@wral/sdk-template
v0.1.0
Published
A Software Development Kit for working with Studio Templates
Downloads
17
Keywords
Readme
Template SDK
Usage
import templateClient from "@wral/sdk-template/v1";
const client = templateClient({
apiKey: "YOUR_TOKEN",
baseUrl: "https://api.example.com/template",
});
const template = await client.getTemplate({
name: "templateId",
versionPattern: '^2.0.1',
effectiveDate: Date.now(),
});
Client API
api(path, fetchOptions)
- fetch wrapper for API requestsgetTemplate({ name, versionPattern='latest', effectiveDate=Date.now() })
- get templatelistTemplates(queryParams)
- list templateslistTemplateVersions(name, queryParms)
- list template versionspublishTemplate({ name, version, body })
- publish a new version of a templateunpublishTemplate({ name, version })
- unpublish a template