@hatchet-dev/typescript-sdk 0.1.12 → 0.1.14

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.
@@ -0,0 +1,481 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ /*
5
+ * ---------------------------------------------------------------
6
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
7
+ * ## ##
8
+ * ## AUTHOR: acacode ##
9
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
10
+ * ---------------------------------------------------------------
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.Api = void 0;
14
+ const http_client_1 = require("./http-client");
15
+ class Api extends http_client_1.HttpClient {
16
+ constructor() {
17
+ super(...arguments);
18
+ /**
19
+ * @description Gets metadata for the Hatchet instance
20
+ *
21
+ * @tags Metadata
22
+ * @name MetadataGet
23
+ * @summary Get metadata
24
+ * @request GET:/api/v1/meta
25
+ */
26
+ this.metadataGet = (params = {}) => this.request(Object.assign({ path: `/api/v1/meta`, method: 'GET', format: 'json' }, params));
27
+ /**
28
+ * @description List all integrations
29
+ *
30
+ * @tags Metadata
31
+ * @name MetadataListIntegrations
32
+ * @summary List integrations
33
+ * @request GET:/api/v1/meta/integrations
34
+ * @secure
35
+ */
36
+ this.metadataListIntegrations = (params = {}) => this.request(Object.assign({ path: `/api/v1/meta/integrations`, method: 'GET', secure: true, format: 'json' }, params));
37
+ /**
38
+ * @description Logs in a user.
39
+ *
40
+ * @tags User
41
+ * @name UserUpdateLogin
42
+ * @summary Login user
43
+ * @request POST:/api/v1/users/login
44
+ */
45
+ this.userUpdateLogin = (data, params = {}) => this.request(Object.assign({ path: `/api/v1/users/login`, method: 'POST', body: data, type: http_client_1.ContentType.Json, format: 'json' }, params));
46
+ /**
47
+ * @description Starts the OAuth flow
48
+ *
49
+ * @tags User
50
+ * @name UserUpdateGoogleOauthStart
51
+ * @summary Start OAuth flow
52
+ * @request GET:/api/v1/users/google/start
53
+ */
54
+ this.userUpdateGoogleOauthStart = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/google/start`, method: 'GET' }, params));
55
+ /**
56
+ * @description Completes the OAuth flow
57
+ *
58
+ * @tags User
59
+ * @name UserUpdateGoogleOauthCallback
60
+ * @summary Complete OAuth flow
61
+ * @request GET:/api/v1/users/google/callback
62
+ */
63
+ this.userUpdateGoogleOauthCallback = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/google/callback`, method: 'GET' }, params));
64
+ /**
65
+ * @description Starts the OAuth flow
66
+ *
67
+ * @tags User
68
+ * @name UserUpdateGithubOauthStart
69
+ * @summary Start OAuth flow
70
+ * @request GET:/api/v1/users/github/start
71
+ * @secure
72
+ */
73
+ this.userUpdateGithubOauthStart = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github/start`, method: 'GET', secure: true }, params));
74
+ /**
75
+ * @description Completes the OAuth flow
76
+ *
77
+ * @tags User
78
+ * @name UserUpdateGithubOauthCallback
79
+ * @summary Complete OAuth flow
80
+ * @request GET:/api/v1/users/github/callback
81
+ * @secure
82
+ */
83
+ this.userUpdateGithubOauthCallback = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/github/callback`, method: 'GET', secure: true }, params));
84
+ /**
85
+ * @description Github App global webhook
86
+ *
87
+ * @tags Github
88
+ * @name GithubUpdateGlobalWebhook
89
+ * @summary Github app global webhook
90
+ * @request POST:/api/v1/github/webhook
91
+ */
92
+ this.githubUpdateGlobalWebhook = (params = {}) => this.request(Object.assign({ path: `/api/v1/github/webhook`, method: 'POST' }, params));
93
+ /**
94
+ * @description Github App tenant webhook
95
+ *
96
+ * @tags Github
97
+ * @name GithubUpdateTenantWebhook
98
+ * @summary Github app tenant webhook
99
+ * @request POST:/api/v1/github/webhook/{webhook}
100
+ */
101
+ this.githubUpdateTenantWebhook = (webhook, params = {}) => this.request(Object.assign({ path: `/api/v1/github/webhook/${webhook}`, method: 'POST' }, params));
102
+ /**
103
+ * @description Gets the current user
104
+ *
105
+ * @tags User
106
+ * @name UserGetCurrent
107
+ * @summary Get current user
108
+ * @request GET:/api/v1/users/current
109
+ * @secure
110
+ */
111
+ this.userGetCurrent = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/current`, method: 'GET', secure: true, format: 'json' }, params));
112
+ /**
113
+ * @description Registers a user.
114
+ *
115
+ * @tags User
116
+ * @name UserCreate
117
+ * @summary Register user
118
+ * @request POST:/api/v1/users/register
119
+ */
120
+ this.userCreate = (data, params = {}) => this.request(Object.assign({ path: `/api/v1/users/register`, method: 'POST', body: data, type: http_client_1.ContentType.Json, format: 'json' }, params));
121
+ /**
122
+ * @description Logs out a user.
123
+ *
124
+ * @tags User
125
+ * @name UserUpdateLogout
126
+ * @summary Logout user
127
+ * @request POST:/api/v1/users/logout
128
+ * @secure
129
+ */
130
+ this.userUpdateLogout = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/logout`, method: 'POST', secure: true, format: 'json' }, params));
131
+ /**
132
+ * @description Lists all tenant memberships for the current user
133
+ *
134
+ * @tags User
135
+ * @name TenantMembershipsList
136
+ * @summary List tenant memberships
137
+ * @request GET:/api/v1/users/memberships
138
+ * @secure
139
+ */
140
+ this.tenantMembershipsList = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/memberships`, method: 'GET', secure: true, format: 'json' }, params));
141
+ /**
142
+ * @description Lists all tenant invites for the current user
143
+ *
144
+ * @tags Tenant
145
+ * @name UserListTenantInvites
146
+ * @summary List tenant invites
147
+ * @request GET:/api/v1/users/invites
148
+ * @secure
149
+ */
150
+ this.userListTenantInvites = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/invites`, method: 'GET', secure: true, format: 'json' }, params));
151
+ /**
152
+ * @description Accepts a tenant invite
153
+ *
154
+ * @tags Tenant
155
+ * @name TenantInviteAccept
156
+ * @summary Accept tenant invite
157
+ * @request POST:/api/v1/users/invites/accept
158
+ * @secure
159
+ */
160
+ this.tenantInviteAccept = (data, params = {}) => this.request(Object.assign({ path: `/api/v1/users/invites/accept`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json }, params));
161
+ /**
162
+ * @description Rejects a tenant invite
163
+ *
164
+ * @tags Tenant
165
+ * @name TenantInviteReject
166
+ * @summary Reject tenant invite
167
+ * @request POST:/api/v1/users/invites/reject
168
+ * @secure
169
+ */
170
+ this.tenantInviteReject = (data, params = {}) => this.request(Object.assign({ path: `/api/v1/users/invites/reject`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json }, params));
171
+ /**
172
+ * @description Creates a new tenant
173
+ *
174
+ * @tags Tenant
175
+ * @name TenantCreate
176
+ * @summary Create tenant
177
+ * @request POST:/api/v1/tenants
178
+ * @secure
179
+ */
180
+ 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));
181
+ /**
182
+ * @description Creates a new tenant invite
183
+ *
184
+ * @tags Tenant
185
+ * @name TenantInviteCreate
186
+ * @summary Create tenant invite
187
+ * @request POST:/api/v1/tenants/{tenant}/invites
188
+ * @secure
189
+ */
190
+ this.tenantInviteCreate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/invites`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
191
+ /**
192
+ * @description Gets a list of tenant invites
193
+ *
194
+ * @tags Tenant
195
+ * @name TenantInviteList
196
+ * @summary List tenant invites
197
+ * @request GET:/api/v1/tenants/{tenant}/invites
198
+ * @secure
199
+ */
200
+ this.tenantInviteList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/invites`, method: 'GET', secure: true, format: 'json' }, params));
201
+ /**
202
+ * @description Updates a tenant invite
203
+ *
204
+ * @name TenantInviteUpdate
205
+ * @summary Update invite
206
+ * @request PATCH:/api/v1/tenants/{tenant}/invites/{tenant-invite}
207
+ * @secure
208
+ */
209
+ this.tenantInviteUpdate = (tenant, tenantInvite, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/invites/${tenantInvite}`, method: 'PATCH', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
210
+ /**
211
+ * @description Deletes a tenant invite
212
+ *
213
+ * @name TenantInviteDelete
214
+ * @summary Delete invite
215
+ * @request DELETE:/api/v1/tenants/{tenant}/invites/{tenant-invite}
216
+ * @secure
217
+ */
218
+ this.tenantInviteDelete = (tenant, tenantInvite, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/invites/${tenantInvite}`, method: 'DELETE', secure: true, format: 'json' }, params));
219
+ /**
220
+ * @description Create an API token for a tenant
221
+ *
222
+ * @tags API Token
223
+ * @name ApiTokenCreate
224
+ * @summary Create API Token
225
+ * @request POST:/api/v1/tenants/{tenant}/api-tokens
226
+ * @secure
227
+ */
228
+ this.apiTokenCreate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/api-tokens`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
229
+ /**
230
+ * @description List API tokens for a tenant
231
+ *
232
+ * @tags API Token
233
+ * @name ApiTokenList
234
+ * @summary List API Tokens
235
+ * @request GET:/api/v1/tenants/{tenant}/api-tokens
236
+ * @secure
237
+ */
238
+ this.apiTokenList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/api-tokens`, method: 'GET', secure: true, format: 'json' }, params));
239
+ /**
240
+ * @description Revoke an API token for a tenant
241
+ *
242
+ * @tags API Token
243
+ * @name ApiTokenUpdateRevoke
244
+ * @summary Revoke API Token
245
+ * @request POST:/api/v1/api-tokens/{api-token}
246
+ * @secure
247
+ */
248
+ this.apiTokenUpdateRevoke = (apiToken, params = {}) => this.request(Object.assign({ path: `/api/v1/api-tokens/${apiToken}`, method: 'POST', secure: true }, params));
249
+ /**
250
+ * @description Lists all events for a tenant.
251
+ *
252
+ * @tags Event
253
+ * @name EventList
254
+ * @summary List events
255
+ * @request GET:/api/v1/tenants/{tenant}/events
256
+ * @secure
257
+ */
258
+ this.eventList = (tenant, query, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/events`, method: 'GET', query: query, secure: true, format: 'json' }, params));
259
+ /**
260
+ * @description Replays a list of events.
261
+ *
262
+ * @tags Event
263
+ * @name EventUpdateReplay
264
+ * @summary Replay events
265
+ * @request POST:/api/v1/tenants/{tenant}/events/replay
266
+ * @secure
267
+ */
268
+ 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));
269
+ /**
270
+ * @description Gets a list of tenant members
271
+ *
272
+ * @tags Tenant
273
+ * @name TenantMemberList
274
+ * @summary List tenant members
275
+ * @request GET:/api/v1/tenants/{tenant}/members
276
+ * @secure
277
+ */
278
+ this.tenantMemberList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/members`, method: 'GET', secure: true, format: 'json' }, params));
279
+ /**
280
+ * @description Get the data for an event.
281
+ *
282
+ * @tags Event
283
+ * @name EventDataGet
284
+ * @summary Get event data
285
+ * @request GET:/api/v1/events/{event}/data
286
+ * @secure
287
+ */
288
+ this.eventDataGet = (event, params = {}) => this.request(Object.assign({ path: `/api/v1/events/${event}/data`, method: 'GET', secure: true, format: 'json' }, params));
289
+ /**
290
+ * @description Lists all event keys for a tenant.
291
+ *
292
+ * @tags Event
293
+ * @name EventKeyList
294
+ * @summary List event keys
295
+ * @request GET:/api/v1/tenants/{tenant}/events/keys
296
+ * @secure
297
+ */
298
+ this.eventKeyList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/events/keys`, method: 'GET', secure: true, format: 'json' }, params));
299
+ /**
300
+ * @description Get all workflows for a tenant
301
+ *
302
+ * @tags Workflow
303
+ * @name WorkflowList
304
+ * @summary Get workflows
305
+ * @request GET:/api/v1/tenants/{tenant}/workflows
306
+ * @secure
307
+ */
308
+ this.workflowList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflows`, method: 'GET', secure: true, format: 'json' }, params));
309
+ /**
310
+ * @description Get a workflow for a tenant
311
+ *
312
+ * @tags Workflow
313
+ * @name WorkflowGet
314
+ * @summary Get workflow
315
+ * @request GET:/api/v1/workflows/{workflow}
316
+ * @secure
317
+ */
318
+ this.workflowGet = (workflow, params = {}) => this.request(Object.assign({ path: `/api/v1/workflows/${workflow}`, method: 'GET', secure: true, format: 'json' }, params));
319
+ /**
320
+ * @description Get a workflow version for a tenant
321
+ *
322
+ * @tags Workflow
323
+ * @name WorkflowVersionGet
324
+ * @summary Get workflow version
325
+ * @request GET:/api/v1/workflows/{workflow}/versions
326
+ * @secure
327
+ */
328
+ this.workflowVersionGet = (workflow, query, params = {}) => this.request(Object.assign({ path: `/api/v1/workflows/${workflow}/versions`, method: 'GET', query: query, secure: true, format: 'json' }, params));
329
+ /**
330
+ * @description Trigger a new workflow run for a tenant
331
+ *
332
+ * @tags Workflow Run
333
+ * @name WorkflowRunCreate
334
+ * @summary Trigger workflow run
335
+ * @request POST:/api/v1/workflows/{workflow}/trigger
336
+ * @secure
337
+ */
338
+ 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));
339
+ /**
340
+ * @description Get a workflow version definition for a tenant
341
+ *
342
+ * @tags Workflow
343
+ * @name WorkflowVersionGetDefinition
344
+ * @summary Get workflow version definition
345
+ * @request GET:/api/v1/workflows/{workflow}/versions/definition
346
+ * @secure
347
+ */
348
+ 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));
349
+ /**
350
+ * @description Link a github repository to a workflow
351
+ *
352
+ * @tags Workflow
353
+ * @name WorkflowUpdateLinkGithub
354
+ * @summary Link github repository
355
+ * @request POST:/api/v1/workflows/{workflow}/link-github
356
+ * @secure
357
+ */
358
+ this.workflowUpdateLinkGithub = (workflow, data, params = {}) => this.request(Object.assign({ path: `/api/v1/workflows/${workflow}/link-github`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
359
+ /**
360
+ * @description Create a pull request for a workflow
361
+ *
362
+ * @tags Workflow
363
+ * @name StepRunUpdateCreatePr
364
+ * @summary Create pull request
365
+ * @request POST:/api/v1/step-runs/{step-run}/create-pr
366
+ * @secure
367
+ */
368
+ this.stepRunUpdateCreatePr = (stepRun, data, params = {}) => this.request(Object.assign({ path: `/api/v1/step-runs/${stepRun}/create-pr`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
369
+ /**
370
+ * @description Get the diff for a step run between the most recent run and the first run.
371
+ *
372
+ * @tags Workflow
373
+ * @name StepRunGetDiff
374
+ * @summary Get diff
375
+ * @request GET:/api/v1/step-runs/{step-run}/diff
376
+ * @secure
377
+ */
378
+ this.stepRunGetDiff = (stepRun, params = {}) => this.request(Object.assign({ path: `/api/v1/step-runs/${stepRun}/diff`, method: 'GET', secure: true, format: 'json' }, params));
379
+ /**
380
+ * @description Get all workflow runs for a tenant
381
+ *
382
+ * @tags Workflow
383
+ * @name WorkflowRunList
384
+ * @summary Get workflow runs
385
+ * @request GET:/api/v1/tenants/{tenant}/workflows/runs
386
+ * @secure
387
+ */
388
+ 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));
389
+ /**
390
+ * @description Get a workflow run for a tenant
391
+ *
392
+ * @tags Workflow
393
+ * @name WorkflowRunGet
394
+ * @summary Get workflow run
395
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}
396
+ * @secure
397
+ */
398
+ this.workflowRunGet = (tenant, workflowRun, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/${workflowRun}`, method: 'GET', secure: true, format: 'json' }, params));
399
+ /**
400
+ * @description List all pull requests for a workflow run
401
+ *
402
+ * @tags Workflow
403
+ * @name WorkflowRunListPullRequests
404
+ * @summary List pull requests
405
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/prs
406
+ * @secure
407
+ */
408
+ this.workflowRunListPullRequests = (tenant, workflowRun, query, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/workflow-runs/${workflowRun}/prs`, method: 'GET', query: query, secure: true, format: 'json' }, params));
409
+ /**
410
+ * @description Get a step run by id
411
+ *
412
+ * @tags Step Run
413
+ * @name StepRunGet
414
+ * @summary Get step run
415
+ * @request GET:/api/v1/tenants/{tenant}/step-runs/{step-run}
416
+ * @secure
417
+ */
418
+ this.stepRunGet = (tenant, stepRun, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/step-runs/${stepRun}`, method: 'GET', secure: true, format: 'json' }, params));
419
+ /**
420
+ * @description Reruns a step run
421
+ *
422
+ * @tags Step Run
423
+ * @name StepRunUpdateRerun
424
+ * @summary Rerun step run
425
+ * @request POST:/api/v1/tenants/{tenant}/step-runs/{step-run}/rerun
426
+ * @secure
427
+ */
428
+ this.stepRunUpdateRerun = (tenant, stepRun, data, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/step-runs/${stepRun}/rerun`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
429
+ /**
430
+ * @description Get all workers for a tenant
431
+ *
432
+ * @tags Worker
433
+ * @name WorkerList
434
+ * @summary Get workers
435
+ * @request GET:/api/v1/tenants/{tenant}/worker
436
+ * @secure
437
+ */
438
+ this.workerList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/tenants/${tenant}/worker`, method: 'GET', secure: true, format: 'json' }, params));
439
+ /**
440
+ * @description Get a worker
441
+ *
442
+ * @tags Worker
443
+ * @name WorkerGet
444
+ * @summary Get worker
445
+ * @request GET:/api/v1/workers/{worker}
446
+ * @secure
447
+ */
448
+ this.workerGet = (worker, params = {}) => this.request(Object.assign({ path: `/api/v1/workers/${worker}`, method: 'GET', secure: true, format: 'json' }, params));
449
+ /**
450
+ * @description List Github App installations
451
+ *
452
+ * @tags Github
453
+ * @name GithubAppListInstallations
454
+ * @summary List Github App installations
455
+ * @request GET:/api/v1/github-app/installations
456
+ * @secure
457
+ */
458
+ this.githubAppListInstallations = (params = {}) => this.request(Object.assign({ path: `/api/v1/github-app/installations`, method: 'GET', secure: true, format: 'json' }, params));
459
+ /**
460
+ * @description List Github App repositories
461
+ *
462
+ * @tags Github
463
+ * @name GithubAppListRepos
464
+ * @summary List Github App repositories
465
+ * @request GET:/api/v1/github-app/installations/{gh-installation}/repos
466
+ * @secure
467
+ */
468
+ this.githubAppListRepos = (ghInstallation, params = {}) => this.request(Object.assign({ path: `/api/v1/github-app/installations/${ghInstallation}/repos`, method: 'GET', secure: true, format: 'json' }, params));
469
+ /**
470
+ * @description List Github App branches
471
+ *
472
+ * @tags Github
473
+ * @name GithubAppListBranches
474
+ * @summary List Github App branches
475
+ * @request GET:/api/v1/github-app/installations/{gh-installation}/repos/{gh-repo-owner}/{gh-repo-name}/branches
476
+ * @secure
477
+ */
478
+ this.githubAppListBranches = (ghInstallation, ghRepoOwner, ghRepoName, params = {}) => this.request(Object.assign({ path: `/api/v1/github-app/installations/${ghInstallation}/repos/${ghRepoOwner}/${ghRepoName}/branches`, method: 'GET', secure: true, format: 'json' }, params));
479
+ }
480
+ }
481
+ exports.Api = Api;