---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../modules.md) / project-index

# project-index

A model of a B2C Commerce project's server-side entry points, built from
cartridges on disk using SFRA and SiteGenesis idioms.

The index lists storefront endpoints (`Controller-Action`) with their
accepted methods, HTTPS, login, and CSRF requirements and, for SFRA, the
middleware chain composed along the cartridge path (`server.extend`,
`append`, `prepend`, `replace`). It also lists hook registrations, Custom
API endpoints, and custom job step types. The result is plain JSON, so it
can be cached, sent to tools, or passed to lint rules as settings.

## Example

```typescript
import {buildProjectIndex} from '@salesforce/b2c-tooling-sdk/project-index';

const index = buildProjectIndex({root: '.'});
const addProduct = index.endpoints.find((e) => e.id === 'Cart-AddProduct');
console.log(addProduct?.methods, addProduct?.csrf, addProduct?.chain?.map((m) => m.id));
```

## Interfaces

- [BuildProjectIndexOptions](interfaces/BuildProjectIndexOptions.md)
- [CartridgeOrder](interfaces/CartridgeOrder.md)
- [CustomApiGroup](interfaces/CustomApiGroup.md)
- [EndpointSummary](interfaces/EndpointSummary.md)
- [EndpointSummaryFilter](interfaces/EndpointSummaryFilter.md)
- [HookCaller](interfaces/HookCaller.md)
- [HookChain](interfaces/HookChain.md)
- [IndexedCartridge](interfaces/IndexedCartridge.md)
- [IndexedCustomApiEndpoint](interfaces/IndexedCustomApiEndpoint.md)
- [IndexedEndpoint](interfaces/IndexedEndpoint.md)
- [IndexedHook](interfaces/IndexedHook.md)
- [IndexedJobStep](interfaces/IndexedJobStep.md)
- [IndexedJobStepParameter](interfaces/IndexedJobStepParameter.md)
- [IndexedMiddleware](interfaces/IndexedMiddleware.md)
- [ProjectIndex](interfaces/ProjectIndex.md)
- [RouteEventListener](interfaces/RouteEventListener.md)
- [RouteStep](interfaces/RouteStep.md)

## Type Aliases

- [EndpointKind](type-aliases/EndpointKind.md)
- [EndpointMethod](type-aliases/EndpointMethod.md)
- [ReturnBehavior](type-aliases/ReturnBehavior.md)

## Variables

- [HOOK\_SEMANTICS](variables/HOOK_SEMANTICS.md)

## Functions

- [acceptsFormPosts](functions/acceptsFormPosts.md)
- [buildProjectIndex](functions/buildProjectIndex.md)
- [controllerEndpoints](functions/controllerEndpoints.md)
- [customApiGroups](functions/customApiGroups.md)
- [droppedSecurityMiddleware](functions/droppedSecurityMiddleware.md)
- [endpointIssues](functions/endpointIssues.md)
- [endpointSummaries](functions/endpointSummaries.md)
- [hookChains](functions/hookChains.md)
- [hookRegistrationIssue](functions/hookRegistrationIssue.md)
- [isApiHook](functions/isApiHook.md)
- [middlewareLabel](functions/middlewareLabel.md)
- [securityRole](functions/securityRole.md)
