getricky 0.1.1 → 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.
@@ -6,6 +6,7 @@ exports.idempotentOperations = void 0;
6
6
  exports.idempotentOperations = new Set([
7
7
  'PATCH /contacts/{contact_id}',
8
8
  'PATCH /conversations/{conversation_id}/assignment',
9
+ 'PATCH /workflows/{workflow_id}',
9
10
  'POST /contacts',
10
11
  'POST /contacts/{contact_id}/notes',
11
12
  'POST /conversations',
@@ -13,4 +14,5 @@ exports.idempotentOperations = new Set([
13
14
  'POST /conversations/{conversation_id}/messages',
14
15
  'POST /conversations/{conversation_id}/reopen',
15
16
  'POST /tags',
17
+ 'POST /workflows',
16
18
  ]);
@@ -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 {};
@@ -489,5 +489,133 @@ class RickyApi extends HeyApiClient {
489
489
  ...options
490
490
  });
491
491
  }
492
+ /**
493
+ * List workflows
494
+ *
495
+ * Every workflow of the organization with its definition, last changed first.
496
+ *
497
+ * Scope: `workflows:read`.
498
+ */
499
+ listWorkflows(options) {
500
+ return (options?.client ?? this.client).get({
501
+ responseStyle: 'data',
502
+ security: [{ scheme: 'bearer', type: 'http' }],
503
+ url: '/workflows',
504
+ ...options
505
+ });
506
+ }
507
+ /**
508
+ * Create a workflow
509
+ *
510
+ * 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.
511
+ *
512
+ * Scope: `workflows:write`.
513
+ */
514
+ createWorkflow(options) {
515
+ return (options.client ?? this.client).post({
516
+ responseStyle: 'data',
517
+ security: [{ scheme: 'bearer', type: 'http' }],
518
+ url: '/workflows',
519
+ ...options,
520
+ headers: {
521
+ 'Content-Type': 'application/json',
522
+ ...options.headers
523
+ }
524
+ });
525
+ }
526
+ /**
527
+ * Delete a workflow
528
+ *
529
+ * Deletes the workflow and answers it as it was. Sends already queued still go out. Deleting twice answers `404`.
530
+ *
531
+ * Scope: `workflows:write`.
532
+ */
533
+ deleteWorkflow(options) {
534
+ return (options.client ?? this.client).delete({
535
+ responseStyle: 'data',
536
+ security: [{ scheme: 'bearer', type: 'http' }],
537
+ url: '/workflows/{workflow_id}',
538
+ ...options
539
+ });
540
+ }
541
+ /**
542
+ * Get a workflow
543
+ *
544
+ * One workflow with its definition.
545
+ *
546
+ * Scope: `workflows:read`.
547
+ */
548
+ getWorkflow(options) {
549
+ return (options.client ?? this.client).get({
550
+ responseStyle: 'data',
551
+ security: [{ scheme: 'bearer', type: 'http' }],
552
+ url: '/workflows/{workflow_id}',
553
+ ...options
554
+ });
555
+ }
556
+ /**
557
+ * Update a workflow
558
+ *
559
+ * 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.
560
+ *
561
+ * Scope: `workflows:write`.
562
+ */
563
+ updateWorkflow(options) {
564
+ return (options.client ?? this.client).patch({
565
+ responseStyle: 'data',
566
+ security: [{ scheme: 'bearer', type: 'http' }],
567
+ url: '/workflows/{workflow_id}',
568
+ ...options,
569
+ headers: {
570
+ 'Content-Type': 'application/json',
571
+ ...options.headers
572
+ }
573
+ });
574
+ }
575
+ /**
576
+ * Activate a workflow
577
+ *
578
+ * 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.
579
+ *
580
+ * Scope: `workflows:write`.
581
+ */
582
+ activateWorkflow(options) {
583
+ return (options.client ?? this.client).post({
584
+ responseStyle: 'data',
585
+ security: [{ scheme: 'bearer', type: 'http' }],
586
+ url: '/workflows/{workflow_id}/activate',
587
+ ...options
588
+ });
589
+ }
590
+ /**
591
+ * Pause a workflow
592
+ *
593
+ * It starts no new executions; sends already queued still go out. Pausing a paused workflow changes nothing. Send no body.
594
+ *
595
+ * Scope: `workflows:write`.
596
+ */
597
+ pauseWorkflow(options) {
598
+ return (options.client ?? this.client).post({
599
+ responseStyle: 'data',
600
+ security: [{ scheme: 'bearer', type: 'http' }],
601
+ url: '/workflows/{workflow_id}/pause',
602
+ ...options
603
+ });
604
+ }
605
+ /**
606
+ * List executions
607
+ *
608
+ * Runs of the workflow with their status, attempts and errors, newest first.
609
+ *
610
+ * Scope: `workflows:read`.
611
+ */
612
+ listWorkflowExecutions(options) {
613
+ return (options.client ?? this.client).get({
614
+ responseStyle: 'data',
615
+ security: [{ scheme: 'bearer', type: 'http' }],
616
+ url: '/workflows/{workflow_id}/executions',
617
+ ...options
618
+ });
619
+ }
492
620
  }
493
621
  exports.RickyApi = RickyApi;