@hatchet-dev/typescript-sdk 0.13.0 → 0.14.0
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.
- package/clients/event/event-client.d.ts +5 -0
- package/clients/event/event-client.js +31 -0
- package/clients/rest/generated/Api.d.ts +189 -19
- package/clients/rest/generated/Api.js +119 -10
- package/clients/rest/generated/data-contracts.d.ts +218 -12
- package/clients/rest/generated/data-contracts.js +39 -1
- package/clients/rest/generated/http-client.js +4 -1
- package/clients/worker/worker.js +4 -4
- package/examples/example-event.js +38 -0
- package/examples/fanout-worker.js +34 -13
- package/examples/rate-limit/worker.js +17 -2
- package/package.json +1 -1
- package/protoc/events/events.d.ts +18 -0
- package/protoc/events/events.js +121 -1
- package/protoc/workflows/workflows.d.ts +10 -2
- package/protoc/workflows/workflows.js +71 -6
- package/step.d.ts +50 -17
- package/step.js +72 -2
- package/util/workflow-run-ref.js +27 -4
- package/workflow.d.ts +114 -38
|
@@ -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,
|
|
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, RateLimitList, RateLimitOrderByDirection, RateLimitOrderByField, 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, WorkflowUpdateRequest, 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,45 @@ 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>>;
|
|
501
|
+
/**
|
|
502
|
+
* @description Lists all rate limits for a tenant.
|
|
503
|
+
*
|
|
504
|
+
* @tags Rate Limits
|
|
505
|
+
* @name RateLimitList
|
|
506
|
+
* @summary List rate limits
|
|
507
|
+
* @request GET:/api/v1/tenants/{tenant}/rate-limits
|
|
508
|
+
* @secure
|
|
509
|
+
*/
|
|
510
|
+
rateLimitList: (tenant: string, query?: {
|
|
511
|
+
/**
|
|
512
|
+
* The number to skip
|
|
513
|
+
* @format int64
|
|
514
|
+
*/
|
|
515
|
+
offset?: number;
|
|
516
|
+
/**
|
|
517
|
+
* The number to limit by
|
|
518
|
+
* @format int64
|
|
519
|
+
*/
|
|
520
|
+
limit?: number;
|
|
521
|
+
/** The search query to filter for */
|
|
522
|
+
search?: string;
|
|
523
|
+
/** What to order by */
|
|
524
|
+
orderByField?: RateLimitOrderByField;
|
|
525
|
+
/** The order direction */
|
|
526
|
+
orderByDirection?: RateLimitOrderByDirection;
|
|
527
|
+
}, params?: RequestParams) => Promise<import("axios").AxiosResponse<RateLimitList, any>>;
|
|
477
528
|
/**
|
|
478
529
|
* @description Gets a list of tenant members
|
|
479
530
|
*
|
|
@@ -494,6 +545,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
494
545
|
* @secure
|
|
495
546
|
*/
|
|
496
547
|
tenantMemberDelete: (tenant: string, member: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantMember, any>>;
|
|
548
|
+
/**
|
|
549
|
+
* @description Get an event.
|
|
550
|
+
*
|
|
551
|
+
* @tags Event
|
|
552
|
+
* @name EventGet
|
|
553
|
+
* @summary Get event data
|
|
554
|
+
* @request GET:/api/v1/events/{event}
|
|
555
|
+
* @secure
|
|
556
|
+
*/
|
|
557
|
+
eventGet: (event: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<Event, any>>;
|
|
497
558
|
/**
|
|
498
559
|
* @description Get the data for an event.
|
|
499
560
|
*
|
|
@@ -556,6 +617,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
556
617
|
* @secure
|
|
557
618
|
*/
|
|
558
619
|
workflowDelete: (workflow: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
|
|
620
|
+
/**
|
|
621
|
+
* @description Update a workflow for a tenant
|
|
622
|
+
*
|
|
623
|
+
* @tags Workflow
|
|
624
|
+
* @name WorkflowUpdate
|
|
625
|
+
* @summary Update workflow
|
|
626
|
+
* @request PATCH:/api/v1/workflows/{workflow}
|
|
627
|
+
* @secure
|
|
628
|
+
*/
|
|
629
|
+
workflowUpdate: (workflow: string, data: WorkflowUpdateRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<Workflow, any>>;
|
|
559
630
|
/**
|
|
560
631
|
* @description Get a workflow version for a tenant
|
|
561
632
|
*
|
|
@@ -592,24 +663,6 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
592
663
|
*/
|
|
593
664
|
version?: string;
|
|
594
665
|
}, 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
666
|
/**
|
|
614
667
|
* @description Get the metrics for a workflow version
|
|
615
668
|
*
|
|
@@ -675,6 +728,22 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
675
728
|
*/
|
|
676
729
|
limit?: number;
|
|
677
730
|
}, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRunEventList, any>>;
|
|
731
|
+
/**
|
|
732
|
+
* @description List events for all step runs for a workflow run
|
|
733
|
+
*
|
|
734
|
+
* @tags Step Run
|
|
735
|
+
* @name WorkflowRunListStepRunEvents
|
|
736
|
+
* @summary List events for all step runs for a workflow run
|
|
737
|
+
* @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/step-run-events
|
|
738
|
+
* @secure
|
|
739
|
+
*/
|
|
740
|
+
workflowRunListStepRunEvents: (tenant: string, workflowRun: string, query?: {
|
|
741
|
+
/**
|
|
742
|
+
* Last ID of the last event
|
|
743
|
+
* @format int32
|
|
744
|
+
*/
|
|
745
|
+
lastId?: number;
|
|
746
|
+
}, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRunEventList, any>>;
|
|
678
747
|
/**
|
|
679
748
|
* @description List archives for a step run
|
|
680
749
|
*
|
|
@@ -696,6 +765,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
696
765
|
*/
|
|
697
766
|
limit?: number;
|
|
698
767
|
}, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRunArchiveList, any>>;
|
|
768
|
+
/**
|
|
769
|
+
* @description Get a count of the workers available for workflow
|
|
770
|
+
*
|
|
771
|
+
* @tags Workflow
|
|
772
|
+
* @name WorkflowGetWorkersCount
|
|
773
|
+
* @summary Get workflow worker count
|
|
774
|
+
* @request GET:/api/v1/tenants/{tenant}/workflows/{workflow}/worker-count
|
|
775
|
+
* @secure
|
|
776
|
+
*/
|
|
777
|
+
workflowGetWorkersCount: (tenant: string, workflow: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowWorkersCount, any>>;
|
|
699
778
|
/**
|
|
700
779
|
* @description Get all workflow runs for a tenant
|
|
701
780
|
*
|
|
@@ -746,12 +825,52 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
746
825
|
parentStepRunId?: string;
|
|
747
826
|
/** A list of workflow run statuses to filter by */
|
|
748
827
|
statuses?: WorkflowRunStatusList;
|
|
828
|
+
/** A list of workflow kinds to filter by */
|
|
829
|
+
kinds?: WorkflowKindList;
|
|
749
830
|
/**
|
|
750
831
|
* A list of metadata key value pairs to filter by
|
|
751
832
|
* @example ["key1:value1","key2:value2"]
|
|
752
833
|
*/
|
|
753
834
|
additionalMetadata?: string[];
|
|
835
|
+
/**
|
|
836
|
+
* The time after the workflow run was created
|
|
837
|
+
* @format date-time
|
|
838
|
+
* @example "2021-01-01T00:00:00Z"
|
|
839
|
+
*/
|
|
840
|
+
createdAfter?: string;
|
|
841
|
+
/**
|
|
842
|
+
* The time before the workflow run was created
|
|
843
|
+
* @format date-time
|
|
844
|
+
* @example "2021-01-01T00:00:00Z"
|
|
845
|
+
*/
|
|
846
|
+
createdBefore?: string;
|
|
847
|
+
/**
|
|
848
|
+
* The time after the workflow run was finished
|
|
849
|
+
* @format date-time
|
|
850
|
+
* @example "2021-01-01T00:00:00Z"
|
|
851
|
+
*/
|
|
852
|
+
finishedAfter?: string;
|
|
853
|
+
/**
|
|
854
|
+
* The time before the workflow run was finished
|
|
855
|
+
* @format date-time
|
|
856
|
+
* @example "2021-01-01T00:00:00Z"
|
|
857
|
+
*/
|
|
858
|
+
finishedBefore?: string;
|
|
859
|
+
/** The order by field */
|
|
860
|
+
orderByField?: WorkflowRunOrderByField;
|
|
861
|
+
/** The order by direction */
|
|
862
|
+
orderByDirection?: WorkflowRunOrderByDirection;
|
|
754
863
|
}, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunList, any>>;
|
|
864
|
+
/**
|
|
865
|
+
* @description Replays a list of workflow runs.
|
|
866
|
+
*
|
|
867
|
+
* @tags Workflow Run
|
|
868
|
+
* @name WorkflowRunUpdateReplay
|
|
869
|
+
* @summary Replay workflow runs
|
|
870
|
+
* @request POST:/api/v1/tenants/{tenant}/workflow-runs/replay
|
|
871
|
+
* @secure
|
|
872
|
+
*/
|
|
873
|
+
workflowRunUpdateReplay: (tenant: string, data: ReplayWorkflowRunsRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<ReplayWorkflowRunsResponse, any>>;
|
|
755
874
|
/**
|
|
756
875
|
* @description Get a summary of workflow run metrics for a tenant
|
|
757
876
|
*
|
|
@@ -795,6 +914,18 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
795
914
|
* @example ["key1:value1","key2:value2"]
|
|
796
915
|
*/
|
|
797
916
|
additionalMetadata?: string[];
|
|
917
|
+
/**
|
|
918
|
+
* The time after the workflow run was created
|
|
919
|
+
* @format date-time
|
|
920
|
+
* @example "2021-01-01T00:00:00Z"
|
|
921
|
+
*/
|
|
922
|
+
createdAfter?: string;
|
|
923
|
+
/**
|
|
924
|
+
* The time before the workflow run was created
|
|
925
|
+
* @format date-time
|
|
926
|
+
* @example "2021-01-01T00:00:00Z"
|
|
927
|
+
*/
|
|
928
|
+
createdBefore?: string;
|
|
798
929
|
}, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunsMetrics, any>>;
|
|
799
930
|
/**
|
|
800
931
|
* @description Get a workflow run for a tenant
|
|
@@ -806,6 +937,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
806
937
|
* @secure
|
|
807
938
|
*/
|
|
808
939
|
workflowRunGet: (tenant: string, workflowRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRun, any>>;
|
|
940
|
+
/**
|
|
941
|
+
* @description Get a workflow run for a tenant
|
|
942
|
+
*
|
|
943
|
+
* @tags Workflow
|
|
944
|
+
* @name WorkflowRunGetShape
|
|
945
|
+
* @summary Get workflow run
|
|
946
|
+
* @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/shape
|
|
947
|
+
* @secure
|
|
948
|
+
*/
|
|
949
|
+
workflowRunGetShape: (tenant: string, workflowRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunShape, any>>;
|
|
809
950
|
/**
|
|
810
951
|
* @description Get a step run by id
|
|
811
952
|
*
|
|
@@ -856,6 +997,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
856
997
|
* @secure
|
|
857
998
|
*/
|
|
858
999
|
workerList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkerList, any>>;
|
|
1000
|
+
/**
|
|
1001
|
+
* @description Update a worker
|
|
1002
|
+
*
|
|
1003
|
+
* @tags Worker
|
|
1004
|
+
* @name WorkerUpdate
|
|
1005
|
+
* @summary Update worker
|
|
1006
|
+
* @request PATCH:/api/v1/workers/{worker}
|
|
1007
|
+
* @secure
|
|
1008
|
+
*/
|
|
1009
|
+
workerUpdate: (worker: string, data: UpdateWorkerRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<Worker, any>>;
|
|
859
1010
|
/**
|
|
860
1011
|
* @description Get a worker
|
|
861
1012
|
*
|
|
@@ -893,4 +1044,23 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
893
1044
|
* @secure
|
|
894
1045
|
*/
|
|
895
1046
|
webhookDelete: (webhook: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
|
|
1047
|
+
/**
|
|
1048
|
+
* @description Lists all requests for a webhook
|
|
1049
|
+
*
|
|
1050
|
+
* @name WebhookRequestsList
|
|
1051
|
+
* @summary List webhook requests
|
|
1052
|
+
* @request GET:/api/v1/webhook-workers/{webhook}/requests
|
|
1053
|
+
* @secure
|
|
1054
|
+
*/
|
|
1055
|
+
webhookRequestsList: (webhook: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WebhookWorkerRequestListResponse, any>>;
|
|
1056
|
+
/**
|
|
1057
|
+
* @description Get the input for a workflow run.
|
|
1058
|
+
*
|
|
1059
|
+
* @tags Workflow Run
|
|
1060
|
+
* @name WorkflowRunGetInput
|
|
1061
|
+
* @summary Get workflow run input
|
|
1062
|
+
* @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/input
|
|
1063
|
+
* @secure
|
|
1064
|
+
*/
|
|
1065
|
+
workflowRunGetInput: (tenant: string, workflowRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<Record<string, any>, any>>;
|
|
896
1066
|
}
|
|
@@ -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,26 @@ 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));
|
|
475
|
+
/**
|
|
476
|
+
* @description Lists all rate limits for a tenant.
|
|
477
|
+
*
|
|
478
|
+
* @tags Rate Limits
|
|
479
|
+
* @name RateLimitList
|
|
480
|
+
* @summary List rate limits
|
|
481
|
+
* @request GET:/api/v1/tenants/{tenant}/rate-limits
|
|
482
|
+
* @secure
|
|
483
|
+
*/
|
|
484
|
+
this.rateLimitList = (tenant, query, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/rate-limits`, method: 'GET', query: query, secure: true, format: 'json' }, params));
|
|
455
485
|
/**
|
|
456
486
|
* @description Gets a list of tenant members
|
|
457
487
|
*
|
|
@@ -472,6 +502,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
472
502
|
* @secure
|
|
473
503
|
*/
|
|
474
504
|
this.tenantMemberDelete = (tenant, member, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/members/${member}`, method: 'DELETE', secure: true, format: 'json' }, params));
|
|
505
|
+
/**
|
|
506
|
+
* @description Get an event.
|
|
507
|
+
*
|
|
508
|
+
* @tags Event
|
|
509
|
+
* @name EventGet
|
|
510
|
+
* @summary Get event data
|
|
511
|
+
* @request GET:/api/v1/events/{event}
|
|
512
|
+
* @secure
|
|
513
|
+
*/
|
|
514
|
+
this.eventGet = (event, params = {}) => this.request(Object.assign({ path: `/api/v1/events/${event}`, method: 'GET', secure: true, format: 'json' }, params));
|
|
475
515
|
/**
|
|
476
516
|
* @description Get the data for an event.
|
|
477
517
|
*
|
|
@@ -532,6 +572,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
532
572
|
* @secure
|
|
533
573
|
*/
|
|
534
574
|
this.workflowDelete = (workflow, params = {}) => this.request(Object.assign({ path: `/api/v1/workflows/${workflow}`, method: 'DELETE', secure: true }, params));
|
|
575
|
+
/**
|
|
576
|
+
* @description Update a workflow for a tenant
|
|
577
|
+
*
|
|
578
|
+
* @tags Workflow
|
|
579
|
+
* @name WorkflowUpdate
|
|
580
|
+
* @summary Update workflow
|
|
581
|
+
* @request PATCH:/api/v1/workflows/{workflow}
|
|
582
|
+
* @secure
|
|
583
|
+
*/
|
|
584
|
+
this.workflowUpdate = (workflow, data, params = {}) => this.request(Object.assign({ path: `/api/v1/workflows/${workflow}`, method: 'PATCH', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
|
|
535
585
|
/**
|
|
536
586
|
* @description Get a workflow version for a tenant
|
|
537
587
|
*
|
|
@@ -552,16 +602,6 @@ class Api extends http_client_1.HttpClient {
|
|
|
552
602
|
* @secure
|
|
553
603
|
*/
|
|
554
604
|
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
605
|
/**
|
|
566
606
|
* @description Get the metrics for a workflow version
|
|
567
607
|
*
|
|
@@ -592,6 +632,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
592
632
|
* @secure
|
|
593
633
|
*/
|
|
594
634
|
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));
|
|
635
|
+
/**
|
|
636
|
+
* @description List events for all step runs for a workflow run
|
|
637
|
+
*
|
|
638
|
+
* @tags Step Run
|
|
639
|
+
* @name WorkflowRunListStepRunEvents
|
|
640
|
+
* @summary List events for all step runs for a workflow run
|
|
641
|
+
* @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/step-run-events
|
|
642
|
+
* @secure
|
|
643
|
+
*/
|
|
644
|
+
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
645
|
/**
|
|
596
646
|
* @description List archives for a step run
|
|
597
647
|
*
|
|
@@ -602,6 +652,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
602
652
|
* @secure
|
|
603
653
|
*/
|
|
604
654
|
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));
|
|
655
|
+
/**
|
|
656
|
+
* @description Get a count of the workers available for workflow
|
|
657
|
+
*
|
|
658
|
+
* @tags Workflow
|
|
659
|
+
* @name WorkflowGetWorkersCount
|
|
660
|
+
* @summary Get workflow worker count
|
|
661
|
+
* @request GET:/api/v1/tenants/{tenant}/workflows/{workflow}/worker-count
|
|
662
|
+
* @secure
|
|
663
|
+
*/
|
|
664
|
+
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
665
|
/**
|
|
606
666
|
* @description Get all workflow runs for a tenant
|
|
607
667
|
*
|
|
@@ -612,6 +672,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
612
672
|
* @secure
|
|
613
673
|
*/
|
|
614
674
|
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));
|
|
675
|
+
/**
|
|
676
|
+
* @description Replays a list of workflow runs.
|
|
677
|
+
*
|
|
678
|
+
* @tags Workflow Run
|
|
679
|
+
* @name WorkflowRunUpdateReplay
|
|
680
|
+
* @summary Replay workflow runs
|
|
681
|
+
* @request POST:/api/v1/tenants/{tenant}/workflow-runs/replay
|
|
682
|
+
* @secure
|
|
683
|
+
*/
|
|
684
|
+
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
685
|
/**
|
|
616
686
|
* @description Get a summary of workflow run metrics for a tenant
|
|
617
687
|
*
|
|
@@ -632,6 +702,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
632
702
|
* @secure
|
|
633
703
|
*/
|
|
634
704
|
this.workflowRunGet = (tenant, workflowRun, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/${workflowRun}`, method: 'GET', secure: true, format: 'json' }, params));
|
|
705
|
+
/**
|
|
706
|
+
* @description Get a workflow run for a tenant
|
|
707
|
+
*
|
|
708
|
+
* @tags Workflow
|
|
709
|
+
* @name WorkflowRunGetShape
|
|
710
|
+
* @summary Get workflow run
|
|
711
|
+
* @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/shape
|
|
712
|
+
* @secure
|
|
713
|
+
*/
|
|
714
|
+
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
715
|
/**
|
|
636
716
|
* @description Get a step run by id
|
|
637
717
|
*
|
|
@@ -682,6 +762,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
682
762
|
* @secure
|
|
683
763
|
*/
|
|
684
764
|
this.workerList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/worker`, method: 'GET', secure: true, format: 'json' }, params));
|
|
765
|
+
/**
|
|
766
|
+
* @description Update a worker
|
|
767
|
+
*
|
|
768
|
+
* @tags Worker
|
|
769
|
+
* @name WorkerUpdate
|
|
770
|
+
* @summary Update worker
|
|
771
|
+
* @request PATCH:/api/v1/workers/{worker}
|
|
772
|
+
* @secure
|
|
773
|
+
*/
|
|
774
|
+
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
775
|
/**
|
|
686
776
|
* @description Get a worker
|
|
687
777
|
*
|
|
@@ -719,6 +809,25 @@ class Api extends http_client_1.HttpClient {
|
|
|
719
809
|
* @secure
|
|
720
810
|
*/
|
|
721
811
|
this.webhookDelete = (webhook, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook-workers/${webhook}`, method: 'DELETE', secure: true }, params));
|
|
812
|
+
/**
|
|
813
|
+
* @description Lists all requests for a webhook
|
|
814
|
+
*
|
|
815
|
+
* @name WebhookRequestsList
|
|
816
|
+
* @summary List webhook requests
|
|
817
|
+
* @request GET:/api/v1/webhook-workers/{webhook}/requests
|
|
818
|
+
* @secure
|
|
819
|
+
*/
|
|
820
|
+
this.webhookRequestsList = (webhook, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook-workers/${webhook}/requests`, method: 'GET', secure: true, format: 'json' }, params));
|
|
821
|
+
/**
|
|
822
|
+
* @description Get the input for a workflow run.
|
|
823
|
+
*
|
|
824
|
+
* @tags Workflow Run
|
|
825
|
+
* @name WorkflowRunGetInput
|
|
826
|
+
* @summary Get workflow run input
|
|
827
|
+
* @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/input
|
|
828
|
+
* @secure
|
|
829
|
+
*/
|
|
830
|
+
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
831
|
}
|
|
723
832
|
}
|
|
724
833
|
exports.Api = Api;
|