Skip to content

@salesforce/b2c-tooling-sdk / schemas / getApiType

Function: getApiType() ​

getApiType(securityScheme?): string

Defined in: packages/b2c-tooling-sdk/src/schemas/security-schemes.ts:33

Maps security scheme to human-readable API type.

This utility processes security schemes from SCAPI schemas (typically found in custom API endpoints) and maps them to user-friendly API type names.

Parameters ​

securityScheme? ​

string

The security scheme from the custom API endpoint

Returns ​

string

Human-readable API type (Admin, Shopper, or the scheme itself)

Example ​

typescript
getApiType('AmOAuth2')      // Returns 'Admin'
getApiType('ShopperToken')  // Returns 'Shopper'
getApiType(undefined)       // Returns '-'

Released under the Apache-2.0 License.