BackstageClient.flows
BackstageClient.flows in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / flows
flows: {
get: (key: string, requestOptions?: RequestOptions) => Promise<{
definitions: {
automations: {
action: string;
description: string;
key: string;
on: | {
enter: string;
}
| {
leave: string;
}
| {
transition: string;
};
}[];
events: string[];
hookPoints: string[];
initial: string;
key: string;
label: string;
objectType: string;
states: {
category: "cancelled" | "closed" | "active" | "draft" | "pending" | "rejected";
description: string;
key: string;
label: string;
systemStatus: string;
terminal: boolean;
}[];
transitions: {
by: | {
description: string;
system: true;
via: ... | ... | ... | ...;
}
| {
description: string;
operations: ...[];
permission: string;
}
| {
actor: ... | ... | ...;
description: string;
operations: ...[];
}
| {
anyOf: ...[];
};
emits: string[];
from: string[];
guards: {
conditions: {
description: ...;
key: ...;
}[];
requiresFields: string[];
};
key: string;
label: string;
to: string;
}[];
version: number;
}[];
description: string;
key: string;
kind: "platform" | "template";
label: string;
quirks: {
description: string;
key: string;
}[];
related: string[];
settings: {
description: string;
key: string;
setIn: string;
}[];
steps: {
description: string;
key: string;
label: string;
operations: string[];
runsOn: "workflow" | "request" | "consumer";
transitions: string[];
}[];
summary: string;
version: number;
}>;
list: (requestOptions?: RequestOptions) => Promise<{
key: string;
kind: "platform" | "template";
label: string;
objectTypes: string[];
summary: string;
version: number;
}[]>;
};Defined in: client.ts:11634
Flows methods
get()#
get: (key: string, requestOptions?: RequestOptions) => Promise<{
definitions: {
automations: {
action: string;
description: string;
key: string;
on: | {
enter: string;
}
| {
leave: string;
}
| {
transition: string;
};
}[];
events: string[];
hookPoints: string[];
initial: string;
key: string;
label: string;
objectType: string;
states: {
category: "cancelled" | "closed" | "active" | "draft" | "pending" | "rejected";
description: string;
key: string;
label: string;
systemStatus: string;
terminal: boolean;
}[];
transitions: {
by: | {
description: string;
system: true;
via: ... | ... | ... | ...;
}
| {
description: string;
operations: ...[];
permission: string;
}
| {
actor: ... | ... | ...;
description: string;
operations: ...[];
}
| {
anyOf: ...[];
};
emits: string[];
from: string[];
guards: {
conditions: {
description: ...;
key: ...;
}[];
requiresFields: string[];
};
key: string;
label: string;
to: string;
}[];
version: number;
}[];
description: string;
key: string;
kind: "platform" | "template";
label: string;
quirks: {
description: string;
key: string;
}[];
related: string[];
settings: {
description: string;
key: string;
setIn: string;
}[];
steps: {
description: string;
key: string;
label: string;
operations: string[];
runsOn: "workflow" | "request" | "consumer";
transitions: string[];
}[];
summary: string;
version: number;
}>;Get a flow One flow in full: a definition per record it moves (states with their categories, transitions with who takes each and the guards checked first, automations, the webhook events it leads to), its steps in the order a caller meets them, the settings that change it, and quirks: what the code does today that a reader should know. It describes what the code does and is held to it by a test. 404 FLOW_NOT_FOUND for an unknown key.
Parameters#
| Parameter | Type |
|---|---|
key | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
definitions: {
automations: {
action: string;
description: string;
key: string;
on: | {
enter: string;
}
| {
leave: string;
}
| {
transition: string;
};
}[];
events: string[];
hookPoints: string[];
initial: string;
key: string;
label: string;
objectType: string;
states: {
category: "cancelled" | "closed" | "active" | "draft" | "pending" | "rejected";
description: string;
key: string;
label: string;
systemStatus: string;
terminal: boolean;
}[];
transitions: {
by: | {
description: string;
system: true;
via: ... | ... | ... | ...;
}
| {
description: string;
operations: ...[];
permission: string;
}
| {
actor: ... | ... | ...;
description: string;
operations: ...[];
}
| {
anyOf: ...[];
};
emits: string[];
from: string[];
guards: {
conditions: {
description: ...;
key: ...;
}[];
requiresFields: string[];
};
key: string;
label: string;
to: string;
}[];
version: number;
}[];
description: string;
key: string;
kind: "platform" | "template";
label: string;
quirks: {
description: string;
key: string;
}[];
related: string[];
settings: {
description: string;
key: string;
setIn: string;
}[];
steps: {
description: string;
key: string;
label: string;
operations: string[];
runsOn: "workflow" | "request" | "consumer";
transitions: string[];
}[];
summary: string;
version: number;
}>
Operation Id#
getFlow
list()#
list: (requestOptions?: RequestOptions) => Promise<{
key: string;
kind: "platform" | "template";
label: string;
objectTypes: string[];
summary: string;
version: number;
}[]>;List flows The platform's flows (checkout, ticket issue, refund), declared as data: their keys, versions and the records each moves. GET /flows/{key} returns one in full. The same for every caller.
Parameters#
| Parameter | Type |
|---|---|
requestOptions? | RequestOptions |
Returns#
Promise<{
key: string;
kind: "platform" | "template";
label: string;
objectTypes: string[];
summary: string;
version: number;
}[]>
Operation Id#
listFlows