@sylphx/sdk 0.31.0 → 0.32.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.
- package/README.md +131 -4
- package/dist/access.d.ts +146 -17
- package/dist/access.js +114 -8
- package/dist/access.js.map +1 -1
- package/dist/agents.d.ts +1564 -0
- package/dist/agents.js +1096 -0
- package/dist/agents.js.map +1 -0
- package/dist/ai.d.ts +1 -2
- package/dist/ai.js +2 -3
- package/dist/ai.js.map +1 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +2 -2
- package/dist/assets.d.ts +447 -0
- package/dist/assets.js +266 -0
- package/dist/assets.js.map +1 -0
- package/dist/auth/client.d.ts +239 -0
- package/dist/auth/client.js +337 -0
- package/dist/auth/client.js.map +1 -0
- package/dist/auth/end-user-keys-mock.d.ts +83 -0
- package/dist/auth/end-user-keys-mock.js +427 -0
- package/dist/auth/end-user-keys-mock.js.map +1 -0
- package/dist/auth/end-user-keys.d.ts +219 -0
- package/dist/auth/end-user-keys.js +240 -0
- package/dist/auth/end-user-keys.js.map +1 -0
- package/dist/auth/verify.d.ts +38 -3
- package/dist/auth/verify.js +58 -8
- package/dist/auth/verify.js.map +1 -1
- package/dist/auth.d.ts +656 -9
- package/dist/auth.js +563 -6
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +99 -21
- package/dist/billing.js +43 -5
- package/dist/billing.js.map +1 -1
- package/dist/broker.d.ts +5 -4
- package/dist/broker.js +3 -3
- package/dist/broker.js.map +1 -1
- package/dist/build.d.ts +362 -29
- package/dist/build.js +302 -10
- package/dist/build.js.map +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.d.ts +140 -0
- package/dist/config/flags.js +462 -0
- package/dist/config/flags.js.map +1 -0
- package/dist/config.d.ts +380 -15
- package/dist/config.js +283 -5
- package/dist/config.js.map +1 -1
- package/dist/connections.d.ts +6 -6
- package/dist/connections.js +3 -3
- package/dist/data.d.ts +612 -7
- package/dist/data.js +566 -4
- package/dist/data.js.map +1 -1
- package/dist/entitlement.d.ts +10 -8
- package/dist/entitlement.js +3 -4
- package/dist/entitlement.js.map +1 -1
- package/dist/events/realtime.d.ts +69 -0
- package/dist/events/realtime.js +107 -0
- package/dist/events/realtime.js.map +1 -0
- package/dist/events/webhooks.d.ts +40 -0
- package/dist/events/webhooks.js +110 -0
- package/dist/events/webhooks.js.map +1 -0
- package/dist/events.d.ts +369 -22
- package/dist/events.js +311 -8
- package/dist/events.js.map +1 -1
- package/dist/flags.d.ts +18 -0
- package/dist/flags.js +44 -0
- package/dist/flags.js.map +1 -0
- package/dist/hosting.d.ts +13 -14
- package/dist/hosting.js +3 -4
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +987 -0
- package/dist/ids.js +317 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +25 -1
- package/dist/index.js +34 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts +2 -2
- package/dist/keys.js +3 -3
- package/dist/knowledge.d.ts +1192 -0
- package/dist/knowledge.js +1002 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/localization.d.ts +663 -0
- package/dist/localization.js +491 -0
- package/dist/localization.js.map +1 -0
- package/dist/methods.js +3251 -133
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +3086 -0
- package/dist/money.js +2358 -0
- package/dist/money.js.map +1 -0
- package/dist/network.d.ts +4 -5
- package/dist/network.js +3 -4
- package/dist/network.js.map +1 -1
- package/dist/notify.d.ts +667 -125
- package/dist/notify.js +471 -73
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +322 -7
- package/dist/observability.js +244 -8
- package/dist/observability.js.map +1 -1
- package/dist/realtime.d.ts +404 -0
- package/dist/realtime.js +312 -0
- package/dist/realtime.js.map +1 -0
- package/dist/release.d.ts +14 -15
- package/dist/release.js +3 -4
- package/dist/release.js.map +1 -1
- package/dist/runners.d.ts +2 -3
- package/dist/runners.js +3 -4
- package/dist/runners.js.map +1 -1
- package/dist/runtime.d.ts +5 -1
- package/dist/runtime.js +7 -3
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes.d.ts +64 -20
- package/dist/sandboxes.js +9 -4
- package/dist/sandboxes.js.map +1 -1
- package/dist/secrets.d.ts +342 -6
- package/dist/secrets.js +271 -4
- package/dist/secrets.js.map +1 -1
- package/dist/workflows.d.ts +969 -15
- package/dist/workflows.js +815 -6
- package/dist/workflows.js.map +1 -1
- package/package.json +2 -2
package/dist/workflows.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
// @generated by sylphx-gen 0.1.0 from contracts@
|
|
1
|
+
// @generated by sylphx-gen 0.1.0 from contracts@c8a7361c53e572321b0ec9fb014fd1e8279b007b62562423038e0d0e5b9d767a. Do not edit.
|
|
2
2
|
// `sylphx.workflows.v1`.
|
|
3
3
|
import * as runtime from './runtime.js';
|
|
4
4
|
import './common.js';
|
|
5
5
|
runtime.registerSchemas({
|
|
6
|
+
'sylphx.workflows.v1.AddDistributedRunShardsRequest': [
|
|
7
|
+
['shards', 'shards', 'sylphx.workflows.v1.ShardInput'],
|
|
8
|
+
],
|
|
6
9
|
'sylphx.workflows.v1.BatchPosition': [
|
|
7
10
|
['parentRun', 'parent_run'],
|
|
8
11
|
['totalCount', 'total_count'],
|
|
@@ -10,7 +13,29 @@ runtime.registerSchemas({
|
|
|
10
13
|
'sylphx.workflows.v1.CalendarSpec': [
|
|
11
14
|
['timeZone', 'time_zone'],
|
|
12
15
|
],
|
|
16
|
+
'sylphx.workflows.v1.CancelDistributedRunRequest': [],
|
|
17
|
+
'sylphx.workflows.v1.CancelJobRunRequest': [],
|
|
13
18
|
'sylphx.workflows.v1.CancelRunRequest': [],
|
|
19
|
+
'sylphx.workflows.v1.CreateDistributedJobRequest': [
|
|
20
|
+
['distributedJobId', 'distributed_job_id'],
|
|
21
|
+
['distributedJob', 'distributed_job', 'sylphx.workflows.v1.DistributedJob'],
|
|
22
|
+
['validateOnly', 'validate_only'],
|
|
23
|
+
],
|
|
24
|
+
'sylphx.workflows.v1.CreateDistributedRunRequest': [
|
|
25
|
+
['distributedRunId', 'distributed_run_id'],
|
|
26
|
+
['distributedRun', 'distributed_run', 'sylphx.workflows.v1.DistributedRun'],
|
|
27
|
+
['validateOnly', 'validate_only'],
|
|
28
|
+
],
|
|
29
|
+
'sylphx.workflows.v1.CreateJobRequest': [
|
|
30
|
+
['jobId', 'job_id'],
|
|
31
|
+
['job', 'job', 'sylphx.workflows.v1.Job'],
|
|
32
|
+
['validateOnly', 'validate_only'],
|
|
33
|
+
],
|
|
34
|
+
'sylphx.workflows.v1.CreateJobRunRequest': [
|
|
35
|
+
['jobRunId', 'job_run_id'],
|
|
36
|
+
['jobRun', 'job_run', 'sylphx.workflows.v1.JobRun'],
|
|
37
|
+
['validateOnly', 'validate_only'],
|
|
38
|
+
],
|
|
14
39
|
'sylphx.workflows.v1.CreateRunRequest': [
|
|
15
40
|
['runId', 'run_id'],
|
|
16
41
|
['run', 'run', 'sylphx.workflows.v1.Run'],
|
|
@@ -26,6 +51,14 @@ runtime.registerSchemas({
|
|
|
26
51
|
['workflow', 'workflow', 'sylphx.workflows.v1.Workflow'],
|
|
27
52
|
['validateOnly', 'validate_only'],
|
|
28
53
|
],
|
|
54
|
+
'sylphx.workflows.v1.DeleteDistributedJobRequest': [
|
|
55
|
+
['allowMissing', 'allow_missing'],
|
|
56
|
+
['validateOnly', 'validate_only'],
|
|
57
|
+
],
|
|
58
|
+
'sylphx.workflows.v1.DeleteJobRequest': [
|
|
59
|
+
['allowMissing', 'allow_missing'],
|
|
60
|
+
['validateOnly', 'validate_only'],
|
|
61
|
+
],
|
|
29
62
|
'sylphx.workflows.v1.DeleteScheduleRequest': [
|
|
30
63
|
['allowMissing', 'allow_missing'],
|
|
31
64
|
['validateOnly', 'validate_only'],
|
|
@@ -34,10 +67,131 @@ runtime.registerSchemas({
|
|
|
34
67
|
['allowMissing', 'allow_missing'],
|
|
35
68
|
['validateOnly', 'validate_only'],
|
|
36
69
|
],
|
|
70
|
+
'sylphx.workflows.v1.DistributedJob': [
|
|
71
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
72
|
+
['spec', 'spec', 'sylphx.workflows.v1.DistributedJobSpec'],
|
|
73
|
+
['status', 'status', 'sylphx.workflows.v1.DistributedJobStatus'],
|
|
74
|
+
],
|
|
75
|
+
'sylphx.workflows.v1.DistributedJobSpec': [
|
|
76
|
+
['worker', 'worker', 'sylphx.workflows.v1.JobSpec'],
|
|
77
|
+
['workerClass', 'worker_class'],
|
|
78
|
+
['scale', 'scale', 'sylphx.workflows.v1.WorkerScale'],
|
|
79
|
+
['scratchGib', 'scratch_gib'],
|
|
80
|
+
['shardCount', 'shard_count'],
|
|
81
|
+
['shardTimeout', 'shard_timeout'],
|
|
82
|
+
['shardRetries', 'shard_retries'],
|
|
83
|
+
['maxFailedShards', 'max_failed_shards'],
|
|
84
|
+
['runTimeout', 'run_timeout'],
|
|
85
|
+
['checkpointUri', 'checkpoint_uri'],
|
|
86
|
+
['outputUri', 'output_uri'],
|
|
87
|
+
],
|
|
88
|
+
'sylphx.workflows.v1.DistributedJobStatus': [
|
|
89
|
+
['observedGeneration', 'observed_generation'],
|
|
90
|
+
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
91
|
+
],
|
|
92
|
+
'sylphx.workflows.v1.DistributedRun': [
|
|
93
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
94
|
+
['jobGeneration', 'job_generation'],
|
|
95
|
+
['manifestOpen', 'manifest_open'],
|
|
96
|
+
['createTime', 'create_time'],
|
|
97
|
+
['startTime', 'start_time'],
|
|
98
|
+
['endTime', 'end_time'],
|
|
99
|
+
['shardCounts', 'shard_counts', 'sylphx.workflows.v1.ShardCounts'],
|
|
100
|
+
['workerCounts', 'worker_counts', 'sylphx.workflows.v1.WorkerCounts'],
|
|
101
|
+
['usage', 'usage', 'sylphx.workflows.v1.DistributedRunUsage'],
|
|
102
|
+
['env', 'env', undefined, 'map'],
|
|
103
|
+
['shards', 'shards', 'sylphx.workflows.v1.ShardInput'],
|
|
104
|
+
['openManifest', 'open_manifest'],
|
|
105
|
+
],
|
|
106
|
+
'sylphx.workflows.v1.DistributedRunUsage': [
|
|
107
|
+
['workerDuration', 'worker_duration'],
|
|
108
|
+
['workerClass', 'worker_class'],
|
|
109
|
+
['instanceType', 'instance_type'],
|
|
110
|
+
],
|
|
111
|
+
'sylphx.workflows.v1.GetDistributedJobRequest': [],
|
|
112
|
+
'sylphx.workflows.v1.GetDistributedRunRequest': [],
|
|
113
|
+
'sylphx.workflows.v1.GetJobRequest': [],
|
|
114
|
+
'sylphx.workflows.v1.GetJobRunRequest': [],
|
|
37
115
|
'sylphx.workflows.v1.GetRunRequest': [],
|
|
38
116
|
'sylphx.workflows.v1.GetScheduleRequest': [],
|
|
39
117
|
'sylphx.workflows.v1.GetWorkflowRequest': [],
|
|
40
118
|
'sylphx.workflows.v1.IntervalSpec': [],
|
|
119
|
+
'sylphx.workflows.v1.Job': [
|
|
120
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
121
|
+
['spec', 'spec', 'sylphx.workflows.v1.JobSpec'],
|
|
122
|
+
['status', 'status', 'sylphx.workflows.v1.JobStatus'],
|
|
123
|
+
],
|
|
124
|
+
'sylphx.workflows.v1.JobHandler': [],
|
|
125
|
+
'sylphx.workflows.v1.JobLogLine': [
|
|
126
|
+
['writeTime', 'write_time'],
|
|
127
|
+
],
|
|
128
|
+
'sylphx.workflows.v1.JobRun': [
|
|
129
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
130
|
+
['jobGeneration', 'job_generation'],
|
|
131
|
+
['resolvedImage', 'resolved_image'],
|
|
132
|
+
['env', 'env', undefined, 'map'],
|
|
133
|
+
['exitCode', 'exit_code'],
|
|
134
|
+
['attemptCount', 'attempt_count'],
|
|
135
|
+
['terminationReason', 'termination_reason'],
|
|
136
|
+
['scheduleFire', 'schedule_fire', 'sylphx.workflows.v1.ScheduleFireRef'],
|
|
137
|
+
['createTime', 'create_time'],
|
|
138
|
+
['startTime', 'start_time'],
|
|
139
|
+
['endTime', 'end_time'],
|
|
140
|
+
['usage', 'usage', 'sylphx.workflows.v1.JobRunUsage'],
|
|
141
|
+
['scheduleTime', 'schedule_time'],
|
|
142
|
+
['startDelay', 'start_delay'],
|
|
143
|
+
],
|
|
144
|
+
'sylphx.workflows.v1.JobRunUsage': [
|
|
145
|
+
['billedDuration', 'billed_duration'],
|
|
146
|
+
['instanceType', 'instance_type'],
|
|
147
|
+
],
|
|
148
|
+
'sylphx.workflows.v1.JobSpec': [
|
|
149
|
+
['env', 'env', undefined, 'map'],
|
|
150
|
+
['instanceType', 'instance_type'],
|
|
151
|
+
['maxRetries', 'max_retries'],
|
|
152
|
+
],
|
|
153
|
+
'sylphx.workflows.v1.JobStatus': [
|
|
154
|
+
['observedGeneration', 'observed_generation'],
|
|
155
|
+
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
156
|
+
['resolvedImage', 'resolved_image'],
|
|
157
|
+
['lastRun', 'last_run'],
|
|
158
|
+
],
|
|
159
|
+
'sylphx.workflows.v1.ListDistributedJobsRequest': [
|
|
160
|
+
['pageSize', 'page_size'],
|
|
161
|
+
['pageToken', 'page_token'],
|
|
162
|
+
['orderBy', 'order_by'],
|
|
163
|
+
],
|
|
164
|
+
'sylphx.workflows.v1.ListDistributedJobsResponse': [
|
|
165
|
+
['distributedJobs', 'distributed_jobs', 'sylphx.workflows.v1.DistributedJob'],
|
|
166
|
+
['nextPageToken', 'next_page_token'],
|
|
167
|
+
],
|
|
168
|
+
'sylphx.workflows.v1.ListDistributedRunsRequest': [
|
|
169
|
+
['pageSize', 'page_size'],
|
|
170
|
+
['pageToken', 'page_token'],
|
|
171
|
+
['orderBy', 'order_by'],
|
|
172
|
+
],
|
|
173
|
+
'sylphx.workflows.v1.ListDistributedRunsResponse': [
|
|
174
|
+
['distributedRuns', 'distributed_runs', 'sylphx.workflows.v1.DistributedRun'],
|
|
175
|
+
['nextPageToken', 'next_page_token'],
|
|
176
|
+
],
|
|
177
|
+
'sylphx.workflows.v1.ListJobRunsRequest': [
|
|
178
|
+
['pageSize', 'page_size'],
|
|
179
|
+
['pageToken', 'page_token'],
|
|
180
|
+
['orderBy', 'order_by'],
|
|
181
|
+
],
|
|
182
|
+
'sylphx.workflows.v1.ListJobRunsResponse': [
|
|
183
|
+
['jobRuns', 'job_runs', 'sylphx.workflows.v1.JobRun'],
|
|
184
|
+
['nextPageToken', 'next_page_token'],
|
|
185
|
+
],
|
|
186
|
+
'sylphx.workflows.v1.ListJobsRequest': [
|
|
187
|
+
['pageSize', 'page_size'],
|
|
188
|
+
['pageToken', 'page_token'],
|
|
189
|
+
['orderBy', 'order_by'],
|
|
190
|
+
],
|
|
191
|
+
'sylphx.workflows.v1.ListJobsResponse': [
|
|
192
|
+
['jobs', 'jobs', 'sylphx.workflows.v1.Job'],
|
|
193
|
+
['nextPageToken', 'next_page_token'],
|
|
194
|
+
],
|
|
41
195
|
'sylphx.workflows.v1.ListRunsRequest': [
|
|
42
196
|
['pageSize', 'page_size'],
|
|
43
197
|
['pageToken', 'page_token'],
|
|
@@ -69,6 +223,31 @@ runtime.registerSchemas({
|
|
|
69
223
|
['pauseNote', 'pause_note'],
|
|
70
224
|
['validateOnly', 'validate_only'],
|
|
71
225
|
],
|
|
226
|
+
'sylphx.workflows.v1.ReadDistributedRunShardsRequest': [
|
|
227
|
+
['pageSize', 'page_size'],
|
|
228
|
+
['pageToken', 'page_token'],
|
|
229
|
+
['stateFilter', 'state_filter'],
|
|
230
|
+
],
|
|
231
|
+
'sylphx.workflows.v1.ReadDistributedRunShardsResponse': [
|
|
232
|
+
['shards', 'shards', 'sylphx.workflows.v1.Shard'],
|
|
233
|
+
['nextPageToken', 'next_page_token'],
|
|
234
|
+
],
|
|
235
|
+
'sylphx.workflows.v1.ReadDistributedRunWorkersRequest': [
|
|
236
|
+
['pageSize', 'page_size'],
|
|
237
|
+
['pageToken', 'page_token'],
|
|
238
|
+
],
|
|
239
|
+
'sylphx.workflows.v1.ReadDistributedRunWorkersResponse': [
|
|
240
|
+
['workers', 'workers', 'sylphx.workflows.v1.Worker'],
|
|
241
|
+
['nextPageToken', 'next_page_token'],
|
|
242
|
+
],
|
|
243
|
+
'sylphx.workflows.v1.ReadJobRunLogsRequest': [
|
|
244
|
+
['pageSize', 'page_size'],
|
|
245
|
+
['pageToken', 'page_token'],
|
|
246
|
+
],
|
|
247
|
+
'sylphx.workflows.v1.ReadJobRunLogsResponse': [
|
|
248
|
+
['lines', 'lines', 'sylphx.workflows.v1.JobLogLine'],
|
|
249
|
+
['nextPageToken', 'next_page_token'],
|
|
250
|
+
],
|
|
72
251
|
'sylphx.workflows.v1.ReadRunHistoryRequest': [
|
|
73
252
|
['pageSize', 'page_size'],
|
|
74
253
|
['pageToken', 'page_token'],
|
|
@@ -98,6 +277,7 @@ runtime.registerSchemas({
|
|
|
98
277
|
['attemptCount', 'attempt_count'],
|
|
99
278
|
['output', 'output', undefined, 'json'],
|
|
100
279
|
['error', 'error', 'sylphx.workflows.v1.RunError'],
|
|
280
|
+
['scheduleTime', 'schedule_time'],
|
|
101
281
|
],
|
|
102
282
|
'sylphx.workflows.v1.RunError': [],
|
|
103
283
|
'sylphx.workflows.v1.RunHistoryEvent': [
|
|
@@ -131,6 +311,13 @@ runtime.registerSchemas({
|
|
|
131
311
|
['lastFire', 'last_fire', 'sylphx.workflows.v1.ScheduleFire'],
|
|
132
312
|
],
|
|
133
313
|
'sylphx.workflows.v1.ServiceHandler': [],
|
|
314
|
+
'sylphx.workflows.v1.Shard': [
|
|
315
|
+
['outputs', 'outputs', undefined, 'json'],
|
|
316
|
+
],
|
|
317
|
+
'sylphx.workflows.v1.ShardCounts': [],
|
|
318
|
+
'sylphx.workflows.v1.ShardInput': [
|
|
319
|
+
['input', 'input', undefined, 'json'],
|
|
320
|
+
],
|
|
134
321
|
'sylphx.workflows.v1.SignalRunRequest': [
|
|
135
322
|
['payload', 'payload', undefined, 'json'],
|
|
136
323
|
],
|
|
@@ -141,6 +328,18 @@ runtime.registerSchemas({
|
|
|
141
328
|
'sylphx.workflows.v1.StartRunBatchResponse': [
|
|
142
329
|
['run', 'run', 'sylphx.workflows.v1.Run'],
|
|
143
330
|
],
|
|
331
|
+
'sylphx.workflows.v1.UpdateDistributedJobRequest': [
|
|
332
|
+
['distributedJob', 'distributed_job', 'sylphx.workflows.v1.DistributedJob'],
|
|
333
|
+
['updateMask', 'update_mask'],
|
|
334
|
+
['allowMissing', 'allow_missing'],
|
|
335
|
+
['validateOnly', 'validate_only'],
|
|
336
|
+
],
|
|
337
|
+
'sylphx.workflows.v1.UpdateJobRequest': [
|
|
338
|
+
['job', 'job', 'sylphx.workflows.v1.Job'],
|
|
339
|
+
['updateMask', 'update_mask'],
|
|
340
|
+
['allowMissing', 'allow_missing'],
|
|
341
|
+
['validateOnly', 'validate_only'],
|
|
342
|
+
],
|
|
144
343
|
'sylphx.workflows.v1.UpdateScheduleRequest': [
|
|
145
344
|
['schedule', 'schedule', 'sylphx.workflows.v1.Schedule'],
|
|
146
345
|
['updateMask', 'update_mask'],
|
|
@@ -154,6 +353,15 @@ runtime.registerSchemas({
|
|
|
154
353
|
['validateOnly', 'validate_only'],
|
|
155
354
|
],
|
|
156
355
|
'sylphx.workflows.v1.WaitRunRequest': [],
|
|
356
|
+
'sylphx.workflows.v1.Worker': [
|
|
357
|
+
['startTime', 'start_time'],
|
|
358
|
+
['endTime', 'end_time'],
|
|
359
|
+
],
|
|
360
|
+
'sylphx.workflows.v1.WorkerCounts': [],
|
|
361
|
+
'sylphx.workflows.v1.WorkerScale': [
|
|
362
|
+
['minWorkers', 'min_workers'],
|
|
363
|
+
['maxWorkers', 'max_workers'],
|
|
364
|
+
],
|
|
157
365
|
'sylphx.workflows.v1.Workflow': [
|
|
158
366
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
159
367
|
['spec', 'spec', 'sylphx.workflows.v1.WorkflowSpec'],
|
|
@@ -165,6 +373,7 @@ runtime.registerSchemas({
|
|
|
165
373
|
['retryPolicy', 'retry_policy', 'sylphx.workflows.v1.RetryPolicy'],
|
|
166
374
|
['timeouts', 'timeouts', 'sylphx.workflows.v1.WorkflowTimeouts'],
|
|
167
375
|
['maxConcurrentRuns', 'max_concurrent_runs'],
|
|
376
|
+
['jobHandler', 'job_handler', 'sylphx.workflows.v1.JobHandler'],
|
|
168
377
|
],
|
|
169
378
|
'sylphx.workflows.v1.WorkflowStatus': [
|
|
170
379
|
['observedGeneration', 'observed_generation'],
|
|
@@ -178,22 +387,149 @@ runtime.registerSchemas({
|
|
|
178
387
|
});
|
|
179
388
|
/**
|
|
180
389
|
* WorkflowsService is Sylphx Workflows: durable execution, schedules, timers,
|
|
181
|
-
* and runs
|
|
182
|
-
* Workflows is the one writer of these types.
|
|
390
|
+
* and runs. Workflows is the one writer of these types.
|
|
183
391
|
*
|
|
184
392
|
* Namespace of Sylphx Workflows on `Sylphx`.
|
|
185
393
|
*/
|
|
186
394
|
export class WorkflowsApi {
|
|
395
|
+
client;
|
|
187
396
|
/** The `workflows` collection. */
|
|
188
397
|
workflows;
|
|
189
398
|
/** The `schedules` collection. */
|
|
190
399
|
schedules;
|
|
191
400
|
/** The `runs` collection. */
|
|
192
401
|
runs;
|
|
402
|
+
/** The `jobs` collection. */
|
|
403
|
+
jobs;
|
|
404
|
+
/** The `job_runs` collection. */
|
|
405
|
+
jobRuns;
|
|
406
|
+
/** The `distributed_jobs` collection. */
|
|
407
|
+
distributedJobs;
|
|
408
|
+
/** The `distributed_runs` collection. */
|
|
409
|
+
distributedRuns;
|
|
193
410
|
constructor(client) {
|
|
411
|
+
this.client = client;
|
|
194
412
|
this.workflows = new WorkflowsCollection(client);
|
|
195
413
|
this.schedules = new SchedulesCollection(client);
|
|
196
414
|
this.runs = new RunsCollection(client);
|
|
415
|
+
this.jobs = new JobsCollection(client);
|
|
416
|
+
this.jobRuns = new JobRunsCollection(client);
|
|
417
|
+
this.distributedJobs = new DistributedJobsCollection(client);
|
|
418
|
+
this.distributedRuns = new DistributedRunsCollection(client);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Updates a schedule; with `allow_missing` it creates the schedule when it
|
|
422
|
+
* does not exist, so its short name `schedule` is an upsert by name.
|
|
423
|
+
*
|
|
424
|
+
* `PATCH /v1/{schedule.name=orgs/*\/projects/*\/envs/*\/schedules/*}` · permission `workflows:write` · effect `write`
|
|
425
|
+
*
|
|
426
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
427
|
+
*
|
|
428
|
+
* Short name of `sx.workflows.schedules.update`.
|
|
429
|
+
*/
|
|
430
|
+
async schedule(request) {
|
|
431
|
+
const operation = await this.client.call({
|
|
432
|
+
method: 'PATCH',
|
|
433
|
+
path: `/v1/${runtime.pathParam(request.schedule?.name, 'orgs/*/projects/*/envs/*/schedules/*', 'schedule.name')}`,
|
|
434
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
435
|
+
body: request.schedule ?? {},
|
|
436
|
+
bodyType: 'sylphx.workflows.v1.Schedule',
|
|
437
|
+
responseType: 'sylphx.common.v1.Operation',
|
|
438
|
+
mutation: true,
|
|
439
|
+
});
|
|
440
|
+
return new runtime.Operation(this.client, operation, 'sylphx.workflows.v1.Schedule');
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Starts a Run of a Workflow, now or after `start_delay` or at
|
|
444
|
+
* `schedule_time`. `run_id` is the caller's key: the same key and intent
|
|
445
|
+
* return the same Run, a changed intent is refused.
|
|
446
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
447
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
448
|
+
*
|
|
449
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/workflows/*}/runs` · permission `workflows:run` · effect `write`
|
|
450
|
+
*
|
|
451
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
452
|
+
*
|
|
453
|
+
* Short name of `sx.workflows.runs.create`.
|
|
454
|
+
*/
|
|
455
|
+
async start(request) {
|
|
456
|
+
return this.client.call({
|
|
457
|
+
method: 'POST',
|
|
458
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/workflows/*', 'parent')}/runs`,
|
|
459
|
+
query: { run_id: request.runId, validate_only: request.validateOnly },
|
|
460
|
+
body: request.run ?? {},
|
|
461
|
+
bodyType: 'sylphx.workflows.v1.Run',
|
|
462
|
+
responseType: 'sylphx.workflows.v1.Run',
|
|
463
|
+
mutation: true,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Sends a named signal to a running Run; a `wait` op for that name resumes
|
|
468
|
+
* with its payload. A signal to a closed Run fails with INVALID_STATE.
|
|
469
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
470
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
471
|
+
*
|
|
472
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:signal` · permission `workflows:run` · effect `write`
|
|
473
|
+
*
|
|
474
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
475
|
+
*
|
|
476
|
+
* Short name of `sx.workflows.runs.signal`.
|
|
477
|
+
*/
|
|
478
|
+
async signal(request) {
|
|
479
|
+
return this.client.call({
|
|
480
|
+
method: 'POST',
|
|
481
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/workflows/*/runs/*', 'name')}:signal`,
|
|
482
|
+
body: runtime.omit(request, ['name']),
|
|
483
|
+
bodyType: 'sylphx.workflows.v1.SignalRunRequest',
|
|
484
|
+
responseType: 'sylphx.workflows.v1.Run',
|
|
485
|
+
mutation: true,
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Requests cancellation. Timers and waits stop; a running invocation is not
|
|
490
|
+
* interrupted: the handler receives one final invocation with `cancel:
|
|
491
|
+
* true`, and the Run ends `cancelled` when it answers.
|
|
492
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
493
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
494
|
+
*
|
|
495
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:cancel` · permission `workflows:run` · effect `destructive`
|
|
496
|
+
*
|
|
497
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
498
|
+
*
|
|
499
|
+
* Short name of `sx.workflows.runs.cancel`.
|
|
500
|
+
*/
|
|
501
|
+
async cancel(request) {
|
|
502
|
+
return this.client.call({
|
|
503
|
+
method: 'POST',
|
|
504
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/workflows/*/runs/*', 'name')}:cancel`,
|
|
505
|
+
body: runtime.omit(request, ['name']),
|
|
506
|
+
bodyType: 'sylphx.workflows.v1.CancelRunRequest',
|
|
507
|
+
responseType: 'sylphx.workflows.v1.Run',
|
|
508
|
+
mutation: true,
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Waits up to `timeout` (at most 60s) for the Run to close, then returns it,
|
|
513
|
+
* closed or not. Its short name is `result`: the closed Run carries the
|
|
514
|
+
* handler's output or error.
|
|
515
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
516
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
517
|
+
*
|
|
518
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:wait` · permission `workflows:read` · effect `read`
|
|
519
|
+
*
|
|
520
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
521
|
+
*
|
|
522
|
+
* Short name of `sx.workflows.runs.wait`.
|
|
523
|
+
*/
|
|
524
|
+
async result(request) {
|
|
525
|
+
return this.client.call({
|
|
526
|
+
method: 'POST',
|
|
527
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/workflows/*/runs/*', 'name')}:wait`,
|
|
528
|
+
body: runtime.omit(request, ['name']),
|
|
529
|
+
bodyType: 'sylphx.workflows.v1.WaitRunRequest',
|
|
530
|
+
responseType: 'sylphx.workflows.v1.Run',
|
|
531
|
+
mutation: true,
|
|
532
|
+
});
|
|
197
533
|
}
|
|
198
534
|
}
|
|
199
535
|
/** `workflows` of Sylphx Workflows: Resource type `workflows.sylphx.com/Workflow`. */
|
|
@@ -364,11 +700,14 @@ export class SchedulesCollection {
|
|
|
364
700
|
return new runtime.Operation(this.client, operation, 'sylphx.workflows.v1.Schedule');
|
|
365
701
|
}
|
|
366
702
|
/**
|
|
367
|
-
* Updates a schedule
|
|
703
|
+
* Updates a schedule; with `allow_missing` it creates the schedule when it
|
|
704
|
+
* does not exist, so its short name `schedule` is an upsert by name.
|
|
368
705
|
*
|
|
369
706
|
* `PATCH /v1/{schedule.name=orgs/*\/projects/*\/envs/*\/schedules/*}` · permission `workflows:write` · effect `write`
|
|
370
707
|
*
|
|
371
708
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
709
|
+
*
|
|
710
|
+
* Also `sx.workflows.schedule`.
|
|
372
711
|
*/
|
|
373
712
|
async update(request) {
|
|
374
713
|
const operation = await this.client.call({
|
|
@@ -485,11 +824,17 @@ export class RunsCollection {
|
|
|
485
824
|
}
|
|
486
825
|
}
|
|
487
826
|
/**
|
|
488
|
-
* Starts a Run of a Workflow
|
|
827
|
+
* Starts a Run of a Workflow, now or after `start_delay` or at
|
|
828
|
+
* `schedule_time`. `run_id` is the caller's key: the same key and intent
|
|
829
|
+
* return the same Run, a changed intent is refused.
|
|
830
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
831
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
489
832
|
*
|
|
490
833
|
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/workflows/*}/runs` · permission `workflows:run` · effect `write`
|
|
491
834
|
*
|
|
492
835
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
836
|
+
*
|
|
837
|
+
* Also `sx.workflows.start`.
|
|
493
838
|
*/
|
|
494
839
|
async create(request) {
|
|
495
840
|
return this.client.call({
|
|
@@ -523,10 +868,14 @@ export class RunsCollection {
|
|
|
523
868
|
/**
|
|
524
869
|
* Sends a named signal to a running Run; a `wait` op for that name resumes
|
|
525
870
|
* with its payload. A signal to a closed Run fails with INVALID_STATE.
|
|
871
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
872
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
526
873
|
*
|
|
527
874
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:signal` · permission `workflows:run` · effect `write`
|
|
528
875
|
*
|
|
529
876
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
877
|
+
*
|
|
878
|
+
* Also `sx.workflows.signal`.
|
|
530
879
|
*/
|
|
531
880
|
async signal(request) {
|
|
532
881
|
return this.client.call({
|
|
@@ -542,10 +891,14 @@ export class RunsCollection {
|
|
|
542
891
|
* Requests cancellation. Timers and waits stop; a running invocation is not
|
|
543
892
|
* interrupted: the handler receives one final invocation with `cancel:
|
|
544
893
|
* true`, and the Run ends `cancelled` when it answers.
|
|
894
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
895
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
545
896
|
*
|
|
546
897
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:cancel` · permission `workflows:run` · effect `destructive`
|
|
547
898
|
*
|
|
548
899
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
900
|
+
*
|
|
901
|
+
* Also `sx.workflows.cancel`.
|
|
549
902
|
*/
|
|
550
903
|
async cancel(request) {
|
|
551
904
|
return this.client.call({
|
|
@@ -559,11 +912,16 @@ export class RunsCollection {
|
|
|
559
912
|
}
|
|
560
913
|
/**
|
|
561
914
|
* Waits up to `timeout` (at most 60s) for the Run to close, then returns it,
|
|
562
|
-
* closed or not.
|
|
915
|
+
* closed or not. Its short name is `result`: the closed Run carries the
|
|
916
|
+
* handler's output or error.
|
|
917
|
+
* An end user's session may call it on a Workflow whose `callers` is
|
|
918
|
+
* `USERS` when the session holds the Workflow's `permission`.
|
|
563
919
|
*
|
|
564
920
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:wait` · permission `workflows:read` · effect `read`
|
|
565
921
|
*
|
|
566
922
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
923
|
+
*
|
|
924
|
+
* Also `sx.workflows.result`.
|
|
567
925
|
*/
|
|
568
926
|
async wait(request) {
|
|
569
927
|
return this.client.call({
|
|
@@ -592,4 +950,455 @@ export class RunsCollection {
|
|
|
592
950
|
});
|
|
593
951
|
}
|
|
594
952
|
}
|
|
953
|
+
/** `jobs` of Sylphx Workflows: Resource type `workflows.sylphx.com/Job`. */
|
|
954
|
+
export class JobsCollection {
|
|
955
|
+
client;
|
|
956
|
+
constructor(client) {
|
|
957
|
+
this.client = client;
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* Gets a job.
|
|
961
|
+
*
|
|
962
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/jobs/*}` · permission `workflows:read` · effect `read`
|
|
963
|
+
*
|
|
964
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
965
|
+
*/
|
|
966
|
+
async get(request) {
|
|
967
|
+
return this.client.call({
|
|
968
|
+
method: 'GET',
|
|
969
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/jobs/*', 'name')}`,
|
|
970
|
+
responseType: 'sylphx.workflows.v1.Job',
|
|
971
|
+
mutation: false,
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* Lists jobs.
|
|
976
|
+
*
|
|
977
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/jobs` · permission `workflows:read` · effect `read`
|
|
978
|
+
*
|
|
979
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
980
|
+
*/
|
|
981
|
+
async list(request) {
|
|
982
|
+
return this.client.call({
|
|
983
|
+
method: 'GET',
|
|
984
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/jobs`,
|
|
985
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
986
|
+
responseType: 'sylphx.workflows.v1.ListJobsResponse',
|
|
987
|
+
mutation: false,
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
/** Every item of every page of `list`. */
|
|
991
|
+
async *listAll(request) {
|
|
992
|
+
let next = request;
|
|
993
|
+
for (;;) {
|
|
994
|
+
const page = await this.list(next);
|
|
995
|
+
yield* page.jobs ?? [];
|
|
996
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
997
|
+
return;
|
|
998
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Creates a job.
|
|
1003
|
+
*
|
|
1004
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/jobs` · permission `workflows:write` · effect `write`
|
|
1005
|
+
*
|
|
1006
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1007
|
+
*/
|
|
1008
|
+
async create(request) {
|
|
1009
|
+
const operation = await this.client.call({
|
|
1010
|
+
method: 'POST',
|
|
1011
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/jobs`,
|
|
1012
|
+
query: { job_id: request.jobId, validate_only: request.validateOnly },
|
|
1013
|
+
body: request.job ?? {},
|
|
1014
|
+
bodyType: 'sylphx.workflows.v1.Job',
|
|
1015
|
+
responseType: 'sylphx.common.v1.Operation',
|
|
1016
|
+
mutation: true,
|
|
1017
|
+
});
|
|
1018
|
+
return new runtime.Operation(this.client, operation, 'sylphx.workflows.v1.Job');
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Updates a job. Runs already started keep the generation they pinned.
|
|
1022
|
+
*
|
|
1023
|
+
* `PATCH /v1/{job.name=orgs/*\/projects/*\/envs/*\/jobs/*}` · permission `workflows:write` · effect `write`
|
|
1024
|
+
*
|
|
1025
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1026
|
+
*/
|
|
1027
|
+
async update(request) {
|
|
1028
|
+
const operation = await this.client.call({
|
|
1029
|
+
method: 'PATCH',
|
|
1030
|
+
path: `/v1/${runtime.pathParam(request.job?.name, 'orgs/*/projects/*/envs/*/jobs/*', 'job.name')}`,
|
|
1031
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
1032
|
+
body: request.job ?? {},
|
|
1033
|
+
bodyType: 'sylphx.workflows.v1.Job',
|
|
1034
|
+
responseType: 'sylphx.common.v1.Operation',
|
|
1035
|
+
mutation: true,
|
|
1036
|
+
});
|
|
1037
|
+
return new runtime.Operation(this.client, operation, 'sylphx.workflows.v1.Job');
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Deletes a job.
|
|
1041
|
+
*
|
|
1042
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/jobs/*}` · permission `workflows:write` · effect `destructive`
|
|
1043
|
+
*
|
|
1044
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1045
|
+
*/
|
|
1046
|
+
async delete(request) {
|
|
1047
|
+
const operation = await this.client.call({
|
|
1048
|
+
method: 'DELETE',
|
|
1049
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/jobs/*', 'name')}`,
|
|
1050
|
+
query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
|
|
1051
|
+
responseType: 'sylphx.common.v1.Operation',
|
|
1052
|
+
mutation: true,
|
|
1053
|
+
});
|
|
1054
|
+
return new runtime.Operation(this.client, operation, undefined);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
/** `job_runs` of Sylphx Workflows: Resource type `workflows.sylphx.com/JobRun`. */
|
|
1058
|
+
export class JobRunsCollection {
|
|
1059
|
+
client;
|
|
1060
|
+
constructor(client) {
|
|
1061
|
+
this.client = client;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Starts a run of a Job now. The same `Idempotency-Key` returns the same
|
|
1065
|
+
* run for 24h; a Schedule fire uses `{job}:{intended time}`. With
|
|
1066
|
+
* concurrency `forbid`, a start while a run is active fails with
|
|
1067
|
+
* INVALID_STATE.
|
|
1068
|
+
*
|
|
1069
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/jobs/*}/job_runs` · permission `workflows:run` · effect `write`
|
|
1070
|
+
*
|
|
1071
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1072
|
+
*/
|
|
1073
|
+
async create(request) {
|
|
1074
|
+
return this.client.call({
|
|
1075
|
+
method: 'POST',
|
|
1076
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/jobs/*', 'parent')}/job_runs`,
|
|
1077
|
+
query: { job_run_id: request.jobRunId, validate_only: request.validateOnly },
|
|
1078
|
+
body: request.jobRun ?? {},
|
|
1079
|
+
bodyType: 'sylphx.workflows.v1.JobRun',
|
|
1080
|
+
responseType: 'sylphx.workflows.v1.JobRun',
|
|
1081
|
+
mutation: true,
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Gets a job run.
|
|
1086
|
+
*
|
|
1087
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/jobs/*\/job_runs/*}` · permission `workflows:read` · effect `read`
|
|
1088
|
+
*
|
|
1089
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1090
|
+
*/
|
|
1091
|
+
async get(request) {
|
|
1092
|
+
return this.client.call({
|
|
1093
|
+
method: 'GET',
|
|
1094
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/jobs/*/job_runs/*', 'name')}`,
|
|
1095
|
+
responseType: 'sylphx.workflows.v1.JobRun',
|
|
1096
|
+
mutation: false,
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Lists a job's runs, newest first.
|
|
1101
|
+
*
|
|
1102
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/jobs/*}/job_runs` · permission `workflows:read` · effect `read`
|
|
1103
|
+
*
|
|
1104
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1105
|
+
*/
|
|
1106
|
+
async list(request) {
|
|
1107
|
+
return this.client.call({
|
|
1108
|
+
method: 'GET',
|
|
1109
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/jobs/*', 'parent')}/job_runs`,
|
|
1110
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
1111
|
+
responseType: 'sylphx.workflows.v1.ListJobRunsResponse',
|
|
1112
|
+
mutation: false,
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
/** Every item of every page of `list`. */
|
|
1116
|
+
async *listAll(request) {
|
|
1117
|
+
let next = request;
|
|
1118
|
+
for (;;) {
|
|
1119
|
+
const page = await this.list(next);
|
|
1120
|
+
yield* page.jobRuns ?? [];
|
|
1121
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1122
|
+
return;
|
|
1123
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* Cancels a job run: SIGTERM, then SIGKILL after 30s. A closed run fails
|
|
1128
|
+
* with INVALID_STATE.
|
|
1129
|
+
*
|
|
1130
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/jobs/*\/job_runs/*}:cancel` · permission `workflows:run` · effect `destructive`
|
|
1131
|
+
*
|
|
1132
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1133
|
+
*/
|
|
1134
|
+
async cancel(request) {
|
|
1135
|
+
return this.client.call({
|
|
1136
|
+
method: 'POST',
|
|
1137
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/jobs/*/job_runs/*', 'name')}:cancel`,
|
|
1138
|
+
body: runtime.omit(request, ['name']),
|
|
1139
|
+
bodyType: 'sylphx.workflows.v1.CancelJobRunRequest',
|
|
1140
|
+
responseType: 'sylphx.workflows.v1.JobRun',
|
|
1141
|
+
mutation: true,
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Reads a page of a job run's log lines, oldest first. With `wait`, an
|
|
1146
|
+
* empty page on a running run waits up to that long for new lines, so a
|
|
1147
|
+
* client follows the log by passing each `next_page_token` back.
|
|
1148
|
+
*
|
|
1149
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/jobs/*\/job_runs/*}:readLogs` · permission `workflows:read` · effect `read`
|
|
1150
|
+
*
|
|
1151
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `PAGE_TOKEN_MISMATCH`.
|
|
1152
|
+
*/
|
|
1153
|
+
async readLogs(request) {
|
|
1154
|
+
return this.client.call({
|
|
1155
|
+
method: 'GET',
|
|
1156
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/jobs/*/job_runs/*', 'name')}:readLogs`,
|
|
1157
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, wait: request.wait },
|
|
1158
|
+
responseType: 'sylphx.workflows.v1.ReadJobRunLogsResponse',
|
|
1159
|
+
mutation: false,
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
/** `distributed_jobs` of Sylphx Workflows: Resource type `workflows.sylphx.com/DistributedJob`. */
|
|
1164
|
+
export class DistributedJobsCollection {
|
|
1165
|
+
client;
|
|
1166
|
+
constructor(client) {
|
|
1167
|
+
this.client = client;
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* Gets a distributed job.
|
|
1171
|
+
*
|
|
1172
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*}` · permission `workflows:read` · effect `read`
|
|
1173
|
+
*
|
|
1174
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1175
|
+
*/
|
|
1176
|
+
async get(request) {
|
|
1177
|
+
return this.client.call({
|
|
1178
|
+
method: 'GET',
|
|
1179
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*', 'name')}`,
|
|
1180
|
+
responseType: 'sylphx.workflows.v1.DistributedJob',
|
|
1181
|
+
mutation: false,
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Lists distributed jobs.
|
|
1186
|
+
*
|
|
1187
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/distributed_jobs` · permission `workflows:read` · effect `read`
|
|
1188
|
+
*
|
|
1189
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1190
|
+
*/
|
|
1191
|
+
async list(request) {
|
|
1192
|
+
return this.client.call({
|
|
1193
|
+
method: 'GET',
|
|
1194
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/distributed_jobs`,
|
|
1195
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
1196
|
+
responseType: 'sylphx.workflows.v1.ListDistributedJobsResponse',
|
|
1197
|
+
mutation: false,
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
/** Every item of every page of `list`. */
|
|
1201
|
+
async *listAll(request) {
|
|
1202
|
+
let next = request;
|
|
1203
|
+
for (;;) {
|
|
1204
|
+
const page = await this.list(next);
|
|
1205
|
+
yield* page.distributedJobs ?? [];
|
|
1206
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1207
|
+
return;
|
|
1208
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Creates a distributed job.
|
|
1213
|
+
*
|
|
1214
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/distributed_jobs` · permission `workflows:write` · effect `write`
|
|
1215
|
+
*
|
|
1216
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1217
|
+
*/
|
|
1218
|
+
async create(request) {
|
|
1219
|
+
const operation = await this.client.call({
|
|
1220
|
+
method: 'POST',
|
|
1221
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/distributed_jobs`,
|
|
1222
|
+
query: { distributed_job_id: request.distributedJobId, validate_only: request.validateOnly },
|
|
1223
|
+
body: request.distributedJob ?? {},
|
|
1224
|
+
bodyType: 'sylphx.workflows.v1.DistributedJob',
|
|
1225
|
+
responseType: 'sylphx.common.v1.Operation',
|
|
1226
|
+
mutation: true,
|
|
1227
|
+
});
|
|
1228
|
+
return new runtime.Operation(this.client, operation, 'sylphx.workflows.v1.DistributedJob');
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Updates a distributed job. Runs already started keep the generation they
|
|
1232
|
+
* pinned.
|
|
1233
|
+
*
|
|
1234
|
+
* `PATCH /v1/{distributed_job.name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*}` · permission `workflows:write` · effect `write`
|
|
1235
|
+
*
|
|
1236
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1237
|
+
*/
|
|
1238
|
+
async update(request) {
|
|
1239
|
+
const operation = await this.client.call({
|
|
1240
|
+
method: 'PATCH',
|
|
1241
|
+
path: `/v1/${runtime.pathParam(request.distributedJob?.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*', 'distributed_job.name')}`,
|
|
1242
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
1243
|
+
body: request.distributedJob ?? {},
|
|
1244
|
+
bodyType: 'sylphx.workflows.v1.DistributedJob',
|
|
1245
|
+
responseType: 'sylphx.common.v1.Operation',
|
|
1246
|
+
mutation: true,
|
|
1247
|
+
});
|
|
1248
|
+
return new runtime.Operation(this.client, operation, 'sylphx.workflows.v1.DistributedJob');
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* Deletes a distributed job.
|
|
1252
|
+
*
|
|
1253
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*}` · permission `workflows:write` · effect `destructive`
|
|
1254
|
+
*
|
|
1255
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1256
|
+
*/
|
|
1257
|
+
async delete(request) {
|
|
1258
|
+
const operation = await this.client.call({
|
|
1259
|
+
method: 'DELETE',
|
|
1260
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*', 'name')}`,
|
|
1261
|
+
query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
|
|
1262
|
+
responseType: 'sylphx.common.v1.Operation',
|
|
1263
|
+
mutation: true,
|
|
1264
|
+
});
|
|
1265
|
+
return new runtime.Operation(this.client, operation, undefined);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
/** `distributed_runs` of Sylphx Workflows: Resource type `workflows.sylphx.com/DistributedRun`. */
|
|
1269
|
+
export class DistributedRunsCollection {
|
|
1270
|
+
client;
|
|
1271
|
+
constructor(client) {
|
|
1272
|
+
this.client = client;
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Starts a run of a distributed job. The same `Idempotency-Key` returns the
|
|
1276
|
+
* same run for 24h.
|
|
1277
|
+
*
|
|
1278
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/distributed_jobs/*}/distributed_runs` · permission `workflows:run` · effect `write`
|
|
1279
|
+
*
|
|
1280
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1281
|
+
*/
|
|
1282
|
+
async create(request) {
|
|
1283
|
+
return this.client.call({
|
|
1284
|
+
method: 'POST',
|
|
1285
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/distributed_jobs/*', 'parent')}/distributed_runs`,
|
|
1286
|
+
query: { distributed_run_id: request.distributedRunId, validate_only: request.validateOnly },
|
|
1287
|
+
body: request.distributedRun ?? {},
|
|
1288
|
+
bodyType: 'sylphx.workflows.v1.DistributedRun',
|
|
1289
|
+
responseType: 'sylphx.workflows.v1.DistributedRun',
|
|
1290
|
+
mutation: true,
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Gets a distributed run: its state, shard and worker counts, and usage.
|
|
1295
|
+
*
|
|
1296
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*\/distributed_runs/*}` · permission `workflows:read` · effect `read`
|
|
1297
|
+
*
|
|
1298
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1299
|
+
*/
|
|
1300
|
+
async get(request) {
|
|
1301
|
+
return this.client.call({
|
|
1302
|
+
method: 'GET',
|
|
1303
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*/distributed_runs/*', 'name')}`,
|
|
1304
|
+
responseType: 'sylphx.workflows.v1.DistributedRun',
|
|
1305
|
+
mutation: false,
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Lists a distributed job's runs, newest first.
|
|
1310
|
+
*
|
|
1311
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/distributed_jobs/*}/distributed_runs` · permission `workflows:read` · effect `read`
|
|
1312
|
+
*
|
|
1313
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1314
|
+
*/
|
|
1315
|
+
async list(request) {
|
|
1316
|
+
return this.client.call({
|
|
1317
|
+
method: 'GET',
|
|
1318
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/distributed_jobs/*', 'parent')}/distributed_runs`,
|
|
1319
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
1320
|
+
responseType: 'sylphx.workflows.v1.ListDistributedRunsResponse',
|
|
1321
|
+
mutation: false,
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1324
|
+
/** Every item of every page of `list`. */
|
|
1325
|
+
async *listAll(request) {
|
|
1326
|
+
let next = request;
|
|
1327
|
+
for (;;) {
|
|
1328
|
+
const page = await this.list(next);
|
|
1329
|
+
yield* page.distributedRuns ?? [];
|
|
1330
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1331
|
+
return;
|
|
1332
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
/**
|
|
1336
|
+
* Cancels a distributed run: workers get SIGTERM and 30s, then leases are
|
|
1337
|
+
* released; finished shards are kept. A closed run fails with INVALID_STATE.
|
|
1338
|
+
*
|
|
1339
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*\/distributed_runs/*}:cancel` · permission `workflows:run` · effect `destructive`
|
|
1340
|
+
*
|
|
1341
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1342
|
+
*/
|
|
1343
|
+
async cancel(request) {
|
|
1344
|
+
return this.client.call({
|
|
1345
|
+
method: 'POST',
|
|
1346
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*/distributed_runs/*', 'name')}:cancel`,
|
|
1347
|
+
body: runtime.omit(request, ['name']),
|
|
1348
|
+
bodyType: 'sylphx.workflows.v1.CancelDistributedRunRequest',
|
|
1349
|
+
responseType: 'sylphx.workflows.v1.DistributedRun',
|
|
1350
|
+
mutation: true,
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Appends shards to a run started with an open manifest; `close` ends the
|
|
1355
|
+
* manifest, and the run ends once those shards are done.
|
|
1356
|
+
*
|
|
1357
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*\/distributed_runs/*}:addShards` · permission `workflows:run` · effect `write`
|
|
1358
|
+
*
|
|
1359
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1360
|
+
*/
|
|
1361
|
+
async addShards(request) {
|
|
1362
|
+
return this.client.call({
|
|
1363
|
+
method: 'POST',
|
|
1364
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*/distributed_runs/*', 'name')}:addShards`,
|
|
1365
|
+
body: runtime.omit(request, ['name']),
|
|
1366
|
+
bodyType: 'sylphx.workflows.v1.AddDistributedRunShardsRequest',
|
|
1367
|
+
responseType: 'sylphx.workflows.v1.DistributedRun',
|
|
1368
|
+
mutation: true,
|
|
1369
|
+
});
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Reads a page of the run's shards, in queue order.
|
|
1373
|
+
*
|
|
1374
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*\/distributed_runs/*}:readShards` · permission `workflows:read` · effect `read`
|
|
1375
|
+
*
|
|
1376
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `RESOURCE_NOT_FOUND`.
|
|
1377
|
+
*/
|
|
1378
|
+
async readShards(request) {
|
|
1379
|
+
return this.client.call({
|
|
1380
|
+
method: 'GET',
|
|
1381
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*/distributed_runs/*', 'name')}:readShards`,
|
|
1382
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, state_filter: request.stateFilter },
|
|
1383
|
+
responseType: 'sylphx.workflows.v1.ReadDistributedRunShardsResponse',
|
|
1384
|
+
mutation: false,
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Reads a page of the run's workers.
|
|
1389
|
+
*
|
|
1390
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/distributed_jobs/*\/distributed_runs/*}:readWorkers` · permission `workflows:read` · effect `read`
|
|
1391
|
+
*
|
|
1392
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `RESOURCE_NOT_FOUND`.
|
|
1393
|
+
*/
|
|
1394
|
+
async readWorkers(request) {
|
|
1395
|
+
return this.client.call({
|
|
1396
|
+
method: 'GET',
|
|
1397
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/distributed_jobs/*/distributed_runs/*', 'name')}:readWorkers`,
|
|
1398
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
1399
|
+
responseType: 'sylphx.workflows.v1.ReadDistributedRunWorkersResponse',
|
|
1400
|
+
mutation: false,
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
595
1404
|
//# sourceMappingURL=workflows.js.map
|