@salesforce/b2c-tooling-sdk / scapi / ScapiLiveSchemaCache
Class: ScapiLiveSchemaCache
Defined in: packages/b2c-tooling-sdk/src/scapi/live.ts:123
Per-tenant cache of contracts from the SCAPI Schemas API, including tenant custom properties and custom APIs. Discovery loads it; execution reuses whatever it holds.
Constructors
Constructor
new ScapiLiveSchemaCache(
options):ScapiLiveSchemaCache
Defined in: packages/b2c-tooling-sdk/src/scapi/live.ts:129
Parameters
options
ScapiLiveSchemaCacheOptions = {}
Returns
ScapiLiveSchemaCache
Methods
get()
get(
tenant):ScapiSchemaDocument[]
Defined in: packages/b2c-tooling-sdk/src/scapi/live.ts:135
All cached live contracts for a tenant, regardless of age. Never fetches.
Parameters
tenant
string
Returns
load()
load(
tenant,client,organizationId,options):Promise<ScapiLiveSchemaLoadResult>
Defined in: packages/b2c-tooling-sdk/src/scapi/live.ts:140
Fetch the tenant's listing and missing or expired contracts, then return the selected set.
Parameters
tenant
string
client
organizationId
string
options
ScapiLiveSchemaLoadOptions = {}
Returns
Promise<ScapiLiveSchemaLoadResult>
put()
put(
tenant,document):void
Defined in: packages/b2c-tooling-sdk/src/scapi/live.ts:204
Record a contract fetched elsewhere (for example by scapi_schemas_list or inside an execution).
Parameters
tenant
string
document
Returns
void