@hatchet-dev/typescript-sdk 0.1.11 → 0.1.13

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,417 @@
1
+ import { APIMeta, AcceptInviteRequest, CreateAPITokenRequest, CreateAPITokenResponse, CreateTenantInviteRequest, CreateTenantRequest, EventData, EventKey, EventKeyList, EventList, EventOrderByDirection, EventOrderByField, EventSearch, ListAPITokensResponse, 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 Logs in a user.
15
+ *
16
+ * @tags User
17
+ * @name UserUpdateLogin
18
+ * @summary Login user
19
+ * @request POST:/api/v1/users/login
20
+ */
21
+ userUpdateLogin: (data: UserLoginRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<User, any>>;
22
+ /**
23
+ * @description Starts the OAuth flow
24
+ *
25
+ * @tags User
26
+ * @name UserUpdateOauthStart
27
+ * @summary Start OAuth flow
28
+ * @request GET:/api/v1/users/google/start
29
+ */
30
+ userUpdateOauthStart: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
31
+ /**
32
+ * @description Completes the OAuth flow
33
+ *
34
+ * @tags User
35
+ * @name UserUpdateOauthCallback
36
+ * @summary Complete OAuth flow
37
+ * @request GET:/api/v1/users/google/callback
38
+ */
39
+ userUpdateOauthCallback: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
40
+ /**
41
+ * @description Gets the current user
42
+ *
43
+ * @tags User
44
+ * @name UserGetCurrent
45
+ * @summary Get current user
46
+ * @request GET:/api/v1/users/current
47
+ * @secure
48
+ */
49
+ userGetCurrent: (params?: RequestParams) => Promise<import("axios").AxiosResponse<User, any>>;
50
+ /**
51
+ * @description Registers a user.
52
+ *
53
+ * @tags User
54
+ * @name UserCreate
55
+ * @summary Register user
56
+ * @request POST:/api/v1/users/register
57
+ */
58
+ userCreate: (data: UserRegisterRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<User, any>>;
59
+ /**
60
+ * @description Logs out a user.
61
+ *
62
+ * @tags User
63
+ * @name UserUpdateLogout
64
+ * @summary Logout user
65
+ * @request POST:/api/v1/users/logout
66
+ * @secure
67
+ */
68
+ userUpdateLogout: (params?: RequestParams) => Promise<import("axios").AxiosResponse<User, any>>;
69
+ /**
70
+ * @description Lists all tenant memberships for the current user
71
+ *
72
+ * @tags User
73
+ * @name TenantMembershipsList
74
+ * @summary List tenant memberships
75
+ * @request GET:/api/v1/users/memberships
76
+ * @secure
77
+ */
78
+ tenantMembershipsList: (params?: RequestParams) => Promise<import("axios").AxiosResponse<UserTenantMembershipsList, any>>;
79
+ /**
80
+ * @description Lists all tenant invites for the current user
81
+ *
82
+ * @tags Tenant
83
+ * @name UserListTenantInvites
84
+ * @summary List tenant invites
85
+ * @request GET:/api/v1/users/invites
86
+ * @secure
87
+ */
88
+ userListTenantInvites: (params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantInviteList, any>>;
89
+ /**
90
+ * @description Accepts a tenant invite
91
+ *
92
+ * @tags Tenant
93
+ * @name TenantInviteAccept
94
+ * @summary Accept tenant invite
95
+ * @request POST:/api/v1/users/invites/accept
96
+ * @secure
97
+ */
98
+ tenantInviteAccept: (data: AcceptInviteRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
99
+ /**
100
+ * @description Rejects a tenant invite
101
+ *
102
+ * @tags Tenant
103
+ * @name TenantInviteReject
104
+ * @summary Reject tenant invite
105
+ * @request POST:/api/v1/users/invites/reject
106
+ * @secure
107
+ */
108
+ tenantInviteReject: (data: RejectInviteRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
109
+ /**
110
+ * @description Creates a new tenant
111
+ *
112
+ * @tags Tenant
113
+ * @name TenantCreate
114
+ * @summary Create tenant
115
+ * @request POST:/api/v1/tenants
116
+ * @secure
117
+ */
118
+ tenantCreate: (data: CreateTenantRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<Tenant, any>>;
119
+ /**
120
+ * @description Creates a new tenant invite
121
+ *
122
+ * @tags Tenant
123
+ * @name TenantInviteCreate
124
+ * @summary Create tenant invite
125
+ * @request POST:/api/v1/tenants/{tenant}/invites
126
+ * @secure
127
+ */
128
+ tenantInviteCreate: (tenant: string, data: CreateTenantInviteRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantInvite, any>>;
129
+ /**
130
+ * @description Gets a list of tenant invites
131
+ *
132
+ * @tags Tenant
133
+ * @name TenantInviteList
134
+ * @summary List tenant invites
135
+ * @request GET:/api/v1/tenants/{tenant}/invites
136
+ * @secure
137
+ */
138
+ tenantInviteList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantInviteList, any>>;
139
+ /**
140
+ * @description Updates a tenant invite
141
+ *
142
+ * @name TenantInviteUpdate
143
+ * @summary Update invite
144
+ * @request PATCH:/api/v1/tenants/{tenant}/invites/{tenant-invite}
145
+ * @secure
146
+ */
147
+ tenantInviteUpdate: (tenant: string, tenantInvite: string, data: UpdateTenantInviteRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantInvite, any>>;
148
+ /**
149
+ * @description Deletes a tenant invite
150
+ *
151
+ * @name TenantInviteDelete
152
+ * @summary Delete invite
153
+ * @request DELETE:/api/v1/tenants/{tenant}/invites/{tenant-invite}
154
+ * @secure
155
+ */
156
+ tenantInviteDelete: (tenant: string, tenantInvite: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantInvite, any>>;
157
+ /**
158
+ * @description Create an API token for a tenant
159
+ *
160
+ * @tags API Token
161
+ * @name ApiTokenCreate
162
+ * @summary Create API Token
163
+ * @request POST:/api/v1/tenants/{tenant}/api-tokens
164
+ * @secure
165
+ */
166
+ apiTokenCreate: (tenant: string, data: CreateAPITokenRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<CreateAPITokenResponse, any>>;
167
+ /**
168
+ * @description List API tokens for a tenant
169
+ *
170
+ * @tags API Token
171
+ * @name ApiTokenList
172
+ * @summary List API Tokens
173
+ * @request GET:/api/v1/tenants/{tenant}/api-tokens
174
+ * @secure
175
+ */
176
+ apiTokenList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<ListAPITokensResponse, any>>;
177
+ /**
178
+ * @description Revoke an API token for a tenant
179
+ *
180
+ * @tags API Token
181
+ * @name ApiTokenUpdateRevoke
182
+ * @summary Revoke API Token
183
+ * @request POST:/api/v1/api-tokens/{api-token}
184
+ * @secure
185
+ */
186
+ apiTokenUpdateRevoke: (apiToken: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any>>;
187
+ /**
188
+ * @description Lists all events for a tenant.
189
+ *
190
+ * @tags Event
191
+ * @name EventList
192
+ * @summary List events
193
+ * @request GET:/api/v1/tenants/{tenant}/events
194
+ * @secure
195
+ */
196
+ eventList: (tenant: string, query?: {
197
+ /**
198
+ * The number to skip
199
+ * @format int64
200
+ */
201
+ offset?: number;
202
+ /**
203
+ * The number to limit by
204
+ * @format int64
205
+ */
206
+ limit?: number;
207
+ /** A list of keys to filter by */
208
+ keys?: EventKey[];
209
+ /** A list of workflow IDs to filter by */
210
+ workflows?: WorkflowID[];
211
+ /** The search query to filter for */
212
+ search?: EventSearch;
213
+ /** What to order by */
214
+ orderByField?: EventOrderByField;
215
+ /** The order direction */
216
+ orderByDirection?: EventOrderByDirection;
217
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<EventList, any>>;
218
+ /**
219
+ * @description Replays a list of events.
220
+ *
221
+ * @tags Event
222
+ * @name EventUpdateReplay
223
+ * @summary Replay events
224
+ * @request POST:/api/v1/tenants/{tenant}/events/replay
225
+ * @secure
226
+ */
227
+ eventUpdateReplay: (tenant: string, data: ReplayEventRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<EventList, any>>;
228
+ /**
229
+ * @description Gets a list of tenant members
230
+ *
231
+ * @tags Tenant
232
+ * @name TenantMemberList
233
+ * @summary List tenant members
234
+ * @request GET:/api/v1/tenants/{tenant}/members
235
+ * @secure
236
+ */
237
+ tenantMemberList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<TenantMemberList, any>>;
238
+ /**
239
+ * @description Get the data for an event.
240
+ *
241
+ * @tags Event
242
+ * @name EventDataGet
243
+ * @summary Get event data
244
+ * @request GET:/api/v1/events/{event}/data
245
+ * @secure
246
+ */
247
+ eventDataGet: (event: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<EventData, any>>;
248
+ /**
249
+ * @description Lists all event keys for a tenant.
250
+ *
251
+ * @tags Event
252
+ * @name EventKeyList
253
+ * @summary List event keys
254
+ * @request GET:/api/v1/tenants/{tenant}/events/keys
255
+ * @secure
256
+ */
257
+ eventKeyList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<EventKeyList, any>>;
258
+ /**
259
+ * @description Get all workflows for a tenant
260
+ *
261
+ * @tags Workflow
262
+ * @name WorkflowList
263
+ * @summary Get workflows
264
+ * @request GET:/api/v1/tenants/{tenant}/workflows
265
+ * @secure
266
+ */
267
+ workflowList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowList, any>>;
268
+ /**
269
+ * @description Get a workflow for a tenant
270
+ *
271
+ * @tags Workflow
272
+ * @name WorkflowGet
273
+ * @summary Get workflow
274
+ * @request GET:/api/v1/workflows/{workflow}
275
+ * @secure
276
+ */
277
+ workflowGet: (workflow: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<Workflow, any>>;
278
+ /**
279
+ * @description Get a workflow version for a tenant
280
+ *
281
+ * @tags Workflow
282
+ * @name WorkflowVersionGet
283
+ * @summary Get workflow version
284
+ * @request GET:/api/v1/workflows/{workflow}/versions
285
+ * @secure
286
+ */
287
+ workflowVersionGet: (workflow: string, query?: {
288
+ /**
289
+ * The workflow version. If not supplied, the latest version is fetched.
290
+ * @format uuid
291
+ * @minLength 36
292
+ * @maxLength 36
293
+ */
294
+ version?: string;
295
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowVersion, any>>;
296
+ /**
297
+ * @description Trigger a new workflow run for a tenant
298
+ *
299
+ * @tags Workflow Run
300
+ * @name WorkflowRunCreate
301
+ * @summary Trigger workflow run
302
+ * @request POST:/api/v1/workflows/{workflow}/trigger
303
+ * @secure
304
+ */
305
+ workflowRunCreate: (workflow: string, data: TriggerWorkflowRunRequest, query?: {
306
+ /**
307
+ * The workflow version. If not supplied, the latest version is fetched.
308
+ * @format uuid
309
+ * @minLength 36
310
+ * @maxLength 36
311
+ */
312
+ version?: string;
313
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRun, any>>;
314
+ /**
315
+ * @description Get a workflow version definition for a tenant
316
+ *
317
+ * @tags Workflow
318
+ * @name WorkflowVersionGetDefinition
319
+ * @summary Get workflow version definition
320
+ * @request GET:/api/v1/workflows/{workflow}/versions/definition
321
+ * @secure
322
+ */
323
+ workflowVersionGetDefinition: (workflow: string, query?: {
324
+ /**
325
+ * The workflow version. If not supplied, the latest version is fetched.
326
+ * @format uuid
327
+ * @minLength 36
328
+ * @maxLength 36
329
+ */
330
+ version?: string;
331
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowVersionDefinition, any>>;
332
+ /**
333
+ * @description Get all workflow runs for a tenant
334
+ *
335
+ * @tags Workflow
336
+ * @name WorkflowRunList
337
+ * @summary Get workflow runs
338
+ * @request GET:/api/v1/tenants/{tenant}/workflows/runs
339
+ * @secure
340
+ */
341
+ workflowRunList: (tenant: string, query?: {
342
+ /**
343
+ * The number to skip
344
+ * @format int64
345
+ */
346
+ offset?: number;
347
+ /**
348
+ * The number to limit by
349
+ * @format int64
350
+ */
351
+ limit?: number;
352
+ /**
353
+ * The event id to get runs for.
354
+ * @format uuid
355
+ * @minLength 36
356
+ * @maxLength 36
357
+ */
358
+ eventId?: string;
359
+ /**
360
+ * The workflow id to get runs for.
361
+ * @format uuid
362
+ * @minLength 36
363
+ * @maxLength 36
364
+ */
365
+ workflowId?: string;
366
+ }, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRunList, any>>;
367
+ /**
368
+ * @description Get a workflow run for a tenant
369
+ *
370
+ * @tags Workflow
371
+ * @name WorkflowRunGet
372
+ * @summary Get workflow run
373
+ * @request GET:/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}
374
+ * @secure
375
+ */
376
+ workflowRunGet: (tenant: string, workflowRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkflowRun, any>>;
377
+ /**
378
+ * @description Get a step run by id
379
+ *
380
+ * @tags Step Run
381
+ * @name StepRunGet
382
+ * @summary Get step run
383
+ * @request GET:/api/v1/tenants/{tenant}/step-runs/{step-run}
384
+ * @secure
385
+ */
386
+ stepRunGet: (tenant: string, stepRun: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRun, any>>;
387
+ /**
388
+ * @description Reruns a step run
389
+ *
390
+ * @tags Step Run
391
+ * @name StepRunUpdateRerun
392
+ * @summary Rerun step run
393
+ * @request POST:/api/v1/tenants/{tenant}/step-runs/{step-run}/rerun
394
+ * @secure
395
+ */
396
+ stepRunUpdateRerun: (tenant: string, stepRun: string, data: RerunStepRunRequest, params?: RequestParams) => Promise<import("axios").AxiosResponse<StepRun, any>>;
397
+ /**
398
+ * @description Get all workers for a tenant
399
+ *
400
+ * @tags Worker
401
+ * @name WorkerList
402
+ * @summary Get workers
403
+ * @request GET:/api/v1/tenants/{tenant}/worker
404
+ * @secure
405
+ */
406
+ workerList: (tenant: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<WorkerList, any>>;
407
+ /**
408
+ * @description Get a worker
409
+ *
410
+ * @tags Worker
411
+ * @name WorkerGet
412
+ * @summary Get worker
413
+ * @request GET:/api/v1/workers/{worker}
414
+ * @secure
415
+ */
416
+ workerGet: (worker: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<Worker, any>>;
417
+ }