@hatchet-dev/typescript-sdk 0.14.0 → 0.16.0-alpha.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.
Files changed (43) hide show
  1. package/clients/admin/admin-client.d.ts +29 -0
  2. package/clients/admin/admin-client.js +34 -0
  3. package/clients/hatchet-client/client-config.d.ts +6 -0
  4. package/clients/hatchet-client/client-config.js +2 -0
  5. package/clients/hatchet-client/hatchet-client.d.ts +2 -0
  6. package/clients/hatchet-client/hatchet-client.js +25 -1
  7. package/clients/rest/api.d.ts +3 -0
  8. package/clients/rest/api.js +10 -0
  9. package/clients/rest/generated/Api.d.ts +11 -1
  10. package/clients/rest/generated/Api.js +10 -0
  11. package/clients/rest/generated/cloud/Api.d.ts +364 -0
  12. package/clients/rest/generated/cloud/Api.js +316 -0
  13. package/clients/rest/generated/cloud/data-contracts.d.ts +460 -0
  14. package/clients/rest/generated/cloud/data-contracts.js +68 -0
  15. package/clients/rest/generated/cloud/http-client.d.ts +41 -0
  16. package/clients/rest/generated/cloud/http-client.js +102 -0
  17. package/clients/rest/generated/data-contracts.d.ts +4 -0
  18. package/clients/rest/generated/data-contracts.js +1 -0
  19. package/clients/rest/index.d.ts +2 -2
  20. package/clients/rest/index.js +4 -5
  21. package/clients/worker/compute/compute-config.d.ts +96 -0
  22. package/clients/worker/compute/compute-config.js +52 -0
  23. package/clients/worker/compute/managed-compute.d.ts +15 -0
  24. package/clients/worker/compute/managed-compute.js +100 -0
  25. package/clients/worker/worker.d.ts +10 -2
  26. package/clients/worker/worker.js +31 -10
  27. package/examples/bulk-fanout-trigger.d.ts +1 -0
  28. package/examples/bulk-fanout-trigger.js +74 -0
  29. package/examples/bulk-fanout-worker.d.ts +1 -0
  30. package/examples/bulk-fanout-worker.js +93 -0
  31. package/examples/bulk-trigger.d.ts +1 -0
  32. package/examples/bulk-trigger.js +63 -0
  33. package/examples/managed-worker.d.ts +1 -0
  34. package/examples/managed-worker.js +65 -0
  35. package/package.json +7 -1
  36. package/protoc/dispatcher/dispatcher.d.ts +1 -0
  37. package/protoc/dispatcher/dispatcher.js +6 -0
  38. package/protoc/workflows/workflows.d.ts +18 -0
  39. package/protoc/workflows/workflows.js +121 -1
  40. package/step.d.ts +90 -0
  41. package/step.js +54 -1
  42. package/util/config-loader/config-loader.js +19 -1
  43. package/workflow.d.ts +285 -0
@@ -0,0 +1,316 @@
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/cloud/metadata
25
+ */
26
+ this.metadataGet = (params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/metadata`, method: 'GET', format: 'json' }, params));
27
+ /**
28
+ * @description Starts the OAuth flow
29
+ *
30
+ * @tags User
31
+ * @name UserUpdateGithubAppOauthStart
32
+ * @summary Start OAuth flow
33
+ * @request GET:/api/v1/cloud/users/github-app/start
34
+ * @secure
35
+ */
36
+ this.userUpdateGithubAppOauthStart = (params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/users/github-app/start`, method: 'GET', secure: true }, params));
37
+ /**
38
+ * @description Completes the OAuth flow
39
+ *
40
+ * @tags User
41
+ * @name UserUpdateGithubAppOauthCallback
42
+ * @summary Complete OAuth flow
43
+ * @request GET:/api/v1/cloud/users/github-app/callback
44
+ * @secure
45
+ */
46
+ this.userUpdateGithubAppOauthCallback = (params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/users/github-app/callback`, method: 'GET', secure: true }, params));
47
+ /**
48
+ * @description Github App global webhook
49
+ *
50
+ * @tags Github
51
+ * @name GithubUpdateGlobalWebhook
52
+ * @summary Github app global webhook
53
+ * @request POST:/api/v1/cloud/github/webhook
54
+ */
55
+ this.githubUpdateGlobalWebhook = (params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/github/webhook`, method: 'POST' }, params));
56
+ /**
57
+ * @description Github App tenant webhook
58
+ *
59
+ * @tags Github
60
+ * @name GithubUpdateTenantWebhook
61
+ * @summary Github app tenant webhook
62
+ * @request POST:/api/v1/cloud/github/webhook/{webhook}
63
+ */
64
+ this.githubUpdateTenantWebhook = (webhook, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/github/webhook/${webhook}`, method: 'POST' }, params));
65
+ /**
66
+ * @description List Github App installations
67
+ *
68
+ * @tags Github
69
+ * @name GithubAppListInstallations
70
+ * @summary List Github App installations
71
+ * @request GET:/api/v1/cloud/github-app/installations
72
+ * @secure
73
+ */
74
+ this.githubAppListInstallations = (params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/github-app/installations`, method: 'GET', secure: true, format: 'json' }, params));
75
+ /**
76
+ * @description List Github App repositories
77
+ *
78
+ * @tags Github
79
+ * @name GithubAppListRepos
80
+ * @summary List Github App repositories
81
+ * @request GET:/api/v1/cloud/github-app/installations/{gh-installation}/repos
82
+ * @secure
83
+ */
84
+ this.githubAppListRepos = (ghInstallation, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/github-app/installations/${ghInstallation}/repos`, method: 'GET', secure: true, format: 'json' }, params));
85
+ /**
86
+ * @description List Github App branches
87
+ *
88
+ * @tags Github
89
+ * @name GithubAppListBranches
90
+ * @summary List Github App branches
91
+ * @request GET:/api/v1/cloud/github-app/installations/{gh-installation}/repos/{gh-repo-owner}/{gh-repo-name}/branches
92
+ * @secure
93
+ */
94
+ this.githubAppListBranches = (ghInstallation, ghRepoOwner, ghRepoName, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/github-app/installations/${ghInstallation}/repos/${ghRepoOwner}/${ghRepoName}/branches`, method: 'GET', secure: true, format: 'json' }, params));
95
+ /**
96
+ * @description Get all managed workers for the tenant
97
+ *
98
+ * @tags Managed Worker
99
+ * @name ManagedWorkerList
100
+ * @summary List Managed Workers
101
+ * @request GET:/api/v1/cloud/tenants/{tenant}/managed-worker
102
+ * @secure
103
+ */
104
+ this.managedWorkerList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/tenants/${tenant}/managed-worker`, method: 'GET', secure: true, format: 'json' }, params));
105
+ /**
106
+ * @description Create a managed worker for the tenant
107
+ *
108
+ * @tags Managed Worker
109
+ * @name ManagedWorkerCreate
110
+ * @summary Create Managed Worker
111
+ * @request POST:/api/v1/cloud/tenants/{tenant}/managed-worker
112
+ * @secure
113
+ */
114
+ this.managedWorkerCreate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/tenants/${tenant}/managed-worker`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
115
+ /**
116
+ * @description Get a managed worker for the tenant
117
+ *
118
+ * @tags Managed Worker
119
+ * @name ManagedWorkerGet
120
+ * @summary Get Managed Worker
121
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}
122
+ * @secure
123
+ */
124
+ this.managedWorkerGet = (managedWorker, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}`, method: 'GET', secure: true, format: 'json' }, params));
125
+ /**
126
+ * @description Update a managed worker for the tenant
127
+ *
128
+ * @tags Managed Worker
129
+ * @name ManagedWorkerUpdate
130
+ * @summary Update Managed Worker
131
+ * @request POST:/api/v1/cloud/managed-worker/{managed-worker}
132
+ * @secure
133
+ */
134
+ this.managedWorkerUpdate = (managedWorker, data, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
135
+ /**
136
+ * @description Delete a managed worker for the tenant
137
+ *
138
+ * @tags Managed Worker
139
+ * @name ManagedWorkerDelete
140
+ * @summary Delete Managed Worker
141
+ * @request DELETE:/api/v1/cloud/managed-worker/{managed-worker}
142
+ * @secure
143
+ */
144
+ this.managedWorkerDelete = (managedWorker, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}`, method: 'DELETE', secure: true, format: 'json' }, params));
145
+ /**
146
+ * @description Registers runtime configs via infra-as-code
147
+ *
148
+ * @tags Managed Worker
149
+ * @name InfraAsCodeCreate
150
+ * @summary Create Infra as Code
151
+ * @request POST:/api/v1/cloud/infra-as-code/{infra-as-code-request}
152
+ * @secure
153
+ */
154
+ this.infraAsCodeCreate = (infraAsCodeRequest, data, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/infra-as-code/${infraAsCodeRequest}`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json }, params));
155
+ /**
156
+ * @description Get a list of runtime config actions for a managed worker
157
+ *
158
+ * @tags Managed Worker
159
+ * @name RuntimeConfigListActions
160
+ * @summary Get Runtime Config Actions
161
+ * @request GET:/api/v1/cloud/runtime-config/{runtime-config}/actions
162
+ * @secure
163
+ */
164
+ this.runtimeConfigListActions = (runtimeConfig, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/runtime-config/${runtimeConfig}/actions`, method: 'GET', secure: true, format: 'json' }, params));
165
+ /**
166
+ * @description Get CPU metrics for a managed worker
167
+ *
168
+ * @tags Metrics
169
+ * @name MetricsCpuGet
170
+ * @summary Get CPU Metrics
171
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/metrics/cpu
172
+ * @secure
173
+ */
174
+ this.metricsCpuGet = (managedWorker, query, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/metrics/cpu`, method: 'GET', query: query, secure: true, format: 'json' }, params));
175
+ /**
176
+ * @description Get memory metrics for a managed worker
177
+ *
178
+ * @tags Metrics
179
+ * @name MetricsMemoryGet
180
+ * @summary Get Memory Metrics
181
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/metrics/memory
182
+ * @secure
183
+ */
184
+ this.metricsMemoryGet = (managedWorker, query, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/metrics/memory`, method: 'GET', query: query, secure: true, format: 'json' }, params));
185
+ /**
186
+ * @description Get disk metrics for a managed worker
187
+ *
188
+ * @tags Metrics
189
+ * @name MetricsDiskGet
190
+ * @summary Get Disk Metrics
191
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/metrics/disk
192
+ * @secure
193
+ */
194
+ this.metricsDiskGet = (managedWorker, query, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/metrics/disk`, method: 'GET', query: query, secure: true, format: 'json' }, params));
195
+ /**
196
+ * @description Lists logs for a managed worker
197
+ *
198
+ * @tags Log
199
+ * @name LogList
200
+ * @summary List Logs
201
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/logs
202
+ * @secure
203
+ */
204
+ this.logList = (managedWorker, query, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/logs`, method: 'GET', query: query, secure: true, format: 'json' }, params));
205
+ /**
206
+ * @description Get all instances for a managed worker
207
+ *
208
+ * @tags Managed Worker
209
+ * @name ManagedWorkerInstancesList
210
+ * @summary List Instances
211
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/instances
212
+ * @secure
213
+ */
214
+ this.managedWorkerInstancesList = (managedWorker, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/instances`, method: 'GET', secure: true, format: 'json' }, params));
215
+ /**
216
+ * @description Get a build
217
+ *
218
+ * @tags Build
219
+ * @name BuildGet
220
+ * @summary Get Build
221
+ * @request GET:/api/v1/cloud/build/{build}
222
+ * @secure
223
+ */
224
+ this.buildGet = (build, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/build/${build}`, method: 'GET', secure: true, format: 'json' }, params));
225
+ /**
226
+ * @description Get the build logs for a specific build of a managed worker
227
+ *
228
+ * @tags Log
229
+ * @name BuildLogsList
230
+ * @summary Get Build Logs
231
+ * @request GET:/api/v1/cloud/build/{build}/logs
232
+ * @secure
233
+ */
234
+ this.buildLogsList = (build, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/build/${build}/logs`, method: 'GET', secure: true, format: 'json' }, params));
235
+ /**
236
+ * @description Get events for a managed worker
237
+ *
238
+ * @tags Managed Worker
239
+ * @name ManagedWorkerEventsList
240
+ * @summary Get Managed Worker Events
241
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/events
242
+ * @secure
243
+ */
244
+ this.managedWorkerEventsList = (managedWorker, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/events`, method: 'GET', secure: true, format: 'json' }, params));
245
+ /**
246
+ * @description Receive a webhook message from Lago
247
+ *
248
+ * @tags Billing
249
+ * @name LagoMessageCreate
250
+ * @summary Receive a webhook message from Lago
251
+ * @request POST:/api/v1/billing/lago/webhook
252
+ */
253
+ this.lagoMessageCreate = (params = {}) => this.request(Object.assign({ path: `/api/v1/billing/lago/webhook`, method: 'POST' }, params));
254
+ /**
255
+ * @description Gets the billing state for a tenant
256
+ *
257
+ * @tags Tenant
258
+ * @name TenantBillingStateGet
259
+ * @summary Get the billing state for a tenant
260
+ * @request GET:/api/v1/billing/tenants/{tenant}
261
+ * @secure
262
+ */
263
+ this.tenantBillingStateGet = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/billing/tenants/${tenant}`, method: 'GET', secure: true, format: 'json' }, params));
264
+ /**
265
+ * @description Update a subscription
266
+ *
267
+ * @tags Billing
268
+ * @name SubscriptionUpsert
269
+ * @summary Create a new subscription
270
+ * @request PATCH:/api/v1/billing/tenants/{tenant}/subscription
271
+ * @secure
272
+ */
273
+ this.subscriptionUpsert = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/billing/tenants/${tenant}/subscription`, method: 'PATCH', body: data, secure: true, type: http_client_1.ContentType.Json, format: 'json' }, params));
274
+ /**
275
+ * @description Get the billing portal link
276
+ *
277
+ * @tags Billing
278
+ * @name BillingPortalLinkGet
279
+ * @summary Create a link to the billing portal
280
+ * @request GET:/api/v1/billing/tenants/{tenant}/billing-portal-link
281
+ * @secure
282
+ */
283
+ this.billingPortalLinkGet = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/billing/tenants/${tenant}/billing-portal-link`, method: 'GET', secure: true, format: 'json' }, params));
284
+ /**
285
+ * @description Push a log entry for the tenant
286
+ *
287
+ * @tags Log
288
+ * @name LogCreate
289
+ * @summary Push Log Entry
290
+ * @request POST:/api/v1/cloud/tenants/{tenant}/logs
291
+ * @secure
292
+ */
293
+ this.logCreate = (tenant, data, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/tenants/${tenant}/logs`, method: 'POST', body: data, secure: true, type: http_client_1.ContentType.Json }, params));
294
+ /**
295
+ * @description Get all feature flags for the tenant
296
+ *
297
+ * @tags Feature Flags
298
+ * @name FeatureFlagsList
299
+ * @summary List Feature Flags
300
+ * @request GET:/api/v1/cloud/tenants/{tenant}/feature-flags
301
+ * @secure
302
+ */
303
+ this.featureFlagsList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/tenants/${tenant}/feature-flags`, method: 'GET', secure: true, format: 'json' }, params));
304
+ /**
305
+ * @description Get a minute by minute breakdown of workflow run metrics for a tenant
306
+ *
307
+ * @tags Workflow
308
+ * @name WorkflowRunEventsGetMetrics
309
+ * @summary Get workflow runs
310
+ * @request GET:/api/v1/cloud/tenants/{tenant}/runs-metrics
311
+ * @secure
312
+ */
313
+ this.workflowRunEventsGetMetrics = (tenant, query, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/tenants/${tenant}/runs-metrics`, method: 'GET', query: query, secure: true, format: 'json' }, params));
314
+ }
315
+ }
316
+ exports.Api = Api;