@hatchet-dev/typescript-sdk 1.33.2 → 1.34.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/clients/admin/admin-client.d.ts +6 -1
  2. package/clients/admin/admin-client.js +9 -4
  3. package/clients/admin/rpc.d.ts +13 -0
  4. package/clients/admin/rpc.js +23 -0
  5. package/clients/event/event-client.d.ts +2 -1
  6. package/clients/event/event-client.js +6 -3
  7. package/clients/event/rpc.d.ts +7 -0
  8. package/clients/event/rpc.js +13 -0
  9. package/clients/rest/generated/data-contracts.d.ts +2 -0
  10. package/clients/transport/grpc-target.d.ts +19 -0
  11. package/clients/transport/grpc-target.js +85 -0
  12. package/clients/transport/index.d.ts +4 -0
  13. package/clients/transport/index.js +15 -0
  14. package/clients/transport/message-bridge.d.ts +32 -0
  15. package/clients/transport/message-bridge.js +20 -0
  16. package/clients/transport/node-transport.d.ts +50 -0
  17. package/clients/transport/node-transport.js +123 -0
  18. package/clients/transport/transport.d.ts +14 -0
  19. package/clients/transport/transport.js +24 -0
  20. package/clients/transport/ts-proto-client.d.ts +41 -0
  21. package/clients/transport/ts-proto-client.js +143 -0
  22. package/core/index.d.ts +9 -0
  23. package/core/index.js +12 -0
  24. package/dist/check-exports.mjs +171 -0
  25. package/legacy/legacy-client.d.ts +4 -0
  26. package/legacy/legacy-client.js +5 -3
  27. package/package.json +95 -2
  28. package/protoc-es/dispatcher/dispatcher_pb.d.ts +1357 -0
  29. package/protoc-es/dispatcher/dispatcher_pb.js +371 -0
  30. package/protoc-es/events/events_pb.d.ts +294 -0
  31. package/protoc-es/events/events_pb.js +61 -0
  32. package/protoc-es/google/rpc/status_pb.d.ts +48 -0
  33. package/protoc-es/google/rpc/status_pb.js +27 -0
  34. package/protoc-es/v1/dispatcher_pb.d.ts +676 -0
  35. package/protoc-es/v1/dispatcher_pb.js +155 -0
  36. package/protoc-es/v1/shared/condition_pb.d.ts +166 -0
  37. package/protoc-es/v1/shared/condition_pb.js +68 -0
  38. package/protoc-es/v1/shared/trigger_pb.d.ts +160 -0
  39. package/protoc-es/v1/shared/trigger_pb.js +55 -0
  40. package/protoc-es/v1/workflows_pb.d.ts +995 -0
  41. package/protoc-es/v1/workflows_pb.js +280 -0
  42. package/protoc-es/workflows/workflows_pb.d.ts +715 -0
  43. package/protoc-es/workflows/workflows_pb.js +216 -0
  44. package/scripts/check-exports.mjs +171 -0
  45. package/util/grpc-error.d.ts +3 -1
  46. package/util/grpc-error.js +13 -4
  47. package/v1/client/admin.d.ts +2 -1
  48. package/v1/client/admin.js +34 -114
  49. package/v1/client/client.d.ts +1 -0
  50. package/v1/client/client.js +8 -5
  51. package/version.d.ts +1 -1
  52. package/version.js +1 -1
@@ -0,0 +1,995 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
3
+ import type { TaskConditions } from "./shared/condition_pb";
4
+ import type { DesiredWorkerLabels } from "./shared/trigger_pb";
5
+ import type { Message } from "@bufbuild/protobuf";
6
+ /**
7
+ * Describes the file v1/workflows.proto.
8
+ */
9
+ export declare const file_v1_workflows: GenFile;
10
+ /**
11
+ * @generated from message v1.CancelTasksRequest
12
+ */
13
+ export type CancelTasksRequest = Message<"v1.CancelTasksRequest"> & {
14
+ /**
15
+ * a list of external UUIDs
16
+ *
17
+ * @generated from field: repeated string external_ids = 1;
18
+ */
19
+ externalIds: string[];
20
+ /**
21
+ * @generated from field: optional v1.TasksFilter filter = 2;
22
+ */
23
+ filter?: TasksFilter | undefined;
24
+ };
25
+ /**
26
+ * Describes the message v1.CancelTasksRequest.
27
+ * Use `create(CancelTasksRequestSchema)` to create a new message.
28
+ */
29
+ export declare const CancelTasksRequestSchema: GenMessage<CancelTasksRequest>;
30
+ /**
31
+ * @generated from message v1.ReplayTasksRequest
32
+ */
33
+ export type ReplayTasksRequest = Message<"v1.ReplayTasksRequest"> & {
34
+ /**
35
+ * a list of external UUIDs
36
+ *
37
+ * @generated from field: repeated string external_ids = 1;
38
+ */
39
+ externalIds: string[];
40
+ /**
41
+ * @generated from field: optional v1.TasksFilter filter = 2;
42
+ */
43
+ filter?: TasksFilter | undefined;
44
+ };
45
+ /**
46
+ * Describes the message v1.ReplayTasksRequest.
47
+ * Use `create(ReplayTasksRequestSchema)` to create a new message.
48
+ */
49
+ export declare const ReplayTasksRequestSchema: GenMessage<ReplayTasksRequest>;
50
+ /**
51
+ * @generated from message v1.TasksFilter
52
+ */
53
+ export type TasksFilter = Message<"v1.TasksFilter"> & {
54
+ /**
55
+ * @generated from field: repeated string statuses = 1;
56
+ */
57
+ statuses: string[];
58
+ /**
59
+ * @generated from field: google.protobuf.Timestamp since = 2;
60
+ */
61
+ since?: Timestamp | undefined;
62
+ /**
63
+ * @generated from field: optional google.protobuf.Timestamp until = 3;
64
+ */
65
+ until?: Timestamp | undefined;
66
+ /**
67
+ * @generated from field: repeated string workflow_ids = 4;
68
+ */
69
+ workflowIds: string[];
70
+ /**
71
+ * @generated from field: repeated string additional_metadata = 5;
72
+ */
73
+ additionalMetadata: string[];
74
+ };
75
+ /**
76
+ * Describes the message v1.TasksFilter.
77
+ * Use `create(TasksFilterSchema)` to create a new message.
78
+ */
79
+ export declare const TasksFilterSchema: GenMessage<TasksFilter>;
80
+ /**
81
+ * @generated from message v1.CancelTasksResponse
82
+ */
83
+ export type CancelTasksResponse = Message<"v1.CancelTasksResponse"> & {
84
+ /**
85
+ * @generated from field: repeated string cancelled_tasks = 1;
86
+ */
87
+ cancelledTasks: string[];
88
+ };
89
+ /**
90
+ * Describes the message v1.CancelTasksResponse.
91
+ * Use `create(CancelTasksResponseSchema)` to create a new message.
92
+ */
93
+ export declare const CancelTasksResponseSchema: GenMessage<CancelTasksResponse>;
94
+ /**
95
+ * @generated from message v1.ReplayTasksResponse
96
+ */
97
+ export type ReplayTasksResponse = Message<"v1.ReplayTasksResponse"> & {
98
+ /**
99
+ * @generated from field: repeated string replayed_tasks = 1;
100
+ */
101
+ replayedTasks: string[];
102
+ };
103
+ /**
104
+ * Describes the message v1.ReplayTasksResponse.
105
+ * Use `create(ReplayTasksResponseSchema)` to create a new message.
106
+ */
107
+ export declare const ReplayTasksResponseSchema: GenMessage<ReplayTasksResponse>;
108
+ /**
109
+ * @generated from message v1.TriggerWorkflowRunRequest
110
+ */
111
+ export type TriggerWorkflowRunRequest = Message<"v1.TriggerWorkflowRunRequest"> & {
112
+ /**
113
+ * @generated from field: string workflow_name = 1;
114
+ */
115
+ workflowName: string;
116
+ /**
117
+ * @generated from field: bytes input = 2;
118
+ */
119
+ input: Uint8Array;
120
+ /**
121
+ * @generated from field: bytes additional_metadata = 3;
122
+ */
123
+ additionalMetadata: Uint8Array;
124
+ /**
125
+ * @generated from field: optional int32 priority = 4;
126
+ */
127
+ priority?: number | undefined;
128
+ /**
129
+ * @generated from field: map<string, v1.DesiredWorkerLabels> desired_worker_labels = 5;
130
+ */
131
+ desiredWorkerLabels: {
132
+ [key: string]: DesiredWorkerLabels;
133
+ };
134
+ };
135
+ /**
136
+ * Describes the message v1.TriggerWorkflowRunRequest.
137
+ * Use `create(TriggerWorkflowRunRequestSchema)` to create a new message.
138
+ */
139
+ export declare const TriggerWorkflowRunRequestSchema: GenMessage<TriggerWorkflowRunRequest>;
140
+ /**
141
+ * @generated from message v1.TriggerWorkflowRunResponse
142
+ */
143
+ export type TriggerWorkflowRunResponse = Message<"v1.TriggerWorkflowRunResponse"> & {
144
+ /**
145
+ * @generated from field: string external_id = 1;
146
+ */
147
+ externalId: string;
148
+ };
149
+ /**
150
+ * Describes the message v1.TriggerWorkflowRunResponse.
151
+ * Use `create(TriggerWorkflowRunResponseSchema)` to create a new message.
152
+ */
153
+ export declare const TriggerWorkflowRunResponseSchema: GenMessage<TriggerWorkflowRunResponse>;
154
+ /**
155
+ * @generated from message v1.BranchDurableTaskRequest
156
+ */
157
+ export type BranchDurableTaskRequest = Message<"v1.BranchDurableTaskRequest"> & {
158
+ /**
159
+ * (required) the external id (uuid) of the durable task
160
+ *
161
+ * @generated from field: string task_external_id = 1;
162
+ */
163
+ taskExternalId: string;
164
+ /**
165
+ * (required) the node id to branch from
166
+ *
167
+ * @generated from field: int64 node_id = 2;
168
+ */
169
+ nodeId: bigint;
170
+ /**
171
+ * (required) the branch id to branch from
172
+ *
173
+ * @generated from field: int64 branch_id = 3;
174
+ */
175
+ branchId: bigint;
176
+ };
177
+ /**
178
+ * Describes the message v1.BranchDurableTaskRequest.
179
+ * Use `create(BranchDurableTaskRequestSchema)` to create a new message.
180
+ */
181
+ export declare const BranchDurableTaskRequestSchema: GenMessage<BranchDurableTaskRequest>;
182
+ /**
183
+ * @generated from message v1.BranchDurableTaskResponse
184
+ */
185
+ export type BranchDurableTaskResponse = Message<"v1.BranchDurableTaskResponse"> & {
186
+ /**
187
+ * the external id of the durable task
188
+ *
189
+ * @generated from field: string task_external_id = 1;
190
+ */
191
+ taskExternalId: string;
192
+ /**
193
+ * the node id of the new entry
194
+ *
195
+ * @generated from field: int64 node_id = 2;
196
+ */
197
+ nodeId: bigint;
198
+ /**
199
+ * the branch id of the new entry
200
+ *
201
+ * @generated from field: int64 branch_id = 3;
202
+ */
203
+ branchId: bigint;
204
+ };
205
+ /**
206
+ * Describes the message v1.BranchDurableTaskResponse.
207
+ * Use `create(BranchDurableTaskResponseSchema)` to create a new message.
208
+ */
209
+ export declare const BranchDurableTaskResponseSchema: GenMessage<BranchDurableTaskResponse>;
210
+ /**
211
+ * CreateWorkflowVersionRequest represents options to create a workflow version.
212
+ *
213
+ * @generated from message v1.CreateWorkflowVersionRequest
214
+ */
215
+ export type CreateWorkflowVersionRequest = Message<"v1.CreateWorkflowVersionRequest"> & {
216
+ /**
217
+ * (required) the workflow name
218
+ *
219
+ * @generated from field: string name = 1;
220
+ */
221
+ name: string;
222
+ /**
223
+ * (optional) the workflow description
224
+ *
225
+ * @generated from field: string description = 2;
226
+ */
227
+ description: string;
228
+ /**
229
+ * (optional) the workflow version
230
+ *
231
+ * @generated from field: string version = 3;
232
+ */
233
+ version: string;
234
+ /**
235
+ * (optional) event triggers for the workflow
236
+ *
237
+ * @generated from field: repeated string event_triggers = 4;
238
+ */
239
+ eventTriggers: string[];
240
+ /**
241
+ * (optional) cron triggers for the workflow
242
+ *
243
+ * @generated from field: repeated string cron_triggers = 5;
244
+ */
245
+ cronTriggers: string[];
246
+ /**
247
+ * (required) the workflow jobs
248
+ *
249
+ * @generated from field: repeated v1.CreateTaskOpts tasks = 6;
250
+ */
251
+ tasks: CreateTaskOpts[];
252
+ /**
253
+ * Deprecated: use concurrency_arr instead
254
+ *
255
+ * (optional) the workflow concurrency options
256
+ *
257
+ * @generated from field: v1.Concurrency concurrency = 7;
258
+ */
259
+ concurrency?: Concurrency | undefined;
260
+ /**
261
+ * (optional) the input for the cron trigger
262
+ *
263
+ * @generated from field: optional string cron_input = 8;
264
+ */
265
+ cronInput?: string | undefined;
266
+ /**
267
+ * (optional) the job to run on failure
268
+ *
269
+ * @generated from field: optional v1.CreateTaskOpts on_failure_task = 9;
270
+ */
271
+ onFailureTask?: CreateTaskOpts | undefined;
272
+ /**
273
+ * (optional) the sticky strategy for assigning tasks to workers
274
+ *
275
+ * @generated from field: optional v1.StickyStrategy sticky = 10;
276
+ */
277
+ sticky?: StickyStrategy | undefined;
278
+ /**
279
+ * (optional) the default priority for the workflow
280
+ *
281
+ * @generated from field: optional int32 default_priority = 11;
282
+ */
283
+ defaultPriority?: number | undefined;
284
+ /**
285
+ * (optional) the workflow concurrency options
286
+ *
287
+ * @generated from field: repeated v1.Concurrency concurrency_arr = 12;
288
+ */
289
+ concurrencyArr: Concurrency[];
290
+ /**
291
+ * (optional) the default filters for the workflow
292
+ *
293
+ * @generated from field: repeated v1.DefaultFilter default_filters = 13;
294
+ */
295
+ defaultFilters: DefaultFilter[];
296
+ /**
297
+ * (optional) the JSON schema for the workflow input
298
+ *
299
+ * @generated from field: optional bytes input_json_schema = 14;
300
+ */
301
+ inputJsonSchema?: Uint8Array | undefined;
302
+ /**
303
+ * (optional) idempotency configuration for the workflow
304
+ *
305
+ * @generated from field: optional v1.IdempotencyConfig idempotency = 15;
306
+ */
307
+ idempotency?: IdempotencyConfig | undefined;
308
+ };
309
+ /**
310
+ * Describes the message v1.CreateWorkflowVersionRequest.
311
+ * Use `create(CreateWorkflowVersionRequestSchema)` to create a new message.
312
+ */
313
+ export declare const CreateWorkflowVersionRequestSchema: GenMessage<CreateWorkflowVersionRequest>;
314
+ /**
315
+ * @generated from message v1.IdempotencyConfig
316
+ */
317
+ export type IdempotencyConfig = Message<"v1.IdempotencyConfig"> & {
318
+ /**
319
+ * a CEL expression for determining the idempotency key for workflow runs
320
+ *
321
+ * @generated from field: string expression = 1;
322
+ */
323
+ expression: string;
324
+ /**
325
+ * time-to-live for idempotency keys in milliseconds. if the method is `STATUS`, this is a "fallback" - the longest the key can live before it's evicted
326
+ *
327
+ * @generated from field: int64 ttl_ms = 2;
328
+ */
329
+ ttlMs: bigint;
330
+ /**
331
+ * the method to use for idempotency, defaults to TTL
332
+ *
333
+ * @generated from field: optional v1.IdempotencyMethod method = 3;
334
+ */
335
+ method?: IdempotencyMethod | undefined;
336
+ };
337
+ /**
338
+ * Describes the message v1.IdempotencyConfig.
339
+ * Use `create(IdempotencyConfigSchema)` to create a new message.
340
+ */
341
+ export declare const IdempotencyConfigSchema: GenMessage<IdempotencyConfig>;
342
+ /**
343
+ * @generated from message v1.IdempotencyCollisionError
344
+ */
345
+ export type IdempotencyCollisionError = Message<"v1.IdempotencyCollisionError"> & {
346
+ /**
347
+ * the external ID of the existing workflow run that caused the collision
348
+ *
349
+ * @generated from field: string existing_run_external_id = 1;
350
+ */
351
+ existingRunExternalId: string;
352
+ /**
353
+ * the external ID of the workflow run that caused the collision
354
+ *
355
+ * @generated from field: string colliding_run_external_id = 2;
356
+ */
357
+ collidingRunExternalId: string;
358
+ };
359
+ /**
360
+ * Describes the message v1.IdempotencyCollisionError.
361
+ * Use `create(IdempotencyCollisionErrorSchema)` to create a new message.
362
+ */
363
+ export declare const IdempotencyCollisionErrorSchema: GenMessage<IdempotencyCollisionError>;
364
+ /**
365
+ * @generated from message v1.BulkTriggerIdempotencyCollisionError
366
+ */
367
+ export type BulkTriggerIdempotencyCollisionError = Message<"v1.BulkTriggerIdempotencyCollisionError"> & {
368
+ /**
369
+ * the external IDs of the successfully triggered workflow runs
370
+ *
371
+ * @generated from field: repeated string successful_workflow_run_external_ids = 1;
372
+ */
373
+ successfulWorkflowRunExternalIds: string[];
374
+ /**
375
+ * the idempotency collision errors
376
+ *
377
+ * @generated from field: repeated v1.IdempotencyCollisionError collisions = 2;
378
+ */
379
+ collisions: IdempotencyCollisionError[];
380
+ };
381
+ /**
382
+ * Describes the message v1.BulkTriggerIdempotencyCollisionError.
383
+ * Use `create(BulkTriggerIdempotencyCollisionErrorSchema)` to create a new message.
384
+ */
385
+ export declare const BulkTriggerIdempotencyCollisionErrorSchema: GenMessage<BulkTriggerIdempotencyCollisionError>;
386
+ /**
387
+ * @generated from message v1.DefaultFilter
388
+ */
389
+ export type DefaultFilter = Message<"v1.DefaultFilter"> & {
390
+ /**
391
+ * (required) the CEL expression for the filter
392
+ *
393
+ * @generated from field: string expression = 1;
394
+ */
395
+ expression: string;
396
+ /**
397
+ * (required) the scope of the filter
398
+ *
399
+ * @generated from field: string scope = 2;
400
+ */
401
+ scope: string;
402
+ /**
403
+ * (optional) the payload for the filter, if any. A JSON object as a string.
404
+ *
405
+ * @generated from field: optional bytes payload = 3;
406
+ */
407
+ payload?: Uint8Array | undefined;
408
+ };
409
+ /**
410
+ * Describes the message v1.DefaultFilter.
411
+ * Use `create(DefaultFilterSchema)` to create a new message.
412
+ */
413
+ export declare const DefaultFilterSchema: GenMessage<DefaultFilter>;
414
+ /**
415
+ * Concurrency declares one entry in a concurrency chain. Entries are processed in array
416
+ * order, so a tenant-scoped entry may come before or after a workflow-scoped one.
417
+ *
418
+ * A tenant-scoped entry (is_tenant_scoped = true) defines (or updates in place) a strategy
419
+ * shared across workflows, keyed by name: every task declaring the same name consumes the
420
+ * same concurrency limit. Registrations whose chains order the same tenant-scoped
421
+ * strategies inconsistently are rejected, since inconsistent orders can deadlock.
422
+ *
423
+ * @generated from message v1.Concurrency
424
+ */
425
+ export type Concurrency = Message<"v1.Concurrency"> & {
426
+ /**
427
+ * (required) the expression to use for concurrency
428
+ *
429
+ * @generated from field: string expression = 1;
430
+ */
431
+ expression: string;
432
+ /**
433
+ * (optional) the maximum number of concurrent workflow runs, default 1
434
+ *
435
+ * @generated from field: optional int32 max_runs = 2;
436
+ */
437
+ maxRuns?: number | undefined;
438
+ /**
439
+ * (optional) the strategy to use when the concurrency limit is reached, default CANCEL_IN_PROGRESS
440
+ *
441
+ * @generated from field: optional v1.ConcurrencyLimitStrategy limit_strategy = 3;
442
+ */
443
+ limitStrategy?: ConcurrencyLimitStrategy | undefined;
444
+ /**
445
+ * (required when is_tenant_scoped) the strategy name; unique per tenant for tenant-scoped strategies
446
+ *
447
+ * @generated from field: optional string name = 4;
448
+ */
449
+ name?: string | undefined;
450
+ /**
451
+ * (optional) when true, the entry is a tenant-scoped strategy shared across workflows, default false
452
+ *
453
+ * @generated from field: optional bool is_tenant_scoped = 5;
454
+ */
455
+ isTenantScoped?: boolean | undefined;
456
+ /**
457
+ * (optional) CEL expression over task input returning the max runs for that task's concurrency group; the group's effective limit is the value from its most recently created task. Overrides max_runs per group; a non-integer or negative result fails the task, and 0 holds the group until a newer task raises the limit
458
+ *
459
+ * @generated from field: optional string max_runs_expression = 6;
460
+ */
461
+ maxRunsExpression?: string | undefined;
462
+ };
463
+ /**
464
+ * Describes the message v1.Concurrency.
465
+ * Use `create(ConcurrencySchema)` to create a new message.
466
+ */
467
+ export declare const ConcurrencySchema: GenMessage<Concurrency>;
468
+ /**
469
+ * @generated from message v1.TaskBatchConfig
470
+ */
471
+ export type TaskBatchConfig = Message<"v1.TaskBatchConfig"> & {
472
+ /**
473
+ * (required) maximum items per batch
474
+ *
475
+ * @generated from field: int32 batch_max_size = 1;
476
+ */
477
+ batchMaxSize: number;
478
+ /**
479
+ * (optional) time before batch flushes (milliseconds)
480
+ *
481
+ * @generated from field: optional int32 batch_max_interval_ms = 2;
482
+ */
483
+ batchMaxIntervalMs?: number | undefined;
484
+ /**
485
+ * (optional) partition key for fairness (prevents mixing tenants)
486
+ *
487
+ * @generated from field: optional string batch_group_key = 3;
488
+ */
489
+ batchGroupKey?: string | undefined;
490
+ /**
491
+ * (optional) concurrent batches per group
492
+ *
493
+ * @generated from field: optional int32 batch_group_max_runs = 4;
494
+ */
495
+ batchGroupMaxRuns?: number | undefined;
496
+ /**
497
+ * (optional) when true, the handler returns one value broadcast to all callers; when false (default), the handler returns a dict keyed by step run id
498
+ *
499
+ * @generated from field: optional bool broadcast_output = 5;
500
+ */
501
+ broadcastOutput?: boolean | undefined;
502
+ };
503
+ /**
504
+ * Describes the message v1.TaskBatchConfig.
505
+ * Use `create(TaskBatchConfigSchema)` to create a new message.
506
+ */
507
+ export declare const TaskBatchConfigSchema: GenMessage<TaskBatchConfig>;
508
+ /**
509
+ * CreateTaskOpts represents options to create a task.
510
+ *
511
+ * @generated from message v1.CreateTaskOpts
512
+ */
513
+ export type CreateTaskOpts = Message<"v1.CreateTaskOpts"> & {
514
+ /**
515
+ * (required) the task name
516
+ *
517
+ * @generated from field: string readable_id = 1;
518
+ */
519
+ readableId: string;
520
+ /**
521
+ * (required) the task action id
522
+ *
523
+ * @generated from field: string action = 2;
524
+ */
525
+ action: string;
526
+ /**
527
+ * (optional) the task timeout
528
+ *
529
+ * @generated from field: string timeout = 3;
530
+ */
531
+ timeout: string;
532
+ /**
533
+ * (optional) the task inputs, assuming string representation of JSON
534
+ *
535
+ * @generated from field: string inputs = 4;
536
+ */
537
+ inputs: string;
538
+ /**
539
+ * (optional) the task parents. if none are passed in, this is a root task
540
+ *
541
+ * @generated from field: repeated string parents = 5;
542
+ */
543
+ parents: string[];
544
+ /**
545
+ * (optional) the number of retries for the task, default 0
546
+ *
547
+ * @generated from field: int32 retries = 6;
548
+ */
549
+ retries: number;
550
+ /**
551
+ * (optional) the rate limits for the task
552
+ *
553
+ * @generated from field: repeated v1.CreateTaskRateLimit rate_limits = 7;
554
+ */
555
+ rateLimits: CreateTaskRateLimit[];
556
+ /**
557
+ * (optional) the desired worker affinity state for the task
558
+ *
559
+ * @generated from field: map<string, v1.DesiredWorkerLabels> worker_labels = 8;
560
+ */
561
+ workerLabels: {
562
+ [key: string]: DesiredWorkerLabels;
563
+ };
564
+ /**
565
+ * (optional) the retry backoff factor for the task
566
+ *
567
+ * @generated from field: optional float backoff_factor = 9;
568
+ */
569
+ backoffFactor?: number | undefined;
570
+ /**
571
+ * (optional) the maximum backoff time for the task
572
+ *
573
+ * @generated from field: optional int32 backoff_max_seconds = 10;
574
+ */
575
+ backoffMaxSeconds?: number | undefined;
576
+ /**
577
+ * (optional) the task concurrency options
578
+ *
579
+ * @generated from field: repeated v1.Concurrency concurrency = 11;
580
+ */
581
+ concurrency: Concurrency[];
582
+ /**
583
+ * (optional) the task conditions for creating the task
584
+ *
585
+ * @generated from field: optional v1.TaskConditions conditions = 12;
586
+ */
587
+ conditions?: TaskConditions | undefined;
588
+ /**
589
+ * (optional) the timeout for the schedule
590
+ *
591
+ * @generated from field: optional string schedule_timeout = 13;
592
+ */
593
+ scheduleTimeout?: string | undefined;
594
+ /**
595
+ * (optional) whether the task is durable
596
+ *
597
+ * @generated from field: bool is_durable = 14;
598
+ */
599
+ isDurable: boolean;
600
+ /**
601
+ * (optional) slot requests (slot_type -> units)
602
+ *
603
+ * @generated from field: map<string, int32> slot_requests = 15;
604
+ */
605
+ slotRequests: {
606
+ [key: string]: number;
607
+ };
608
+ /**
609
+ * (optional) batch execution configuration
610
+ *
611
+ * @generated from field: optional v1.TaskBatchConfig batch = 16;
612
+ */
613
+ batch?: TaskBatchConfig | undefined;
614
+ };
615
+ /**
616
+ * Describes the message v1.CreateTaskOpts.
617
+ * Use `create(CreateTaskOptsSchema)` to create a new message.
618
+ */
619
+ export declare const CreateTaskOptsSchema: GenMessage<CreateTaskOpts>;
620
+ /**
621
+ * @generated from message v1.CreateTaskRateLimit
622
+ */
623
+ export type CreateTaskRateLimit = Message<"v1.CreateTaskRateLimit"> & {
624
+ /**
625
+ * (required) the key for the rate limit
626
+ *
627
+ * @generated from field: string key = 1;
628
+ */
629
+ key: string;
630
+ /**
631
+ * (optional) the number of units this task consumes
632
+ *
633
+ * @generated from field: optional int32 units = 2;
634
+ */
635
+ units?: number | undefined;
636
+ /**
637
+ * (optional) a CEL expression for determining the rate limit key
638
+ *
639
+ * @generated from field: optional string key_expr = 3;
640
+ */
641
+ keyExpr?: string | undefined;
642
+ /**
643
+ * (optional) a CEL expression for determining the number of units consumed
644
+ *
645
+ * @generated from field: optional string units_expr = 4;
646
+ */
647
+ unitsExpr?: string | undefined;
648
+ /**
649
+ * (optional) a CEL expression for determining the total amount of rate limit units
650
+ *
651
+ * @generated from field: optional string limit_values_expr = 5;
652
+ */
653
+ limitValuesExpr?: string | undefined;
654
+ /**
655
+ * (optional) the default rate limit window to use for dynamic rate limits
656
+ *
657
+ * @generated from field: optional v1.RateLimitDuration duration = 6;
658
+ */
659
+ duration?: RateLimitDuration | undefined;
660
+ };
661
+ /**
662
+ * Describes the message v1.CreateTaskRateLimit.
663
+ * Use `create(CreateTaskRateLimitSchema)` to create a new message.
664
+ */
665
+ export declare const CreateTaskRateLimitSchema: GenMessage<CreateTaskRateLimit>;
666
+ /**
667
+ * CreateWorkflowVersionResponse represents the response after creating a workflow version.
668
+ *
669
+ * @generated from message v1.CreateWorkflowVersionResponse
670
+ */
671
+ export type CreateWorkflowVersionResponse = Message<"v1.CreateWorkflowVersionResponse"> & {
672
+ /**
673
+ * @generated from field: string id = 1;
674
+ */
675
+ id: string;
676
+ /**
677
+ * @generated from field: string workflow_id = 2;
678
+ */
679
+ workflowId: string;
680
+ };
681
+ /**
682
+ * Describes the message v1.CreateWorkflowVersionResponse.
683
+ * Use `create(CreateWorkflowVersionResponseSchema)` to create a new message.
684
+ */
685
+ export declare const CreateWorkflowVersionResponseSchema: GenMessage<CreateWorkflowVersionResponse>;
686
+ /**
687
+ * @generated from message v1.GetRunDetailsRequest
688
+ */
689
+ export type GetRunDetailsRequest = Message<"v1.GetRunDetailsRequest"> & {
690
+ /**
691
+ * (required) the external id (uuid) of the workflow run
692
+ *
693
+ * @generated from field: string external_id = 1;
694
+ */
695
+ externalId: string;
696
+ };
697
+ /**
698
+ * Describes the message v1.GetRunDetailsRequest.
699
+ * Use `create(GetRunDetailsRequestSchema)` to create a new message.
700
+ */
701
+ export declare const GetRunDetailsRequestSchema: GenMessage<GetRunDetailsRequest>;
702
+ /**
703
+ * @generated from message v1.TaskRunDetail
704
+ */
705
+ export type TaskRunDetail = Message<"v1.TaskRunDetail"> & {
706
+ /**
707
+ * the external id (uuid) of the task run
708
+ *
709
+ * @generated from field: string external_id = 1;
710
+ */
711
+ externalId: string;
712
+ /**
713
+ * the status of the task run
714
+ *
715
+ * @generated from field: v1.RunStatus status = 2;
716
+ */
717
+ status: RunStatus;
718
+ /**
719
+ * (optional) error message from the task run, if any
720
+ *
721
+ * @generated from field: optional string error = 3;
722
+ */
723
+ error?: string | undefined;
724
+ /**
725
+ * (optional) the output payload for the task run
726
+ *
727
+ * @generated from field: optional bytes output = 4;
728
+ */
729
+ output?: Uint8Array | undefined;
730
+ /**
731
+ * the readable id of the task
732
+ *
733
+ * @generated from field: string readable_id = 5;
734
+ */
735
+ readableId: string;
736
+ /**
737
+ * whether the task has been evicted from a worker (status will be RUNNING)
738
+ *
739
+ * @generated from field: bool is_evicted = 6;
740
+ */
741
+ isEvicted: boolean;
742
+ };
743
+ /**
744
+ * Describes the message v1.TaskRunDetail.
745
+ * Use `create(TaskRunDetailSchema)` to create a new message.
746
+ */
747
+ export declare const TaskRunDetailSchema: GenMessage<TaskRunDetail>;
748
+ /**
749
+ * @generated from message v1.GetRunDetailsResponse
750
+ */
751
+ export type GetRunDetailsResponse = Message<"v1.GetRunDetailsResponse"> & {
752
+ /**
753
+ * the input payload for the workflow run
754
+ *
755
+ * @generated from field: bytes input = 1;
756
+ */
757
+ input: Uint8Array;
758
+ /**
759
+ * the status of the workflow run
760
+ *
761
+ * @generated from field: v1.RunStatus status = 2;
762
+ */
763
+ status: RunStatus;
764
+ /**
765
+ * map of task run external ids to their details
766
+ *
767
+ * @generated from field: map<string, v1.TaskRunDetail> task_runs = 3;
768
+ */
769
+ taskRuns: {
770
+ [key: string]: TaskRunDetail;
771
+ };
772
+ /**
773
+ * indicates if the workflow run is done
774
+ *
775
+ * @generated from field: bool done = 4;
776
+ */
777
+ done: boolean;
778
+ /**
779
+ * (optional) additional metadata for the workflow run
780
+ *
781
+ * @generated from field: bytes additional_metadata = 5;
782
+ */
783
+ additionalMetadata: Uint8Array;
784
+ /**
785
+ * whether any task in this run has been evicted
786
+ *
787
+ * @generated from field: bool is_evicted = 6;
788
+ */
789
+ isEvicted: boolean;
790
+ };
791
+ /**
792
+ * Describes the message v1.GetRunDetailsResponse.
793
+ * Use `create(GetRunDetailsResponseSchema)` to create a new message.
794
+ */
795
+ export declare const GetRunDetailsResponseSchema: GenMessage<GetRunDetailsResponse>;
796
+ /**
797
+ * @generated from enum v1.StickyStrategy
798
+ */
799
+ export declare enum StickyStrategy {
800
+ /**
801
+ * @generated from enum value: SOFT = 0;
802
+ */
803
+ SOFT = 0,
804
+ /**
805
+ * @generated from enum value: HARD = 1;
806
+ */
807
+ HARD = 1
808
+ }
809
+ /**
810
+ * Describes the enum v1.StickyStrategy.
811
+ */
812
+ export declare const StickyStrategySchema: GenEnum<StickyStrategy>;
813
+ /**
814
+ * @generated from enum v1.RateLimitDuration
815
+ */
816
+ export declare enum RateLimitDuration {
817
+ /**
818
+ * @generated from enum value: SECOND = 0;
819
+ */
820
+ SECOND = 0,
821
+ /**
822
+ * @generated from enum value: MINUTE = 1;
823
+ */
824
+ MINUTE = 1,
825
+ /**
826
+ * @generated from enum value: HOUR = 2;
827
+ */
828
+ HOUR = 2,
829
+ /**
830
+ * @generated from enum value: DAY = 3;
831
+ */
832
+ DAY = 3,
833
+ /**
834
+ * @generated from enum value: WEEK = 4;
835
+ */
836
+ WEEK = 4,
837
+ /**
838
+ * @generated from enum value: MONTH = 5;
839
+ */
840
+ MONTH = 5,
841
+ /**
842
+ * @generated from enum value: YEAR = 6;
843
+ */
844
+ YEAR = 6
845
+ }
846
+ /**
847
+ * Describes the enum v1.RateLimitDuration.
848
+ */
849
+ export declare const RateLimitDurationSchema: GenEnum<RateLimitDuration>;
850
+ /**
851
+ * @generated from enum v1.RunStatus
852
+ */
853
+ export declare enum RunStatus {
854
+ /**
855
+ * @generated from enum value: QUEUED = 0;
856
+ */
857
+ QUEUED = 0,
858
+ /**
859
+ * @generated from enum value: RUNNING = 1;
860
+ */
861
+ RUNNING = 1,
862
+ /**
863
+ * @generated from enum value: COMPLETED = 2;
864
+ */
865
+ COMPLETED = 2,
866
+ /**
867
+ * @generated from enum value: FAILED = 3;
868
+ */
869
+ FAILED = 3,
870
+ /**
871
+ * @generated from enum value: CANCELLED = 4;
872
+ */
873
+ CANCELLED = 4,
874
+ /**
875
+ * @generated from enum value: EVICTED = 5;
876
+ */
877
+ EVICTED = 5
878
+ }
879
+ /**
880
+ * Describes the enum v1.RunStatus.
881
+ */
882
+ export declare const RunStatusSchema: GenEnum<RunStatus>;
883
+ /**
884
+ * @generated from enum v1.IdempotencyMethod
885
+ */
886
+ export declare enum IdempotencyMethod {
887
+ /**
888
+ * @generated from enum value: TTL = 0;
889
+ */
890
+ TTL = 0,
891
+ /**
892
+ * @generated from enum value: STATUS = 1;
893
+ */
894
+ STATUS = 1
895
+ }
896
+ /**
897
+ * Describes the enum v1.IdempotencyMethod.
898
+ */
899
+ export declare const IdempotencyMethodSchema: GenEnum<IdempotencyMethod>;
900
+ /**
901
+ * @generated from enum v1.ConcurrencyLimitStrategy
902
+ */
903
+ export declare enum ConcurrencyLimitStrategy {
904
+ /**
905
+ * @generated from enum value: CANCEL_IN_PROGRESS = 0;
906
+ */
907
+ CANCEL_IN_PROGRESS = 0,
908
+ /**
909
+ * deprecated
910
+ *
911
+ * @generated from enum value: DROP_NEWEST = 1;
912
+ */
913
+ DROP_NEWEST = 1,
914
+ /**
915
+ * deprecated
916
+ *
917
+ * @generated from enum value: QUEUE_NEWEST = 2;
918
+ */
919
+ QUEUE_NEWEST = 2,
920
+ /**
921
+ * @generated from enum value: GROUP_ROUND_ROBIN = 3;
922
+ */
923
+ GROUP_ROUND_ROBIN = 3,
924
+ /**
925
+ * @generated from enum value: CANCEL_NEWEST = 4;
926
+ */
927
+ CANCEL_NEWEST = 4,
928
+ /**
929
+ * @generated from enum value: CANCEL_QUEUED_EXCEPT_NEWEST = 5;
930
+ */
931
+ CANCEL_QUEUED_EXCEPT_NEWEST = 5,
932
+ /**
933
+ * @generated from enum value: CANCEL_QUEUED_EXCEPT_OLDEST = 6;
934
+ */
935
+ CANCEL_QUEUED_EXCEPT_OLDEST = 6
936
+ }
937
+ /**
938
+ * Describes the enum v1.ConcurrencyLimitStrategy.
939
+ */
940
+ export declare const ConcurrencyLimitStrategySchema: GenEnum<ConcurrencyLimitStrategy>;
941
+ /**
942
+ * AdminService represents a set of RPCs for admin management of tasks, workflows, etc.
943
+ *
944
+ * @generated from service v1.AdminService
945
+ */
946
+ export declare const AdminService: GenService<{
947
+ /**
948
+ * @generated from rpc v1.AdminService.PutWorkflow
949
+ */
950
+ putWorkflow: {
951
+ methodKind: "unary";
952
+ input: typeof CreateWorkflowVersionRequestSchema;
953
+ output: typeof CreateWorkflowVersionResponseSchema;
954
+ };
955
+ /**
956
+ * @generated from rpc v1.AdminService.CancelTasks
957
+ */
958
+ cancelTasks: {
959
+ methodKind: "unary";
960
+ input: typeof CancelTasksRequestSchema;
961
+ output: typeof CancelTasksResponseSchema;
962
+ };
963
+ /**
964
+ * @generated from rpc v1.AdminService.ReplayTasks
965
+ */
966
+ replayTasks: {
967
+ methodKind: "unary";
968
+ input: typeof ReplayTasksRequestSchema;
969
+ output: typeof ReplayTasksResponseSchema;
970
+ };
971
+ /**
972
+ * @generated from rpc v1.AdminService.TriggerWorkflowRun
973
+ */
974
+ triggerWorkflowRun: {
975
+ methodKind: "unary";
976
+ input: typeof TriggerWorkflowRunRequestSchema;
977
+ output: typeof TriggerWorkflowRunResponseSchema;
978
+ };
979
+ /**
980
+ * @generated from rpc v1.AdminService.GetRunDetails
981
+ */
982
+ getRunDetails: {
983
+ methodKind: "unary";
984
+ input: typeof GetRunDetailsRequestSchema;
985
+ output: typeof GetRunDetailsResponseSchema;
986
+ };
987
+ /**
988
+ * @generated from rpc v1.AdminService.BranchDurableTask
989
+ */
990
+ branchDurableTask: {
991
+ methodKind: "unary";
992
+ input: typeof BranchDurableTaskRequestSchema;
993
+ output: typeof BranchDurableTaskResponseSchema;
994
+ };
995
+ }>;