@sylphx/sdk 0.28.0 → 0.30.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 (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -118
  3. package/dist/access.d.ts +659 -0
  4. package/dist/access.js +638 -0
  5. package/dist/access.js.map +1 -0
  6. package/dist/ai.d.ts +176 -0
  7. package/dist/ai.js +112 -0
  8. package/dist/ai.js.map +1 -0
  9. package/dist/artifacts.d.ts +165 -0
  10. package/dist/artifacts.js +129 -0
  11. package/dist/artifacts.js.map +1 -0
  12. package/dist/auth.d.ts +896 -0
  13. package/dist/auth.js +828 -0
  14. package/dist/auth.js.map +1 -0
  15. package/dist/billing.d.ts +758 -0
  16. package/dist/billing.js +553 -0
  17. package/dist/billing.js.map +1 -0
  18. package/dist/broker.d.ts +226 -0
  19. package/dist/broker.js +187 -0
  20. package/dist/broker.js.map +1 -0
  21. package/dist/build.d.ts +313 -0
  22. package/dist/build.js +271 -0
  23. package/dist/build.js.map +1 -0
  24. package/dist/common.d.ts +162 -0
  25. package/dist/common.js +41 -0
  26. package/dist/common.js.map +1 -0
  27. package/dist/config.d.ts +198 -0
  28. package/dist/config.js +168 -0
  29. package/dist/config.js.map +1 -0
  30. package/dist/connections.d.ts +354 -0
  31. package/dist/connections.js +313 -0
  32. package/dist/connections.js.map +1 -0
  33. package/dist/data.d.ts +858 -0
  34. package/dist/data.js +814 -0
  35. package/dist/data.js.map +1 -0
  36. package/dist/entitlement.d.ts +172 -0
  37. package/dist/entitlement.js +116 -0
  38. package/dist/entitlement.js.map +1 -0
  39. package/dist/events.d.ts +1324 -0
  40. package/dist/events.js +1227 -0
  41. package/dist/events.js.map +1 -0
  42. package/dist/hosting.d.ts +709 -0
  43. package/dist/hosting.js +611 -0
  44. package/dist/hosting.js.map +1 -0
  45. package/dist/index.d.ts +79 -33656
  46. package/dist/index.js +113 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/keys.d.ts +438 -0
  49. package/dist/keys.js +406 -0
  50. package/dist/keys.js.map +1 -0
  51. package/dist/methods.d.ts +2 -0
  52. package/dist/methods.js +3995 -0
  53. package/dist/methods.js.map +1 -0
  54. package/dist/network.d.ts +733 -0
  55. package/dist/network.js +711 -0
  56. package/dist/network.js.map +1 -0
  57. package/dist/notify.d.ts +1359 -0
  58. package/dist/notify.js +1282 -0
  59. package/dist/notify.js.map +1 -0
  60. package/dist/observability.d.ts +509 -0
  61. package/dist/observability.js +437 -0
  62. package/dist/observability.js.map +1 -0
  63. package/dist/release.d.ts +303 -0
  64. package/dist/release.js +214 -0
  65. package/dist/release.js.map +1 -0
  66. package/dist/runners.d.ts +262 -0
  67. package/dist/runners.js +238 -0
  68. package/dist/runners.js.map +1 -0
  69. package/dist/runtime.d.ts +88 -0
  70. package/dist/runtime.js +226 -0
  71. package/dist/runtime.js.map +1 -0
  72. package/dist/sandboxes.d.ts +1705 -0
  73. package/dist/sandboxes.js +1226 -0
  74. package/dist/sandboxes.js.map +1 -0
  75. package/dist/secrets.d.ts +508 -0
  76. package/dist/secrets.js +474 -0
  77. package/dist/secrets.js.map +1 -0
  78. package/dist/workflows.d.ts +678 -0
  79. package/dist/workflows.js +595 -0
  80. package/dist/workflows.js.map +1 -0
  81. package/package.json +33 -112
  82. package/dist/connect.d.ts +0 -2838
  83. package/dist/connect.mjs +0 -220
  84. package/dist/connect.mjs.map +0 -1
  85. package/dist/health/index.d.ts +0 -1394
  86. package/dist/health/index.mjs +0 -1394
  87. package/dist/health/index.mjs.map +0 -1
  88. package/dist/index.mjs +0 -38429
  89. package/dist/index.mjs.map +0 -1
  90. package/dist/nextjs/index.d.ts +0 -724
  91. package/dist/nextjs/index.mjs +0 -3332
  92. package/dist/nextjs/index.mjs.map +0 -1
  93. package/dist/react/index.d.ts +0 -13066
  94. package/dist/react/index.mjs +0 -35329
  95. package/dist/react/index.mjs.map +0 -1
  96. package/dist/server/index.d.ts +0 -2000
  97. package/dist/server/index.mjs +0 -3446
  98. package/dist/server/index.mjs.map +0 -1
  99. package/dist/web-analytics.d.ts +0 -90
  100. package/dist/web-analytics.mjs +0 -225
  101. package/dist/web-analytics.mjs.map +0 -1
@@ -0,0 +1,678 @@
1
+ import * as runtime from './runtime.js';
2
+ import './common.js';
3
+ import type * as common from './common.js';
4
+ /** A child Run's place in its batch. */
5
+ export interface BatchPosition {
6
+ /** The parent batch Run. */
7
+ readonly parentRun?: string;
8
+ /** Zero-based index of this child. */
9
+ readonly index?: number;
10
+ /** Number of children in the batch. */
11
+ readonly totalCount?: number;
12
+ }
13
+ /** A cron calendar. */
14
+ export interface CalendarSpec {
15
+ /** A 5-field cron expression, for example `0 3 * * *`. */
16
+ cron?: string;
17
+ /** IANA time zone; default `UTC`. */
18
+ timeZone?: string;
19
+ }
20
+ /** The request of CancelRun. */
21
+ export interface CancelRunRequest {
22
+ /** The name of the run. */
23
+ name: string;
24
+ /** Why the Run is cancelled. */
25
+ reason?: string;
26
+ }
27
+ /** The request of CreateRun. */
28
+ export interface CreateRunRequest {
29
+ /** The parent to create in. */
30
+ parent: string;
31
+ /** The run id, the final name segment; the server assigns one when empty. */
32
+ runId?: string;
33
+ /** The run to create; only caller-writable fields are read. */
34
+ run: Run;
35
+ /** Validate and return the result without writing anything. */
36
+ validateOnly?: boolean;
37
+ }
38
+ /** The request of CreateSchedule. */
39
+ export interface CreateScheduleRequest {
40
+ /** The parent to create in. */
41
+ parent: string;
42
+ /**
43
+ * The schedule id, the final name segment; the server assigns one when
44
+ * empty.
45
+ */
46
+ scheduleId?: string;
47
+ /** The schedule to create; only caller-writable fields are read. */
48
+ schedule: Schedule;
49
+ /** Validate and return the result without writing anything. */
50
+ validateOnly?: boolean;
51
+ }
52
+ /** The request of CreateWorkflow. */
53
+ export interface CreateWorkflowRequest {
54
+ /** The parent to create in. */
55
+ parent: string;
56
+ /**
57
+ * The workflow id, the final name segment; the server assigns one when
58
+ * empty.
59
+ */
60
+ workflowId?: string;
61
+ /** The workflow to create; only caller-writable fields are read. */
62
+ workflow: Workflow;
63
+ /** Validate and return the result without writing anything. */
64
+ validateOnly?: boolean;
65
+ }
66
+ /** The request of DeleteSchedule. */
67
+ export interface DeleteScheduleRequest {
68
+ /** The name of the schedule to delete. */
69
+ name: string;
70
+ /** Delete only if the current etag matches. */
71
+ etag?: string;
72
+ /** Succeed when the schedule does not exist. */
73
+ allowMissing?: boolean;
74
+ /** Validate without deleting anything. */
75
+ validateOnly?: boolean;
76
+ }
77
+ /** The request of DeleteWorkflow. */
78
+ export interface DeleteWorkflowRequest {
79
+ /** The name of the workflow to delete. */
80
+ name: string;
81
+ /** Delete only if the current etag matches. */
82
+ etag?: string;
83
+ /** Succeed when the workflow does not exist. */
84
+ allowMissing?: boolean;
85
+ /** Validate without deleting anything. */
86
+ validateOnly?: boolean;
87
+ /**
88
+ * Also cancel and delete the Workflow's Runs and Schedules; without it a
89
+ * Workflow with open Runs or Schedules fails with INVALID_STATE.
90
+ */
91
+ force?: boolean;
92
+ }
93
+ /** The request of GetRun. */
94
+ export interface GetRunRequest {
95
+ /** The name of the run to get. */
96
+ name: string;
97
+ }
98
+ /** The request of GetSchedule. */
99
+ export interface GetScheduleRequest {
100
+ /** The name of the schedule to get. */
101
+ name: string;
102
+ }
103
+ /** The request of GetWorkflow. */
104
+ export interface GetWorkflowRequest {
105
+ /** The name of the workflow to get. */
106
+ name: string;
107
+ }
108
+ /** A fixed interval. */
109
+ export interface IntervalSpec {
110
+ /** The period, 1s to 365d. */
111
+ every?: string;
112
+ /** Phase offset within each period. */
113
+ offset?: string;
114
+ }
115
+ /** The request of ListRuns. */
116
+ export interface ListRunsRequest {
117
+ /** The parent to list in. */
118
+ parent: string;
119
+ /** At most this many; default 50, clamped to 1000. */
120
+ pageSize?: number;
121
+ /** `next_page_token` of the previous page. */
122
+ pageToken?: string;
123
+ /** AIP-160 filter over labels and filterable fields. */
124
+ filter?: string;
125
+ /** AIP-132 ordering over filterable fields. */
126
+ orderBy?: string;
127
+ }
128
+ /** The response of ListRuns. */
129
+ export interface ListRunsResponse {
130
+ /** The page. */
131
+ runs?: Run[];
132
+ /** The token of the next page; empty on the last page. */
133
+ nextPageToken?: string;
134
+ }
135
+ /** The request of ListSchedules. */
136
+ export interface ListSchedulesRequest {
137
+ /** The parent to list in. */
138
+ parent: string;
139
+ /** At most this many; default 50, clamped to 1000. */
140
+ pageSize?: number;
141
+ /** `next_page_token` of the previous page. */
142
+ pageToken?: string;
143
+ /** AIP-160 filter over labels and filterable fields. */
144
+ filter?: string;
145
+ /** AIP-132 ordering over filterable fields. */
146
+ orderBy?: string;
147
+ }
148
+ /** The response of ListSchedules. */
149
+ export interface ListSchedulesResponse {
150
+ /** The page. */
151
+ schedules?: Schedule[];
152
+ /** The token of the next page; empty on the last page. */
153
+ nextPageToken?: string;
154
+ }
155
+ /** The request of ListWorkflows. */
156
+ export interface ListWorkflowsRequest {
157
+ /** The parent to list in. */
158
+ parent: string;
159
+ /** At most this many; default 50, clamped to 1000. */
160
+ pageSize?: number;
161
+ /** `next_page_token` of the previous page. */
162
+ pageToken?: string;
163
+ /** AIP-160 filter over labels and filterable fields. */
164
+ filter?: string;
165
+ /** AIP-132 ordering over filterable fields. */
166
+ orderBy?: string;
167
+ }
168
+ /** The response of ListWorkflows. */
169
+ export interface ListWorkflowsResponse {
170
+ /** The page. */
171
+ workflows?: Workflow[];
172
+ /** The token of the next page; empty on the last page. */
173
+ nextPageToken?: string;
174
+ }
175
+ /** The request of PauseSchedule. */
176
+ export interface PauseScheduleRequest {
177
+ /** The name of the schedule. */
178
+ name: string;
179
+ /** Why the Schedule is paused. */
180
+ pauseNote?: string;
181
+ /** Act only if the current etag matches. */
182
+ etag?: string;
183
+ /** Validate without writing anything. */
184
+ validateOnly?: boolean;
185
+ }
186
+ /** The request of ReadRunHistory. */
187
+ export interface ReadRunHistoryRequest {
188
+ /** The name of the run. */
189
+ name: string;
190
+ /** At most this many; default 100, clamped to 1000. */
191
+ pageSize?: number;
192
+ /** `next_page_token` of the previous page. */
193
+ pageToken?: string;
194
+ }
195
+ /** The response of ReadRunHistory. */
196
+ export interface ReadRunHistoryResponse {
197
+ /** The page, oldest first. */
198
+ events?: RunHistoryEvent[];
199
+ /** The token of the next page; empty on the last page. */
200
+ nextPageToken?: string;
201
+ }
202
+ /** The request of ResumeSchedule. */
203
+ export interface ResumeScheduleRequest {
204
+ /** The name of the schedule. */
205
+ name: string;
206
+ /** Act only if the current etag matches. */
207
+ etag?: string;
208
+ /** Validate without writing anything. */
209
+ validateOnly?: boolean;
210
+ }
211
+ /** How a failed invocation is retried. */
212
+ export interface RetryPolicy {
213
+ /** Attempts per step, 1 to 100; default 10. */
214
+ maxAttempts?: number;
215
+ /** The first backoff; default 1s. */
216
+ initialInterval?: string;
217
+ /** Backoff growth, 1.0 to 10.0; default 2.0. */
218
+ backoffCoefficient?: number;
219
+ /** The largest backoff; default 10m. */
220
+ maxInterval?: string;
221
+ }
222
+ /**
223
+ * A Run is one execution of a Workflow, read from the engine
224
+ * (workflows-on-temporal.md §6.3). Create starts it: the same
225
+ * `Idempotency-Key` and input return the same Run, a changed input under the
226
+ * same key is refused. A Run ends `succeeded` only from its handler's recorded
227
+ * result, and `cancelled` only from an authenticated cancel the handler
228
+ * acknowledged or a Run that never started.
229
+ */
230
+ export interface Run {
231
+ /** `orgs/{org}/projects/{project}/envs/{env}/workflows/{workflow}/runs/{run}`. */
232
+ name?: string;
233
+ /** `run_<cell><ulid>`; never reused. */
234
+ readonly uid?: string;
235
+ /** Resource metadata. */
236
+ meta?: common.ResourceMeta;
237
+ /** The Workflow generation the Run pinned at start. */
238
+ readonly workflowGeneration?: string;
239
+ /** The Run input, at most 256 KiB of JSON. */
240
+ input?: Record<string, unknown>;
241
+ /** Delay the first invocation by this much. */
242
+ startDelay?: string;
243
+ /** The Run's lifecycle state. */
244
+ readonly state?: RunState;
245
+ /** Set when a Schedule fire started the Run. */
246
+ readonly scheduleFire?: ScheduleFireRef;
247
+ /** Set on a child of a batch Run. */
248
+ readonly batchPosition?: BatchPosition;
249
+ /** When the Run started. */
250
+ readonly startTime?: string;
251
+ /** When the Run closed. */
252
+ readonly endTime?: string;
253
+ /** Attempts made so far, across every step. */
254
+ readonly attemptCount?: number;
255
+ /** The handler's `complete` output, once `succeeded`. */
256
+ readonly output?: Record<string, unknown>;
257
+ /** The failure, once `failed` or `timed_out`. */
258
+ readonly error?: RunError;
259
+ }
260
+ /** Why a Run failed. */
261
+ export interface RunError {
262
+ /**
263
+ * A machine-readable code, for example `handler_rejected` or
264
+ * `card_declined`.
265
+ */
266
+ readonly code?: string;
267
+ /** A customer-safe message. */
268
+ readonly message?: string;
269
+ /** Whether the handler marked the failure retryable. */
270
+ readonly retryable?: boolean;
271
+ }
272
+ /** One entry of a Run's history. */
273
+ export interface RunHistoryEvent {
274
+ /** Monotonic sequence number within the Run. */
275
+ readonly sequence?: string;
276
+ /** When the event happened. */
277
+ readonly eventTime?: string;
278
+ /** What happened. */
279
+ readonly kind?: RunHistoryEventKind;
280
+ /** The step id, for step events. */
281
+ readonly step?: string;
282
+ /** The attempt number, for invocation events. */
283
+ readonly attempt?: number;
284
+ /** The attempt outcome, for invocation events. */
285
+ readonly attemptOutcome?: AttemptOutcome;
286
+ /** Event details (step output, signal payload, error). */
287
+ readonly details?: Record<string, unknown>;
288
+ }
289
+ /**
290
+ * A Schedule starts Runs of a Workflow on a calendar or an interval
291
+ * (workflows-on-temporal.md §6.2). Every fire is an engine timer; `(schedule,
292
+ * intended time)` is the Run identity, so one instant starts at most one Run.
293
+ * A fire is not a Run result.
294
+ */
295
+ export interface Schedule {
296
+ /** `orgs/{org}/projects/{project}/envs/{env}/schedules/{schedule}`. */
297
+ name?: string;
298
+ /** `sch_<cell><ulid>`; never reused. */
299
+ readonly uid?: string;
300
+ /** Resource metadata. */
301
+ meta?: common.ResourceMeta;
302
+ /** Desired state. */
303
+ spec?: ScheduleSpec;
304
+ /** Observed state. */
305
+ readonly status?: ScheduleStatus;
306
+ }
307
+ /** One fire of a Schedule. */
308
+ export interface ScheduleFire {
309
+ /** The instant the fire was due. */
310
+ readonly intendedTime?: string;
311
+ /** The Run it started, if any. */
312
+ readonly run?: string;
313
+ /** What the fire did. */
314
+ readonly outcome?: FireOutcome;
315
+ }
316
+ /** The Schedule fire that started a Run. */
317
+ export interface ScheduleFireRef {
318
+ /** The Schedule. */
319
+ readonly schedule?: string;
320
+ /** The instant the fire was due. */
321
+ readonly intendedTime?: string;
322
+ }
323
+ /** ScheduleSpec is the caller-writable state of a Schedule. */
324
+ export interface ScheduleSpec {
325
+ /** The Workflow the Schedule starts, in the same environment. */
326
+ workflow?: string;
327
+ /** The input of every Run, at most 64 KiB of JSON. */
328
+ input?: Record<string, unknown>;
329
+ /** A calendar: cron expression and time zone. */
330
+ calendar?: CalendarSpec;
331
+ /** A fixed interval. */
332
+ interval?: IntervalSpec;
333
+ /** Random delay added to each fire, at most min(interval, 1h). */
334
+ jitter?: string;
335
+ /** What a fire does while a previous Run is still running. */
336
+ overlapPolicy?: OverlapPolicy;
337
+ /** Missed fires older than this are skipped; 10s to 365d. */
338
+ catchupWindow?: string;
339
+ /** Whether fires are paused. */
340
+ paused?: boolean;
341
+ /** Why the Schedule is paused; shown in status. */
342
+ pauseNote?: string;
343
+ }
344
+ /** ScheduleStatus is the observed state of a Schedule. */
345
+ export interface ScheduleStatus {
346
+ /** The generation this status was computed from. */
347
+ readonly observedGeneration?: string;
348
+ /** Ready, Reconciling, Stalled. */
349
+ readonly conditions?: common.Condition[];
350
+ /** The next intended fire times. */
351
+ readonly nextFireTimes?: string[];
352
+ /** The most recent fire. */
353
+ readonly lastFire?: ScheduleFire;
354
+ }
355
+ /** A Hosting Service route that handles a Workflow's steps. */
356
+ export interface ServiceHandler {
357
+ /** The Hosting Service in the same environment. */
358
+ service?: string;
359
+ /** The request path, for example `/api/sylphx/workflows`. */
360
+ path?: string;
361
+ }
362
+ /** The request of SignalRun. */
363
+ export interface SignalRunRequest {
364
+ /** The name of the run. */
365
+ name: string;
366
+ /** The signal name the handler waits on. */
367
+ signal: string;
368
+ /** The signal payload, at most 64 KiB of JSON. */
369
+ payload?: Record<string, unknown>;
370
+ }
371
+ /** The request of StartRunBatch. */
372
+ export interface StartRunBatchRequest {
373
+ /** The parent the method acts in. */
374
+ parent: string;
375
+ /** The inputs, one child Run each; at most 10 000. */
376
+ inputs: Record<string, unknown>[];
377
+ /** At most this many children run at once; 0 is the Workflow's limit. */
378
+ maxConcurrency?: number;
379
+ }
380
+ /** The response of StartRunBatch. */
381
+ export interface StartRunBatchResponse {
382
+ /** The parent batch Run. */
383
+ run?: Run;
384
+ }
385
+ /** The request of UpdateSchedule. */
386
+ export interface UpdateScheduleRequest {
387
+ /** The schedule to update; `name` identifies it. */
388
+ schedule: Schedule;
389
+ /** The fields to write; unset writes every populated field. */
390
+ updateMask?: string;
391
+ /** Create the schedule when it does not exist (declarative upsert). */
392
+ allowMissing?: boolean;
393
+ /** Validate and return the result without writing anything. */
394
+ validateOnly?: boolean;
395
+ }
396
+ /** The request of UpdateWorkflow. */
397
+ export interface UpdateWorkflowRequest {
398
+ /** The workflow to update; `name` identifies it. */
399
+ workflow: Workflow;
400
+ /** The fields to write; unset writes every populated field. */
401
+ updateMask?: string;
402
+ /** Create the workflow when it does not exist (declarative upsert). */
403
+ allowMissing?: boolean;
404
+ /** Validate and return the result without writing anything. */
405
+ validateOnly?: boolean;
406
+ }
407
+ /** The request of WaitRun. */
408
+ export interface WaitRunRequest {
409
+ /** The name of the run. */
410
+ name: string;
411
+ /** How long to wait; default 30s, at most 60s. */
412
+ timeout?: string;
413
+ }
414
+ /**
415
+ * A Workflow is durable work a customer declares: the handler each step of a
416
+ * Run invokes, and its retry and timeout policy (workflows-on-temporal.md
417
+ * §6.1). A Workflow write never starts, completes, or cancels a Run; a Run
418
+ * pins the Workflow generation it started from.
419
+ */
420
+ export interface Workflow {
421
+ /** `orgs/{org}/projects/{project}/envs/{env}/workflows/{workflow}`. */
422
+ name?: string;
423
+ /** `wf_<cell><ulid>`; never reused. */
424
+ readonly uid?: string;
425
+ /** Resource metadata. */
426
+ meta?: common.ResourceMeta;
427
+ /** Desired state. */
428
+ spec?: WorkflowSpec;
429
+ /** Observed state. */
430
+ readonly status?: WorkflowStatus;
431
+ }
432
+ /** WorkflowSpec is the caller-writable state of a Workflow. */
433
+ export interface WorkflowSpec {
434
+ /**
435
+ * An HTTPS URI on port 443 whose host is a verified Network Domain of this
436
+ * project or a Hosting route the project owns.
437
+ */
438
+ handlerUri?: string;
439
+ /** A Hosting Service in the same environment, which may be scaled to zero. */
440
+ serviceHandler?: ServiceHandler;
441
+ /** How a failed invocation is retried. */
442
+ retryPolicy?: RetryPolicy;
443
+ /** Invocation and Run deadlines. */
444
+ timeouts?: WorkflowTimeouts;
445
+ /**
446
+ * At most this many running Runs of this Workflow; 0 is unlimited within the
447
+ * plan.
448
+ */
449
+ maxConcurrentRuns?: number;
450
+ }
451
+ /** WorkflowStatus is the observed state of a Workflow. */
452
+ export interface WorkflowStatus {
453
+ /** The generation this status was computed from. */
454
+ readonly observedGeneration?: string;
455
+ /** Ready, Reconciling, Stalled. */
456
+ readonly conditions?: common.Condition[];
457
+ /** The handler URI the current generation resolved to. */
458
+ readonly resolvedHandlerUri?: string;
459
+ }
460
+ /** Deadlines of a Workflow. */
461
+ export interface WorkflowTimeouts {
462
+ /** One handler invocation, 1s to 900s; default 60s. */
463
+ invocationTimeout?: string;
464
+ /** The whole Run, at most 365d; default 30d. */
465
+ runTimeout?: string;
466
+ }
467
+ /** How one invocation attempt ended (workflows-on-temporal.md §7.3). */
468
+ export type AttemptOutcome = 'invoked' | 'protocol_error' | 'rejected' | 'retryable' | 'unreached' | 'unknown' | 'unsigned' | (string & {});
469
+ /** What one Schedule fire did. */
470
+ export type FireOutcome = 'started' | 'skipped' | 'buffered' | (string & {});
471
+ /** What a Schedule fire does while a previous Run is still running. */
472
+ export type OverlapPolicy = 'skip' | 'buffer_one' | 'buffer_all' | 'cancel_other' | 'allow' | (string & {});
473
+ /** What a Run history event records. */
474
+ export type RunHistoryEventKind = 'run_started' | 'invocation' | 'step_completed' | 'sleep_started' | 'signal_received' | 'child_started' | 'cancel_requested' | 'run_closed' | (string & {});
475
+ /** The lifecycle state of a Run. */
476
+ export type RunState = 'running' | 'succeeded' | 'failed' | 'cancelled' | 'timed_out' | (string & {});
477
+ /**
478
+ * WorkflowsService is Sylphx Workflows: durable execution, schedules, timers,
479
+ * and runs (docs/services/workflows/vision.md, workflows-on-temporal.md §6).
480
+ * Workflows is the one writer of these types.
481
+ *
482
+ * Namespace of Sylphx Workflows on `Sylphx`.
483
+ */
484
+ export declare class WorkflowsApi {
485
+ /** The `workflows` collection. */
486
+ readonly workflows: WorkflowsCollection;
487
+ /** The `schedules` collection. */
488
+ readonly schedules: SchedulesCollection;
489
+ /** The `runs` collection. */
490
+ readonly runs: RunsCollection;
491
+ constructor(client: runtime.Client);
492
+ }
493
+ /** `workflows` of Sylphx Workflows: Resource type `workflows.sylphx.com/Workflow`. */
494
+ export declare class WorkflowsCollection {
495
+ private readonly client;
496
+ constructor(client: runtime.Client);
497
+ /**
498
+ * Gets a workflow.
499
+ *
500
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*}` · permission `workflows:read` · effect `read`
501
+ *
502
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
503
+ */
504
+ get(request: GetWorkflowRequest): Promise<Workflow>;
505
+ /**
506
+ * Lists workflows.
507
+ *
508
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/workflows` · permission `workflows:read` · effect `read`
509
+ *
510
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
511
+ */
512
+ list(request: ListWorkflowsRequest): Promise<ListWorkflowsResponse>;
513
+ /** Every item of every page of `list`. */
514
+ listAll(request: ListWorkflowsRequest): AsyncGenerator<Workflow>;
515
+ /**
516
+ * Creates a workflow.
517
+ *
518
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/workflows` · permission `workflows:write` · effect `write`
519
+ *
520
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
521
+ */
522
+ create(request: CreateWorkflowRequest): Promise<Workflow>;
523
+ /**
524
+ * Updates a workflow.
525
+ *
526
+ * `PATCH /v1/{workflow.name=orgs/*\/projects/*\/envs/*\/workflows/*}` · permission `workflows:write` · effect `write`
527
+ *
528
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
529
+ */
530
+ update(request: UpdateWorkflowRequest): Promise<Workflow>;
531
+ /**
532
+ * Deletes a workflow.
533
+ *
534
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*}` · permission `workflows:write` · effect `destructive`
535
+ *
536
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
537
+ */
538
+ delete(request: DeleteWorkflowRequest): Promise<Record<string, never>>;
539
+ }
540
+ /** `schedules` of Sylphx Workflows: Resource type `workflows.sylphx.com/Schedule`. */
541
+ export declare class SchedulesCollection {
542
+ private readonly client;
543
+ constructor(client: runtime.Client);
544
+ /**
545
+ * Gets a schedule.
546
+ *
547
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/schedules/*}` · permission `workflows:read` · effect `read`
548
+ *
549
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
550
+ */
551
+ get(request: GetScheduleRequest): Promise<Schedule>;
552
+ /**
553
+ * Lists schedules.
554
+ *
555
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/schedules` · permission `workflows:read` · effect `read`
556
+ *
557
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
558
+ */
559
+ list(request: ListSchedulesRequest): Promise<ListSchedulesResponse>;
560
+ /** Every item of every page of `list`. */
561
+ listAll(request: ListSchedulesRequest): AsyncGenerator<Schedule>;
562
+ /**
563
+ * Creates a schedule.
564
+ *
565
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/schedules` · permission `workflows:write` · effect `write`
566
+ *
567
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
568
+ */
569
+ create(request: CreateScheduleRequest): Promise<runtime.Operation<Schedule>>;
570
+ /**
571
+ * Updates a schedule.
572
+ *
573
+ * `PATCH /v1/{schedule.name=orgs/*\/projects/*\/envs/*\/schedules/*}` · permission `workflows:write` · effect `write`
574
+ *
575
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
576
+ */
577
+ update(request: UpdateScheduleRequest): Promise<runtime.Operation<Schedule>>;
578
+ /**
579
+ * Deletes a schedule.
580
+ *
581
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/schedules/*}` · permission `workflows:write` · effect `destructive`
582
+ *
583
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
584
+ */
585
+ delete(request: DeleteScheduleRequest): Promise<runtime.Operation<Record<string, never>>>;
586
+ /**
587
+ * Pauses a Schedule: no fire starts a Run until it is resumed.
588
+ *
589
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/schedules/*}:pause` · permission `workflows:write` · effect `write`
590
+ *
591
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
592
+ */
593
+ pause(request: PauseScheduleRequest): Promise<runtime.Operation<Schedule>>;
594
+ /**
595
+ * Resumes a paused Schedule; missed fires follow `catchup_window`.
596
+ *
597
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/schedules/*}:resume` · permission `workflows:write` · effect `write`
598
+ *
599
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
600
+ */
601
+ resume(request: ResumeScheduleRequest): Promise<runtime.Operation<Schedule>>;
602
+ }
603
+ /** `runs` of Sylphx Workflows: Resource type `workflows.sylphx.com/Run`. */
604
+ export declare class RunsCollection {
605
+ private readonly client;
606
+ constructor(client: runtime.Client);
607
+ /**
608
+ * Gets a run.
609
+ *
610
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}` · permission `workflows:read` · effect `read`
611
+ *
612
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
613
+ */
614
+ get(request: GetRunRequest): Promise<Run>;
615
+ /**
616
+ * Lists runs.
617
+ *
618
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/workflows/*}/runs` · permission `workflows:read` · effect `read`
619
+ *
620
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
621
+ */
622
+ list(request: ListRunsRequest): Promise<ListRunsResponse>;
623
+ /** Every item of every page of `list`. */
624
+ listAll(request: ListRunsRequest): AsyncGenerator<Run>;
625
+ /**
626
+ * Starts a Run of a Workflow.
627
+ *
628
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/workflows/*}/runs` · permission `workflows:run` · effect `write`
629
+ *
630
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
631
+ */
632
+ create(request: CreateRunRequest): Promise<Run>;
633
+ /**
634
+ * Starts a batch: a parent Run that fans out one child Run per item, each
635
+ * with a stable index and count.
636
+ *
637
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/workflows/*}/runs:startBatch` · permission `workflows:run` · effect `write`
638
+ *
639
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `RATE_LIMITED`, `PLAN_LIMIT_REACHED`.
640
+ */
641
+ startBatch(request: StartRunBatchRequest): Promise<StartRunBatchResponse>;
642
+ /**
643
+ * Sends a named signal to a running Run; a `wait` op for that name resumes
644
+ * with its payload. A signal to a closed Run fails with INVALID_STATE.
645
+ *
646
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:signal` · permission `workflows:run` · effect `write`
647
+ *
648
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
649
+ */
650
+ signal(request: SignalRunRequest): Promise<Run>;
651
+ /**
652
+ * Requests cancellation. Timers and waits stop; a running invocation is not
653
+ * interrupted: the handler receives one final invocation with `cancel:
654
+ * true`, and the Run ends `cancelled` when it answers.
655
+ *
656
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:cancel` · permission `workflows:run` · effect `destructive`
657
+ *
658
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
659
+ */
660
+ cancel(request: CancelRunRequest): Promise<Run>;
661
+ /**
662
+ * Waits up to `timeout` (at most 60s) for the Run to close, then returns it,
663
+ * closed or not.
664
+ *
665
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:wait` · permission `workflows:read` · effect `read`
666
+ *
667
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
668
+ */
669
+ wait(request: WaitRunRequest): Promise<Run>;
670
+ /**
671
+ * Reads a page of the Run's immutable history, projected to Sylphx events.
672
+ *
673
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/workflows/*\/runs/*}:readHistory` · permission `workflows:read` · effect `read`
674
+ *
675
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `RESOURCE_NOT_FOUND`.
676
+ */
677
+ readHistory(request: ReadRunHistoryRequest): Promise<ReadRunHistoryResponse>;
678
+ }