@salesforce/b2c-tooling-sdk / clients / createAccountManagerRolesClient
Function: createAccountManagerRolesClient()
createAccountManagerRolesClient(
config,auth):AccountManagerRolesClient
Defined in: packages/b2c-tooling-sdk/src/clients/am-api.ts:515
Creates a typed Account Manager Roles API client.
Returns the openapi-fetch client directly, with authentication handled via middleware. This gives full access to all openapi-fetch features with type-safe paths, parameters, and responses.
Parameters
config
Account Manager Roles client configuration
auth
Authentication strategy (typically OAuth)
Returns
Typed openapi-fetch client
Example
ts
// Create Account Manager Roles client with OAuth auth
const oauthStrategy = new OAuthStrategy({
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
});
const client = createAccountManagerRolesClient({}, oauthStrategy);
// List roles
const { data, error } = await client.GET('/dw/rest/v1/roles', {
params: { query: { pageable: { size: 25, page: 0 } } }
});