@hatchet-dev/typescript-sdk 0.1.13 → 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.
- package/clients/rest/generated/Api.d.ts +126 -5
- package/clients/rest/generated/Api.js +122 -4
- package/clients/rest/generated/data-contracts.d.ts +90 -0
- package/clients/rest/generated/data-contracts.js +6 -1
- package/clients/worker/worker.js +1 -0
- package/package.json +2 -1
- package/protoc/dispatcher/dispatcher.d.ts +57 -0
- package/protoc/dispatcher/dispatcher.js +157 -2
- package/protoc/workflows/workflows.d.ts +2 -0
- package/protoc/workflows/workflows.js +16 -2
- package/step.d.ts +3 -0
- package/step.js +1 -0
- package/workflow.d.ts +8 -0
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
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
2
|
import { HttpClient, RequestParams } from './http-client';
|
|
3
3
|
export declare class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
4
4
|
/**
|
|
@@ -10,6 +10,16 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
10
10
|
* @request GET:/api/v1/meta
|
|
11
11
|
*/
|
|
12
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>>;
|
|
13
23
|
/**
|
|
14
24
|
* @description Logs in a user.
|
|
15
25
|
*
|
|
@@ -23,20 +33,58 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
23
33
|
* @description Starts the OAuth flow
|
|
24
34
|
*
|
|
25
35
|
* @tags User
|
|
26
|
-
* @name
|
|
36
|
+
* @name UserUpdateGoogleOauthStart
|
|
27
37
|
* @summary Start OAuth flow
|
|
28
38
|
* @request GET:/api/v1/users/google/start
|
|
29
39
|
*/
|
|
30
|
-
|
|
40
|
+
userUpdateGoogleOauthStart: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
31
41
|
/**
|
|
32
42
|
* @description Completes the OAuth flow
|
|
33
43
|
*
|
|
34
44
|
* @tags User
|
|
35
|
-
* @name
|
|
45
|
+
* @name UserUpdateGoogleOauthCallback
|
|
36
46
|
* @summary Complete OAuth flow
|
|
37
47
|
* @request GET:/api/v1/users/google/callback
|
|
38
48
|
*/
|
|
39
|
-
|
|
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>>;
|
|
40
88
|
/**
|
|
41
89
|
* @description Gets the current user
|
|
42
90
|
*
|
|
@@ -329,6 +377,36 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
329
377
|
*/
|
|
330
378
|
version?: string;
|
|
331
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>>;
|
|
332
410
|
/**
|
|
333
411
|
* @description Get all workflow runs for a tenant
|
|
334
412
|
*
|
|
@@ -374,6 +452,19 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
374
452
|
* @secure
|
|
375
453
|
*/
|
|
376
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>>;
|
|
377
468
|
/**
|
|
378
469
|
* @description Get a step run by id
|
|
379
470
|
*
|
|
@@ -414,4 +505,34 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
414
505
|
* @secure
|
|
415
506
|
*/
|
|
416
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>>;
|
|
417
538
|
}
|
|
@@ -24,6 +24,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
24
24
|
* @request GET:/api/v1/meta
|
|
25
25
|
*/
|
|
26
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));
|
|
27
37
|
/**
|
|
28
38
|
* @description Logs in a user.
|
|
29
39
|
*
|
|
@@ -37,20 +47,58 @@ class Api extends http_client_1.HttpClient {
|
|
|
37
47
|
* @description Starts the OAuth flow
|
|
38
48
|
*
|
|
39
49
|
* @tags User
|
|
40
|
-
* @name
|
|
50
|
+
* @name UserUpdateGoogleOauthStart
|
|
41
51
|
* @summary Start OAuth flow
|
|
42
52
|
* @request GET:/api/v1/users/google/start
|
|
43
53
|
*/
|
|
44
|
-
this.
|
|
54
|
+
this.userUpdateGoogleOauthStart = (params = {}) => this.request(Object.assign({ path: `/api/v1/users/google/start`, method: 'GET' }, params));
|
|
45
55
|
/**
|
|
46
56
|
* @description Completes the OAuth flow
|
|
47
57
|
*
|
|
48
58
|
* @tags User
|
|
49
|
-
* @name
|
|
59
|
+
* @name UserUpdateGoogleOauthCallback
|
|
50
60
|
* @summary Complete OAuth flow
|
|
51
61
|
* @request GET:/api/v1/users/google/callback
|
|
52
62
|
*/
|
|
53
|
-
this.
|
|
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));
|
|
54
102
|
/**
|
|
55
103
|
* @description Gets the current user
|
|
56
104
|
*
|
|
@@ -298,6 +346,36 @@ class Api extends http_client_1.HttpClient {
|
|
|
298
346
|
* @secure
|
|
299
347
|
*/
|
|
300
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));
|
|
301
379
|
/**
|
|
302
380
|
* @description Get all workflow runs for a tenant
|
|
303
381
|
*
|
|
@@ -318,6 +396,16 @@ class Api extends http_client_1.HttpClient {
|
|
|
318
396
|
* @secure
|
|
319
397
|
*/
|
|
320
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));
|
|
321
409
|
/**
|
|
322
410
|
* @description Get a step run by id
|
|
323
411
|
*
|
|
@@ -358,6 +446,36 @@ class Api extends http_client_1.HttpClient {
|
|
|
358
446
|
* @secure
|
|
359
447
|
*/
|
|
360
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));
|
|
361
479
|
}
|
|
362
480
|
}
|
|
363
481
|
exports.Api = Api;
|
|
@@ -8,6 +8,16 @@ export interface APIMetaAuth {
|
|
|
8
8
|
*/
|
|
9
9
|
schemes?: string[];
|
|
10
10
|
}
|
|
11
|
+
export type ListAPIMetaIntegration = APIMetaIntegration[];
|
|
12
|
+
export interface APIMetaIntegration {
|
|
13
|
+
/**
|
|
14
|
+
* the name of the integration
|
|
15
|
+
* @example "github"
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/** whether this integration is enabled on the instance */
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
}
|
|
11
21
|
export interface APIErrors {
|
|
12
22
|
errors: APIError[];
|
|
13
23
|
}
|
|
@@ -275,6 +285,23 @@ export interface Workflow {
|
|
|
275
285
|
lastRun?: WorkflowRun;
|
|
276
286
|
/** The jobs of the workflow. */
|
|
277
287
|
jobs?: Job[];
|
|
288
|
+
deployment?: WorkflowDeploymentConfig;
|
|
289
|
+
}
|
|
290
|
+
export interface WorkflowDeploymentConfig {
|
|
291
|
+
metadata: APIResourceMeta;
|
|
292
|
+
/** The repository name. */
|
|
293
|
+
gitRepoName: string;
|
|
294
|
+
/** The repository owner. */
|
|
295
|
+
gitRepoOwner: string;
|
|
296
|
+
/** The repository branch. */
|
|
297
|
+
gitRepoBranch: string;
|
|
298
|
+
/** The Github App installation. */
|
|
299
|
+
githubAppInstallation?: GithubAppInstallation;
|
|
300
|
+
/**
|
|
301
|
+
* The id of the Github App installation.
|
|
302
|
+
* @format uuid
|
|
303
|
+
*/
|
|
304
|
+
githubAppInstallationId: string;
|
|
278
305
|
}
|
|
279
306
|
export interface WorkflowVersionMeta {
|
|
280
307
|
metadata: APIResourceMeta;
|
|
@@ -453,6 +480,7 @@ export interface StepRun {
|
|
|
453
480
|
cancelledAtEpoch?: number;
|
|
454
481
|
cancelledReason?: string;
|
|
455
482
|
cancelledError?: string;
|
|
483
|
+
inputSchema?: string;
|
|
456
484
|
}
|
|
457
485
|
export interface WorkerList {
|
|
458
486
|
pagination?: PaginationResponse;
|
|
@@ -507,3 +535,65 @@ export interface RerunStepRunRequest {
|
|
|
507
535
|
export interface TriggerWorkflowRunRequest {
|
|
508
536
|
input: object;
|
|
509
537
|
}
|
|
538
|
+
export interface LinkGithubRepositoryRequest {
|
|
539
|
+
/**
|
|
540
|
+
* The repository name.
|
|
541
|
+
* @minLength 36
|
|
542
|
+
* @maxLength 36
|
|
543
|
+
*/
|
|
544
|
+
installationId: string;
|
|
545
|
+
/** The repository name. */
|
|
546
|
+
gitRepoName: string;
|
|
547
|
+
/** The repository owner. */
|
|
548
|
+
gitRepoOwner: string;
|
|
549
|
+
/** The repository branch. */
|
|
550
|
+
gitRepoBranch: string;
|
|
551
|
+
}
|
|
552
|
+
export interface GithubBranch {
|
|
553
|
+
branch_name: string;
|
|
554
|
+
is_default: boolean;
|
|
555
|
+
}
|
|
556
|
+
export interface GithubRepo {
|
|
557
|
+
repo_owner: string;
|
|
558
|
+
repo_name: string;
|
|
559
|
+
}
|
|
560
|
+
export interface GithubAppInstallation {
|
|
561
|
+
metadata: APIResourceMeta;
|
|
562
|
+
installation_settings_url: string;
|
|
563
|
+
account_name: string;
|
|
564
|
+
account_avatar_url: string;
|
|
565
|
+
}
|
|
566
|
+
export interface ListGithubAppInstallationsResponse {
|
|
567
|
+
pagination: PaginationResponse;
|
|
568
|
+
rows: GithubAppInstallation[];
|
|
569
|
+
}
|
|
570
|
+
export type ListGithubReposResponse = GithubRepo[];
|
|
571
|
+
export type ListGithubBranchesResponse = GithubBranch[];
|
|
572
|
+
export interface CreatePullRequestFromStepRun {
|
|
573
|
+
branchName: string;
|
|
574
|
+
}
|
|
575
|
+
export interface GetStepRunDiffResponse {
|
|
576
|
+
diffs: StepRunDiff[];
|
|
577
|
+
}
|
|
578
|
+
export interface StepRunDiff {
|
|
579
|
+
key: string;
|
|
580
|
+
original: string;
|
|
581
|
+
modified: string;
|
|
582
|
+
}
|
|
583
|
+
export interface ListPullRequestsResponse {
|
|
584
|
+
pullRequests: PullRequest[];
|
|
585
|
+
}
|
|
586
|
+
export interface PullRequest {
|
|
587
|
+
repositoryOwner: string;
|
|
588
|
+
repositoryName: string;
|
|
589
|
+
pullRequestID: number;
|
|
590
|
+
pullRequestTitle: string;
|
|
591
|
+
pullRequestNumber: number;
|
|
592
|
+
pullRequestHeadBranch: string;
|
|
593
|
+
pullRequestBaseBranch: string;
|
|
594
|
+
pullRequestState: PullRequestState;
|
|
595
|
+
}
|
|
596
|
+
export declare enum PullRequestState {
|
|
597
|
+
Open = "open",
|
|
598
|
+
Closed = "closed"
|
|
599
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ---------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.StepRunStatus = exports.JobRunStatus = exports.WorkflowRunStatus = exports.EventOrderByDirection = exports.EventOrderByField = exports.TenantMemberRole = void 0;
|
|
13
|
+
exports.PullRequestState = exports.StepRunStatus = exports.JobRunStatus = exports.WorkflowRunStatus = exports.EventOrderByDirection = exports.EventOrderByField = exports.TenantMemberRole = void 0;
|
|
14
14
|
var TenantMemberRole;
|
|
15
15
|
(function (TenantMemberRole) {
|
|
16
16
|
TenantMemberRole["OWNER"] = "OWNER";
|
|
@@ -52,3 +52,8 @@ var StepRunStatus;
|
|
|
52
52
|
StepRunStatus["FAILED"] = "FAILED";
|
|
53
53
|
StepRunStatus["CANCELLED"] = "CANCELLED";
|
|
54
54
|
})(StepRunStatus || (exports.StepRunStatus = StepRunStatus = {}));
|
|
55
|
+
var PullRequestState;
|
|
56
|
+
(function (PullRequestState) {
|
|
57
|
+
PullRequestState["Open"] = "open";
|
|
58
|
+
PullRequestState["Closed"] = "closed";
|
|
59
|
+
})(PullRequestState || (exports.PullRequestState = PullRequestState = {}));
|
package/clients/worker/worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hatchet-dev/typescript-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Background task orchestration & visibility for developers",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"worker:dag": "npm run exec -- ./examples/dag-worker.ts",
|
|
34
34
|
"worker:concurrency": "npm run exec -- ./examples/concurrency/concurrency-worker.ts",
|
|
35
35
|
"event:concurrency": "npm run exec -- ./examples/concurrency/concurrency-event.ts",
|
|
36
|
+
"worker:retries": "npm run exec -- ./examples/retries-worker.ts",
|
|
36
37
|
"api": "npm run exec -- ./examples/api.ts",
|
|
37
38
|
"prepublish": "cp package.json dist/package.json;",
|
|
38
39
|
"publish:ci": "rm -rf ./dist && npm run tsc:build && npm run prepublish && cd dist && npm publish --access public --no-git-checks",
|
|
@@ -152,6 +152,23 @@ export interface WorkflowEvent {
|
|
|
152
152
|
eventTimestamp: Date | undefined;
|
|
153
153
|
/** the event payload */
|
|
154
154
|
eventPayload: string;
|
|
155
|
+
/**
|
|
156
|
+
* whether this is the last event for the workflow run - server
|
|
157
|
+
* will hang up the connection but clients might want to case
|
|
158
|
+
*/
|
|
159
|
+
hangup: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface OverridesData {
|
|
162
|
+
/** the step run id */
|
|
163
|
+
stepRunId: string;
|
|
164
|
+
/** the path of the data to set */
|
|
165
|
+
path: string;
|
|
166
|
+
/** the value to set */
|
|
167
|
+
value: string;
|
|
168
|
+
/** the filename of the caller */
|
|
169
|
+
callerFilename: string;
|
|
170
|
+
}
|
|
171
|
+
export interface OverridesDataResponse {
|
|
155
172
|
}
|
|
156
173
|
export declare const WorkerRegisterRequest: {
|
|
157
174
|
encode(message: WorkerRegisterRequest, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -241,6 +258,22 @@ export declare const WorkflowEvent: {
|
|
|
241
258
|
create(base?: DeepPartial<WorkflowEvent>): WorkflowEvent;
|
|
242
259
|
fromPartial(object: DeepPartial<WorkflowEvent>): WorkflowEvent;
|
|
243
260
|
};
|
|
261
|
+
export declare const OverridesData: {
|
|
262
|
+
encode(message: OverridesData, writer?: _m0.Writer): _m0.Writer;
|
|
263
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OverridesData;
|
|
264
|
+
fromJSON(object: any): OverridesData;
|
|
265
|
+
toJSON(message: OverridesData): unknown;
|
|
266
|
+
create(base?: DeepPartial<OverridesData>): OverridesData;
|
|
267
|
+
fromPartial(object: DeepPartial<OverridesData>): OverridesData;
|
|
268
|
+
};
|
|
269
|
+
export declare const OverridesDataResponse: {
|
|
270
|
+
encode(_: OverridesDataResponse, writer?: _m0.Writer): _m0.Writer;
|
|
271
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OverridesDataResponse;
|
|
272
|
+
fromJSON(_: any): OverridesDataResponse;
|
|
273
|
+
toJSON(_: OverridesDataResponse): unknown;
|
|
274
|
+
create(base?: DeepPartial<OverridesDataResponse>): OverridesDataResponse;
|
|
275
|
+
fromPartial(_: DeepPartial<OverridesDataResponse>): OverridesDataResponse;
|
|
276
|
+
};
|
|
244
277
|
export type DispatcherDefinition = typeof DispatcherDefinition;
|
|
245
278
|
export declare const DispatcherDefinition: {
|
|
246
279
|
readonly name: "Dispatcher";
|
|
@@ -356,6 +389,28 @@ export declare const DispatcherDefinition: {
|
|
|
356
389
|
readonly responseStream: false;
|
|
357
390
|
readonly options: {};
|
|
358
391
|
};
|
|
392
|
+
readonly putOverridesData: {
|
|
393
|
+
readonly name: "PutOverridesData";
|
|
394
|
+
readonly requestType: {
|
|
395
|
+
encode(message: OverridesData, writer?: _m0.Writer): _m0.Writer;
|
|
396
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OverridesData;
|
|
397
|
+
fromJSON(object: any): OverridesData;
|
|
398
|
+
toJSON(message: OverridesData): unknown;
|
|
399
|
+
create(base?: DeepPartial<OverridesData>): OverridesData;
|
|
400
|
+
fromPartial(object: DeepPartial<OverridesData>): OverridesData;
|
|
401
|
+
};
|
|
402
|
+
readonly requestStream: false;
|
|
403
|
+
readonly responseType: {
|
|
404
|
+
encode(_: OverridesDataResponse, writer?: _m0.Writer): _m0.Writer;
|
|
405
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OverridesDataResponse;
|
|
406
|
+
fromJSON(_: any): OverridesDataResponse;
|
|
407
|
+
toJSON(_: OverridesDataResponse): unknown;
|
|
408
|
+
create(base?: DeepPartial<OverridesDataResponse>): OverridesDataResponse;
|
|
409
|
+
fromPartial(_: DeepPartial<OverridesDataResponse>): OverridesDataResponse;
|
|
410
|
+
};
|
|
411
|
+
readonly responseStream: false;
|
|
412
|
+
readonly options: {};
|
|
413
|
+
};
|
|
359
414
|
readonly unsubscribe: {
|
|
360
415
|
readonly name: "Unsubscribe";
|
|
361
416
|
readonly requestType: {
|
|
@@ -386,6 +441,7 @@ export interface DispatcherServiceImplementation<CallContextExt = {}> {
|
|
|
386
441
|
subscribeToWorkflowEvents(request: SubscribeToWorkflowEventsRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<WorkflowEvent>>;
|
|
387
442
|
sendStepActionEvent(request: StepActionEvent, context: CallContext & CallContextExt): Promise<DeepPartial<ActionEventResponse>>;
|
|
388
443
|
sendGroupKeyActionEvent(request: GroupKeyActionEvent, context: CallContext & CallContextExt): Promise<DeepPartial<ActionEventResponse>>;
|
|
444
|
+
putOverridesData(request: OverridesData, context: CallContext & CallContextExt): Promise<DeepPartial<OverridesDataResponse>>;
|
|
389
445
|
unsubscribe(request: WorkerUnsubscribeRequest, context: CallContext & CallContextExt): Promise<DeepPartial<WorkerUnsubscribeResponse>>;
|
|
390
446
|
}
|
|
391
447
|
export interface DispatcherClient<CallOptionsExt = {}> {
|
|
@@ -394,6 +450,7 @@ export interface DispatcherClient<CallOptionsExt = {}> {
|
|
|
394
450
|
subscribeToWorkflowEvents(request: DeepPartial<SubscribeToWorkflowEventsRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<WorkflowEvent>;
|
|
395
451
|
sendStepActionEvent(request: DeepPartial<StepActionEvent>, options?: CallOptions & CallOptionsExt): Promise<ActionEventResponse>;
|
|
396
452
|
sendGroupKeyActionEvent(request: DeepPartial<GroupKeyActionEvent>, options?: CallOptions & CallOptionsExt): Promise<ActionEventResponse>;
|
|
453
|
+
putOverridesData(request: DeepPartial<OverridesData>, options?: CallOptions & CallOptionsExt): Promise<OverridesDataResponse>;
|
|
397
454
|
unsubscribe(request: DeepPartial<WorkerUnsubscribeRequest>, options?: CallOptions & CallOptionsExt): Promise<WorkerUnsubscribeResponse>;
|
|
398
455
|
}
|
|
399
456
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.DispatcherDefinition = exports.WorkflowEvent = exports.SubscribeToWorkflowEventsRequest = exports.ActionEventResponse = exports.StepActionEvent = exports.GroupKeyActionEvent = exports.WorkerUnsubscribeResponse = exports.WorkerUnsubscribeRequest = exports.WorkerListenRequest = exports.AssignedAction = exports.WorkerRegisterResponse = exports.WorkerRegisterRequest = exports.resourceEventTypeToJSON = exports.resourceEventTypeFromJSON = exports.ResourceEventType = exports.resourceTypeToJSON = exports.resourceTypeFromJSON = exports.ResourceType = exports.stepActionEventTypeToJSON = exports.stepActionEventTypeFromJSON = exports.StepActionEventType = exports.groupKeyActionEventTypeToJSON = exports.groupKeyActionEventTypeFromJSON = exports.GroupKeyActionEventType = exports.actionTypeToJSON = exports.actionTypeFromJSON = exports.ActionType = exports.protobufPackage = void 0;
|
|
26
|
+
exports.DispatcherDefinition = exports.OverridesDataResponse = exports.OverridesData = exports.WorkflowEvent = exports.SubscribeToWorkflowEventsRequest = exports.ActionEventResponse = exports.StepActionEvent = exports.GroupKeyActionEvent = exports.WorkerUnsubscribeResponse = exports.WorkerUnsubscribeRequest = exports.WorkerListenRequest = exports.AssignedAction = exports.WorkerRegisterResponse = exports.WorkerRegisterRequest = exports.resourceEventTypeToJSON = exports.resourceEventTypeFromJSON = exports.ResourceEventType = exports.resourceTypeToJSON = exports.resourceTypeFromJSON = exports.ResourceType = exports.stepActionEventTypeToJSON = exports.stepActionEventTypeFromJSON = exports.StepActionEventType = exports.groupKeyActionEventTypeToJSON = exports.groupKeyActionEventTypeFromJSON = exports.GroupKeyActionEventType = exports.actionTypeToJSON = exports.actionTypeFromJSON = exports.ActionType = exports.protobufPackage = void 0;
|
|
27
27
|
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
28
28
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
29
29
|
exports.protobufPackage = "";
|
|
@@ -1235,6 +1235,7 @@ function createBaseWorkflowEvent() {
|
|
|
1235
1235
|
resourceId: "",
|
|
1236
1236
|
eventTimestamp: undefined,
|
|
1237
1237
|
eventPayload: "",
|
|
1238
|
+
hangup: false,
|
|
1238
1239
|
};
|
|
1239
1240
|
}
|
|
1240
1241
|
exports.WorkflowEvent = {
|
|
@@ -1257,6 +1258,9 @@ exports.WorkflowEvent = {
|
|
|
1257
1258
|
if (message.eventPayload !== "") {
|
|
1258
1259
|
writer.uint32(50).string(message.eventPayload);
|
|
1259
1260
|
}
|
|
1261
|
+
if (message.hangup === true) {
|
|
1262
|
+
writer.uint32(56).bool(message.hangup);
|
|
1263
|
+
}
|
|
1260
1264
|
return writer;
|
|
1261
1265
|
},
|
|
1262
1266
|
decode(input, length) {
|
|
@@ -1302,6 +1306,12 @@ exports.WorkflowEvent = {
|
|
|
1302
1306
|
}
|
|
1303
1307
|
message.eventPayload = reader.string();
|
|
1304
1308
|
continue;
|
|
1309
|
+
case 7:
|
|
1310
|
+
if (tag !== 56) {
|
|
1311
|
+
break;
|
|
1312
|
+
}
|
|
1313
|
+
message.hangup = reader.bool();
|
|
1314
|
+
continue;
|
|
1305
1315
|
}
|
|
1306
1316
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1307
1317
|
break;
|
|
@@ -1318,6 +1328,7 @@ exports.WorkflowEvent = {
|
|
|
1318
1328
|
resourceId: isSet(object.resourceId) ? globalThis.String(object.resourceId) : "",
|
|
1319
1329
|
eventTimestamp: isSet(object.eventTimestamp) ? fromJsonTimestamp(object.eventTimestamp) : undefined,
|
|
1320
1330
|
eventPayload: isSet(object.eventPayload) ? globalThis.String(object.eventPayload) : "",
|
|
1331
|
+
hangup: isSet(object.hangup) ? globalThis.Boolean(object.hangup) : false,
|
|
1321
1332
|
};
|
|
1322
1333
|
},
|
|
1323
1334
|
toJSON(message) {
|
|
@@ -1340,13 +1351,16 @@ exports.WorkflowEvent = {
|
|
|
1340
1351
|
if (message.eventPayload !== "") {
|
|
1341
1352
|
obj.eventPayload = message.eventPayload;
|
|
1342
1353
|
}
|
|
1354
|
+
if (message.hangup === true) {
|
|
1355
|
+
obj.hangup = message.hangup;
|
|
1356
|
+
}
|
|
1343
1357
|
return obj;
|
|
1344
1358
|
},
|
|
1345
1359
|
create(base) {
|
|
1346
1360
|
return exports.WorkflowEvent.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1347
1361
|
},
|
|
1348
1362
|
fromPartial(object) {
|
|
1349
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1363
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1350
1364
|
const message = createBaseWorkflowEvent();
|
|
1351
1365
|
message.workflowRunId = (_a = object.workflowRunId) !== null && _a !== void 0 ? _a : "";
|
|
1352
1366
|
message.resourceType = (_b = object.resourceType) !== null && _b !== void 0 ? _b : 0;
|
|
@@ -1354,6 +1368,139 @@ exports.WorkflowEvent = {
|
|
|
1354
1368
|
message.resourceId = (_d = object.resourceId) !== null && _d !== void 0 ? _d : "";
|
|
1355
1369
|
message.eventTimestamp = (_e = object.eventTimestamp) !== null && _e !== void 0 ? _e : undefined;
|
|
1356
1370
|
message.eventPayload = (_f = object.eventPayload) !== null && _f !== void 0 ? _f : "";
|
|
1371
|
+
message.hangup = (_g = object.hangup) !== null && _g !== void 0 ? _g : false;
|
|
1372
|
+
return message;
|
|
1373
|
+
},
|
|
1374
|
+
};
|
|
1375
|
+
function createBaseOverridesData() {
|
|
1376
|
+
return { stepRunId: "", path: "", value: "", callerFilename: "" };
|
|
1377
|
+
}
|
|
1378
|
+
exports.OverridesData = {
|
|
1379
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1380
|
+
if (message.stepRunId !== "") {
|
|
1381
|
+
writer.uint32(10).string(message.stepRunId);
|
|
1382
|
+
}
|
|
1383
|
+
if (message.path !== "") {
|
|
1384
|
+
writer.uint32(18).string(message.path);
|
|
1385
|
+
}
|
|
1386
|
+
if (message.value !== "") {
|
|
1387
|
+
writer.uint32(26).string(message.value);
|
|
1388
|
+
}
|
|
1389
|
+
if (message.callerFilename !== "") {
|
|
1390
|
+
writer.uint32(34).string(message.callerFilename);
|
|
1391
|
+
}
|
|
1392
|
+
return writer;
|
|
1393
|
+
},
|
|
1394
|
+
decode(input, length) {
|
|
1395
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1396
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1397
|
+
const message = createBaseOverridesData();
|
|
1398
|
+
while (reader.pos < end) {
|
|
1399
|
+
const tag = reader.uint32();
|
|
1400
|
+
switch (tag >>> 3) {
|
|
1401
|
+
case 1:
|
|
1402
|
+
if (tag !== 10) {
|
|
1403
|
+
break;
|
|
1404
|
+
}
|
|
1405
|
+
message.stepRunId = reader.string();
|
|
1406
|
+
continue;
|
|
1407
|
+
case 2:
|
|
1408
|
+
if (tag !== 18) {
|
|
1409
|
+
break;
|
|
1410
|
+
}
|
|
1411
|
+
message.path = reader.string();
|
|
1412
|
+
continue;
|
|
1413
|
+
case 3:
|
|
1414
|
+
if (tag !== 26) {
|
|
1415
|
+
break;
|
|
1416
|
+
}
|
|
1417
|
+
message.value = reader.string();
|
|
1418
|
+
continue;
|
|
1419
|
+
case 4:
|
|
1420
|
+
if (tag !== 34) {
|
|
1421
|
+
break;
|
|
1422
|
+
}
|
|
1423
|
+
message.callerFilename = reader.string();
|
|
1424
|
+
continue;
|
|
1425
|
+
}
|
|
1426
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1427
|
+
break;
|
|
1428
|
+
}
|
|
1429
|
+
reader.skipType(tag & 7);
|
|
1430
|
+
}
|
|
1431
|
+
return message;
|
|
1432
|
+
},
|
|
1433
|
+
fromJSON(object) {
|
|
1434
|
+
return {
|
|
1435
|
+
stepRunId: isSet(object.stepRunId) ? globalThis.String(object.stepRunId) : "",
|
|
1436
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
1437
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1438
|
+
callerFilename: isSet(object.callerFilename) ? globalThis.String(object.callerFilename) : "",
|
|
1439
|
+
};
|
|
1440
|
+
},
|
|
1441
|
+
toJSON(message) {
|
|
1442
|
+
const obj = {};
|
|
1443
|
+
if (message.stepRunId !== "") {
|
|
1444
|
+
obj.stepRunId = message.stepRunId;
|
|
1445
|
+
}
|
|
1446
|
+
if (message.path !== "") {
|
|
1447
|
+
obj.path = message.path;
|
|
1448
|
+
}
|
|
1449
|
+
if (message.value !== "") {
|
|
1450
|
+
obj.value = message.value;
|
|
1451
|
+
}
|
|
1452
|
+
if (message.callerFilename !== "") {
|
|
1453
|
+
obj.callerFilename = message.callerFilename;
|
|
1454
|
+
}
|
|
1455
|
+
return obj;
|
|
1456
|
+
},
|
|
1457
|
+
create(base) {
|
|
1458
|
+
return exports.OverridesData.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1459
|
+
},
|
|
1460
|
+
fromPartial(object) {
|
|
1461
|
+
var _a, _b, _c, _d;
|
|
1462
|
+
const message = createBaseOverridesData();
|
|
1463
|
+
message.stepRunId = (_a = object.stepRunId) !== null && _a !== void 0 ? _a : "";
|
|
1464
|
+
message.path = (_b = object.path) !== null && _b !== void 0 ? _b : "";
|
|
1465
|
+
message.value = (_c = object.value) !== null && _c !== void 0 ? _c : "";
|
|
1466
|
+
message.callerFilename = (_d = object.callerFilename) !== null && _d !== void 0 ? _d : "";
|
|
1467
|
+
return message;
|
|
1468
|
+
},
|
|
1469
|
+
};
|
|
1470
|
+
function createBaseOverridesDataResponse() {
|
|
1471
|
+
return {};
|
|
1472
|
+
}
|
|
1473
|
+
exports.OverridesDataResponse = {
|
|
1474
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
1475
|
+
return writer;
|
|
1476
|
+
},
|
|
1477
|
+
decode(input, length) {
|
|
1478
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1479
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1480
|
+
const message = createBaseOverridesDataResponse();
|
|
1481
|
+
while (reader.pos < end) {
|
|
1482
|
+
const tag = reader.uint32();
|
|
1483
|
+
switch (tag >>> 3) {
|
|
1484
|
+
}
|
|
1485
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1486
|
+
break;
|
|
1487
|
+
}
|
|
1488
|
+
reader.skipType(tag & 7);
|
|
1489
|
+
}
|
|
1490
|
+
return message;
|
|
1491
|
+
},
|
|
1492
|
+
fromJSON(_) {
|
|
1493
|
+
return {};
|
|
1494
|
+
},
|
|
1495
|
+
toJSON(_) {
|
|
1496
|
+
const obj = {};
|
|
1497
|
+
return obj;
|
|
1498
|
+
},
|
|
1499
|
+
create(base) {
|
|
1500
|
+
return exports.OverridesDataResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1501
|
+
},
|
|
1502
|
+
fromPartial(_) {
|
|
1503
|
+
const message = createBaseOverridesDataResponse();
|
|
1357
1504
|
return message;
|
|
1358
1505
|
},
|
|
1359
1506
|
};
|
|
@@ -1401,6 +1548,14 @@ exports.DispatcherDefinition = {
|
|
|
1401
1548
|
responseStream: false,
|
|
1402
1549
|
options: {},
|
|
1403
1550
|
},
|
|
1551
|
+
putOverridesData: {
|
|
1552
|
+
name: "PutOverridesData",
|
|
1553
|
+
requestType: exports.OverridesData,
|
|
1554
|
+
requestStream: false,
|
|
1555
|
+
responseType: exports.OverridesDataResponse,
|
|
1556
|
+
responseStream: false,
|
|
1557
|
+
options: {},
|
|
1558
|
+
},
|
|
1404
1559
|
unsubscribe: {
|
|
1405
1560
|
name: "Unsubscribe",
|
|
1406
1561
|
requestType: exports.WorkerUnsubscribeRequest,
|
|
@@ -64,6 +64,8 @@ export interface CreateWorkflowStepOpts {
|
|
|
64
64
|
parents: string[];
|
|
65
65
|
/** (optional) the custom step user data, assuming string representation of JSON */
|
|
66
66
|
userData: string;
|
|
67
|
+
/** (optional) the number of retries for the step, default 0 */
|
|
68
|
+
retries: number;
|
|
67
69
|
}
|
|
68
70
|
/** ListWorkflowsRequest is the request for ListWorkflows. */
|
|
69
71
|
export interface ListWorkflowsRequest {
|
|
@@ -470,7 +470,7 @@ exports.CreateWorkflowJobOpts = {
|
|
|
470
470
|
},
|
|
471
471
|
};
|
|
472
472
|
function createBaseCreateWorkflowStepOpts() {
|
|
473
|
-
return { readableId: "", action: "", timeout: "", inputs: "", parents: [], userData: "" };
|
|
473
|
+
return { readableId: "", action: "", timeout: "", inputs: "", parents: [], userData: "", retries: 0 };
|
|
474
474
|
}
|
|
475
475
|
exports.CreateWorkflowStepOpts = {
|
|
476
476
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -492,6 +492,9 @@ exports.CreateWorkflowStepOpts = {
|
|
|
492
492
|
if (message.userData !== "") {
|
|
493
493
|
writer.uint32(50).string(message.userData);
|
|
494
494
|
}
|
|
495
|
+
if (message.retries !== 0) {
|
|
496
|
+
writer.uint32(56).int32(message.retries);
|
|
497
|
+
}
|
|
495
498
|
return writer;
|
|
496
499
|
},
|
|
497
500
|
decode(input, length) {
|
|
@@ -537,6 +540,12 @@ exports.CreateWorkflowStepOpts = {
|
|
|
537
540
|
}
|
|
538
541
|
message.userData = reader.string();
|
|
539
542
|
continue;
|
|
543
|
+
case 7:
|
|
544
|
+
if (tag !== 56) {
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
message.retries = reader.int32();
|
|
548
|
+
continue;
|
|
540
549
|
}
|
|
541
550
|
if ((tag & 7) === 4 || tag === 0) {
|
|
542
551
|
break;
|
|
@@ -553,6 +562,7 @@ exports.CreateWorkflowStepOpts = {
|
|
|
553
562
|
inputs: isSet(object.inputs) ? globalThis.String(object.inputs) : "",
|
|
554
563
|
parents: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.parents) ? object.parents.map((e) => globalThis.String(e)) : [],
|
|
555
564
|
userData: isSet(object.userData) ? globalThis.String(object.userData) : "",
|
|
565
|
+
retries: isSet(object.retries) ? globalThis.Number(object.retries) : 0,
|
|
556
566
|
};
|
|
557
567
|
},
|
|
558
568
|
toJSON(message) {
|
|
@@ -576,13 +586,16 @@ exports.CreateWorkflowStepOpts = {
|
|
|
576
586
|
if (message.userData !== "") {
|
|
577
587
|
obj.userData = message.userData;
|
|
578
588
|
}
|
|
589
|
+
if (message.retries !== 0) {
|
|
590
|
+
obj.retries = Math.round(message.retries);
|
|
591
|
+
}
|
|
579
592
|
return obj;
|
|
580
593
|
},
|
|
581
594
|
create(base) {
|
|
582
595
|
return exports.CreateWorkflowStepOpts.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
583
596
|
},
|
|
584
597
|
fromPartial(object) {
|
|
585
|
-
var _a, _b, _c, _d, _e, _f;
|
|
598
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
586
599
|
const message = createBaseCreateWorkflowStepOpts();
|
|
587
600
|
message.readableId = (_a = object.readableId) !== null && _a !== void 0 ? _a : "";
|
|
588
601
|
message.action = (_b = object.action) !== null && _b !== void 0 ? _b : "";
|
|
@@ -590,6 +603,7 @@ exports.CreateWorkflowStepOpts = {
|
|
|
590
603
|
message.inputs = (_d = object.inputs) !== null && _d !== void 0 ? _d : "";
|
|
591
604
|
message.parents = ((_e = object.parents) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
|
|
592
605
|
message.userData = (_f = object.userData) !== null && _f !== void 0 ? _f : "";
|
|
606
|
+
message.retries = (_g = object.retries) !== null && _g !== void 0 ? _g : 0;
|
|
593
607
|
return message;
|
|
594
608
|
},
|
|
595
609
|
};
|
package/step.d.ts
CHANGED
|
@@ -3,14 +3,17 @@ export declare const CreateStepSchema: z.ZodObject<{
|
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
parents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5
5
|
timeout: z.ZodOptional<z.ZodString>;
|
|
6
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
name: string;
|
|
8
9
|
parents?: string[] | undefined;
|
|
9
10
|
timeout?: string | undefined;
|
|
11
|
+
retries?: number | undefined;
|
|
10
12
|
}, {
|
|
11
13
|
name: string;
|
|
12
14
|
parents?: string[] | undefined;
|
|
13
15
|
timeout?: string | undefined;
|
|
16
|
+
retries?: number | undefined;
|
|
14
17
|
}>;
|
|
15
18
|
export type NextStep = {
|
|
16
19
|
[key: string]: string;
|
package/step.js
CHANGED
package/workflow.d.ts
CHANGED
|
@@ -5,14 +5,17 @@ declare const StepsSchema: z.ZodArray<z.ZodObject<{
|
|
|
5
5
|
name: z.ZodString;
|
|
6
6
|
parents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
7
|
timeout: z.ZodOptional<z.ZodString>;
|
|
8
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
9
10
|
name: string;
|
|
10
11
|
parents?: string[] | undefined;
|
|
11
12
|
timeout?: string | undefined;
|
|
13
|
+
retries?: number | undefined;
|
|
12
14
|
}, {
|
|
13
15
|
name: string;
|
|
14
16
|
parents?: string[] | undefined;
|
|
15
17
|
timeout?: string | undefined;
|
|
18
|
+
retries?: number | undefined;
|
|
16
19
|
}>, "many">;
|
|
17
20
|
export type Steps = z.infer<typeof StepsSchema>;
|
|
18
21
|
export declare const ConcurrencyLimitStrategy: typeof PbConcurrencyLimitStrategy;
|
|
@@ -58,14 +61,17 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
58
61
|
name: z.ZodString;
|
|
59
62
|
parents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
60
63
|
timeout: z.ZodOptional<z.ZodString>;
|
|
64
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
61
65
|
}, "strip", z.ZodTypeAny, {
|
|
62
66
|
name: string;
|
|
63
67
|
parents?: string[] | undefined;
|
|
64
68
|
timeout?: string | undefined;
|
|
69
|
+
retries?: number | undefined;
|
|
65
70
|
}, {
|
|
66
71
|
name: string;
|
|
67
72
|
parents?: string[] | undefined;
|
|
68
73
|
timeout?: string | undefined;
|
|
74
|
+
retries?: number | undefined;
|
|
69
75
|
}>, "many">;
|
|
70
76
|
}, "strip", z.ZodTypeAny, {
|
|
71
77
|
description: string;
|
|
@@ -73,6 +79,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
73
79
|
name: string;
|
|
74
80
|
parents?: string[] | undefined;
|
|
75
81
|
timeout?: string | undefined;
|
|
82
|
+
retries?: number | undefined;
|
|
76
83
|
}[];
|
|
77
84
|
id: string;
|
|
78
85
|
on: {
|
|
@@ -90,6 +97,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
90
97
|
name: string;
|
|
91
98
|
parents?: string[] | undefined;
|
|
92
99
|
timeout?: string | undefined;
|
|
100
|
+
retries?: number | undefined;
|
|
93
101
|
}[];
|
|
94
102
|
id: string;
|
|
95
103
|
on: {
|