Appearance
Interface: PolicyPacksClient
Policy packs (POST /definitions/import, GET /definitions/export): load a set of rules, rule sets, workflows, collection flows and lists into the tenant, or read the published versions back as one. See docs/integrate/policies.md.
Properties
export
ts
export: (keys, options?) => Promise<{
definitions: {
collectionFlows: object[];
lists: object[];
rules: object[];
ruleSets: object[];
workflows: object[];
};
description?: string;
name: string;
version: string;
}>;The published versions of keys as a pack (definitions:read; lists need lists:read).
Parameters
keys
readonly PolicyPackKeyLike[]
options?
Returns
Promise<{ definitions: { collectionFlows: object[]; lists: object[]; rules: object[]; ruleSets: object[]; workflows: object[]; }; description?: string; name: string; version: string; }>
import
ts
import: (pack, options?) => Promise<{
approvalRequired: boolean;
definitions: object[];
lists: object[];
name: string;
publish: boolean;
version: string;
}>;Validates every item first and creates one draft version per definition (definitions:write).
Parameters
pack
definitions
{ collectionFlows?: object[]; lists?: object[]; rules?: object[]; ruleSets?: object[]; workflows?: object[]; }
definitions.collectionFlows?
object[]
definitions.lists?
object[]
definitions.rules?
object[]
definitions.ruleSets?
object[]
definitions.workflows?
object[]
description?
string
name
string
version
string
options?
Returns
Promise<{ approvalRequired: boolean; definitions: object[]; lists: object[]; name: string; publish: boolean; version: string; }>
importStarter
ts
importStarter: (id, options?) => Promise<{
approvalRequired: boolean;
definitions: object[];
lists: object[];
name: string;
publish: boolean;
version: string;
}>;Imports a starter pack by its id, like import with the pack as the body.
Parameters
id
string
options?
Returns
Promise<{ approvalRequired: boolean; definitions: object[]; lists: object[]; name: string; publish: boolean; version: string; }>
starters
ts
starters: () => Promise<object[]>;The starter packs the deployment ships (definitions:read).
Returns
Promise<object[]>