Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / clients / SlasClient

Type Alias: SlasClient

SlasClient = Client<paths>

Defined in: packages/b2c-tooling-sdk/src/clients/slas-admin.ts:59

The typed SLAS client - this is the openapi-fetch Client with full type safety.

Common Endpoints

MethodPathDescription
GET/tenants/{tenantId}Get tenant info
GET/tenants/{tenantId}/clientsList SLAS clients
PUT/tenants/{tenantId}/clients/{clientId}Create/update a client
DELETE/tenants/{tenantId}/clients/{clientId}Delete a client

Example

typescript
import { createSlasClient } from '@salesforce/b2c-tooling-sdk/clients';
import { OAuthStrategy } from '@salesforce/b2c-tooling-sdk/auth';

const auth = new OAuthStrategy({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
});

const client = createSlasClient({ shortCode: 'kv7kzm78' }, auth);

// List all SLAS clients for a tenant
const { data, error } = await client.GET('/tenants/{tenantId}/clients', {
  params: { path: { tenantId: 'your-tenant' } }
});

See

Released under the Apache-2.0 License.