@hatchet-dev/typescript-sdk 0.12.5 → 0.13.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.
@@ -11,12 +11,17 @@ export declare enum LogLevel {
11
11
  export interface PushEventOptions {
12
12
  additionalMetadata?: Record<string, string>;
13
13
  }
14
+ export interface EventWithMetadata<T> {
15
+ payload: T;
16
+ additionalMetadata?: Record<string, any>;
17
+ }
14
18
  export declare class EventClient {
15
19
  config: ClientConfig;
16
20
  client: EventsServiceClient;
17
21
  logger: Logger;
18
22
  constructor(config: ClientConfig, channel: Channel, factory: ClientFactory);
19
23
  push<T>(type: string, input: T, options?: PushEventOptions): Promise<import("../../protoc/events/events").Event>;
24
+ bulkPush<T>(type: string, inputs: EventWithMetadata<T>[], options?: PushEventOptions): Promise<import("../../protoc/events/events").Events>;
20
25
  putLog(stepRunId: string, log: string, level?: LogLevel): void;
21
26
  putStream(stepRunId: string, data: string | Uint8Array): void;
22
27
  }
@@ -51,6 +51,37 @@ class EventClient {
51
51
  throw new hatchet_error_1.default(e.message);
52
52
  }
53
53
  }
54
+ bulkPush(type, inputs, options = {}) {
55
+ var _a;
56
+ const namespacedType = `${(_a = this.config.namespace) !== null && _a !== void 0 ? _a : ''}${type}`;
57
+ const events = inputs.map((input) => {
58
+ return {
59
+ key: namespacedType,
60
+ payload: JSON.stringify(input.payload),
61
+ eventTimestamp: new Date(),
62
+ additionalMetadata: (() => {
63
+ if (input.additionalMetadata) {
64
+ return JSON.stringify(input.additionalMetadata);
65
+ }
66
+ if (options.additionalMetadata) {
67
+ return JSON.stringify(options.additionalMetadata);
68
+ }
69
+ return undefined;
70
+ })(),
71
+ };
72
+ });
73
+ const req = {
74
+ events,
75
+ };
76
+ try {
77
+ const e = this.client.bulkPush(req);
78
+ this.logger.info(`Bulk events pushed for type: ${namespacedType}`);
79
+ return e;
80
+ }
81
+ catch (e) {
82
+ throw new hatchet_error_1.default(e.message);
83
+ }
84
+ }
54
85
  putLog(stepRunId, log, level) {
55
86
  const createdAt = new Date();
56
87
  (0, retrier_1.retrier)(() => __awaiter(this, void 0, void 0, function* () {
@@ -1,4 +1,4 @@
1
- import { AcceptInviteRequest, APIErrors, APIMeta, CreateAPITokenRequest, CreateAPITokenResponse, CreateEventRequest, CreateSNSIntegrationRequest, CreateTenantAlertEmailGroupRequest, CreateTenantInviteRequest, CreateTenantRequest, Event, EventData, EventKey, EventKeyList, EventList, EventOrderByDirection, EventOrderByField, EventSearch, ListAPIMetaIntegration, ListAPITokensResponse, ListSlackWebhooks, ListSNSIntegrations, LogLineLevelField, LogLineList, LogLineOrderByDirection, LogLineOrderByField, LogLineSearch, RejectInviteRequest, ReplayEventRequest, RerunStepRunRequest, SNSIntegration, StepRun, StepRunArchiveList, StepRunEventList, Tenant, TenantAlertEmailGroup, TenantAlertEmailGroupList, TenantAlertingSettings, TenantInvite, TenantInviteList, TenantMember, TenantMemberList, TenantQueueMetrics, TenantResourcePolicy, TriggerWorkflowRunRequest, UpdateTenantAlertEmailGroupRequest, UpdateTenantInviteRequest, UpdateTenantRequest, User, UserChangePasswordRequest, UserLoginRequest, UserRegisterRequest, UserTenantMembershipsList, WebhookWorkerCreated, WebhookWorkerCreateRequest, WebhookWorkerListResponse, Worker, WorkerList, Workflow, WorkflowID, WorkflowList, WorkflowMetrics, WorkflowRun, WorkflowRunList, WorkflowRunsCancelRequest, WorkflowRunsMetrics, WorkflowRunStatus, WorkflowRunStatusList, WorkflowVersion, WorkflowVersionDefinition } from './data-contracts';
1
+ import { AcceptInviteRequest, APIErrors, APIMeta, BulkCreateEventRequest, BulkCreateEventResponse, CancelEventRequest, CreateAPITokenRequest, CreateAPITokenResponse, CreateEventRequest, CreateSNSIntegrationRequest, CreateTenantAlertEmailGroupRequest, CreateTenantInviteRequest, CreateTenantRequest, Event, EventData, EventKey, EventKeyList, EventList, EventOrderByDirection, EventOrderByField, EventSearch, ListAPIMetaIntegration, ListAPITokensResponse, ListSlackWebhooks, ListSNSIntegrations, LogLineLevelField, LogLineList, LogLineOrderByDirection, LogLineOrderByField, LogLineSearch, RejectInviteRequest, ReplayEventRequest, ReplayWorkflowRunsRequest, ReplayWorkflowRunsResponse, RerunStepRunRequest, SNSIntegration, StepRun, StepRunArchiveList, StepRunEventList, Tenant, TenantAlertEmailGroup, TenantAlertEmailGroupList, TenantAlertingSettings, TenantInvite, TenantInviteList, TenantMember, TenantMemberList, TenantQueueMetrics, TenantResourcePolicy, TriggerWorkflowRunRequest, UpdateTenantAlertEmailGroupRequest, UpdateTenantInviteRequest, UpdateTenantRequest, UpdateWorkerRequest, User, UserChangePasswordRequest, UserLoginRequest, UserRegisterRequest, UserTenantMembershipsList, WebhookWorkerCreated, WebhookWorkerCreateRequest, WebhookWorkerListResponse, WebhookWorkerRequestListResponse, Worker, WorkerList, Workflow, WorkflowID, WorkflowKindList, WorkflowList, WorkflowMetrics, WorkflowRun, WorkflowRunList, WorkflowRunOrderByDirection, WorkflowRunOrderByField, WorkflowRunsCancelRequest, WorkflowRunShape, WorkflowRunsMetrics, WorkflowRunStatus, WorkflowRunStatusList, WorkflowVersion, WorkflowWorkersCount } from './data-contracts';
2
2
  import { HttpClient, RequestParams } from './http-client';
3
3
  export declare class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4
4
  /**
@@ -453,6 +453,8 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
453
453
  * @example ["key1:value1","key2:value2"]
454
454
  */
455
455
  additionalMetadata?: string[];
456
+ /** A list of event ids to filter by */
457
+ eventIds?: string[];
456
458
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<EventList, any>>;
457
459
  /**
458
460
  * @description Creates a new event.
@@ -464,6 +466,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
464
466
  * @secure
465
467
  */
466
468
  eventCreate: (tenant: string, data: CreateEventRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<Event, any>>;
469
+ /**
470
+ * @description Bulk creates new events.
471
+ *
472
+ * @tags Event
473
+ * @name EventCreateBulk
474
+ * @summary Bulk Create events
475
+ * @request POST:/api/v1/tenants/{tenant}/events/bulk
476
+ * @secure
477
+ */
478
+ eventCreateBulk: (tenant: string, data: BulkCreateEventRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<BulkCreateEventResponse, any>>;
467
479
  /**
468
480
  * @description Replays a list of events.
469
481
  *
@@ -474,6 +486,18 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
474
486
  * @secure
475
487
  */
476
488
  eventUpdateReplay: (tenant: string, data: ReplayEventRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<EventList, any>>;
489
+ /**
490
+ * @description Cancels all runs for a list of events.
491
+ *
492
+ * @tags Event
493
+ * @name EventUpdateCancel
494
+ * @summary Replay events
495
+ * @request POST:/api/v1/tenants/{tenant}/events/cancel
496
+ * @secure
497
+ */
498
+ eventUpdateCancel: (tenant: string, data: CancelEventRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<{
499
+ workflowRunIds?: string[];
500
+ }, any>>;
477
501
  /**
478
502
  * @description Gets a list of tenant members
479
503
  *
@@ -494,6 +518,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
494
518
  * @secure
495
519
  */
496
520
  tenantMemberDelete: (tenant: string, member: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantMember, any>>;
521
+ /**
522
+ * @description Get an event.
523
+ *
524
+ * @tags Event
525
+ * @name EventGet
526
+ * @summary Get event data
527
+ * @request GET:/api/v1/events/{event}
528
+ * @secure
529
+ */
530
+ eventGet: (event: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<Event, any>>;
497
531
  /**
498
532
  * @description Get the data for an event.
499
533
  *
@@ -592,24 +626,6 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
592
626
  */
593
627
  version?: string;
594
628
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRun, any>>;
595
- /**
596
- * @description Get a workflow version definition for a tenant
597
- *
598
- * @tags Workflow
599
- * @name WorkflowVersionGetDefinition
600
- * @summary Get workflow version definition
601
- * @request GET:/api/v1/workflows/{workflow}/versions/definition
602
- * @secure
603
- */
604
- workflowVersionGetDefinition: (workflow: string, query?: {
605
- /**
606
- * The workflow version. If not supplied, the latest version is fetched.
607
- * @format uuid
608
- * @minLength 36
609
- * @maxLength 36
610
- */
611
- version?: string;
612
- }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowVersionDefinition, any>>;
613
629
  /**
614
630
  * @description Get the metrics for a workflow version
615
631
  *
@@ -675,6 +691,22 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
675
691
  */
676
692
  limit?: number;
677
693
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRunEventList, any>>;
694
+ /**
695
+ * @description List events for all step runs for a workflow run
696
+ *
697
+ * @tags Step Run
698
+ * @name WorkflowRunListStepRunEvents
699
+ * @summary List events for all step runs for a workflow run
700
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/step-run-events
701
+ * @secure
702
+ */
703
+ workflowRunListStepRunEvents: (tenant: string, workflowRun: string, query?: {
704
+ /**
705
+ * Last ID of the last event
706
+ * @format int32
707
+ */
708
+ lastId?: number;
709
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRunEventList, any>>;
678
710
  /**
679
711
  * @description List archives for a step run
680
712
  *
@@ -696,6 +728,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
696
728
  */
697
729
  limit?: number;
698
730
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRunArchiveList, any>>;
731
+ /**
732
+ * @description Get a count of the workers available for workflow
733
+ *
734
+ * @tags Workflow
735
+ * @name WorkflowGetWorkersCount
736
+ * @summary Get workflow worker count
737
+ * @request GET:/api/v1/tenants/{tenant}/workflows/{workflow}/worker-count
738
+ * @secure
739
+ */
740
+ workflowGetWorkersCount: (tenant: string, workflow: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowWorkersCount, any>>;
699
741
  /**
700
742
  * @description Get all workflow runs for a tenant
701
743
  *
@@ -746,12 +788,40 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
746
788
  parentStepRunId?: string;
747
789
  /** A list of workflow run statuses to filter by */
748
790
  statuses?: WorkflowRunStatusList;
791
+ /** A list of workflow kinds to filter by */
792
+ kinds?: WorkflowKindList;
749
793
  /**
750
794
  * A list of metadata key value pairs to filter by
751
795
  * @example ["key1:value1","key2:value2"]
752
796
  */
753
797
  additionalMetadata?: string[];
798
+ /**
799
+ * The time after the workflow run was created
800
+ * @format date-time
801
+ * @example "2021-01-01T00:00:00Z"
802
+ */
803
+ createdAfter?: string;
804
+ /**
805
+ * The time before the workflow run was created
806
+ * @format date-time
807
+ * @example "2021-01-01T00:00:00Z"
808
+ */
809
+ createdBefore?: string;
810
+ /** The order by field */
811
+ orderByField?: WorkflowRunOrderByField;
812
+ /** The order by direction */
813
+ orderByDirection?: WorkflowRunOrderByDirection;
754
814
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunList, any>>;
815
+ /**
816
+ * @description Replays a list of workflow runs.
817
+ *
818
+ * @tags Workflow Run
819
+ * @name WorkflowRunUpdateReplay
820
+ * @summary Replay workflow runs
821
+ * @request POST:/api/v1/tenants/{tenant}/workflow-runs/replay
822
+ * @secure
823
+ */
824
+ workflowRunUpdateReplay: (tenant: string, data: ReplayWorkflowRunsRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<ReplayWorkflowRunsResponse, any>>;
755
825
  /**
756
826
  * @description Get a summary of workflow run metrics for a tenant
757
827
  *
@@ -795,6 +865,18 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
795
865
  * @example ["key1:value1","key2:value2"]
796
866
  */
797
867
  additionalMetadata?: string[];
868
+ /**
869
+ * The time after the workflow run was created
870
+ * @format date-time
871
+ * @example "2021-01-01T00:00:00Z"
872
+ */
873
+ createdAfter?: string;
874
+ /**
875
+ * The time before the workflow run was created
876
+ * @format date-time
877
+ * @example "2021-01-01T00:00:00Z"
878
+ */
879
+ createdBefore?: string;
798
880
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunsMetrics, any>>;
799
881
  /**
800
882
  * @description Get a workflow run for a tenant
@@ -806,6 +888,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
806
888
  * @secure
807
889
  */
808
890
  workflowRunGet: (tenant: string, workflowRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRun, any>>;
891
+ /**
892
+ * @description Get a workflow run for a tenant
893
+ *
894
+ * @tags Workflow
895
+ * @name WorkflowRunGetShape
896
+ * @summary Get workflow run
897
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/shape
898
+ * @secure
899
+ */
900
+ workflowRunGetShape: (tenant: string, workflowRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunShape, any>>;
809
901
  /**
810
902
  * @description Get a step run by id
811
903
  *
@@ -856,6 +948,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
856
948
  * @secure
857
949
  */
858
950
  workerList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkerList, any>>;
951
+ /**
952
+ * @description Update a worker
953
+ *
954
+ * @tags Worker
955
+ * @name WorkerUpdate
956
+ * @summary Update worker
957
+ * @request PATCH:/api/v1/workers/{worker}
958
+ * @secure
959
+ */
960
+ workerUpdate: (worker: string, data: UpdateWorkerRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<Worker, any>>;
859
961
  /**
860
962
  * @description Get a worker
861
963
  *
@@ -893,4 +995,23 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
893
995
  * @secure
894
996
  */
895
997
  webhookDelete: (webhook: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
998
+ /**
999
+ * @description Lists all requests for a webhook
1000
+ *
1001
+ * @name WebhookRequestsList
1002
+ * @summary List webhook requests
1003
+ * @request GET:/api/v1/webhook-workers/{webhook}/requests
1004
+ * @secure
1005
+ */
1006
+ webhookRequestsList: (webhook: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WebhookWorkerRequestListResponse, any>>;
1007
+ /**
1008
+ * @description Get the input for a workflow run.
1009
+ *
1010
+ * @tags Workflow Run
1011
+ * @name WorkflowRunGetInput
1012
+ * @summary Get workflow run input
1013
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/input
1014
+ * @secure
1015
+ */
1016
+ workflowRunGetInput: (tenant: string, workflowRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<Record<string, any>, any>>;
896
1017
  }
@@ -442,6 +442,16 @@ class Api extends http_client_1.HttpClient {
442
442
  * @secure
443
443
  */
444
444
  this.eventCreate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/events`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
445
+ /**
446
+ * @description Bulk creates new events.
447
+ *
448
+ * @tags Event
449
+ * @name EventCreateBulk
450
+ * @summary Bulk Create events
451
+ * @request POST:/api/v1/tenants/{tenant}/events/bulk
452
+ * @secure
453
+ */
454
+ this.eventCreateBulk = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/events/bulk`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
445
455
  /**
446
456
  * @description Replays a list of events.
447
457
  *
@@ -452,6 +462,16 @@ class Api extends http_client_1.HttpClient {
452
462
  * @secure
453
463
  */
454
464
  this.eventUpdateReplay = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/events/replay`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
465
+ /**
466
+ * @description Cancels all runs for a list of events.
467
+ *
468
+ * @tags Event
469
+ * @name EventUpdateCancel
470
+ * @summary Replay events
471
+ * @request POST:/api/v1/tenants/{tenant}/events/cancel
472
+ * @secure
473
+ */
474
+ this.eventUpdateCancel = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/events/cancel`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
455
475
  /**
456
476
  * @description Gets a list of tenant members
457
477
  *
@@ -472,6 +492,16 @@ class Api extends http_client_1.HttpClient {
472
492
  * @secure
473
493
  */
474
494
  this.tenantMemberDelete = (tenant, member, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/members/${member}`, method: 'DELETE', secure: true, format: 'json' }, params));
495
+ /**
496
+ * @description Get an event.
497
+ *
498
+ * @tags Event
499
+ * @name EventGet
500
+ * @summary Get event data
501
+ * @request GET:/api/v1/events/{event}
502
+ * @secure
503
+ */
504
+ this.eventGet = (event, params = {}) => this.request(Object.assign({ path: `/api/v1/events/${event}`, method: 'GET', secure: true, format: 'json' }, params));
475
505
  /**
476
506
  * @description Get the data for an event.
477
507
  *
@@ -552,16 +582,6 @@ class Api extends http_client_1.HttpClient {
552
582
  * @secure
553
583
  */
554
584
  this.workflowRunCreate = (workflow, data, query, params = {}) => this.request(Object.assign({ path: `/api/v1/workflows/${workflow}/trigger`, method: 'POST', query: query, body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
555
- /**
556
- * @description Get a workflow version definition for a tenant
557
- *
558
- * @tags Workflow
559
- * @name WorkflowVersionGetDefinition
560
- * @summary Get workflow version definition
561
- * @request GET:/api/v1/workflows/{workflow}/versions/definition
562
- * @secure
563
- */
564
- this.workflowVersionGetDefinition = (workflow, query, params = {}) => this.request(Object.assign({ path: `/api/v1/workflows/${workflow}/versions/definition`, method: 'GET', query: query, secure: true, format: 'json' }, params));
565
585
  /**
566
586
  * @description Get the metrics for a workflow version
567
587
  *
@@ -592,6 +612,16 @@ class Api extends http_client_1.HttpClient {
592
612
  * @secure
593
613
  */
594
614
  this.stepRunListEvents = (stepRun, query, params = {}) => this.request(Object.assign({ path: `/api/v1/step-runs/${stepRun}/events`, method: 'GET', query: query, secure: true, format: 'json' }, params));
615
+ /**
616
+ * @description List events for all step runs for a workflow run
617
+ *
618
+ * @tags Step Run
619
+ * @name WorkflowRunListStepRunEvents
620
+ * @summary List events for all step runs for a workflow run
621
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/step-run-events
622
+ * @secure
623
+ */
624
+ this.workflowRunListStepRunEvents = (tenant, workflowRun, query, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/${workflowRun}/step-run-events`, method: 'GET', query: query, secure: true, format: 'json' }, params));
595
625
  /**
596
626
  * @description List archives for a step run
597
627
  *
@@ -602,6 +632,16 @@ class Api extends http_client_1.HttpClient {
602
632
  * @secure
603
633
  */
604
634
  this.stepRunListArchives = (stepRun, query, params = {}) => this.request(Object.assign({ path: `/api/v1/step-runs/${stepRun}/archives`, method: 'GET', query: query, secure: true, format: 'json' }, params));
635
+ /**
636
+ * @description Get a count of the workers available for workflow
637
+ *
638
+ * @tags Workflow
639
+ * @name WorkflowGetWorkersCount
640
+ * @summary Get workflow worker count
641
+ * @request GET:/api/v1/tenants/{tenant}/workflows/{workflow}/worker-count
642
+ * @secure
643
+ */
644
+ this.workflowGetWorkersCount = (tenant, workflow, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflows/${workflow}/worker-count`, method: 'GET', secure: true, format: 'json' }, params));
605
645
  /**
606
646
  * @description Get all workflow runs for a tenant
607
647
  *
@@ -612,6 +652,16 @@ class Api extends http_client_1.HttpClient {
612
652
  * @secure
613
653
  */
614
654
  this.workflowRunList = (tenant, query, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflows/runs`, method: 'GET', query: query, secure: true, format: 'json' }, params));
655
+ /**
656
+ * @description Replays a list of workflow runs.
657
+ *
658
+ * @tags Workflow Run
659
+ * @name WorkflowRunUpdateReplay
660
+ * @summary Replay workflow runs
661
+ * @request POST:/api/v1/tenants/{tenant}/workflow-runs/replay
662
+ * @secure
663
+ */
664
+ this.workflowRunUpdateReplay = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/replay`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
615
665
  /**
616
666
  * @description Get a summary of workflow run metrics for a tenant
617
667
  *
@@ -632,6 +682,16 @@ class Api extends http_client_1.HttpClient {
632
682
  * @secure
633
683
  */
634
684
  this.workflowRunGet = (tenant, workflowRun, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/${workflowRun}`, method: 'GET', secure: true, format: 'json' }, params));
685
+ /**
686
+ * @description Get a workflow run for a tenant
687
+ *
688
+ * @tags Workflow
689
+ * @name WorkflowRunGetShape
690
+ * @summary Get workflow run
691
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/shape
692
+ * @secure
693
+ */
694
+ this.workflowRunGetShape = (tenant, workflowRun, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/${workflowRun}/shape`, method: 'GET', secure: true, format: 'json' }, params));
635
695
  /**
636
696
  * @description Get a step run by id
637
697
  *
@@ -682,6 +742,16 @@ class Api extends http_client_1.HttpClient {
682
742
  * @secure
683
743
  */
684
744
  this.workerList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/worker`, method: 'GET', secure: true, format: 'json' }, params));
745
+ /**
746
+ * @description Update a worker
747
+ *
748
+ * @tags Worker
749
+ * @name WorkerUpdate
750
+ * @summary Update worker
751
+ * @request PATCH:/api/v1/workers/{worker}
752
+ * @secure
753
+ */
754
+ this.workerUpdate = (worker, data, params = {}) => this.request(Object.assign({ path: `/api/v1/workers/${worker}`, method: 'PATCH', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
685
755
  /**
686
756
  * @description Get a worker
687
757
  *
@@ -719,6 +789,25 @@ class Api extends http_client_1.HttpClient {
719
789
  * @secure
720
790
  */
721
791
  this.webhookDelete = (webhook, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook-workers/${webhook}`, method: 'DELETE', secure: true }, params));
792
+ /**
793
+ * @description Lists all requests for a webhook
794
+ *
795
+ * @name WebhookRequestsList
796
+ * @summary List webhook requests
797
+ * @request GET:/api/v1/webhook-workers/{webhook}/requests
798
+ * @secure
799
+ */
800
+ this.webhookRequestsList = (webhook, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook-workers/${webhook}/requests`, method: 'GET', secure: true, format: 'json' }, params));
801
+ /**
802
+ * @description Get the input for a workflow run.
803
+ *
804
+ * @tags Workflow Run
805
+ * @name WorkflowRunGetInput
806
+ * @summary Get workflow run input
807
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/input
808
+ * @secure
809
+ */
810
+ this.workflowRunGetInput = (tenant, workflowRun, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/${workflowRun}/input`, method: 'GET', secure: true, format: 'json' }, params));
722
811
  }
723
812
  }
724
813
  exports.Api = Api;