getricky 0.1.0 → 0.1.2

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.
@@ -3,6 +3,7 @@
3
3
  export const idempotentOperations = new Set([
4
4
  'PATCH /contacts/{contact_id}',
5
5
  'PATCH /conversations/{conversation_id}/assignment',
6
+ 'PATCH /workflows/{workflow_id}',
6
7
  'POST /contacts',
7
8
  'POST /contacts/{contact_id}/notes',
8
9
  'POST /conversations',
@@ -10,4 +11,5 @@ export const idempotentOperations = new Set([
10
11
  'POST /conversations/{conversation_id}/messages',
11
12
  'POST /conversations/{conversation_id}/reopen',
12
13
  'POST /tags',
14
+ 'POST /workflows',
13
15
  ]);
@@ -1,2 +1,2 @@
1
1
  export { type Options, RickyApi } from './sdk.gen.js';
2
- export type { AddContactNote, AddContactNoteData, AddContactNoteError, AddContactNoteErrors, AddContactNoteResponse, AddContactNoteResponses, AssignConversation, AssignConversationData, AssignConversationError, AssignConversationErrors, AssignConversationResponse, AssignConversationResponses, Channel, ClientOptions, CloseConversation, CloseConversationData, CloseConversationError, CloseConversationErrors, CloseConversationResponse, CloseConversationResponses, Contact, ContactField, ContactIdentity, Conversation, CreateContact, CreateContactData, CreateContactError, CreateContactErrors, CreateContactResponse, CreateContactResponses, CreatedWebhook, CreateTag, CreateTagData, CreateTagError, CreateTagErrors, CreateTagResponse, CreateTagResponses, CreateWebhook, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookResponse, CreateWebhookResponses, DisableWebhookData, DisableWebhookError, DisableWebhookErrors, DisableWebhookResponse, DisableWebhookResponses, Error, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetConversationData, GetConversationError, GetConversationErrors, GetConversationResponse, GetConversationResponses, GetMessageData, GetMessageError, GetMessageErrors, GetMessageResponse, GetMessageResponses, GetSendData, GetSendError, GetSendErrors, GetSendResponse, GetSendResponses, IdempotencyKey, ListChannelsData, ListChannelsError, ListChannelsErrors, ListChannelsResponse, ListChannelsResponses, ListContactFieldsData, ListContactFieldsError, ListContactFieldsErrors, ListContactFieldsResponse, ListContactFieldsResponses, ListContactsData, ListContactsError, ListContactsErrors, ListContactsResponse, ListContactsResponses, ListConversationsData, ListConversationsError, ListConversationsErrors, ListConversationsResponse, ListConversationsResponses, ListMembersData, ListMembersError, ListMembersErrors, ListMembersResponse, ListMembersResponses, ListMessagesData, ListMessagesError, ListMessagesErrors, ListMessagesResponse, ListMessagesResponses, ListTagsData, ListTagsError, ListTagsErrors, ListTagsResponse, ListTagsResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListWebhookDeliveriesData, ListWebhookDeliveriesError, ListWebhookDeliveriesErrors, ListWebhookDeliveriesResponse, ListWebhookDeliveriesResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponses, MediaMessage, Member, Message, ReopenConversationData, ReopenConversationError, ReopenConversationErrors, ReopenConversationResponse, ReopenConversationResponses, RetryWebhookDeliveryData, RetryWebhookDeliveryError, RetryWebhookDeliveryErrors, RetryWebhookDeliveryResponse, RetryWebhookDeliveryResponses, RotateWebhookSecret, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, Send, SendMessage, SendMessageData, SendMessageError, SendMessageErrors, SendMessageResponse, SendMessageResponses, StartConversation, StartConversationData, StartConversationError, StartConversationErrors, StartConversationResponse, StartConversationResponses, Tag, Template, TemplateMessage, TestWebhookData, TestWebhookError, TestWebhookErrors, TestWebhookResponse, TestWebhookResponses, UpdateContact, UpdateContactData, UpdateContactError, UpdateContactErrors, UpdateContactResponse, UpdateContactResponses, Webhook, WebhookContactCreatedWebhookPayload, WebhookContactCreatedWebhookRequest, WebhookContactUpdatedWebhookPayload, WebhookContactUpdatedWebhookRequest, WebhookConversationAssignmentChangedWebhookPayload, WebhookConversationAssignmentChangedWebhookRequest, WebhookConversationClosedWebhookPayload, WebhookConversationClosedWebhookRequest, WebhookConversationOpenedWebhookPayload, WebhookConversationOpenedWebhookRequest, WebhookDelivery, WebhookEvent, WebhookMessageDeliveredWebhookPayload, WebhookMessageDeliveredWebhookRequest, WebhookMessageFailedWebhookPayload, WebhookMessageFailedWebhookRequest, WebhookMessageReadWebhookPayload, WebhookMessageReadWebhookRequest, WebhookMessageReceivedWebhookPayload, WebhookMessageReceivedWebhookRequest, WebhookMessageSentWebhookPayload, WebhookMessageSentWebhookRequest, Webhooks, WebhookTestResult, WebhookWebhookTestWebhookPayload, WebhookWebhookTestWebhookRequest } from './types.gen.js';
2
+ export type { ActivateWorkflowData, ActivateWorkflowError, ActivateWorkflowErrors, ActivateWorkflowResponse, ActivateWorkflowResponses, AddContactNote, AddContactNoteData, AddContactNoteError, AddContactNoteErrors, AddContactNoteResponse, AddContactNoteResponses, AssignConversation, AssignConversationData, AssignConversationError, AssignConversationErrors, AssignConversationResponse, AssignConversationResponses, Channel, ClientOptions, CloseConversation, CloseConversationData, CloseConversationError, CloseConversationErrors, CloseConversationResponse, CloseConversationResponses, Contact, ContactField, ContactIdentity, Conversation, CreateContact, CreateContactData, CreateContactError, CreateContactErrors, CreateContactResponse, CreateContactResponses, CreatedWebhook, CreateTag, CreateTagData, CreateTagError, CreateTagErrors, CreateTagResponse, CreateTagResponses, CreateWebhook, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookResponse, CreateWebhookResponses, CreateWorkflow, CreateWorkflowData, CreateWorkflowError, CreateWorkflowErrors, CreateWorkflowResponse, CreateWorkflowResponses, DeleteWorkflowData, DeleteWorkflowError, DeleteWorkflowErrors, DeleteWorkflowResponse, DeleteWorkflowResponses, DisableWebhookData, DisableWebhookError, DisableWebhookErrors, DisableWebhookResponse, DisableWebhookResponses, Error, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetConversationData, GetConversationError, GetConversationErrors, GetConversationResponse, GetConversationResponses, GetMessageData, GetMessageError, GetMessageErrors, GetMessageResponse, GetMessageResponses, GetSendData, GetSendError, GetSendErrors, GetSendResponse, GetSendResponses, GetWorkflowData, GetWorkflowError, GetWorkflowErrors, GetWorkflowResponse, GetWorkflowResponses, IdempotencyKey, ListChannelsData, ListChannelsError, ListChannelsErrors, ListChannelsResponse, ListChannelsResponses, ListContactFieldsData, ListContactFieldsError, ListContactFieldsErrors, ListContactFieldsResponse, ListContactFieldsResponses, ListContactsData, ListContactsError, ListContactsErrors, ListContactsResponse, ListContactsResponses, ListConversationsData, ListConversationsError, ListConversationsErrors, ListConversationsResponse, ListConversationsResponses, ListMembersData, ListMembersError, ListMembersErrors, ListMembersResponse, ListMembersResponses, ListMessagesData, ListMessagesError, ListMessagesErrors, ListMessagesResponse, ListMessagesResponses, ListTagsData, ListTagsError, ListTagsErrors, ListTagsResponse, ListTagsResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListWebhookDeliveriesData, ListWebhookDeliveriesError, ListWebhookDeliveriesErrors, ListWebhookDeliveriesResponse, ListWebhookDeliveriesResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponses, ListWorkflowExecutionsData, ListWorkflowExecutionsError, ListWorkflowExecutionsErrors, ListWorkflowExecutionsResponse, ListWorkflowExecutionsResponses, ListWorkflowsData, ListWorkflowsError, ListWorkflowsErrors, ListWorkflowsResponse, ListWorkflowsResponses, MediaMessage, Member, Message, PauseWorkflowData, PauseWorkflowError, PauseWorkflowErrors, PauseWorkflowResponse, PauseWorkflowResponses, ReopenConversationData, ReopenConversationError, ReopenConversationErrors, ReopenConversationResponse, ReopenConversationResponses, RetryWebhookDeliveryData, RetryWebhookDeliveryError, RetryWebhookDeliveryErrors, RetryWebhookDeliveryResponse, RetryWebhookDeliveryResponses, RotateWebhookSecret, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, Send, SendMessage, SendMessageData, SendMessageError, SendMessageErrors, SendMessageResponse, SendMessageResponses, StartConversation, StartConversationData, StartConversationError, StartConversationErrors, StartConversationResponse, StartConversationResponses, Tag, Template, TemplateMessage, TestWebhookData, TestWebhookError, TestWebhookErrors, TestWebhookResponse, TestWebhookResponses, UpdateContact, UpdateContactData, UpdateContactError, UpdateContactErrors, UpdateContactResponse, UpdateContactResponses, UpdateWorkflow, UpdateWorkflowData, UpdateWorkflowError, UpdateWorkflowErrors, UpdateWorkflowResponse, UpdateWorkflowResponses, Webhook, WebhookContactCreatedWebhookPayload, WebhookContactCreatedWebhookRequest, WebhookContactUpdatedWebhookPayload, WebhookContactUpdatedWebhookRequest, WebhookConversationAssignmentChangedWebhookPayload, WebhookConversationAssignmentChangedWebhookRequest, WebhookConversationClosedWebhookPayload, WebhookConversationClosedWebhookRequest, WebhookConversationOpenedWebhookPayload, WebhookConversationOpenedWebhookRequest, WebhookDelivery, WebhookEvent, WebhookMessageDeliveredWebhookPayload, WebhookMessageDeliveredWebhookRequest, WebhookMessageFailedWebhookPayload, WebhookMessageFailedWebhookRequest, WebhookMessageReadWebhookPayload, WebhookMessageReadWebhookRequest, WebhookMessageReceivedWebhookPayload, WebhookMessageReceivedWebhookRequest, WebhookMessageSentWebhookPayload, WebhookMessageSentWebhookRequest, Webhooks, WebhookTestResult, WebhookWebhookTestWebhookPayload, WebhookWebhookTestWebhookRequest, Workflow, WorkflowExecution } from './types.gen.js';
@@ -1,5 +1,5 @@
1
1
  import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
2
- import type { AddContactNoteData, AddContactNoteErrors, AddContactNoteResponses, AssignConversationData, AssignConversationErrors, AssignConversationResponses, CloseConversationData, CloseConversationErrors, CloseConversationResponses, CreateContactData, CreateContactErrors, CreateContactResponses, CreateTagData, CreateTagErrors, CreateTagResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DisableWebhookData, DisableWebhookErrors, DisableWebhookResponses, GetContactData, GetContactErrors, GetContactResponses, GetConversationData, GetConversationErrors, GetConversationResponses, GetMessageData, GetMessageErrors, GetMessageResponses, GetSendData, GetSendErrors, GetSendResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListContactFieldsData, ListContactFieldsErrors, ListContactFieldsResponses, ListContactsData, ListContactsErrors, ListContactsResponses, ListConversationsData, ListConversationsErrors, ListConversationsResponses, ListMembersData, ListMembersErrors, ListMembersResponses, ListMessagesData, ListMessagesErrors, ListMessagesResponses, ListTagsData, ListTagsErrors, ListTagsResponses, ListTemplatesData, ListTemplatesErrors, ListTemplatesResponses, ListWebhookDeliveriesData, ListWebhookDeliveriesErrors, ListWebhookDeliveriesResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, ReopenConversationData, ReopenConversationErrors, ReopenConversationResponses, RetryWebhookDeliveryData, RetryWebhookDeliveryErrors, RetryWebhookDeliveryResponses, RotateWebhookSecretData, RotateWebhookSecretErrors, RotateWebhookSecretResponses, SendMessageData, SendMessageErrors, SendMessageResponses, StartConversationData, StartConversationErrors, StartConversationResponses, TestWebhookData, TestWebhookErrors, TestWebhookResponses, UpdateContactData, UpdateContactErrors, UpdateContactResponses } from './types.gen.js';
2
+ import type { ActivateWorkflowData, ActivateWorkflowErrors, ActivateWorkflowResponses, AddContactNoteData, AddContactNoteErrors, AddContactNoteResponses, AssignConversationData, AssignConversationErrors, AssignConversationResponses, CloseConversationData, CloseConversationErrors, CloseConversationResponses, CreateContactData, CreateContactErrors, CreateContactResponses, CreateTagData, CreateTagErrors, CreateTagResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, CreateWorkflowData, CreateWorkflowErrors, CreateWorkflowResponses, DeleteWorkflowData, DeleteWorkflowErrors, DeleteWorkflowResponses, DisableWebhookData, DisableWebhookErrors, DisableWebhookResponses, GetContactData, GetContactErrors, GetContactResponses, GetConversationData, GetConversationErrors, GetConversationResponses, GetMessageData, GetMessageErrors, GetMessageResponses, GetSendData, GetSendErrors, GetSendResponses, GetWorkflowData, GetWorkflowErrors, GetWorkflowResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListContactFieldsData, ListContactFieldsErrors, ListContactFieldsResponses, ListContactsData, ListContactsErrors, ListContactsResponses, ListConversationsData, ListConversationsErrors, ListConversationsResponses, ListMembersData, ListMembersErrors, ListMembersResponses, ListMessagesData, ListMessagesErrors, ListMessagesResponses, ListTagsData, ListTagsErrors, ListTagsResponses, ListTemplatesData, ListTemplatesErrors, ListTemplatesResponses, ListWebhookDeliveriesData, ListWebhookDeliveriesErrors, ListWebhookDeliveriesResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, ListWorkflowExecutionsData, ListWorkflowExecutionsErrors, ListWorkflowExecutionsResponses, ListWorkflowsData, ListWorkflowsErrors, ListWorkflowsResponses, PauseWorkflowData, PauseWorkflowErrors, PauseWorkflowResponses, ReopenConversationData, ReopenConversationErrors, ReopenConversationResponses, RetryWebhookDeliveryData, RetryWebhookDeliveryErrors, RetryWebhookDeliveryResponses, RotateWebhookSecretData, RotateWebhookSecretErrors, RotateWebhookSecretResponses, SendMessageData, SendMessageErrors, SendMessageResponses, StartConversationData, StartConversationErrors, StartConversationResponses, TestWebhookData, TestWebhookErrors, TestWebhookResponses, UpdateContactData, UpdateContactErrors, UpdateContactResponses, UpdateWorkflowData, UpdateWorkflowErrors, UpdateWorkflowResponses } from './types.gen.js';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -255,5 +255,69 @@ export declare class RickyApi extends HeyApiClient {
255
255
  * Scope: `webhooks:manage`.
256
256
  */
257
257
  retryWebhookDelivery<ThrowOnError extends boolean = true>(options: Options<RetryWebhookDeliveryData, ThrowOnError>): RequestResult<RetryWebhookDeliveryResponses, RetryWebhookDeliveryErrors, ThrowOnError, 'data'>;
258
+ /**
259
+ * List workflows
260
+ *
261
+ * Every workflow of the organization with its definition, last changed first.
262
+ *
263
+ * Scope: `workflows:read`.
264
+ */
265
+ listWorkflows<ThrowOnError extends boolean = true>(options?: Options<ListWorkflowsData, ThrowOnError>): RequestResult<ListWorkflowsResponses, ListWorkflowsErrors, ThrowOnError, 'data'>;
266
+ /**
267
+ * Create a workflow
268
+ *
269
+ * Creates a conversation workflow as a `draft`; it runs nothing until you activate it. Ricky checks the flow with the rules of the workflow editor, and that its channels, members and agents belong to the organization.
270
+ *
271
+ * Scope: `workflows:write`.
272
+ */
273
+ createWorkflow<ThrowOnError extends boolean = true>(options: Options<CreateWorkflowData, ThrowOnError>): RequestResult<CreateWorkflowResponses, CreateWorkflowErrors, ThrowOnError, 'data'>;
274
+ /**
275
+ * Delete a workflow
276
+ *
277
+ * Deletes the workflow and answers it as it was. Sends already queued still go out. Deleting twice answers `404`.
278
+ *
279
+ * Scope: `workflows:write`.
280
+ */
281
+ deleteWorkflow<ThrowOnError extends boolean = true>(options: Options<DeleteWorkflowData, ThrowOnError>): RequestResult<DeleteWorkflowResponses, DeleteWorkflowErrors, ThrowOnError, 'data'>;
282
+ /**
283
+ * Get a workflow
284
+ *
285
+ * One workflow with its definition.
286
+ *
287
+ * Scope: `workflows:read`.
288
+ */
289
+ getWorkflow<ThrowOnError extends boolean = true>(options: Options<GetWorkflowData, ThrowOnError>): RequestResult<GetWorkflowResponses, GetWorkflowErrors, ThrowOnError, 'data'>;
290
+ /**
291
+ * Update a workflow
292
+ *
293
+ * Changes the name, replaces the definition, or both, and keeps the status. An active workflow must still be able to run the new definition. A scheduled workflow only accepts a new name.
294
+ *
295
+ * Scope: `workflows:write`.
296
+ */
297
+ updateWorkflow<ThrowOnError extends boolean = true>(options: Options<UpdateWorkflowData, ThrowOnError>): RequestResult<UpdateWorkflowResponses, UpdateWorkflowErrors, ThrowOnError, 'data'>;
298
+ /**
299
+ * Activate a workflow
300
+ *
301
+ * From now on it runs on new events, and its steps can message contacts, assign members or put an AI agent on conversations. Ricky checks again what it references; assigning an AI agent needs an active subscription. Activating an active workflow changes nothing. Send no body.
302
+ *
303
+ * Scope: `workflows:write`.
304
+ */
305
+ activateWorkflow<ThrowOnError extends boolean = true>(options: Options<ActivateWorkflowData, ThrowOnError>): RequestResult<ActivateWorkflowResponses, ActivateWorkflowErrors, ThrowOnError, 'data'>;
306
+ /**
307
+ * Pause a workflow
308
+ *
309
+ * It starts no new executions; sends already queued still go out. Pausing a paused workflow changes nothing. Send no body.
310
+ *
311
+ * Scope: `workflows:write`.
312
+ */
313
+ pauseWorkflow<ThrowOnError extends boolean = true>(options: Options<PauseWorkflowData, ThrowOnError>): RequestResult<PauseWorkflowResponses, PauseWorkflowErrors, ThrowOnError, 'data'>;
314
+ /**
315
+ * List executions
316
+ *
317
+ * Runs of the workflow with their status, attempts and errors, newest first.
318
+ *
319
+ * Scope: `workflows:read`.
320
+ */
321
+ listWorkflowExecutions<ThrowOnError extends boolean = true>(options: Options<ListWorkflowExecutionsData, ThrowOnError>): RequestResult<ListWorkflowExecutionsResponses, ListWorkflowExecutionsErrors, ThrowOnError, 'data'>;
258
322
  }
259
323
  export {};
@@ -486,4 +486,132 @@ export class RickyApi extends HeyApiClient {
486
486
  ...options
487
487
  });
488
488
  }
489
+ /**
490
+ * List workflows
491
+ *
492
+ * Every workflow of the organization with its definition, last changed first.
493
+ *
494
+ * Scope: `workflows:read`.
495
+ */
496
+ listWorkflows(options) {
497
+ return (options?.client ?? this.client).get({
498
+ responseStyle: 'data',
499
+ security: [{ scheme: 'bearer', type: 'http' }],
500
+ url: '/workflows',
501
+ ...options
502
+ });
503
+ }
504
+ /**
505
+ * Create a workflow
506
+ *
507
+ * Creates a conversation workflow as a `draft`; it runs nothing until you activate it. Ricky checks the flow with the rules of the workflow editor, and that its channels, members and agents belong to the organization.
508
+ *
509
+ * Scope: `workflows:write`.
510
+ */
511
+ createWorkflow(options) {
512
+ return (options.client ?? this.client).post({
513
+ responseStyle: 'data',
514
+ security: [{ scheme: 'bearer', type: 'http' }],
515
+ url: '/workflows',
516
+ ...options,
517
+ headers: {
518
+ 'Content-Type': 'application/json',
519
+ ...options.headers
520
+ }
521
+ });
522
+ }
523
+ /**
524
+ * Delete a workflow
525
+ *
526
+ * Deletes the workflow and answers it as it was. Sends already queued still go out. Deleting twice answers `404`.
527
+ *
528
+ * Scope: `workflows:write`.
529
+ */
530
+ deleteWorkflow(options) {
531
+ return (options.client ?? this.client).delete({
532
+ responseStyle: 'data',
533
+ security: [{ scheme: 'bearer', type: 'http' }],
534
+ url: '/workflows/{workflow_id}',
535
+ ...options
536
+ });
537
+ }
538
+ /**
539
+ * Get a workflow
540
+ *
541
+ * One workflow with its definition.
542
+ *
543
+ * Scope: `workflows:read`.
544
+ */
545
+ getWorkflow(options) {
546
+ return (options.client ?? this.client).get({
547
+ responseStyle: 'data',
548
+ security: [{ scheme: 'bearer', type: 'http' }],
549
+ url: '/workflows/{workflow_id}',
550
+ ...options
551
+ });
552
+ }
553
+ /**
554
+ * Update a workflow
555
+ *
556
+ * Changes the name, replaces the definition, or both, and keeps the status. An active workflow must still be able to run the new definition. A scheduled workflow only accepts a new name.
557
+ *
558
+ * Scope: `workflows:write`.
559
+ */
560
+ updateWorkflow(options) {
561
+ return (options.client ?? this.client).patch({
562
+ responseStyle: 'data',
563
+ security: [{ scheme: 'bearer', type: 'http' }],
564
+ url: '/workflows/{workflow_id}',
565
+ ...options,
566
+ headers: {
567
+ 'Content-Type': 'application/json',
568
+ ...options.headers
569
+ }
570
+ });
571
+ }
572
+ /**
573
+ * Activate a workflow
574
+ *
575
+ * From now on it runs on new events, and its steps can message contacts, assign members or put an AI agent on conversations. Ricky checks again what it references; assigning an AI agent needs an active subscription. Activating an active workflow changes nothing. Send no body.
576
+ *
577
+ * Scope: `workflows:write`.
578
+ */
579
+ activateWorkflow(options) {
580
+ return (options.client ?? this.client).post({
581
+ responseStyle: 'data',
582
+ security: [{ scheme: 'bearer', type: 'http' }],
583
+ url: '/workflows/{workflow_id}/activate',
584
+ ...options
585
+ });
586
+ }
587
+ /**
588
+ * Pause a workflow
589
+ *
590
+ * It starts no new executions; sends already queued still go out. Pausing a paused workflow changes nothing. Send no body.
591
+ *
592
+ * Scope: `workflows:write`.
593
+ */
594
+ pauseWorkflow(options) {
595
+ return (options.client ?? this.client).post({
596
+ responseStyle: 'data',
597
+ security: [{ scheme: 'bearer', type: 'http' }],
598
+ url: '/workflows/{workflow_id}/pause',
599
+ ...options
600
+ });
601
+ }
602
+ /**
603
+ * List executions
604
+ *
605
+ * Runs of the workflow with their status, attempts and errors, newest first.
606
+ *
607
+ * Scope: `workflows:read`.
608
+ */
609
+ listWorkflowExecutions(options) {
610
+ return (options.client ?? this.client).get({
611
+ responseStyle: 'data',
612
+ security: [{ scheme: 'bearer', type: 'http' }],
613
+ url: '/workflows/{workflow_id}/executions',
614
+ ...options
615
+ });
616
+ }
489
617
  }