@soat/sdk 0.92.2 → 0.93.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -2
- package/dist/index.d.cts +30 -6
- package/dist/index.d.mts +30 -6
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3703,7 +3703,7 @@ var Playbooks = class {
|
|
|
3703
3703
|
*
|
|
3704
3704
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
3705
3705
|
*
|
|
3706
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
3706
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
3707
3707
|
*/
|
|
3708
3708
|
static createPlaybook(options) {
|
|
3709
3709
|
return (options.client ?? client).post({
|
|
@@ -3719,6 +3719,8 @@ var Playbooks = class {
|
|
|
3719
3719
|
* Validate a playbook definition
|
|
3720
3720
|
*
|
|
3721
3721
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
3722
|
+
*
|
|
3723
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
3722
3724
|
*/
|
|
3723
3725
|
static validatePlaybook(options) {
|
|
3724
3726
|
return (options.client ?? client).post({
|
|
@@ -3757,7 +3759,7 @@ var Playbooks = class {
|
|
|
3757
3759
|
*
|
|
3758
3760
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
3759
3761
|
*
|
|
3760
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
3762
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
3761
3763
|
*/
|
|
3762
3764
|
static updatePlaybook(options) {
|
|
3763
3765
|
return (options.client ?? client).patch({
|
|
@@ -3980,6 +3982,8 @@ var Playbooks = class {
|
|
|
3980
3982
|
*
|
|
3981
3983
|
* Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node ID, and every node's state is read against the new version: a node added is open, a node removed leaves the structure while its entries stay, a node whose input reads another field is `stale`, and a value its input's new schema refuses is missing again. The cascade then runs what became runnable. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. Each upgrade is recorded with what moved; the version the case is already on records nothing.
|
|
3982
3984
|
*
|
|
3985
|
+
* The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
|
|
3986
|
+
*
|
|
3983
3987
|
* An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work, or that of a case reading it as an upstream, runs as is `403 PLAYBOOK_SELF_WRITE`.
|
|
3984
3988
|
*/
|
|
3985
3989
|
static upgradePlaybookCase(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -6304,6 +6304,14 @@ type UpdatePlaybookRequest = {
|
|
|
6304
6304
|
expected_version?: ExpectedVersion;
|
|
6305
6305
|
};
|
|
6306
6306
|
type ValidatePlaybookRequest = {
|
|
6307
|
+
/**
|
|
6308
|
+
* Also check the references against this project: the upstreams (`UNKNOWN_UPSTREAM`, and the `MISSING_NODE` and `UNKNOWN_FIELD` of what an upstream node pulls) and the executors (`EXECUTOR_NOT_FOUND`).
|
|
6309
|
+
*/
|
|
6310
|
+
project_id?: string;
|
|
6311
|
+
/**
|
|
6312
|
+
* The playbook the definition would update, so an upstream reading it back is `UPSTREAM_CYCLE`. Requires `project_id`.
|
|
6313
|
+
*/
|
|
6314
|
+
playbook_id?: string;
|
|
6307
6315
|
/**
|
|
6308
6316
|
* The definition to check
|
|
6309
6317
|
*/
|
|
@@ -6312,7 +6320,7 @@ type ValidatePlaybookRequest = {
|
|
|
6312
6320
|
type PlaybookValidationResult = {
|
|
6313
6321
|
valid: boolean;
|
|
6314
6322
|
/**
|
|
6315
|
-
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION` or `
|
|
6323
|
+
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM`, `UPSTREAM_CYCLE` or `EXECUTOR_NOT_FOUND`. The same items a refused write lists under `meta.problems`.
|
|
6316
6324
|
*/
|
|
6317
6325
|
problems: Array<ValidationProblem>;
|
|
6318
6326
|
};
|
|
@@ -6442,7 +6450,7 @@ type PlaybookCaseSummary = {
|
|
|
6442
6450
|
updated_at?: Date;
|
|
6443
6451
|
};
|
|
6444
6452
|
/**
|
|
6445
|
-
* The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook.
|
|
6453
|
+
* The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook. Bound at create and fitted to the version at each upgrade; empty when the version declares none.
|
|
6446
6454
|
*/
|
|
6447
6455
|
type PlaybookCaseUpstreams = {
|
|
6448
6456
|
[key: string]: string;
|
|
@@ -6669,6 +6677,10 @@ type UpgradePlaybookCaseRequest = {
|
|
|
6669
6677
|
* The version to move the case to; the playbook's current one when omitted
|
|
6670
6678
|
*/
|
|
6671
6679
|
version?: number;
|
|
6680
|
+
/**
|
|
6681
|
+
* A case for each upstream the target version declares and the case does not bind yet, by name, checked as at create. A binding the target version declares on the same playbook is kept and never named here; every other binding is dropped.
|
|
6682
|
+
*/
|
|
6683
|
+
upstreams?: PlaybookCaseUpstreams;
|
|
6672
6684
|
/**
|
|
6673
6685
|
* Answer once every execution the write queued, and every one those queue in turn, has settled or parked, instead of right away
|
|
6674
6686
|
*/
|
|
@@ -18647,13 +18659,21 @@ type ValidatePlaybookData = {
|
|
|
18647
18659
|
};
|
|
18648
18660
|
type ValidatePlaybookErrors = {
|
|
18649
18661
|
/**
|
|
18650
|
-
* Bad request — the definition's shape cannot be read
|
|
18662
|
+
* Bad request — the definition's shape cannot be read, or `playbook_id` is given without `project_id`
|
|
18651
18663
|
*/
|
|
18652
18664
|
400: unknown;
|
|
18653
18665
|
/**
|
|
18654
18666
|
* Unauthorized
|
|
18655
18667
|
*/
|
|
18656
18668
|
401: unknown;
|
|
18669
|
+
/**
|
|
18670
|
+
* Forbidden
|
|
18671
|
+
*/
|
|
18672
|
+
403: unknown;
|
|
18673
|
+
/**
|
|
18674
|
+
* `playbook_id` names no playbook of the project
|
|
18675
|
+
*/
|
|
18676
|
+
404: unknown;
|
|
18657
18677
|
};
|
|
18658
18678
|
type ValidatePlaybookResponses = {
|
|
18659
18679
|
/**
|
|
@@ -19495,7 +19515,7 @@ type UpgradePlaybookCaseData = {
|
|
|
19495
19515
|
};
|
|
19496
19516
|
type UpgradePlaybookCaseErrors = {
|
|
19497
19517
|
/**
|
|
19498
|
-
* Bad request — a version the playbook does not have
|
|
19518
|
+
* Bad request — a version the playbook does not have, or `PLAYBOOK_CASE_UPSTREAM_INVALID`: an upstream the target version declares left unbound, a name it does not declare or the case already binds, or a case that cannot be bound
|
|
19499
19519
|
*/
|
|
19500
19520
|
400: unknown;
|
|
19501
19521
|
/**
|
|
@@ -25862,13 +25882,15 @@ export declare class Playbooks {
|
|
|
25862
25882
|
*
|
|
25863
25883
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
25864
25884
|
*
|
|
25865
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
25885
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
25866
25886
|
*/
|
|
25867
25887
|
static createPlaybook<ThrowOnError extends boolean = false>(options: Options<CreatePlaybookData, ThrowOnError>): RequestResult<CreatePlaybookResponses, CreatePlaybookErrors, ThrowOnError>;
|
|
25868
25888
|
/**
|
|
25869
25889
|
* Validate a playbook definition
|
|
25870
25890
|
*
|
|
25871
25891
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
25892
|
+
*
|
|
25893
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
25872
25894
|
*/
|
|
25873
25895
|
static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
|
|
25874
25896
|
/**
|
|
@@ -25888,7 +25910,7 @@ export declare class Playbooks {
|
|
|
25888
25910
|
*
|
|
25889
25911
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
25890
25912
|
*
|
|
25891
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
25913
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
25892
25914
|
*/
|
|
25893
25915
|
static updatePlaybook<ThrowOnError extends boolean = false>(options: Options<UpdatePlaybookData, ThrowOnError>): RequestResult<UpdatePlaybookResponses, UpdatePlaybookErrors, ThrowOnError>;
|
|
25894
25916
|
/**
|
|
@@ -26002,6 +26024,8 @@ export declare class Playbooks {
|
|
|
26002
26024
|
*
|
|
26003
26025
|
* Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node ID, and every node's state is read against the new version: a node added is open, a node removed leaves the structure while its entries stay, a node whose input reads another field is `stale`, and a value its input's new schema refuses is missing again. The cascade then runs what became runnable. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. Each upgrade is recorded with what moved; the version the case is already on records nothing.
|
|
26004
26026
|
*
|
|
26027
|
+
* The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
|
|
26028
|
+
*
|
|
26005
26029
|
* An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work, or that of a case reading it as an upstream, runs as is `403 PLAYBOOK_SELF_WRITE`.
|
|
26006
26030
|
*/
|
|
26007
26031
|
static upgradePlaybookCase<ThrowOnError extends boolean = false>(options: Options<UpgradePlaybookCaseData, ThrowOnError>): RequestResult<UpgradePlaybookCaseResponses, UpgradePlaybookCaseErrors, ThrowOnError>;
|
package/dist/index.d.mts
CHANGED
|
@@ -6304,6 +6304,14 @@ type UpdatePlaybookRequest = {
|
|
|
6304
6304
|
expected_version?: ExpectedVersion;
|
|
6305
6305
|
};
|
|
6306
6306
|
type ValidatePlaybookRequest = {
|
|
6307
|
+
/**
|
|
6308
|
+
* Also check the references against this project: the upstreams (`UNKNOWN_UPSTREAM`, and the `MISSING_NODE` and `UNKNOWN_FIELD` of what an upstream node pulls) and the executors (`EXECUTOR_NOT_FOUND`).
|
|
6309
|
+
*/
|
|
6310
|
+
project_id?: string;
|
|
6311
|
+
/**
|
|
6312
|
+
* The playbook the definition would update, so an upstream reading it back is `UPSTREAM_CYCLE`. Requires `project_id`.
|
|
6313
|
+
*/
|
|
6314
|
+
playbook_id?: string;
|
|
6307
6315
|
/**
|
|
6308
6316
|
* The definition to check
|
|
6309
6317
|
*/
|
|
@@ -6312,7 +6320,7 @@ type ValidatePlaybookRequest = {
|
|
|
6312
6320
|
type PlaybookValidationResult = {
|
|
6313
6321
|
valid: boolean;
|
|
6314
6322
|
/**
|
|
6315
|
-
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION` or `
|
|
6323
|
+
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM`, `UPSTREAM_CYCLE` or `EXECUTOR_NOT_FOUND`. The same items a refused write lists under `meta.problems`.
|
|
6316
6324
|
*/
|
|
6317
6325
|
problems: Array<ValidationProblem>;
|
|
6318
6326
|
};
|
|
@@ -6442,7 +6450,7 @@ type PlaybookCaseSummary = {
|
|
|
6442
6450
|
updated_at?: Date;
|
|
6443
6451
|
};
|
|
6444
6452
|
/**
|
|
6445
|
-
* The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook.
|
|
6453
|
+
* The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook. Bound at create and fitted to the version at each upgrade; empty when the version declares none.
|
|
6446
6454
|
*/
|
|
6447
6455
|
type PlaybookCaseUpstreams = {
|
|
6448
6456
|
[key: string]: string;
|
|
@@ -6669,6 +6677,10 @@ type UpgradePlaybookCaseRequest = {
|
|
|
6669
6677
|
* The version to move the case to; the playbook's current one when omitted
|
|
6670
6678
|
*/
|
|
6671
6679
|
version?: number;
|
|
6680
|
+
/**
|
|
6681
|
+
* A case for each upstream the target version declares and the case does not bind yet, by name, checked as at create. A binding the target version declares on the same playbook is kept and never named here; every other binding is dropped.
|
|
6682
|
+
*/
|
|
6683
|
+
upstreams?: PlaybookCaseUpstreams;
|
|
6672
6684
|
/**
|
|
6673
6685
|
* Answer once every execution the write queued, and every one those queue in turn, has settled or parked, instead of right away
|
|
6674
6686
|
*/
|
|
@@ -18647,13 +18659,21 @@ type ValidatePlaybookData = {
|
|
|
18647
18659
|
};
|
|
18648
18660
|
type ValidatePlaybookErrors = {
|
|
18649
18661
|
/**
|
|
18650
|
-
* Bad request — the definition's shape cannot be read
|
|
18662
|
+
* Bad request — the definition's shape cannot be read, or `playbook_id` is given without `project_id`
|
|
18651
18663
|
*/
|
|
18652
18664
|
400: unknown;
|
|
18653
18665
|
/**
|
|
18654
18666
|
* Unauthorized
|
|
18655
18667
|
*/
|
|
18656
18668
|
401: unknown;
|
|
18669
|
+
/**
|
|
18670
|
+
* Forbidden
|
|
18671
|
+
*/
|
|
18672
|
+
403: unknown;
|
|
18673
|
+
/**
|
|
18674
|
+
* `playbook_id` names no playbook of the project
|
|
18675
|
+
*/
|
|
18676
|
+
404: unknown;
|
|
18657
18677
|
};
|
|
18658
18678
|
type ValidatePlaybookResponses = {
|
|
18659
18679
|
/**
|
|
@@ -19495,7 +19515,7 @@ type UpgradePlaybookCaseData = {
|
|
|
19495
19515
|
};
|
|
19496
19516
|
type UpgradePlaybookCaseErrors = {
|
|
19497
19517
|
/**
|
|
19498
|
-
* Bad request — a version the playbook does not have
|
|
19518
|
+
* Bad request — a version the playbook does not have, or `PLAYBOOK_CASE_UPSTREAM_INVALID`: an upstream the target version declares left unbound, a name it does not declare or the case already binds, or a case that cannot be bound
|
|
19499
19519
|
*/
|
|
19500
19520
|
400: unknown;
|
|
19501
19521
|
/**
|
|
@@ -25862,13 +25882,15 @@ export declare class Playbooks {
|
|
|
25862
25882
|
*
|
|
25863
25883
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
25864
25884
|
*
|
|
25865
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
25885
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
25866
25886
|
*/
|
|
25867
25887
|
static createPlaybook<ThrowOnError extends boolean = false>(options: Options<CreatePlaybookData, ThrowOnError>): RequestResult<CreatePlaybookResponses, CreatePlaybookErrors, ThrowOnError>;
|
|
25868
25888
|
/**
|
|
25869
25889
|
* Validate a playbook definition
|
|
25870
25890
|
*
|
|
25871
25891
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
25892
|
+
*
|
|
25893
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
25872
25894
|
*/
|
|
25873
25895
|
static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
|
|
25874
25896
|
/**
|
|
@@ -25888,7 +25910,7 @@ export declare class Playbooks {
|
|
|
25888
25910
|
*
|
|
25889
25911
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
25890
25912
|
*
|
|
25891
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
25913
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
25892
25914
|
*/
|
|
25893
25915
|
static updatePlaybook<ThrowOnError extends boolean = false>(options: Options<UpdatePlaybookData, ThrowOnError>): RequestResult<UpdatePlaybookResponses, UpdatePlaybookErrors, ThrowOnError>;
|
|
25894
25916
|
/**
|
|
@@ -26002,6 +26024,8 @@ export declare class Playbooks {
|
|
|
26002
26024
|
*
|
|
26003
26025
|
* Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node ID, and every node's state is read against the new version: a node added is open, a node removed leaves the structure while its entries stay, a node whose input reads another field is `stale`, and a value its input's new schema refuses is missing again. The cascade then runs what became runnable. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. Each upgrade is recorded with what moved; the version the case is already on records nothing.
|
|
26004
26026
|
*
|
|
26027
|
+
* The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
|
|
26028
|
+
*
|
|
26005
26029
|
* An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work, or that of a case reading it as an upstream, runs as is `403 PLAYBOOK_SELF_WRITE`.
|
|
26006
26030
|
*/
|
|
26007
26031
|
static upgradePlaybookCase<ThrowOnError extends boolean = false>(options: Options<UpgradePlaybookCaseData, ThrowOnError>): RequestResult<UpgradePlaybookCaseResponses, UpgradePlaybookCaseErrors, ThrowOnError>;
|
package/dist/index.mjs
CHANGED
|
@@ -3702,7 +3702,7 @@ var Playbooks = class {
|
|
|
3702
3702
|
*
|
|
3703
3703
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
3704
3704
|
*
|
|
3705
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
3705
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
3706
3706
|
*/
|
|
3707
3707
|
static createPlaybook(options) {
|
|
3708
3708
|
return (options.client ?? client).post({
|
|
@@ -3718,6 +3718,8 @@ var Playbooks = class {
|
|
|
3718
3718
|
* Validate a playbook definition
|
|
3719
3719
|
*
|
|
3720
3720
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
3721
|
+
*
|
|
3722
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
3721
3723
|
*/
|
|
3722
3724
|
static validatePlaybook(options) {
|
|
3723
3725
|
return (options.client ?? client).post({
|
|
@@ -3756,7 +3758,7 @@ var Playbooks = class {
|
|
|
3756
3758
|
*
|
|
3757
3759
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
3758
3760
|
*
|
|
3759
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
3761
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
3760
3762
|
*/
|
|
3761
3763
|
static updatePlaybook(options) {
|
|
3762
3764
|
return (options.client ?? client).patch({
|
|
@@ -3979,6 +3981,8 @@ var Playbooks = class {
|
|
|
3979
3981
|
*
|
|
3980
3982
|
* Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node ID, and every node's state is read against the new version: a node added is open, a node removed leaves the structure while its entries stay, a node whose input reads another field is `stale`, and a value its input's new schema refuses is missing again. The cascade then runs what became runnable. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. Each upgrade is recorded with what moved; the version the case is already on records nothing.
|
|
3981
3983
|
*
|
|
3984
|
+
* The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
|
|
3985
|
+
*
|
|
3982
3986
|
* An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work, or that of a case reading it as an upstream, runs as is `403 PLAYBOOK_SELF_WRITE`.
|
|
3983
3987
|
*/
|
|
3984
3988
|
static upgradePlaybookCase(options) {
|