@scenario-labs/sdk 2.2.1 → 2.4.0-alpha.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.
Files changed (163) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts.map +1 -1
  4. package/client.js +9 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs +9 -1
  7. package/client.mjs.map +1 -1
  8. package/index.d.mts +1 -0
  9. package/index.d.mts.map +1 -1
  10. package/index.d.ts +1 -0
  11. package/index.d.ts.map +1 -1
  12. package/index.js +3 -1
  13. package/index.js.map +1 -1
  14. package/index.mjs +1 -0
  15. package/index.mjs.map +1 -1
  16. package/lib/auth-refresh.d.mts +52 -0
  17. package/lib/auth-refresh.d.mts.map +1 -0
  18. package/lib/auth-refresh.d.ts +52 -0
  19. package/lib/auth-refresh.d.ts.map +1 -0
  20. package/lib/auth-refresh.js +81 -0
  21. package/lib/auth-refresh.js.map +1 -0
  22. package/lib/auth-refresh.mjs +78 -0
  23. package/lib/auth-refresh.mjs.map +1 -0
  24. package/lib/generate.js +7 -7
  25. package/lib/generate.js.map +1 -1
  26. package/lib/generate.mjs +7 -7
  27. package/lib/generate.mjs.map +1 -1
  28. package/lib/job.d.mts +15 -3
  29. package/lib/job.d.mts.map +1 -1
  30. package/lib/job.d.ts +15 -3
  31. package/lib/job.d.ts.map +1 -1
  32. package/lib/job.js +22 -8
  33. package/lib/job.js.map +1 -1
  34. package/lib/job.mjs +22 -8
  35. package/lib/job.mjs.map +1 -1
  36. package/lib/models.d.mts +8 -2
  37. package/lib/models.d.mts.map +1 -1
  38. package/lib/models.d.ts +8 -2
  39. package/lib/models.d.ts.map +1 -1
  40. package/lib/models.js +13 -5
  41. package/lib/models.js.map +1 -1
  42. package/lib/models.mjs +13 -5
  43. package/lib/models.mjs.map +1 -1
  44. package/lib/scenario.d.mts +28 -13
  45. package/lib/scenario.d.mts.map +1 -1
  46. package/lib/scenario.d.ts +28 -13
  47. package/lib/scenario.d.ts.map +1 -1
  48. package/lib/scenario.js +31 -12
  49. package/lib/scenario.js.map +1 -1
  50. package/lib/scenario.mjs +31 -12
  51. package/lib/scenario.mjs.map +1 -1
  52. package/lib/scope.d.mts +41 -0
  53. package/lib/scope.d.mts.map +1 -0
  54. package/lib/scope.d.ts +41 -0
  55. package/lib/scope.d.ts.map +1 -0
  56. package/lib/scope.js +55 -0
  57. package/lib/scope.js.map +1 -0
  58. package/lib/scope.mjs +49 -0
  59. package/lib/scope.mjs.map +1 -0
  60. package/lib/upload.d.mts +15 -3
  61. package/lib/upload.d.mts.map +1 -1
  62. package/lib/upload.d.ts +15 -3
  63. package/lib/upload.d.ts.map +1 -1
  64. package/lib/upload.js +29 -12
  65. package/lib/upload.js.map +1 -1
  66. package/lib/upload.mjs +29 -12
  67. package/lib/upload.mjs.map +1 -1
  68. package/lib/workflow.d.mts +8 -2
  69. package/lib/workflow.d.mts.map +1 -1
  70. package/lib/workflow.d.ts +8 -2
  71. package/lib/workflow.d.ts.map +1 -1
  72. package/lib/workflow.js +14 -6
  73. package/lib/workflow.js.map +1 -1
  74. package/lib/workflow.mjs +14 -6
  75. package/lib/workflow.mjs.map +1 -1
  76. package/lib/workflow_converter.d.mts +8 -2
  77. package/lib/workflow_converter.d.mts.map +1 -1
  78. package/lib/workflow_converter.d.ts +8 -2
  79. package/lib/workflow_converter.d.ts.map +1 -1
  80. package/lib/workflow_converter.js +83 -19
  81. package/lib/workflow_converter.js.map +1 -1
  82. package/lib/workflow_converter.mjs +83 -19
  83. package/lib/workflow_converter.mjs.map +1 -1
  84. package/lib/workflow_import_validator.d.mts +1 -1
  85. package/lib/workflow_import_validator.d.mts.map +1 -1
  86. package/lib/workflow_import_validator.d.ts +1 -1
  87. package/lib/workflow_import_validator.d.ts.map +1 -1
  88. package/lib/workflow_import_validator.js +1 -0
  89. package/lib/workflow_import_validator.js.map +1 -1
  90. package/lib/workflow_import_validator.mjs +1 -0
  91. package/lib/workflow_import_validator.mjs.map +1 -1
  92. package/package.json +9 -3
  93. package/resources/assets/assets.d.mts +1 -1
  94. package/resources/assets/assets.d.mts.map +1 -1
  95. package/resources/assets/assets.d.ts +1 -1
  96. package/resources/assets/assets.d.ts.map +1 -1
  97. package/resources/generate.d.mts +594 -10
  98. package/resources/generate.d.mts.map +1 -1
  99. package/resources/generate.d.ts +594 -10
  100. package/resources/generate.d.ts.map +1 -1
  101. package/resources/generate.js +2 -2
  102. package/resources/generate.js.map +1 -1
  103. package/resources/generate.mjs +2 -2
  104. package/resources/generate.mjs.map +1 -1
  105. package/resources/jobs.d.mts +3 -3
  106. package/resources/jobs.d.mts.map +1 -1
  107. package/resources/jobs.d.ts +3 -3
  108. package/resources/jobs.d.ts.map +1 -1
  109. package/resources/models/examples.d.mts +2 -2
  110. package/resources/models/examples.d.mts.map +1 -1
  111. package/resources/models/examples.d.ts +2 -2
  112. package/resources/models/examples.d.ts.map +1 -1
  113. package/resources/models/models.d.mts +126 -7
  114. package/resources/models/models.d.mts.map +1 -1
  115. package/resources/models/models.d.ts +126 -7
  116. package/resources/models/models.d.ts.map +1 -1
  117. package/resources/models/models.js.map +1 -1
  118. package/resources/models/models.mjs.map +1 -1
  119. package/resources/models/train.d.mts +106 -3
  120. package/resources/models/train.d.mts.map +1 -1
  121. package/resources/models/train.d.ts +106 -3
  122. package/resources/models/train.d.ts.map +1 -1
  123. package/resources/usages.d.mts +23 -3
  124. package/resources/usages.d.mts.map +1 -1
  125. package/resources/usages.d.ts +23 -3
  126. package/resources/usages.d.ts.map +1 -1
  127. package/resources/workflows.d.mts +22 -5
  128. package/resources/workflows.d.mts.map +1 -1
  129. package/resources/workflows.d.ts +22 -5
  130. package/resources/workflows.d.ts.map +1 -1
  131. package/resources/workflows.js +4 -1
  132. package/resources/workflows.js.map +1 -1
  133. package/resources/workflows.mjs +4 -1
  134. package/resources/workflows.mjs.map +1 -1
  135. package/src/client.ts +9 -1
  136. package/src/index.ts +1 -0
  137. package/src/lib/auth-refresh.ts +98 -0
  138. package/src/lib/generate.ts +7 -7
  139. package/src/lib/job.ts +29 -7
  140. package/src/lib/models.ts +14 -4
  141. package/src/lib/scenario.ts +51 -13
  142. package/src/lib/scope.ts +68 -0
  143. package/src/lib/upload.ts +36 -11
  144. package/src/lib/workflow.ts +15 -5
  145. package/src/lib/workflow_converter.ts +128 -19
  146. package/src/lib/workflow_import_validator.ts +3 -1
  147. package/src/resources/assets/assets.ts +1 -1
  148. package/src/resources/generate.ts +713 -12
  149. package/src/resources/jobs.ts +3 -3
  150. package/src/resources/models/examples.ts +2 -2
  151. package/src/resources/models/models.ts +189 -7
  152. package/src/resources/models/train.ts +138 -3
  153. package/src/resources/usages.ts +27 -1
  154. package/src/resources/workflows.ts +24 -5
  155. package/src/version.ts +1 -1
  156. package/version.d.mts +1 -1
  157. package/version.d.mts.map +1 -1
  158. package/version.d.ts +1 -1
  159. package/version.d.ts.map +1 -1
  160. package/version.js +1 -1
  161. package/version.js.map +1 -1
  162. package/version.mjs +1 -1
  163. package/version.mjs.map +1 -1
@@ -85,7 +85,10 @@ export class Workflows extends APIResource {
85
85
  }
86
86
 
87
87
  /**
88
- * Approve a user approval node in a workflow
88
+ * Respond to a user-approval node in a workflow. Pass action="approve" (default)
89
+ * to advance the workflow, or action="reject" to mark the node Rejected. A
90
+ * rejected stand-alone node cancels the workflow; a rejected ForEach iteration
91
+ * cascades to the surrounding loop.
89
92
  */
90
93
  userApproval(
91
94
  workflowID: string,
@@ -5580,7 +5583,7 @@ export namespace WorkflowRunResponse {
5580
5583
  /**
5581
5584
  * The status of the node. Only available for WorkflowJob nodes.
5582
5585
  */
5583
- status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
5586
+ status: 'failure' | 'pending' | 'processing' | 'rejected' | 'skipped' | 'success';
5584
5587
 
5585
5588
  /**
5586
5589
  * The type of the job for the node.
@@ -7866,7 +7869,7 @@ export namespace WorkflowUserApprovalResponse {
7866
7869
  /**
7867
7870
  * The status of the node. Only available for WorkflowJob nodes.
7868
7871
  */
7869
- status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
7872
+ status: 'failure' | 'pending' | 'processing' | 'rejected' | 'skipped' | 'success';
7870
7873
 
7871
7874
  /**
7872
7875
  * The type of the job for the node.
@@ -9788,7 +9791,7 @@ export interface WorkflowListParams extends WorkflowsCursorParams {
9788
9791
 
9789
9792
  export interface WorkflowApproveUserParams {
9790
9793
  /**
9791
- * The ID of the user approval node to approve in the workflow
9794
+ * The ID of the user approval node to act on in the workflow
9792
9795
  */
9793
9796
  nodeId: string;
9794
9797
 
@@ -9796,6 +9799,14 @@ export interface WorkflowApproveUserParams {
9796
9799
  * The ID of the workflow job that contains the user approval node
9797
9800
  */
9798
9801
  workflowJobId: string;
9802
+
9803
+ /**
9804
+ * Decision taken on the approval node. "approve" marks it Success and advances the
9805
+ * workflow; "reject" marks it Rejected and either cancels the workflow or — if the
9806
+ * node is inside a ForEach iteration — cascades to the loop. Defaults to "approve"
9807
+ * for backward compatibility.
9808
+ */
9809
+ action?: 'approve' | 'reject';
9799
9810
  }
9800
9811
 
9801
9812
  export interface WorkflowGetTagsParams {
@@ -9817,7 +9828,7 @@ export interface WorkflowRunParams {
9817
9828
 
9818
9829
  export interface WorkflowUserApprovalParams {
9819
9830
  /**
9820
- * The ID of the user approval node to approve in the workflow
9831
+ * The ID of the user approval node to act on in the workflow
9821
9832
  */
9822
9833
  nodeId: string;
9823
9834
 
@@ -9825,6 +9836,14 @@ export interface WorkflowUserApprovalParams {
9825
9836
  * The ID of the workflow job that contains the user approval node
9826
9837
  */
9827
9838
  workflowJobId: string;
9839
+
9840
+ /**
9841
+ * Decision taken on the approval node. "approve" marks it Success and advances the
9842
+ * workflow; "reject" marks it Rejected and either cancels the workflow or — if the
9843
+ * node is inside a ForEach iteration — cascades to the loop. Defaults to "approve"
9844
+ * for backward compatibility.
9845
+ */
9846
+ action?: 'approve' | 'reject';
9828
9847
  }
9829
9848
 
9830
9849
  export declare namespace Workflows {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.2.1'; // x-release-please-version
1
+ export const VERSION = '2.4.0-alpha.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.2.1";
1
+ export declare const VERSION = "2.4.0-alpha.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.2.1";
1
+ export declare const VERSION = "2.4.0-alpha.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.2.1'; // x-release-please-version
4
+ exports.VERSION = '2.4.0-alpha.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,eAAe,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.2.1'; // x-release-please-version
1
+ export const VERSION = '2.4.0-alpha.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,CAAC,2BAA2B"}