@naturali/sdk 0.208.6 → 0.208.7

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 CHANGED
@@ -4542,6 +4542,8 @@ var Playbooks = class {
4542
4542
  * Validate a playbook definition
4543
4543
  *
4544
4544
  * 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.
4545
+ *
4546
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
4545
4547
  */
4546
4548
  static validatePlaybook(options) {
4547
4549
  return (options.client ?? client).post({
@@ -4803,6 +4805,8 @@ var Playbooks = class {
4803
4805
  *
4804
4806
  * 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.
4805
4807
  *
4808
+ * 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.
4809
+ *
4806
4810
  * 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`.
4807
4811
  */
4808
4812
  static upgradePlaybookCase(options) {
package/dist/index.d.cts CHANGED
@@ -7374,6 +7374,10 @@ type UpdatePlaybookRequest = {
7374
7374
  expected_version?: ExpectedVersion;
7375
7375
  };
7376
7376
  type ValidatePlaybookRequest = {
7377
+ /**
7378
+ * The playbook the definition would update, so an upstream reading it back is `UPSTREAM_CYCLE`. Requires `project_id`.
7379
+ */
7380
+ playbook_id?: string;
7377
7381
  /**
7378
7382
  * The definition to check
7379
7383
  */
@@ -7382,7 +7386,7 @@ type ValidatePlaybookRequest = {
7382
7386
  type PlaybookValidationResult = {
7383
7387
  valid: boolean;
7384
7388
  /**
7385
- * 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 `CYCLE`. The same items a refused write lists under `meta.problems`.
7389
+ * 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` or `UPSTREAM_CYCLE`. The same items a refused write lists under `meta.problems`.
7386
7390
  */
7387
7391
  problems: Array<ValidationProblem>;
7388
7392
  };
@@ -7512,7 +7516,7 @@ type PlaybookCaseSummary = {
7512
7516
  updated_at?: Date;
7513
7517
  };
7514
7518
  /**
7515
- * 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. Fixed at create; empty when the playbook declares none.
7519
+ * 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.
7516
7520
  */
7517
7521
  type PlaybookCaseUpstreams = {
7518
7522
  [key: string]: string;
@@ -7739,6 +7743,10 @@ type UpgradePlaybookCaseRequest = {
7739
7743
  * The version to move the case to; the playbook's current one when omitted
7740
7744
  */
7741
7745
  version?: number;
7746
+ /**
7747
+ * 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.
7748
+ */
7749
+ upstreams?: PlaybookCaseUpstreams;
7742
7750
  /**
7743
7751
  * Answer once every execution the write queued, and every one those queue in turn, has settled or parked, instead of right away
7744
7752
  */
@@ -22861,13 +22869,21 @@ type ValidatePlaybookData = {
22861
22869
  };
22862
22870
  type ValidatePlaybookErrors = {
22863
22871
  /**
22864
- * Bad request — the definition's shape cannot be read
22872
+ * Bad request — the definition's shape cannot be read, or `playbook_id` is given without `project_id`
22865
22873
  */
22866
22874
  400: unknown;
22867
22875
  /**
22868
22876
  * Unauthorized
22869
22877
  */
22870
22878
  401: unknown;
22879
+ /**
22880
+ * Forbidden
22881
+ */
22882
+ 403: unknown;
22883
+ /**
22884
+ * `playbook_id` names no playbook of the project
22885
+ */
22886
+ 404: unknown;
22871
22887
  };
22872
22888
  type ValidatePlaybookResponses = {
22873
22889
  /**
@@ -23786,7 +23802,7 @@ type UpgradePlaybookCaseData = {
23786
23802
  };
23787
23803
  type UpgradePlaybookCaseErrors = {
23788
23804
  /**
23789
- * Bad request — a version the playbook does not have
23805
+ * 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
23790
23806
  */
23791
23807
  400: unknown;
23792
23808
  /**
@@ -30596,6 +30612,8 @@ export declare class Playbooks {
30596
30612
  * Validate a playbook definition
30597
30613
  *
30598
30614
  * 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.
30615
+ *
30616
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
30599
30617
  */
30600
30618
  static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
30601
30619
  /**
@@ -30729,6 +30747,8 @@ export declare class Playbooks {
30729
30747
  *
30730
30748
  * 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.
30731
30749
  *
30750
+ * 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.
30751
+ *
30732
30752
  * 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`.
30733
30753
  */
30734
30754
  static upgradePlaybookCase<ThrowOnError extends boolean = false>(options: Options<UpgradePlaybookCaseData, ThrowOnError>): RequestResult<UpgradePlaybookCaseResponses, UpgradePlaybookCaseErrors, ThrowOnError>;
package/dist/index.d.mts CHANGED
@@ -7374,6 +7374,10 @@ type UpdatePlaybookRequest = {
7374
7374
  expected_version?: ExpectedVersion;
7375
7375
  };
7376
7376
  type ValidatePlaybookRequest = {
7377
+ /**
7378
+ * The playbook the definition would update, so an upstream reading it back is `UPSTREAM_CYCLE`. Requires `project_id`.
7379
+ */
7380
+ playbook_id?: string;
7377
7381
  /**
7378
7382
  * The definition to check
7379
7383
  */
@@ -7382,7 +7386,7 @@ type ValidatePlaybookRequest = {
7382
7386
  type PlaybookValidationResult = {
7383
7387
  valid: boolean;
7384
7388
  /**
7385
- * 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 `CYCLE`. The same items a refused write lists under `meta.problems`.
7389
+ * 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` or `UPSTREAM_CYCLE`. The same items a refused write lists under `meta.problems`.
7386
7390
  */
7387
7391
  problems: Array<ValidationProblem>;
7388
7392
  };
@@ -7512,7 +7516,7 @@ type PlaybookCaseSummary = {
7512
7516
  updated_at?: Date;
7513
7517
  };
7514
7518
  /**
7515
- * 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. Fixed at create; empty when the playbook declares none.
7519
+ * 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.
7516
7520
  */
7517
7521
  type PlaybookCaseUpstreams = {
7518
7522
  [key: string]: string;
@@ -7739,6 +7743,10 @@ type UpgradePlaybookCaseRequest = {
7739
7743
  * The version to move the case to; the playbook's current one when omitted
7740
7744
  */
7741
7745
  version?: number;
7746
+ /**
7747
+ * 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.
7748
+ */
7749
+ upstreams?: PlaybookCaseUpstreams;
7742
7750
  /**
7743
7751
  * Answer once every execution the write queued, and every one those queue in turn, has settled or parked, instead of right away
7744
7752
  */
@@ -22861,13 +22869,21 @@ type ValidatePlaybookData = {
22861
22869
  };
22862
22870
  type ValidatePlaybookErrors = {
22863
22871
  /**
22864
- * Bad request — the definition's shape cannot be read
22872
+ * Bad request — the definition's shape cannot be read, or `playbook_id` is given without `project_id`
22865
22873
  */
22866
22874
  400: unknown;
22867
22875
  /**
22868
22876
  * Unauthorized
22869
22877
  */
22870
22878
  401: unknown;
22879
+ /**
22880
+ * Forbidden
22881
+ */
22882
+ 403: unknown;
22883
+ /**
22884
+ * `playbook_id` names no playbook of the project
22885
+ */
22886
+ 404: unknown;
22871
22887
  };
22872
22888
  type ValidatePlaybookResponses = {
22873
22889
  /**
@@ -23786,7 +23802,7 @@ type UpgradePlaybookCaseData = {
23786
23802
  };
23787
23803
  type UpgradePlaybookCaseErrors = {
23788
23804
  /**
23789
- * Bad request — a version the playbook does not have
23805
+ * 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
23790
23806
  */
23791
23807
  400: unknown;
23792
23808
  /**
@@ -30596,6 +30612,8 @@ export declare class Playbooks {
30596
30612
  * Validate a playbook definition
30597
30613
  *
30598
30614
  * 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.
30615
+ *
30616
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
30599
30617
  */
30600
30618
  static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
30601
30619
  /**
@@ -30729,6 +30747,8 @@ export declare class Playbooks {
30729
30747
  *
30730
30748
  * 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.
30731
30749
  *
30750
+ * 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.
30751
+ *
30732
30752
  * 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`.
30733
30753
  */
30734
30754
  static upgradePlaybookCase<ThrowOnError extends boolean = false>(options: Options<UpgradePlaybookCaseData, ThrowOnError>): RequestResult<UpgradePlaybookCaseResponses, UpgradePlaybookCaseErrors, ThrowOnError>;
package/dist/index.mjs CHANGED
@@ -4541,6 +4541,8 @@ var Playbooks = class {
4541
4541
  * Validate a playbook definition
4542
4542
  *
4543
4543
  * 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.
4544
+ *
4545
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
4544
4546
  */
4545
4547
  static validatePlaybook(options) {
4546
4548
  return (options.client ?? client).post({
@@ -4802,6 +4804,8 @@ var Playbooks = class {
4802
4804
  *
4803
4805
  * 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.
4804
4806
  *
4807
+ * 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.
4808
+ *
4805
4809
  * 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`.
4806
4810
  */
4807
4811
  static upgradePlaybookCase(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.208.6",
3
+ "version": "0.208.7",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.208.6",
41
+ "@naturali/api": "0.208.7",
42
42
  "@ttoss/openapi-codegen": "^0.5.0",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",