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