@hatchet-dev/typescript-sdk 0.6.1 → 0.7.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.
@@ -56,8 +56,8 @@ class AdminClient {
56
56
  }
57
57
  });
58
58
  }
59
- put_rate_limit(key, limit, duration = workflows_1.RateLimitDuration.SECOND) {
60
- return __awaiter(this, void 0, void 0, function* () {
59
+ put_rate_limit(key_1, limit_1) {
60
+ return __awaiter(this, arguments, void 0, function* (key, limit, duration = workflows_1.RateLimitDuration.SECOND) {
61
61
  try {
62
62
  yield (0, retrier_1.retrier)(() => __awaiter(this, void 0, void 0, function* () {
63
63
  return this.client.putRateLimit({
@@ -18,5 +18,6 @@ export declare class DispatcherClient {
18
18
  sendStepActionEvent(in_: StepActionEvent): Promise<import("../../protoc/dispatcher").ActionEventResponse>;
19
19
  sendGroupKeyActionEvent(in_: GroupKeyActionEvent): Promise<import("../../protoc/dispatcher").ActionEventResponse>;
20
20
  putOverridesData(in_: DeepPartial<OverridesData>): Promise<void | import("../../protoc/dispatcher").OverridesDataResponse>;
21
+ refreshTimeout(incrementTimeoutBy: string, stepRunId: string): Promise<import("../../protoc/dispatcher").RefreshTimeoutResponse>;
21
22
  }
22
23
  export {};
@@ -58,5 +58,18 @@ class DispatcherClient {
58
58
  });
59
59
  });
60
60
  }
61
+ refreshTimeout(incrementTimeoutBy, stepRunId) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ try {
64
+ return this.client.refreshTimeout({
65
+ stepRunId,
66
+ incrementTimeoutBy,
67
+ });
68
+ }
69
+ catch (e) {
70
+ throw new hatchet_error_1.default(e.message);
71
+ }
72
+ });
73
+ }
61
74
  }
62
75
  exports.DispatcherClient = DispatcherClient;
@@ -36,8 +36,8 @@ class Heartbeat {
36
36
  });
37
37
  }
38
38
  stop() {
39
- var _a, _b;
40
39
  return __awaiter(this, void 0, void 0, function* () {
40
+ var _a, _b;
41
41
  (_a = this.heartbeatWorker) === null || _a === void 0 ? void 0 : _a.postMessage('stop');
42
42
  (_b = this.heartbeatWorker) === null || _b === void 0 ? void 0 : _b.terminate();
43
43
  this.heartbeatWorker = undefined;
@@ -14,7 +14,7 @@ export interface HatchetClientOptions {
14
14
  credentials?: ChannelCredentials;
15
15
  }
16
16
  export declare const channelFactory: (config: ClientConfig, credentials: ChannelCredentials) => import("nice-grpc").Channel;
17
- export declare const addTokenMiddleware: (token: string) => <Request_1, Response_1>(call: ClientMiddlewareCall<Request_1, Response_1>, options: CallOptions) => AsyncGenerator<Awaited<Response_1>, Awaited<Response_1> | undefined, undefined>;
17
+ export declare const addTokenMiddleware: (token: string) => <Request, Response>(call: ClientMiddlewareCall<Request, Response>, options: CallOptions) => AsyncGenerator<Awaited<Response>, Awaited<Response> | undefined, undefined>;
18
18
  export declare class HatchetClient {
19
19
  config: ClientConfig;
20
20
  credentials: ChannelCredentials;
@@ -5,13 +5,13 @@ import { ListenerClient } from './listener-client';
5
5
  export declare class Streamable {
6
6
  listener: AsyncIterable<WorkflowRunEvent>;
7
7
  id: string;
8
- responseEmitter: EventEmitter;
8
+ responseEmitter: EventEmitter<[never]>;
9
9
  constructor(listener: AsyncIterable<WorkflowRunEvent>, id: string);
10
10
  stream(): AsyncGenerator<WorkflowRunEvent, void, unknown>;
11
11
  }
12
12
  export declare class GrpcPooledListener {
13
13
  listener: AsyncIterable<WorkflowRunEvent> | undefined;
14
- requestEmitter: EventEmitter;
14
+ requestEmitter: EventEmitter<[never]>;
15
15
  signal: AbortController;
16
16
  client: ListenerClient;
17
17
  subscribers: Record<string, Streamable>;
@@ -68,9 +68,9 @@ class GrpcPooledListener {
68
68
  this.init();
69
69
  this.onFinish = onFinish;
70
70
  }
71
- init(retries = 0) {
72
- var _a, e_1, _b, _c;
73
- return __awaiter(this, void 0, void 0, function* () {
71
+ init() {
72
+ return __awaiter(this, arguments, void 0, function* (retries = 0) {
73
+ var _a, e_1, _b, _c;
74
74
  if (retries > DEFAULT_EVENT_LISTENER_RETRY_COUNT)
75
75
  return;
76
76
  if (retries > 0) {
@@ -26,7 +26,7 @@ export interface StepRunEvent {
26
26
  export declare class PollingAsyncListener {
27
27
  client: ListenerClient;
28
28
  q: Array<StepRunEvent>;
29
- eventEmitter: EventEmitter;
29
+ eventEmitter: EventEmitter<[never]>;
30
30
  pollInterval: any;
31
31
  constructor(workflowRunid: string, client: ListenerClient);
32
32
  emit(event: StepRunEvent): void;
@@ -107,9 +107,9 @@ class PollingAsyncListener {
107
107
  this.eventEmitter.emit('event');
108
108
  }
109
109
  listen(workflowRunId) {
110
- var _a, e_1, _b, _c;
111
- var _d;
112
110
  return __awaiter(this, void 0, void 0, function* () {
111
+ var _a, e_1, _b, _c;
112
+ var _d;
113
113
  let listener = this.client.client.subscribeToWorkflowEvents({
114
114
  workflowRunId,
115
115
  });
@@ -180,8 +180,8 @@ class PollingAsyncListener {
180
180
  });
181
181
  }
182
182
  getWorkflowRun(workflowRunId) {
183
- var _a, _b, _c;
184
183
  return __awaiter(this, void 0, void 0, function* () {
184
+ var _a, _b, _c;
185
185
  try {
186
186
  const res = yield this.client.api.workflowRunGet(this.client.config.tenant_id, workflowRunId);
187
187
  const stepRuns = (_c = (_b = (_a = res.data.jobRuns) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.stepRuns) !== null && _c !== void 0 ? _c : [];
@@ -1,4 +1,4 @@
1
- import { APIMeta, AcceptInviteRequest, CreateAPITokenRequest, CreateAPITokenResponse, CreatePullRequestFromStepRun, CreateSNSIntegrationRequest, CreateTenantInviteRequest, CreateTenantRequest, EventData, EventKey, EventKeyList, EventList, EventOrderByDirection, EventOrderByField, EventSearch, GetStepRunDiffResponse, LinkGithubRepositoryRequest, ListAPIMetaIntegration, ListAPITokensResponse, ListGithubAppInstallationsResponse, ListGithubBranchesResponse, ListGithubReposResponse, ListPullRequestsResponse, ListSNSIntegrations, LogLineLevelField, LogLineList, LogLineOrderByDirection, LogLineOrderByField, LogLineSearch, PullRequestState, RejectInviteRequest, ReplayEventRequest, RerunStepRunRequest, SNSIntegration, StepRun, Tenant, TenantInvite, TenantInviteList, TenantMemberList, TriggerWorkflowRunRequest, UpdateTenantInviteRequest, User, UserChangePasswordRequest, UserLoginRequest, UserRegisterRequest, UserTenantMembershipsList, Worker, WorkerList, Workflow, WorkflowID, WorkflowList, WorkflowMetrics, WorkflowRun, WorkflowRunList, WorkflowRunStatus, WorkflowRunStatusList, WorkflowVersion, WorkflowVersionDefinition } from './data-contracts';
1
+ import { APIMeta, AcceptInviteRequest, CreateAPITokenRequest, CreateAPITokenResponse, CreatePullRequestFromStepRun, CreateSNSIntegrationRequest, CreateTenantAlertEmailGroupRequest, CreateTenantInviteRequest, CreateTenantRequest, EventData, EventKey, EventKeyList, EventList, EventOrderByDirection, EventOrderByField, EventSearch, GetStepRunDiffResponse, LinkGithubRepositoryRequest, ListAPIMetaIntegration, ListAPITokensResponse, ListGithubAppInstallationsResponse, ListGithubBranchesResponse, ListGithubReposResponse, ListPullRequestsResponse, ListSNSIntegrations, ListSlackWebhooks, LogLineLevelField, LogLineList, LogLineOrderByDirection, LogLineOrderByField, LogLineSearch, PullRequestState, RejectInviteRequest, ReplayEventRequest, RerunStepRunRequest, SNSIntegration, StepRun, StepRunEventList, Tenant, TenantAlertEmailGroup, TenantAlertEmailGroupList, TenantAlertingSettings, TenantInvite, TenantInviteList, TenantMemberList, TriggerWorkflowRunRequest, UpdateTenantAlertEmailGroupRequest, UpdateTenantInviteRequest, UpdateTenantRequest, User, UserChangePasswordRequest, UserLoginRequest, UserRegisterRequest, UserTenantMembershipsList, Worker, WorkerList, Workflow, WorkflowID, WorkflowList, WorkflowMetrics, WorkflowRun, WorkflowRunList, WorkflowRunStatus, WorkflowRunStatusList, WorkflowRunsCancelRequest, WorkflowRunsMetrics, WorkflowVersion, WorkflowVersionDefinition } from './data-contracts';
2
2
  import { HttpClient, RequestParams } from './http-client';
3
3
  export declare class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4
4
  /**
@@ -72,7 +72,6 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
72
72
  * @name UserUpdateGithubOauthStart
73
73
  * @summary Start OAuth flow
74
74
  * @request GET:/api/v1/users/github/start
75
- * @secure
76
75
  */
77
76
  userUpdateGithubOauthStart: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
78
77
  /**
@@ -82,9 +81,48 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
82
81
  * @name UserUpdateGithubOauthCallback
83
82
  * @summary Complete OAuth flow
84
83
  * @request GET:/api/v1/users/github/callback
85
- * @secure
86
84
  */
87
85
  userUpdateGithubOauthCallback: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
86
+ /**
87
+ * @description Starts the OAuth flow
88
+ *
89
+ * @tags User
90
+ * @name UserUpdateGithubAppOauthStart
91
+ * @summary Start OAuth flow
92
+ * @request GET:/api/v1/users/github-app/start
93
+ * @secure
94
+ */
95
+ userUpdateGithubAppOauthStart: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
96
+ /**
97
+ * @description Completes the OAuth flow
98
+ *
99
+ * @tags User
100
+ * @name UserUpdateGithubAppOauthCallback
101
+ * @summary Complete OAuth flow
102
+ * @request GET:/api/v1/users/github-app/callback
103
+ * @secure
104
+ */
105
+ userUpdateGithubAppOauthCallback: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
106
+ /**
107
+ * @description Starts the OAuth flow
108
+ *
109
+ * @tags User
110
+ * @name UserUpdateSlackOauthStart
111
+ * @summary Start OAuth flow
112
+ * @request GET:/api/v1/tenants/{tenant}/slack/start
113
+ * @secure
114
+ */
115
+ userUpdateSlackOauthStart: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
116
+ /**
117
+ * @description Completes the OAuth flow
118
+ *
119
+ * @tags User
120
+ * @name UserUpdateSlackOauthCallback
121
+ * @summary Complete OAuth flow
122
+ * @request GET:/api/v1/users/slack/callback
123
+ * @secure
124
+ */
125
+ userUpdateSlackOauthCallback: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
88
126
  /**
89
127
  * @description Github App global webhook
90
128
  *
@@ -132,6 +170,46 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
132
170
  * @secure
133
171
  */
134
172
  snsCreate: (tenant: string, data: CreateSNSIntegrationRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<SNSIntegration, any>>;
173
+ /**
174
+ * @description Creates a new tenant alert email group
175
+ *
176
+ * @tags Tenant
177
+ * @name AlertEmailGroupCreate
178
+ * @summary Create tenant alert email group
179
+ * @request POST:/api/v1/tenants/{tenant}/alerting-email-groups
180
+ * @secure
181
+ */
182
+ alertEmailGroupCreate: (tenant: string, data: CreateTenantAlertEmailGroupRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantAlertEmailGroup, any>>;
183
+ /**
184
+ * @description Gets a list of tenant alert email groups
185
+ *
186
+ * @tags Tenant
187
+ * @name AlertEmailGroupList
188
+ * @summary List tenant alert email groups
189
+ * @request GET:/api/v1/tenants/{tenant}/alerting-email-groups
190
+ * @secure
191
+ */
192
+ alertEmailGroupList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantAlertEmailGroupList, any>>;
193
+ /**
194
+ * @description Updates a tenant alert email group
195
+ *
196
+ * @tags Tenant
197
+ * @name AlertEmailGroupUpdate
198
+ * @summary Update tenant alert email group
199
+ * @request PATCH:/api/v1/alerting-email-groups/{alert-email-group}
200
+ * @secure
201
+ */
202
+ alertEmailGroupUpdate: (alertEmailGroup: string, data: UpdateTenantAlertEmailGroupRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantAlertEmailGroup, any>>;
203
+ /**
204
+ * @description Deletes a tenant alert email group
205
+ *
206
+ * @tags Tenant
207
+ * @name AlertEmailGroupDelete
208
+ * @summary Delete tenant alert email group
209
+ * @request DELETE:/api/v1/alerting-email-groups/{alert-email-group}
210
+ * @secure
211
+ */
212
+ alertEmailGroupDelete: (alertEmailGroup: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
135
213
  /**
136
214
  * @description Delete SNS integration
137
215
  *
@@ -142,6 +220,26 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
142
220
  * @secure
143
221
  */
144
222
  snsDelete: (sns: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
223
+ /**
224
+ * @description List Slack webhooks
225
+ *
226
+ * @tags Slack
227
+ * @name SlackWebhookList
228
+ * @summary List Slack integrations
229
+ * @request GET:/api/v1/tenants/{tenant}/slack
230
+ * @secure
231
+ */
232
+ slackWebhookList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<ListSlackWebhooks, any>>;
233
+ /**
234
+ * @description Delete Slack webhook
235
+ *
236
+ * @tags Slack
237
+ * @name SlackWebhookDelete
238
+ * @summary Delete Slack webhook
239
+ * @request DELETE:/api/v1/slack/{slack}
240
+ * @secure
241
+ */
242
+ slackWebhookDelete: (slack: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
145
243
  /**
146
244
  * @description Gets the current user
147
245
  *
@@ -231,6 +329,26 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
231
329
  * @secure
232
330
  */
233
331
  tenantCreate: (data: CreateTenantRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<Tenant, any>>;
332
+ /**
333
+ * @description Update an existing tenant
334
+ *
335
+ * @tags Tenant
336
+ * @name TenantUpdate
337
+ * @summary Update tenant
338
+ * @request PATCH:/api/v1/tenants/{tenant}
339
+ * @secure
340
+ */
341
+ tenantUpdate: (tenant: string, data: UpdateTenantRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<Tenant, any>>;
342
+ /**
343
+ * @description Gets the alerting settings for a tenant
344
+ *
345
+ * @tags Tenant
346
+ * @name TenantAlertingSettingsGet
347
+ * @summary Get tenant alerting settings
348
+ * @request GET:/api/v1/tenants/{tenant}/alerting/settings
349
+ * @secure
350
+ */
351
+ tenantAlertingSettingsGet: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantAlertingSettings, any>>;
234
352
  /**
235
353
  * @description Creates a new tenant invite
236
354
  *
@@ -331,6 +449,11 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
331
449
  orderByField?: EventOrderByField;
332
450
  /** The order direction */
333
451
  orderByDirection?: EventOrderByDirection;
452
+ /**
453
+ * A list of metadata key value pairs to filter by
454
+ * @example ["key1:value1","key2:value2"]
455
+ */
456
+ additionalMetadata?: string[];
334
457
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<EventList, any>>;
335
458
  /**
336
459
  * @description Replays a list of events.
@@ -382,6 +505,18 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
382
505
  * @secure
383
506
  */
384
507
  workflowList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowList, any>>;
508
+ /**
509
+ * @description Cancel a batch of workflow runs
510
+ *
511
+ * @tags Workflow Run
512
+ * @name WorkflowRunCancel
513
+ * @summary Cancel workflow runs
514
+ * @request POST:/api/v1/tenants/{tenant}/workflows/cancel
515
+ * @secure
516
+ */
517
+ workflowRunCancel: (tenant: string, data: WorkflowRunsCancelRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<{
518
+ workflowRunIds?: string[] | undefined;
519
+ }, any>>;
385
520
  /**
386
521
  * @description Get a workflow for a tenant
387
522
  *
@@ -530,6 +665,27 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
530
665
  * @secure
531
666
  */
532
667
  stepRunGetDiff: (stepRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<GetStepRunDiffResponse, any>>;
668
+ /**
669
+ * @description List events for a step run
670
+ *
671
+ * @tags Step Run
672
+ * @name StepRunListEvents
673
+ * @summary List events for step run
674
+ * @request GET:/api/v1/step-runs/{step-run}/events
675
+ * @secure
676
+ */
677
+ stepRunListEvents: (stepRun: string, query?: {
678
+ /**
679
+ * The number to skip
680
+ * @format int64
681
+ */
682
+ offset?: number;
683
+ /**
684
+ * The number to limit by
685
+ * @format int64
686
+ */
687
+ limit?: number;
688
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRunEventList, any>>;
533
689
  /**
534
690
  * @description Get all workflow runs for a tenant
535
691
  *
@@ -578,7 +734,58 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
578
734
  * @maxLength 36
579
735
  */
580
736
  parentStepRunId?: string;
737
+ /** A list of workflow run statuses to filter by */
738
+ statuses?: WorkflowRunStatusList;
739
+ /**
740
+ * A list of metadata key value pairs to filter by
741
+ * @example ["key1:value1","key2:value2"]
742
+ */
743
+ additionalMetadata?: string[];
581
744
  }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunList, any>>;
745
+ /**
746
+ * @description Get a summary of workflow run metrics for a tenant
747
+ *
748
+ * @tags Workflow
749
+ * @name WorkflowRunGetMetrics
750
+ * @summary Get workflow runs
751
+ * @request GET:/api/v1/tenants/{tenant}/workflows/runs/metrics
752
+ * @secure
753
+ */
754
+ workflowRunGetMetrics: (tenant: string, query?: {
755
+ /**
756
+ * The event id to get runs for.
757
+ * @format uuid
758
+ * @minLength 36
759
+ * @maxLength 36
760
+ */
761
+ eventId?: string;
762
+ /**
763
+ * The workflow id to get runs for.
764
+ * @format uuid
765
+ * @minLength 36
766
+ * @maxLength 36
767
+ */
768
+ workflowId?: string;
769
+ /**
770
+ * The parent workflow run id
771
+ * @format uuid
772
+ * @minLength 36
773
+ * @maxLength 36
774
+ */
775
+ parentWorkflowRunId?: string;
776
+ /**
777
+ * The parent step run id
778
+ * @format uuid
779
+ * @minLength 36
780
+ * @maxLength 36
781
+ */
782
+ parentStepRunId?: string;
783
+ /**
784
+ * A list of metadata key value pairs to filter by
785
+ * @example ["key1:value1","key2:value2"]
786
+ */
787
+ additionalMetadata?: string[];
788
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunsMetrics, any>>;
582
789
  /**
583
790
  * @description Get a workflow run for a tenant
584
791
  *
@@ -86,9 +86,8 @@ class Api extends http_client_1.HttpClient {
86
86
  * @name UserUpdateGithubOauthStart
87
87
  * @summary Start OAuth flow
88
88
  * @request GET:/api/v1/users/github/start
89
- * @secure
90
89
  */
91
- this.userUpdateGithubOauthStart = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github/start`, method: 'GET', secure: true }, params));
90
+ this.userUpdateGithubOauthStart = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github/start`, method: 'GET' }, params));
92
91
  /**
93
92
  * @description Completes the OAuth flow
94
93
  *
@@ -96,9 +95,48 @@ class Api extends http_client_1.HttpClient {
96
95
  * @name UserUpdateGithubOauthCallback
97
96
  * @summary Complete OAuth flow
98
97
  * @request GET:/api/v1/users/github/callback
98
+ */
99
+ this.userUpdateGithubOauthCallback = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github/callback`, method: 'GET' }, params));
100
+ /**
101
+ * @description Starts the OAuth flow
102
+ *
103
+ * @tags User
104
+ * @name UserUpdateGithubAppOauthStart
105
+ * @summary Start OAuth flow
106
+ * @request GET:/api/v1/users/github-app/start
107
+ * @secure
108
+ */
109
+ this.userUpdateGithubAppOauthStart = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github-app/start`, method: 'GET', secure: true }, params));
110
+ /**
111
+ * @description Completes the OAuth flow
112
+ *
113
+ * @tags User
114
+ * @name UserUpdateGithubAppOauthCallback
115
+ * @summary Complete OAuth flow
116
+ * @request GET:/api/v1/users/github-app/callback
117
+ * @secure
118
+ */
119
+ this.userUpdateGithubAppOauthCallback = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github-app/callback`, method: 'GET', secure: true }, params));
120
+ /**
121
+ * @description Starts the OAuth flow
122
+ *
123
+ * @tags User
124
+ * @name UserUpdateSlackOauthStart
125
+ * @summary Start OAuth flow
126
+ * @request GET:/api/v1/tenants/{tenant}/slack/start
99
127
  * @secure
100
128
  */
101
- this.userUpdateGithubOauthCallback = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github/callback`, method: 'GET', secure: true }, params));
129
+ this.userUpdateSlackOauthStart = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/slack/start`, method: 'GET', secure: true }, params));
130
+ /**
131
+ * @description Completes the OAuth flow
132
+ *
133
+ * @tags User
134
+ * @name UserUpdateSlackOauthCallback
135
+ * @summary Complete OAuth flow
136
+ * @request GET:/api/v1/users/slack/callback
137
+ * @secure
138
+ */
139
+ this.userUpdateSlackOauthCallback = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/slack/callback`, method: 'GET', secure: true }, params));
102
140
  /**
103
141
  * @description Github App global webhook
104
142
  *
@@ -146,6 +184,46 @@ class Api extends http_client_1.HttpClient {
146
184
  * @secure
147
185
  */
148
186
  this.snsCreate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/sns`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
187
+ /**
188
+ * @description Creates a new tenant alert email group
189
+ *
190
+ * @tags Tenant
191
+ * @name AlertEmailGroupCreate
192
+ * @summary Create tenant alert email group
193
+ * @request POST:/api/v1/tenants/{tenant}/alerting-email-groups
194
+ * @secure
195
+ */
196
+ this.alertEmailGroupCreate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/alerting-email-groups`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
197
+ /**
198
+ * @description Gets a list of tenant alert email groups
199
+ *
200
+ * @tags Tenant
201
+ * @name AlertEmailGroupList
202
+ * @summary List tenant alert email groups
203
+ * @request GET:/api/v1/tenants/{tenant}/alerting-email-groups
204
+ * @secure
205
+ */
206
+ this.alertEmailGroupList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/alerting-email-groups`, method: 'GET', secure: true, format: 'json' }, params));
207
+ /**
208
+ * @description Updates a tenant alert email group
209
+ *
210
+ * @tags Tenant
211
+ * @name AlertEmailGroupUpdate
212
+ * @summary Update tenant alert email group
213
+ * @request PATCH:/api/v1/alerting-email-groups/{alert-email-group}
214
+ * @secure
215
+ */
216
+ this.alertEmailGroupUpdate = (alertEmailGroup, data, params = {}) => this.request(Object.assign({ path: `/api/v1/alerting-email-groups/${alertEmailGroup}`, method: 'PATCH', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
217
+ /**
218
+ * @description Deletes a tenant alert email group
219
+ *
220
+ * @tags Tenant
221
+ * @name AlertEmailGroupDelete
222
+ * @summary Delete tenant alert email group
223
+ * @request DELETE:/api/v1/alerting-email-groups/{alert-email-group}
224
+ * @secure
225
+ */
226
+ this.alertEmailGroupDelete = (alertEmailGroup, params = {}) => this.request(Object.assign({ path: `/api/v1/alerting-email-groups/${alertEmailGroup}`, method: 'DELETE', secure: true }, params));
149
227
  /**
150
228
  * @description Delete SNS integration
151
229
  *
@@ -156,6 +234,26 @@ class Api extends http_client_1.HttpClient {
156
234
  * @secure
157
235
  */
158
236
  this.snsDelete = (sns, params = {}) => this.request(Object.assign({ path: `/api/v1/sns/${sns}`, method: 'DELETE', secure: true }, params));
237
+ /**
238
+ * @description List Slack webhooks
239
+ *
240
+ * @tags Slack
241
+ * @name SlackWebhookList
242
+ * @summary List Slack integrations
243
+ * @request GET:/api/v1/tenants/{tenant}/slack
244
+ * @secure
245
+ */
246
+ this.slackWebhookList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/slack`, method: 'GET', secure: true, format: 'json' }, params));
247
+ /**
248
+ * @description Delete Slack webhook
249
+ *
250
+ * @tags Slack
251
+ * @name SlackWebhookDelete
252
+ * @summary Delete Slack webhook
253
+ * @request DELETE:/api/v1/slack/{slack}
254
+ * @secure
255
+ */
256
+ this.slackWebhookDelete = (slack, params = {}) => this.request(Object.assign({ path: `/api/v1/slack/${slack}`, method: 'DELETE', secure: true }, params));
159
257
  /**
160
258
  * @description Gets the current user
161
259
  *
@@ -245,6 +343,26 @@ class Api extends http_client_1.HttpClient {
245
343
  * @secure
246
344
  */
247
345
  this.tenantCreate = (data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
346
+ /**
347
+ * @description Update an existing tenant
348
+ *
349
+ * @tags Tenant
350
+ * @name TenantUpdate
351
+ * @summary Update tenant
352
+ * @request PATCH:/api/v1/tenants/{tenant}
353
+ * @secure
354
+ */
355
+ this.tenantUpdate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}`, method: 'PATCH', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
356
+ /**
357
+ * @description Gets the alerting settings for a tenant
358
+ *
359
+ * @tags Tenant
360
+ * @name TenantAlertingSettingsGet
361
+ * @summary Get tenant alerting settings
362
+ * @request GET:/api/v1/tenants/{tenant}/alerting/settings
363
+ * @secure
364
+ */
365
+ this.tenantAlertingSettingsGet = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/alerting/settings`, method: 'GET', secure: true, format: 'json' }, params));
248
366
  /**
249
367
  * @description Creates a new tenant invite
250
368
  *
@@ -373,6 +491,16 @@ class Api extends http_client_1.HttpClient {
373
491
  * @secure
374
492
  */
375
493
  this.workflowList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflows`, method: 'GET', secure: true, format: 'json' }, params));
494
+ /**
495
+ * @description Cancel a batch of workflow runs
496
+ *
497
+ * @tags Workflow Run
498
+ * @name WorkflowRunCancel
499
+ * @summary Cancel workflow runs
500
+ * @request POST:/api/v1/tenants/{tenant}/workflows/cancel
501
+ * @secure
502
+ */
503
+ this.workflowRunCancel = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflows/cancel`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
376
504
  /**
377
505
  * @description Get a workflow for a tenant
378
506
  *
@@ -473,6 +601,16 @@ class Api extends http_client_1.HttpClient {
473
601
  * @secure
474
602
  */
475
603
  this.stepRunGetDiff = (stepRun, params = {}) => this.request(Object.assign({ path: `/api/v1/step-runs/${stepRun}/diff`, method: 'GET', secure: true, format: 'json' }, params));
604
+ /**
605
+ * @description List events for a step run
606
+ *
607
+ * @tags Step Run
608
+ * @name StepRunListEvents
609
+ * @summary List events for step run
610
+ * @request GET:/api/v1/step-runs/{step-run}/events
611
+ * @secure
612
+ */
613
+ 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));
476
614
  /**
477
615
  * @description Get all workflow runs for a tenant
478
616
  *
@@ -483,6 +621,16 @@ class Api extends http_client_1.HttpClient {
483
621
  * @secure
484
622
  */
485
623
  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));
624
+ /**
625
+ * @description Get a summary of workflow run metrics for a tenant
626
+ *
627
+ * @tags Workflow
628
+ * @name WorkflowRunGetMetrics
629
+ * @summary Get workflow runs
630
+ * @request GET:/api/v1/tenants/{tenant}/workflows/runs/metrics
631
+ * @secure
632
+ */
633
+ this.workflowRunGetMetrics = (tenant, query, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflows/runs/metrics`, method: 'GET', query: query, secure: true, format: 'json' }, params));
486
634
  /**
487
635
  * @description Get a workflow run for a tenant
488
636
  *