@hatchet-dev/typescript-sdk 0.15.0 → 0.16.0-alpha.2

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 (32) hide show
  1. package/clients/hatchet-client/client-config.d.ts +6 -0
  2. package/clients/hatchet-client/client-config.js +2 -0
  3. package/clients/hatchet-client/hatchet-client.d.ts +2 -0
  4. package/clients/hatchet-client/hatchet-client.js +25 -1
  5. package/clients/rest/api.d.ts +3 -0
  6. package/clients/rest/api.js +10 -0
  7. package/clients/rest/generated/cloud/Api.d.ts +377 -0
  8. package/clients/rest/generated/cloud/Api.js +326 -0
  9. package/clients/rest/generated/cloud/data-contracts.d.ts +468 -0
  10. package/clients/rest/generated/cloud/data-contracts.js +68 -0
  11. package/clients/rest/generated/cloud/http-client.d.ts +41 -0
  12. package/clients/rest/generated/cloud/http-client.js +102 -0
  13. package/clients/rest/index.d.ts +2 -2
  14. package/clients/rest/index.js +4 -5
  15. package/clients/worker/compute/compute-config.d.ts +150 -0
  16. package/clients/worker/compute/compute-config.js +76 -0
  17. package/clients/worker/compute/managed-compute.d.ts +15 -0
  18. package/clients/worker/compute/managed-compute.js +100 -0
  19. package/clients/worker/worker.d.ts +10 -2
  20. package/clients/worker/worker.js +31 -10
  21. package/examples/managed-worker.d.ts +1 -0
  22. package/examples/managed-worker.js +65 -0
  23. package/package.json +4 -1
  24. package/protoc/dispatcher/dispatcher.d.ts +19 -0
  25. package/protoc/dispatcher/dispatcher.js +368 -92
  26. package/protoc/events/events.js +45 -23
  27. package/protoc/google/protobuf/timestamp.js +5 -3
  28. package/protoc/workflows/workflows.js +153 -77
  29. package/step.d.ts +117 -0
  30. package/step.js +2 -0
  31. package/util/config-loader/config-loader.js +19 -1
  32. package/workflow.d.ts +443 -0
@@ -0,0 +1,326 @@
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 the build logs for a specific build of a managed worker
207
+ *
208
+ * @tags Log
209
+ * @name IacLogsList
210
+ * @summary Get IaC Logs
211
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/iac-logs
212
+ * @secure
213
+ */
214
+ this.iacLogsList = (managedWorker, query, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/iac-logs`, method: 'GET', query: query, secure: true, format: 'json' }, params));
215
+ /**
216
+ * @description Get all instances for a managed worker
217
+ *
218
+ * @tags Managed Worker
219
+ * @name ManagedWorkerInstancesList
220
+ * @summary List Instances
221
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/instances
222
+ * @secure
223
+ */
224
+ this.managedWorkerInstancesList = (managedWorker, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/instances`, method: 'GET', secure: true, format: 'json' }, params));
225
+ /**
226
+ * @description Get a build
227
+ *
228
+ * @tags Build
229
+ * @name BuildGet
230
+ * @summary Get Build
231
+ * @request GET:/api/v1/cloud/build/{build}
232
+ * @secure
233
+ */
234
+ this.buildGet = (build, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/build/${build}`, method: 'GET', secure: true, format: 'json' }, params));
235
+ /**
236
+ * @description Get the build logs for a specific build of a managed worker
237
+ *
238
+ * @tags Log
239
+ * @name BuildLogsList
240
+ * @summary Get Build Logs
241
+ * @request GET:/api/v1/cloud/build/{build}/logs
242
+ * @secure
243
+ */
244
+ this.buildLogsList = (build, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/build/${build}/logs`, method: 'GET', secure: true, format: 'json' }, params));
245
+ /**
246
+ * @description Get events for a managed worker
247
+ *
248
+ * @tags Managed Worker
249
+ * @name ManagedWorkerEventsList
250
+ * @summary Get Managed Worker Events
251
+ * @request GET:/api/v1/cloud/managed-worker/{managed-worker}/events
252
+ * @secure
253
+ */
254
+ this.managedWorkerEventsList = (managedWorker, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/managed-worker/${managedWorker}/events`, method: 'GET', secure: true, format: 'json' }, params));
255
+ /**
256
+ * @description Receive a webhook message from Lago
257
+ *
258
+ * @tags Billing
259
+ * @name LagoMessageCreate
260
+ * @summary Receive a webhook message from Lago
261
+ * @request POST:/api/v1/billing/lago/webhook
262
+ */
263
+ this.lagoMessageCreate = (params = {}) => this.request(Object.assign({ path: `/api/v1/billing/lago/webhook`, method: 'POST' }, params));
264
+ /**
265
+ * @description Gets the billing state for a tenant
266
+ *
267
+ * @tags Tenant
268
+ * @name TenantBillingStateGet
269
+ * @summary Get the billing state for a tenant
270
+ * @request GET:/api/v1/billing/tenants/{tenant}
271
+ * @secure
272
+ */
273
+ this.tenantBillingStateGet = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/billing/tenants/${tenant}`, method: 'GET', secure: true, format: 'json' }, params));
274
+ /**
275
+ * @description Update a subscription
276
+ *
277
+ * @tags Billing
278
+ * @name SubscriptionUpsert
279
+ * @summary Create a new subscription
280
+ * @request PATCH:/api/v1/billing/tenants/{tenant}/subscription
281
+ * @secure
282
+ */
283
+ 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));
284
+ /**
285
+ * @description Get the billing portal link
286
+ *
287
+ * @tags Billing
288
+ * @name BillingPortalLinkGet
289
+ * @summary Create a link to the billing portal
290
+ * @request GET:/api/v1/billing/tenants/{tenant}/billing-portal-link
291
+ * @secure
292
+ */
293
+ this.billingPortalLinkGet = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/billing/tenants/${tenant}/billing-portal-link`, method: 'GET', secure: true, format: 'json' }, params));
294
+ /**
295
+ * @description Push a log entry for the tenant
296
+ *
297
+ * @tags Log
298
+ * @name LogCreate
299
+ * @summary Push Log Entry
300
+ * @request POST:/api/v1/cloud/tenants/{tenant}/logs
301
+ * @secure
302
+ */
303
+ 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));
304
+ /**
305
+ * @description Get all feature flags for the tenant
306
+ *
307
+ * @tags Feature Flags
308
+ * @name FeatureFlagsList
309
+ * @summary List Feature Flags
310
+ * @request GET:/api/v1/cloud/tenants/{tenant}/feature-flags
311
+ * @secure
312
+ */
313
+ this.featureFlagsList = (tenant, params = {}) => this.request(Object.assign({ path: `/api/v1/cloud/tenants/${tenant}/feature-flags`, method: 'GET', secure: true, format: 'json' }, params));
314
+ /**
315
+ * @description Get a minute by minute breakdown of workflow run metrics for a tenant
316
+ *
317
+ * @tags Workflow
318
+ * @name WorkflowRunEventsGetMetrics
319
+ * @summary Get workflow runs
320
+ * @request GET:/api/v1/cloud/tenants/{tenant}/runs-metrics
321
+ * @secure
322
+ */
323
+ 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));
324
+ }
325
+ }
326
+ exports.Api = Api;