sim 2.2.24-preview.279.1 → 2.2.24-preview.281.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.
@@ -4849,6 +4849,7 @@ type GetMetaResponseRef0 = {
4849
4849
  v2Enabled: boolean;
4850
4850
  keyType: 'personal' | 'workspace' | 'oauth_access_token';
4851
4851
  expiresAt: string | null;
4852
+ scopes: Array<'api:read' | 'api:write' | 'search:read'>;
4852
4853
  };
4853
4854
  export type GetMetaResponse = {
4854
4855
  data: GetMetaResponseRef0;
@@ -8052,6 +8053,29 @@ export type ListWorkflowsResponse = {
8052
8053
  data: Array<ListWorkflowsResponseRef0>;
8053
8054
  nextCursor: string | null;
8054
8055
  };
8056
+ /** `GET /api/v2/workflows/[workflowId]/triggers` */
8057
+ export type ListWorkflowTriggersParams = {
8058
+ workflowId: string;
8059
+ };
8060
+ export type ListWorkflowTriggersQuery = Record<string, unknown>;
8061
+ type ListWorkflowTriggersResponseRef0 = {
8062
+ blockId: string;
8063
+ kind: 'schedule' | 'polling' | 'event' | 'webhook';
8064
+ provider: string | null;
8065
+ enabled: boolean;
8066
+ status: 'active' | 'disabled' | 'completed';
8067
+ failedCount: number;
8068
+ lastFailedAt: string | null;
8069
+ nextRunAt: string | null;
8070
+ lastRanAt: string | null;
8071
+ cronExpression: string | null;
8072
+ timezone: string | null;
8073
+ url: string | null;
8074
+ };
8075
+ export type ListWorkflowTriggersResponse = {
8076
+ data: Array<ListWorkflowTriggersResponseRef0>;
8077
+ nextCursor: string | null;
8078
+ };
8055
8079
  /** `GET /api/v2/workflows/[workflowId]/versions` */
8056
8080
  export type ListWorkflowVersionsParams = {
8057
8081
  workflowId: string;
@@ -11610,6 +11634,32 @@ type UpdateWorkflowPublicApiResponseRef0 = {
11610
11634
  export type UpdateWorkflowPublicApiResponse = {
11611
11635
  data: UpdateWorkflowPublicApiResponseRef0;
11612
11636
  };
11637
+ /** `PATCH /api/v2/workflows/[workflowId]/triggers/[blockId]` */
11638
+ export type UpdateWorkflowTriggerParams = {
11639
+ workflowId: string;
11640
+ blockId: string;
11641
+ };
11642
+ export type UpdateWorkflowTriggerQuery = Record<string, unknown>;
11643
+ export type UpdateWorkflowTriggerBody = {
11644
+ enabled: boolean;
11645
+ };
11646
+ type UpdateWorkflowTriggerResponseRef0 = {
11647
+ blockId: string;
11648
+ kind: 'schedule' | 'polling' | 'event' | 'webhook';
11649
+ provider: string | null;
11650
+ enabled: boolean;
11651
+ status: 'active' | 'disabled' | 'completed';
11652
+ failedCount: number;
11653
+ lastFailedAt: string | null;
11654
+ nextRunAt: string | null;
11655
+ lastRanAt: string | null;
11656
+ cronExpression: string | null;
11657
+ timezone: string | null;
11658
+ url: string | null;
11659
+ };
11660
+ export type UpdateWorkflowTriggerResponse = {
11661
+ data: UpdateWorkflowTriggerResponseRef0;
11662
+ };
11613
11663
  /** `PATCH /api/v2/workflows/[workflowId]/versions/[version]` */
11614
11664
  export type UpdateWorkflowVersionParams = {
11615
11665
  version: number;
@@ -18114,6 +18164,16 @@ export declare const V2_OPERATIONS: {
18114
18164
  };
18115
18165
  };
18116
18166
  };
18167
+ readonly listWorkflowTriggers: {
18168
+ readonly method: 'GET';
18169
+ readonly path: '/api/v2/workflows/[workflowId]/triggers';
18170
+ readonly pathParams: readonly ['workflowId'];
18171
+ readonly pathParamDocs: {
18172
+ readonly workflowId: 'Unique workflow identifier.';
18173
+ };
18174
+ readonly responseMode: 'json';
18175
+ readonly summary: 'List workflow triggers';
18176
+ };
18117
18177
  readonly listWorkflowVersions: {
18118
18178
  readonly method: 'GET';
18119
18179
  readonly path: '/api/v2/workflows/[workflowId]/versions';
@@ -21121,6 +21181,24 @@ export declare const V2_OPERATIONS: {
21121
21181
  };
21122
21182
  };
21123
21183
  };
21184
+ readonly updateWorkflowTrigger: {
21185
+ readonly method: 'PATCH';
21186
+ readonly path: '/api/v2/workflows/[workflowId]/triggers/[blockId]';
21187
+ readonly pathParams: readonly ['workflowId', 'blockId'];
21188
+ readonly pathParamDocs: {
21189
+ readonly workflowId: 'Unique workflow identifier.';
21190
+ readonly blockId: 'Trigger block in the deployed workflow.';
21191
+ };
21192
+ readonly responseMode: 'json';
21193
+ readonly summary: 'Update workflow trigger';
21194
+ readonly body: {
21195
+ readonly enabled: {
21196
+ readonly kind: 'boolean';
21197
+ readonly required: true;
21198
+ readonly describe: 'Whether the trigger should fire. A disable lasts until the next deploy or version activation, which re-enables every trigger.';
21199
+ };
21200
+ };
21201
+ };
21124
21202
  readonly updateWorkflowVersion: {
21125
21203
  readonly method: 'PATCH';
21126
21204
  readonly path: '/api/v2/workflows/[workflowId]/versions/[version]';
package/dist/index.js CHANGED
@@ -15504,6 +15504,14 @@ var V2_OPERATIONS = {
15504
15504
  }
15505
15505
  }
15506
15506
  },
15507
+ listWorkflowTriggers: {
15508
+ method: "GET",
15509
+ path: "/api/v2/workflows/[workflowId]/triggers",
15510
+ pathParams: ["workflowId"],
15511
+ pathParamDocs: { workflowId: "Unique workflow identifier." },
15512
+ responseMode: "json",
15513
+ summary: "List workflow triggers"
15514
+ },
15507
15515
  listWorkflowVersions: {
15508
15516
  method: "GET",
15509
15517
  path: "/api/v2/workflows/[workflowId]/versions",
@@ -18024,6 +18032,24 @@ var V2_OPERATIONS = {
18024
18032
  }
18025
18033
  }
18026
18034
  },
18035
+ updateWorkflowTrigger: {
18036
+ method: "PATCH",
18037
+ path: "/api/v2/workflows/[workflowId]/triggers/[blockId]",
18038
+ pathParams: ["workflowId", "blockId"],
18039
+ pathParamDocs: {
18040
+ workflowId: "Unique workflow identifier.",
18041
+ blockId: "Trigger block in the deployed workflow."
18042
+ },
18043
+ responseMode: "json",
18044
+ summary: "Update workflow trigger",
18045
+ body: {
18046
+ enabled: {
18047
+ kind: "boolean",
18048
+ required: true,
18049
+ describe: "Whether the trigger should fire. A disable lasts until the next deploy or version activation, which re-enables every trigger."
18050
+ }
18051
+ }
18052
+ },
18027
18053
  updateWorkflowVersion: {
18028
18054
  method: "PATCH",
18029
18055
  path: "/api/v2/workflows/[workflowId]/versions/[version]",
@@ -19288,6 +19314,21 @@ var CLI_CONTRACT = {
19288
19314
  renamedFrom: ["workflows deployment list"],
19289
19315
  describe: "Show a workflow’s current deployment"
19290
19316
  },
19317
+ listWorkflowTriggers: {
19318
+ describe: "Show the health of every trigger the live deployment serves",
19319
+ columns: [
19320
+ { header: "block", path: "blockId" },
19321
+ { header: "kind" },
19322
+ { header: "provider" },
19323
+ { header: "status" },
19324
+ { header: "failures", path: "failedCount" },
19325
+ { header: "last failed", path: "lastFailedAt", format: "timestamp" },
19326
+ { header: "next run", path: "nextRunAt", format: "timestamp" }
19327
+ ]
19328
+ },
19329
+ updateWorkflowTrigger: {
19330
+ describe: "Enable or disable one trigger of the live deployment"
19331
+ },
19291
19332
  setSecret: { hidden: true },
19292
19333
  deleteTable: {
19293
19334
  confirm: "This archives the table and all of its rows; restore with `tables restore`."
package/dist/runtime.js CHANGED
@@ -15553,6 +15553,14 @@ var V2_OPERATIONS = {
15553
15553
  }
15554
15554
  }
15555
15555
  },
15556
+ listWorkflowTriggers: {
15557
+ method: "GET",
15558
+ path: "/api/v2/workflows/[workflowId]/triggers",
15559
+ pathParams: ["workflowId"],
15560
+ pathParamDocs: { workflowId: "Unique workflow identifier." },
15561
+ responseMode: "json",
15562
+ summary: "List workflow triggers"
15563
+ },
15556
15564
  listWorkflowVersions: {
15557
15565
  method: "GET",
15558
15566
  path: "/api/v2/workflows/[workflowId]/versions",
@@ -18073,6 +18081,24 @@ var V2_OPERATIONS = {
18073
18081
  }
18074
18082
  }
18075
18083
  },
18084
+ updateWorkflowTrigger: {
18085
+ method: "PATCH",
18086
+ path: "/api/v2/workflows/[workflowId]/triggers/[blockId]",
18087
+ pathParams: ["workflowId", "blockId"],
18088
+ pathParamDocs: {
18089
+ workflowId: "Unique workflow identifier.",
18090
+ blockId: "Trigger block in the deployed workflow."
18091
+ },
18092
+ responseMode: "json",
18093
+ summary: "Update workflow trigger",
18094
+ body: {
18095
+ enabled: {
18096
+ kind: "boolean",
18097
+ required: true,
18098
+ describe: "Whether the trigger should fire. A disable lasts until the next deploy or version activation, which re-enables every trigger."
18099
+ }
18100
+ }
18101
+ },
18076
18102
  updateWorkflowVersion: {
18077
18103
  method: "PATCH",
18078
18104
  path: "/api/v2/workflows/[workflowId]/versions/[version]",
@@ -19337,6 +19363,21 @@ var CLI_CONTRACT = {
19337
19363
  renamedFrom: ["workflows deployment list"],
19338
19364
  describe: "Show a workflow’s current deployment"
19339
19365
  },
19366
+ listWorkflowTriggers: {
19367
+ describe: "Show the health of every trigger the live deployment serves",
19368
+ columns: [
19369
+ { header: "block", path: "blockId" },
19370
+ { header: "kind" },
19371
+ { header: "provider" },
19372
+ { header: "status" },
19373
+ { header: "failures", path: "failedCount" },
19374
+ { header: "last failed", path: "lastFailedAt", format: "timestamp" },
19375
+ { header: "next run", path: "nextRunAt", format: "timestamp" }
19376
+ ]
19377
+ },
19378
+ updateWorkflowTrigger: {
19379
+ describe: "Enable or disable one trigger of the live deployment"
19380
+ },
19340
19381
  setSecret: { hidden: true },
19341
19382
  deleteTable: {
19342
19383
  confirm: "This archives the table and all of its rows; restore with `tables restore`."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.2.24-preview.279.1",
3
+ "version": "2.2.24-preview.281.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "bin": {