@greatwait/contracts 0.2.3 → 0.3.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 (79) hide show
  1. package/dist/attempt-search.d.ts +235 -0
  2. package/dist/attempt-search.js +98 -0
  3. package/dist/billing.d.ts +4 -4
  4. package/dist/bulk-operations.d.ts +1832 -0
  5. package/dist/bulk-operations.js +610 -0
  6. package/dist/configuration-bounds.d.ts +12 -0
  7. package/dist/configuration-bounds.js +12 -0
  8. package/dist/configuration.d.ts +71 -0
  9. package/dist/configuration.js +204 -0
  10. package/dist/data-export.d.ts +3 -3
  11. package/dist/effective-limits.d.ts +4 -4
  12. package/dist/execution-selection.d.ts +48 -0
  13. package/dist/execution-selection.js +21 -0
  14. package/dist/http-request.d.ts +1 -1
  15. package/dist/identifiers.d.ts +2 -0
  16. package/dist/identifiers.js +2 -0
  17. package/dist/identity.d.ts +3 -3
  18. package/dist/index.d.ts +5 -0
  19. package/dist/index.js +5 -0
  20. package/dist/occurrence-states.d.ts +14 -0
  21. package/dist/occurrence-states.js +13 -0
  22. package/dist/operations.d.ts +573 -89
  23. package/dist/operations.js +67 -0
  24. package/dist/protocol.d.ts +19 -5
  25. package/dist/protocol.js +14 -7
  26. package/dist/schedule-selection.d.ts +28 -0
  27. package/dist/schedule-selection.js +48 -0
  28. package/dist/scheduling-records.d.ts +20 -20
  29. package/dist/scheduling.d.ts +64 -63
  30. package/dist/scheduling.js +10 -37
  31. package/dist/test-sink.d.ts +6 -6
  32. package/dist/usage.d.ts +3 -3
  33. package/generated/v1/examples/attempts.search.response.json +42 -0
  34. package/generated/v1/examples/bulk.cancel.request.json +3 -0
  35. package/generated/v1/examples/bulk.cancel.response.json +59 -0
  36. package/generated/v1/examples/bulk.confirm.request.json +5 -0
  37. package/generated/v1/examples/bulk.confirm.response.json +59 -0
  38. package/generated/v1/examples/bulk.items.response.json +3 -0
  39. package/generated/v1/examples/bulk.list.response.json +63 -0
  40. package/generated/v1/examples/bulk.pause.request.json +3 -0
  41. package/generated/v1/examples/bulk.pause.response.json +59 -0
  42. package/generated/v1/examples/bulk.preview.request.json +12 -0
  43. package/generated/v1/examples/bulk.preview.response.json +59 -0
  44. package/generated/v1/examples/bulk.read.response.json +59 -0
  45. package/generated/v1/examples/bulk.resume.request.json +3 -0
  46. package/generated/v1/examples/bulk.resume.response.json +59 -0
  47. package/generated/v1/manifest.json +243 -1
  48. package/generated/v1/openapi.json +21569 -2418
  49. package/generated/v1/policy-matrix.json +63 -0
  50. package/generated/v1/schemas/attempts.search.query.json +96 -0
  51. package/generated/v1/schemas/attempts.search.response.json +271 -0
  52. package/generated/v1/schemas/bulk.cancel.request.json +13 -0
  53. package/generated/v1/schemas/bulk.cancel.response.json +1717 -0
  54. package/generated/v1/schemas/bulk.confirm.request-headers.json +13 -0
  55. package/generated/v1/schemas/bulk.confirm.request.json +19 -0
  56. package/generated/v1/schemas/bulk.confirm.response.json +1717 -0
  57. package/generated/v1/schemas/bulk.items.query.json +29 -0
  58. package/generated/v1/schemas/bulk.items.response.json +194 -0
  59. package/generated/v1/schemas/bulk.list.query.json +32 -0
  60. package/generated/v1/schemas/bulk.list.response.json +1789 -0
  61. package/generated/v1/schemas/bulk.pause.request.json +13 -0
  62. package/generated/v1/schemas/bulk.pause.response.json +1717 -0
  63. package/generated/v1/schemas/bulk.preview.request.json +1218 -0
  64. package/generated/v1/schemas/bulk.preview.response.json +1717 -0
  65. package/generated/v1/schemas/bulk.read.response.json +1717 -0
  66. package/generated/v1/schemas/bulk.resume.request.json +13 -0
  67. package/generated/v1/schemas/bulk.resume.response.json +1717 -0
  68. package/generated/v1/schemas/executions.list.query.json +33 -12
  69. package/generated/v1/schemas/schedules.list.query.json +32 -3
  70. package/generated/v1/snippets/attempts.search.json +6 -0
  71. package/generated/v1/snippets/bulk.cancel.json +6 -0
  72. package/generated/v1/snippets/bulk.confirm.json +6 -0
  73. package/generated/v1/snippets/bulk.items.json +6 -0
  74. package/generated/v1/snippets/bulk.list.json +6 -0
  75. package/generated/v1/snippets/bulk.pause.json +6 -0
  76. package/generated/v1/snippets/bulk.preview.json +6 -0
  77. package/generated/v1/snippets/bulk.read.json +6 -0
  78. package/generated/v1/snippets/bulk.resume.json +6 -0
  79. package/package.json +1 -1
@@ -0,0 +1,1717 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "pattern": "^bjo_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
8
+ },
9
+ "authority": {
10
+ "type": "object",
11
+ "properties": {
12
+ "environment": {
13
+ "type": "string",
14
+ "pattern": "^env_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
15
+ },
16
+ "environmentKind": {
17
+ "type": "string",
18
+ "enum": ["test", "live"]
19
+ },
20
+ "organization": {
21
+ "type": "string",
22
+ "pattern": "^org_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
23
+ },
24
+ "project": {
25
+ "type": "string",
26
+ "pattern": "^proj_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
27
+ }
28
+ },
29
+ "required": ["environment", "environmentKind", "organization", "project"]
30
+ },
31
+ "intent": {
32
+ "oneOf": [
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "target": {
37
+ "type": "string",
38
+ "enum": ["schedules", "parent_schedules", "occurrences"]
39
+ },
40
+ "selection": {
41
+ "anyOf": [
42
+ {
43
+ "type": "object",
44
+ "properties": {
45
+ "kind": {
46
+ "type": "string",
47
+ "const": "ids"
48
+ },
49
+ "resource": {
50
+ "type": "string",
51
+ "const": "schedules"
52
+ },
53
+ "ids": {
54
+ "maxItems": 1000000,
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string",
58
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
59
+ }
60
+ }
61
+ },
62
+ "required": ["kind", "resource", "ids"]
63
+ },
64
+ {
65
+ "type": "object",
66
+ "properties": {
67
+ "kind": {
68
+ "type": "string",
69
+ "const": "ids"
70
+ },
71
+ "resource": {
72
+ "type": "string",
73
+ "const": "executions"
74
+ },
75
+ "ids": {
76
+ "maxItems": 1000000,
77
+ "type": "array",
78
+ "items": {
79
+ "type": "string",
80
+ "pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
81
+ }
82
+ }
83
+ },
84
+ "required": ["kind", "resource", "ids"]
85
+ },
86
+ {
87
+ "type": "object",
88
+ "properties": {
89
+ "kind": {
90
+ "type": "string",
91
+ "const": "all_matching"
92
+ },
93
+ "resource": {
94
+ "type": "string",
95
+ "const": "schedules"
96
+ },
97
+ "filter": {
98
+ "type": "object",
99
+ "properties": {
100
+ "external_identifier": {
101
+ "type": "string",
102
+ "minLength": 1,
103
+ "maxLength": 256,
104
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
105
+ },
106
+ "tag": {
107
+ "type": "string",
108
+ "minLength": 1,
109
+ "maxLength": 64,
110
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
111
+ },
112
+ "status": {
113
+ "type": "string",
114
+ "enum": ["active", "paused", "cancelled", "completed"]
115
+ },
116
+ "recurrence": {
117
+ "type": "string",
118
+ "enum": ["at", "every", "cron"]
119
+ },
120
+ "endpoint": {
121
+ "anyOf": [
122
+ {
123
+ "type": "string",
124
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
125
+ },
126
+ {
127
+ "type": "string",
128
+ "const": "none"
129
+ }
130
+ ]
131
+ },
132
+ "text": {
133
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
134
+ "type": "string",
135
+ "maxLength": 256
136
+ },
137
+ "schedule": {
138
+ "type": "string",
139
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
140
+ },
141
+ "dueAfter": {
142
+ "type": "string",
143
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
144
+ },
145
+ "dueBefore": {
146
+ "type": "string",
147
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
148
+ }
149
+ }
150
+ }
151
+ },
152
+ "required": ["kind", "resource", "filter"]
153
+ },
154
+ {
155
+ "type": "object",
156
+ "properties": {
157
+ "kind": {
158
+ "type": "string",
159
+ "const": "all_matching"
160
+ },
161
+ "resource": {
162
+ "type": "string",
163
+ "const": "executions"
164
+ },
165
+ "filter": {
166
+ "type": "object",
167
+ "properties": {
168
+ "external_identifier": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 256,
172
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
173
+ },
174
+ "tag": {
175
+ "type": "string",
176
+ "minLength": 1,
177
+ "maxLength": 64,
178
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
179
+ },
180
+ "status": {
181
+ "type": "string",
182
+ "enum": ["active", "paused", "cancelled", "completed"]
183
+ },
184
+ "recurrence": {
185
+ "type": "string",
186
+ "enum": ["at", "every", "cron"]
187
+ },
188
+ "endpoint": {
189
+ "anyOf": [
190
+ {
191
+ "type": "string",
192
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
193
+ },
194
+ {
195
+ "type": "string",
196
+ "const": "none"
197
+ }
198
+ ]
199
+ },
200
+ "text": {
201
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
202
+ "type": "string",
203
+ "maxLength": 256
204
+ },
205
+ "schedule": {
206
+ "type": "string",
207
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
208
+ },
209
+ "from": {
210
+ "type": "string",
211
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
212
+ },
213
+ "to": {
214
+ "type": "string",
215
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
216
+ },
217
+ "outcome": {
218
+ "type": "string",
219
+ "enum": [
220
+ "planned",
221
+ "due",
222
+ "dispatching",
223
+ "retry_wait",
224
+ "ambiguous",
225
+ "succeeded",
226
+ "terminal_failed",
227
+ "cancelled",
228
+ "skipped_stale"
229
+ ]
230
+ }
231
+ }
232
+ }
233
+ },
234
+ "required": ["kind", "resource", "filter"]
235
+ }
236
+ ]
237
+ },
238
+ "operation": {
239
+ "type": "string",
240
+ "const": "retry"
241
+ },
242
+ "parameters": {
243
+ "type": "object",
244
+ "properties": {
245
+ "includeSucceeded": {
246
+ "type": "boolean"
247
+ }
248
+ }
249
+ }
250
+ },
251
+ "required": ["target", "selection", "operation", "parameters"]
252
+ },
253
+ {
254
+ "type": "object",
255
+ "properties": {
256
+ "target": {
257
+ "type": "string",
258
+ "enum": ["schedules", "parent_schedules", "occurrences"]
259
+ },
260
+ "selection": {
261
+ "anyOf": [
262
+ {
263
+ "type": "object",
264
+ "properties": {
265
+ "kind": {
266
+ "type": "string",
267
+ "const": "ids"
268
+ },
269
+ "resource": {
270
+ "type": "string",
271
+ "const": "schedules"
272
+ },
273
+ "ids": {
274
+ "maxItems": 1000000,
275
+ "type": "array",
276
+ "items": {
277
+ "type": "string",
278
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
279
+ }
280
+ }
281
+ },
282
+ "required": ["kind", "resource", "ids"]
283
+ },
284
+ {
285
+ "type": "object",
286
+ "properties": {
287
+ "kind": {
288
+ "type": "string",
289
+ "const": "ids"
290
+ },
291
+ "resource": {
292
+ "type": "string",
293
+ "const": "executions"
294
+ },
295
+ "ids": {
296
+ "maxItems": 1000000,
297
+ "type": "array",
298
+ "items": {
299
+ "type": "string",
300
+ "pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
301
+ }
302
+ }
303
+ },
304
+ "required": ["kind", "resource", "ids"]
305
+ },
306
+ {
307
+ "type": "object",
308
+ "properties": {
309
+ "kind": {
310
+ "type": "string",
311
+ "const": "all_matching"
312
+ },
313
+ "resource": {
314
+ "type": "string",
315
+ "const": "schedules"
316
+ },
317
+ "filter": {
318
+ "type": "object",
319
+ "properties": {
320
+ "external_identifier": {
321
+ "type": "string",
322
+ "minLength": 1,
323
+ "maxLength": 256,
324
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
325
+ },
326
+ "tag": {
327
+ "type": "string",
328
+ "minLength": 1,
329
+ "maxLength": 64,
330
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
331
+ },
332
+ "status": {
333
+ "type": "string",
334
+ "enum": ["active", "paused", "cancelled", "completed"]
335
+ },
336
+ "recurrence": {
337
+ "type": "string",
338
+ "enum": ["at", "every", "cron"]
339
+ },
340
+ "endpoint": {
341
+ "anyOf": [
342
+ {
343
+ "type": "string",
344
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
345
+ },
346
+ {
347
+ "type": "string",
348
+ "const": "none"
349
+ }
350
+ ]
351
+ },
352
+ "text": {
353
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
354
+ "type": "string",
355
+ "maxLength": 256
356
+ },
357
+ "schedule": {
358
+ "type": "string",
359
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
360
+ },
361
+ "dueAfter": {
362
+ "type": "string",
363
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
364
+ },
365
+ "dueBefore": {
366
+ "type": "string",
367
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
368
+ }
369
+ }
370
+ }
371
+ },
372
+ "required": ["kind", "resource", "filter"]
373
+ },
374
+ {
375
+ "type": "object",
376
+ "properties": {
377
+ "kind": {
378
+ "type": "string",
379
+ "const": "all_matching"
380
+ },
381
+ "resource": {
382
+ "type": "string",
383
+ "const": "executions"
384
+ },
385
+ "filter": {
386
+ "type": "object",
387
+ "properties": {
388
+ "external_identifier": {
389
+ "type": "string",
390
+ "minLength": 1,
391
+ "maxLength": 256,
392
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
393
+ },
394
+ "tag": {
395
+ "type": "string",
396
+ "minLength": 1,
397
+ "maxLength": 64,
398
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
399
+ },
400
+ "status": {
401
+ "type": "string",
402
+ "enum": ["active", "paused", "cancelled", "completed"]
403
+ },
404
+ "recurrence": {
405
+ "type": "string",
406
+ "enum": ["at", "every", "cron"]
407
+ },
408
+ "endpoint": {
409
+ "anyOf": [
410
+ {
411
+ "type": "string",
412
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
413
+ },
414
+ {
415
+ "type": "string",
416
+ "const": "none"
417
+ }
418
+ ]
419
+ },
420
+ "text": {
421
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
422
+ "type": "string",
423
+ "maxLength": 256
424
+ },
425
+ "schedule": {
426
+ "type": "string",
427
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
428
+ },
429
+ "from": {
430
+ "type": "string",
431
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
432
+ },
433
+ "to": {
434
+ "type": "string",
435
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
436
+ },
437
+ "outcome": {
438
+ "type": "string",
439
+ "enum": [
440
+ "planned",
441
+ "due",
442
+ "dispatching",
443
+ "retry_wait",
444
+ "ambiguous",
445
+ "succeeded",
446
+ "terminal_failed",
447
+ "cancelled",
448
+ "skipped_stale"
449
+ ]
450
+ }
451
+ }
452
+ }
453
+ },
454
+ "required": ["kind", "resource", "filter"]
455
+ }
456
+ ]
457
+ },
458
+ "operation": {
459
+ "type": "string",
460
+ "const": "reschedule"
461
+ },
462
+ "parameters": {
463
+ "oneOf": [
464
+ {
465
+ "type": "object",
466
+ "properties": {
467
+ "mode": {
468
+ "type": "string",
469
+ "const": "absolute"
470
+ },
471
+ "at": {
472
+ "type": "string",
473
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
474
+ }
475
+ },
476
+ "required": ["mode", "at"]
477
+ },
478
+ {
479
+ "type": "object",
480
+ "properties": {
481
+ "mode": {
482
+ "type": "string",
483
+ "const": "shift_existing"
484
+ },
485
+ "seconds": {
486
+ "type": "integer",
487
+ "minimum": -31536000,
488
+ "maximum": 31536000
489
+ }
490
+ },
491
+ "required": ["mode", "seconds"]
492
+ },
493
+ {
494
+ "type": "object",
495
+ "properties": {
496
+ "mode": {
497
+ "type": "string",
498
+ "const": "delay_from_reference"
499
+ },
500
+ "seconds": {
501
+ "type": "integer",
502
+ "minimum": 1,
503
+ "maximum": 31536000
504
+ }
505
+ },
506
+ "required": ["mode", "seconds"]
507
+ },
508
+ {
509
+ "type": "object",
510
+ "properties": {
511
+ "mode": {
512
+ "type": "string",
513
+ "const": "definition"
514
+ },
515
+ "definition": {
516
+ "anyOf": [
517
+ {
518
+ "type": "object",
519
+ "properties": {
520
+ "everySeconds": {
521
+ "type": "integer",
522
+ "minimum": 60,
523
+ "maximum": 31536000
524
+ }
525
+ },
526
+ "required": ["everySeconds"]
527
+ },
528
+ {
529
+ "type": "object",
530
+ "properties": {
531
+ "cron": {
532
+ "type": "string",
533
+ "minLength": 1,
534
+ "maxLength": 256
535
+ },
536
+ "timeZone": {}
537
+ },
538
+ "required": ["cron", "timeZone"]
539
+ }
540
+ ]
541
+ }
542
+ },
543
+ "required": ["mode", "definition"]
544
+ }
545
+ ]
546
+ }
547
+ },
548
+ "required": ["target", "selection", "operation", "parameters"]
549
+ },
550
+ {
551
+ "type": "object",
552
+ "properties": {
553
+ "target": {
554
+ "type": "string",
555
+ "enum": ["schedules", "parent_schedules", "occurrences"]
556
+ },
557
+ "selection": {
558
+ "anyOf": [
559
+ {
560
+ "type": "object",
561
+ "properties": {
562
+ "kind": {
563
+ "type": "string",
564
+ "const": "ids"
565
+ },
566
+ "resource": {
567
+ "type": "string",
568
+ "const": "schedules"
569
+ },
570
+ "ids": {
571
+ "maxItems": 1000000,
572
+ "type": "array",
573
+ "items": {
574
+ "type": "string",
575
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
576
+ }
577
+ }
578
+ },
579
+ "required": ["kind", "resource", "ids"]
580
+ },
581
+ {
582
+ "type": "object",
583
+ "properties": {
584
+ "kind": {
585
+ "type": "string",
586
+ "const": "ids"
587
+ },
588
+ "resource": {
589
+ "type": "string",
590
+ "const": "executions"
591
+ },
592
+ "ids": {
593
+ "maxItems": 1000000,
594
+ "type": "array",
595
+ "items": {
596
+ "type": "string",
597
+ "pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
598
+ }
599
+ }
600
+ },
601
+ "required": ["kind", "resource", "ids"]
602
+ },
603
+ {
604
+ "type": "object",
605
+ "properties": {
606
+ "kind": {
607
+ "type": "string",
608
+ "const": "all_matching"
609
+ },
610
+ "resource": {
611
+ "type": "string",
612
+ "const": "schedules"
613
+ },
614
+ "filter": {
615
+ "type": "object",
616
+ "properties": {
617
+ "external_identifier": {
618
+ "type": "string",
619
+ "minLength": 1,
620
+ "maxLength": 256,
621
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
622
+ },
623
+ "tag": {
624
+ "type": "string",
625
+ "minLength": 1,
626
+ "maxLength": 64,
627
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
628
+ },
629
+ "status": {
630
+ "type": "string",
631
+ "enum": ["active", "paused", "cancelled", "completed"]
632
+ },
633
+ "recurrence": {
634
+ "type": "string",
635
+ "enum": ["at", "every", "cron"]
636
+ },
637
+ "endpoint": {
638
+ "anyOf": [
639
+ {
640
+ "type": "string",
641
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
642
+ },
643
+ {
644
+ "type": "string",
645
+ "const": "none"
646
+ }
647
+ ]
648
+ },
649
+ "text": {
650
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
651
+ "type": "string",
652
+ "maxLength": 256
653
+ },
654
+ "schedule": {
655
+ "type": "string",
656
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
657
+ },
658
+ "dueAfter": {
659
+ "type": "string",
660
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
661
+ },
662
+ "dueBefore": {
663
+ "type": "string",
664
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
665
+ }
666
+ }
667
+ }
668
+ },
669
+ "required": ["kind", "resource", "filter"]
670
+ },
671
+ {
672
+ "type": "object",
673
+ "properties": {
674
+ "kind": {
675
+ "type": "string",
676
+ "const": "all_matching"
677
+ },
678
+ "resource": {
679
+ "type": "string",
680
+ "const": "executions"
681
+ },
682
+ "filter": {
683
+ "type": "object",
684
+ "properties": {
685
+ "external_identifier": {
686
+ "type": "string",
687
+ "minLength": 1,
688
+ "maxLength": 256,
689
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
690
+ },
691
+ "tag": {
692
+ "type": "string",
693
+ "minLength": 1,
694
+ "maxLength": 64,
695
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
696
+ },
697
+ "status": {
698
+ "type": "string",
699
+ "enum": ["active", "paused", "cancelled", "completed"]
700
+ },
701
+ "recurrence": {
702
+ "type": "string",
703
+ "enum": ["at", "every", "cron"]
704
+ },
705
+ "endpoint": {
706
+ "anyOf": [
707
+ {
708
+ "type": "string",
709
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
710
+ },
711
+ {
712
+ "type": "string",
713
+ "const": "none"
714
+ }
715
+ ]
716
+ },
717
+ "text": {
718
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
719
+ "type": "string",
720
+ "maxLength": 256
721
+ },
722
+ "schedule": {
723
+ "type": "string",
724
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
725
+ },
726
+ "from": {
727
+ "type": "string",
728
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
729
+ },
730
+ "to": {
731
+ "type": "string",
732
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
733
+ },
734
+ "outcome": {
735
+ "type": "string",
736
+ "enum": [
737
+ "planned",
738
+ "due",
739
+ "dispatching",
740
+ "retry_wait",
741
+ "ambiguous",
742
+ "succeeded",
743
+ "terminal_failed",
744
+ "cancelled",
745
+ "skipped_stale"
746
+ ]
747
+ }
748
+ }
749
+ }
750
+ },
751
+ "required": ["kind", "resource", "filter"]
752
+ }
753
+ ]
754
+ },
755
+ "operation": {
756
+ "type": "string",
757
+ "const": "cancel"
758
+ },
759
+ "parameters": {
760
+ "type": "object",
761
+ "properties": {}
762
+ }
763
+ },
764
+ "required": ["target", "selection", "operation", "parameters"]
765
+ },
766
+ {
767
+ "type": "object",
768
+ "properties": {
769
+ "target": {
770
+ "type": "string",
771
+ "enum": ["schedules", "parent_schedules", "occurrences"]
772
+ },
773
+ "selection": {
774
+ "anyOf": [
775
+ {
776
+ "type": "object",
777
+ "properties": {
778
+ "kind": {
779
+ "type": "string",
780
+ "const": "ids"
781
+ },
782
+ "resource": {
783
+ "type": "string",
784
+ "const": "schedules"
785
+ },
786
+ "ids": {
787
+ "maxItems": 1000000,
788
+ "type": "array",
789
+ "items": {
790
+ "type": "string",
791
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
792
+ }
793
+ }
794
+ },
795
+ "required": ["kind", "resource", "ids"]
796
+ },
797
+ {
798
+ "type": "object",
799
+ "properties": {
800
+ "kind": {
801
+ "type": "string",
802
+ "const": "ids"
803
+ },
804
+ "resource": {
805
+ "type": "string",
806
+ "const": "executions"
807
+ },
808
+ "ids": {
809
+ "maxItems": 1000000,
810
+ "type": "array",
811
+ "items": {
812
+ "type": "string",
813
+ "pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
814
+ }
815
+ }
816
+ },
817
+ "required": ["kind", "resource", "ids"]
818
+ },
819
+ {
820
+ "type": "object",
821
+ "properties": {
822
+ "kind": {
823
+ "type": "string",
824
+ "const": "all_matching"
825
+ },
826
+ "resource": {
827
+ "type": "string",
828
+ "const": "schedules"
829
+ },
830
+ "filter": {
831
+ "type": "object",
832
+ "properties": {
833
+ "external_identifier": {
834
+ "type": "string",
835
+ "minLength": 1,
836
+ "maxLength": 256,
837
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
838
+ },
839
+ "tag": {
840
+ "type": "string",
841
+ "minLength": 1,
842
+ "maxLength": 64,
843
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
844
+ },
845
+ "status": {
846
+ "type": "string",
847
+ "enum": ["active", "paused", "cancelled", "completed"]
848
+ },
849
+ "recurrence": {
850
+ "type": "string",
851
+ "enum": ["at", "every", "cron"]
852
+ },
853
+ "endpoint": {
854
+ "anyOf": [
855
+ {
856
+ "type": "string",
857
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
858
+ },
859
+ {
860
+ "type": "string",
861
+ "const": "none"
862
+ }
863
+ ]
864
+ },
865
+ "text": {
866
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
867
+ "type": "string",
868
+ "maxLength": 256
869
+ },
870
+ "schedule": {
871
+ "type": "string",
872
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
873
+ },
874
+ "dueAfter": {
875
+ "type": "string",
876
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
877
+ },
878
+ "dueBefore": {
879
+ "type": "string",
880
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
881
+ }
882
+ }
883
+ }
884
+ },
885
+ "required": ["kind", "resource", "filter"]
886
+ },
887
+ {
888
+ "type": "object",
889
+ "properties": {
890
+ "kind": {
891
+ "type": "string",
892
+ "const": "all_matching"
893
+ },
894
+ "resource": {
895
+ "type": "string",
896
+ "const": "executions"
897
+ },
898
+ "filter": {
899
+ "type": "object",
900
+ "properties": {
901
+ "external_identifier": {
902
+ "type": "string",
903
+ "minLength": 1,
904
+ "maxLength": 256,
905
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
906
+ },
907
+ "tag": {
908
+ "type": "string",
909
+ "minLength": 1,
910
+ "maxLength": 64,
911
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
912
+ },
913
+ "status": {
914
+ "type": "string",
915
+ "enum": ["active", "paused", "cancelled", "completed"]
916
+ },
917
+ "recurrence": {
918
+ "type": "string",
919
+ "enum": ["at", "every", "cron"]
920
+ },
921
+ "endpoint": {
922
+ "anyOf": [
923
+ {
924
+ "type": "string",
925
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
926
+ },
927
+ {
928
+ "type": "string",
929
+ "const": "none"
930
+ }
931
+ ]
932
+ },
933
+ "text": {
934
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
935
+ "type": "string",
936
+ "maxLength": 256
937
+ },
938
+ "schedule": {
939
+ "type": "string",
940
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
941
+ },
942
+ "from": {
943
+ "type": "string",
944
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
945
+ },
946
+ "to": {
947
+ "type": "string",
948
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
949
+ },
950
+ "outcome": {
951
+ "type": "string",
952
+ "enum": [
953
+ "planned",
954
+ "due",
955
+ "dispatching",
956
+ "retry_wait",
957
+ "ambiguous",
958
+ "succeeded",
959
+ "terminal_failed",
960
+ "cancelled",
961
+ "skipped_stale"
962
+ ]
963
+ }
964
+ }
965
+ }
966
+ },
967
+ "required": ["kind", "resource", "filter"]
968
+ }
969
+ ]
970
+ },
971
+ "operation": {
972
+ "type": "string",
973
+ "const": "pause"
974
+ },
975
+ "parameters": {
976
+ "type": "object",
977
+ "properties": {}
978
+ }
979
+ },
980
+ "required": ["target", "selection", "operation", "parameters"]
981
+ },
982
+ {
983
+ "type": "object",
984
+ "properties": {
985
+ "target": {
986
+ "type": "string",
987
+ "enum": ["schedules", "parent_schedules", "occurrences"]
988
+ },
989
+ "selection": {
990
+ "anyOf": [
991
+ {
992
+ "type": "object",
993
+ "properties": {
994
+ "kind": {
995
+ "type": "string",
996
+ "const": "ids"
997
+ },
998
+ "resource": {
999
+ "type": "string",
1000
+ "const": "schedules"
1001
+ },
1002
+ "ids": {
1003
+ "maxItems": 1000000,
1004
+ "type": "array",
1005
+ "items": {
1006
+ "type": "string",
1007
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1008
+ }
1009
+ }
1010
+ },
1011
+ "required": ["kind", "resource", "ids"]
1012
+ },
1013
+ {
1014
+ "type": "object",
1015
+ "properties": {
1016
+ "kind": {
1017
+ "type": "string",
1018
+ "const": "ids"
1019
+ },
1020
+ "resource": {
1021
+ "type": "string",
1022
+ "const": "executions"
1023
+ },
1024
+ "ids": {
1025
+ "maxItems": 1000000,
1026
+ "type": "array",
1027
+ "items": {
1028
+ "type": "string",
1029
+ "pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1030
+ }
1031
+ }
1032
+ },
1033
+ "required": ["kind", "resource", "ids"]
1034
+ },
1035
+ {
1036
+ "type": "object",
1037
+ "properties": {
1038
+ "kind": {
1039
+ "type": "string",
1040
+ "const": "all_matching"
1041
+ },
1042
+ "resource": {
1043
+ "type": "string",
1044
+ "const": "schedules"
1045
+ },
1046
+ "filter": {
1047
+ "type": "object",
1048
+ "properties": {
1049
+ "external_identifier": {
1050
+ "type": "string",
1051
+ "minLength": 1,
1052
+ "maxLength": 256,
1053
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
1054
+ },
1055
+ "tag": {
1056
+ "type": "string",
1057
+ "minLength": 1,
1058
+ "maxLength": 64,
1059
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
1060
+ },
1061
+ "status": {
1062
+ "type": "string",
1063
+ "enum": ["active", "paused", "cancelled", "completed"]
1064
+ },
1065
+ "recurrence": {
1066
+ "type": "string",
1067
+ "enum": ["at", "every", "cron"]
1068
+ },
1069
+ "endpoint": {
1070
+ "anyOf": [
1071
+ {
1072
+ "type": "string",
1073
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1074
+ },
1075
+ {
1076
+ "type": "string",
1077
+ "const": "none"
1078
+ }
1079
+ ]
1080
+ },
1081
+ "text": {
1082
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
1083
+ "type": "string",
1084
+ "maxLength": 256
1085
+ },
1086
+ "schedule": {
1087
+ "type": "string",
1088
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1089
+ },
1090
+ "dueAfter": {
1091
+ "type": "string",
1092
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1093
+ },
1094
+ "dueBefore": {
1095
+ "type": "string",
1096
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1097
+ }
1098
+ }
1099
+ }
1100
+ },
1101
+ "required": ["kind", "resource", "filter"]
1102
+ },
1103
+ {
1104
+ "type": "object",
1105
+ "properties": {
1106
+ "kind": {
1107
+ "type": "string",
1108
+ "const": "all_matching"
1109
+ },
1110
+ "resource": {
1111
+ "type": "string",
1112
+ "const": "executions"
1113
+ },
1114
+ "filter": {
1115
+ "type": "object",
1116
+ "properties": {
1117
+ "external_identifier": {
1118
+ "type": "string",
1119
+ "minLength": 1,
1120
+ "maxLength": 256,
1121
+ "description": "Host application identifier, matched exactly and case-sensitively; at most 256 UTF-8 bytes. Readable by schedule readers; do not include secrets."
1122
+ },
1123
+ "tag": {
1124
+ "type": "string",
1125
+ "minLength": 1,
1126
+ "maxLength": 64,
1127
+ "description": "An exact, case-sensitive tag of at most 64 UTF-8 bytes."
1128
+ },
1129
+ "status": {
1130
+ "type": "string",
1131
+ "enum": ["active", "paused", "cancelled", "completed"]
1132
+ },
1133
+ "recurrence": {
1134
+ "type": "string",
1135
+ "enum": ["at", "every", "cron"]
1136
+ },
1137
+ "endpoint": {
1138
+ "anyOf": [
1139
+ {
1140
+ "type": "string",
1141
+ "pattern": "^ep_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1142
+ },
1143
+ {
1144
+ "type": "string",
1145
+ "const": "none"
1146
+ }
1147
+ ]
1148
+ },
1149
+ "text": {
1150
+ "description": "Case-insensitive literal substring of schedule name, endpoint address or schedule identifier.",
1151
+ "type": "string",
1152
+ "maxLength": 256
1153
+ },
1154
+ "schedule": {
1155
+ "type": "string",
1156
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1157
+ },
1158
+ "from": {
1159
+ "type": "string",
1160
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1161
+ },
1162
+ "to": {
1163
+ "type": "string",
1164
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1165
+ },
1166
+ "outcome": {
1167
+ "type": "string",
1168
+ "enum": [
1169
+ "planned",
1170
+ "due",
1171
+ "dispatching",
1172
+ "retry_wait",
1173
+ "ambiguous",
1174
+ "succeeded",
1175
+ "terminal_failed",
1176
+ "cancelled",
1177
+ "skipped_stale"
1178
+ ]
1179
+ }
1180
+ }
1181
+ }
1182
+ },
1183
+ "required": ["kind", "resource", "filter"]
1184
+ }
1185
+ ]
1186
+ },
1187
+ "operation": {
1188
+ "type": "string",
1189
+ "const": "resume"
1190
+ },
1191
+ "parameters": {
1192
+ "type": "object",
1193
+ "properties": {}
1194
+ }
1195
+ },
1196
+ "required": ["target", "selection", "operation", "parameters"]
1197
+ }
1198
+ ]
1199
+ },
1200
+ "state": {
1201
+ "type": "string",
1202
+ "enum": [
1203
+ "preparing",
1204
+ "awaiting_confirmation",
1205
+ "queued",
1206
+ "running",
1207
+ "paused",
1208
+ "blocked",
1209
+ "completed",
1210
+ "completed_with_failures",
1211
+ "cancelled",
1212
+ "expired",
1213
+ "refused"
1214
+ ]
1215
+ },
1216
+ "version": {
1217
+ "type": "integer",
1218
+ "exclusiveMinimum": 0,
1219
+ "maximum": 9007199254740991
1220
+ },
1221
+ "createdAt": {
1222
+ "type": "string",
1223
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1224
+ },
1225
+ "updatedAt": {
1226
+ "type": "string",
1227
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1228
+ },
1229
+ "referenceAt": {
1230
+ "type": "string",
1231
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1232
+ },
1233
+ "preparationExpiresAt": {
1234
+ "type": "string",
1235
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1236
+ },
1237
+ "previewExpiresAt": {
1238
+ "type": "string",
1239
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1240
+ },
1241
+ "executionExpiresAt": {
1242
+ "type": "string",
1243
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1244
+ },
1245
+ "resultsExpireAt": {
1246
+ "type": "string",
1247
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1248
+ },
1249
+ "intentDigest": {
1250
+ "type": "string",
1251
+ "pattern": "^[a-f0-9]{64}$"
1252
+ },
1253
+ "complete": {
1254
+ "type": "boolean"
1255
+ },
1256
+ "counts": {
1257
+ "type": "object",
1258
+ "properties": {
1259
+ "matched": {
1260
+ "type": "integer",
1261
+ "minimum": 0,
1262
+ "maximum": 9007199254740991
1263
+ },
1264
+ "eligible": {
1265
+ "type": "integer",
1266
+ "minimum": 0,
1267
+ "maximum": 9007199254740991
1268
+ },
1269
+ "ineligible": {
1270
+ "type": "integer",
1271
+ "minimum": 0,
1272
+ "maximum": 9007199254740991
1273
+ },
1274
+ "pending": {
1275
+ "type": "integer",
1276
+ "minimum": 0,
1277
+ "maximum": 9007199254740991
1278
+ },
1279
+ "running": {
1280
+ "type": "integer",
1281
+ "minimum": 0,
1282
+ "maximum": 9007199254740991
1283
+ },
1284
+ "succeeded": {
1285
+ "type": "integer",
1286
+ "minimum": 0,
1287
+ "maximum": 9007199254740991
1288
+ },
1289
+ "noOp": {
1290
+ "type": "integer",
1291
+ "minimum": 0,
1292
+ "maximum": 9007199254740991
1293
+ },
1294
+ "skipped": {
1295
+ "type": "integer",
1296
+ "minimum": 0,
1297
+ "maximum": 9007199254740991
1298
+ },
1299
+ "conflicted": {
1300
+ "type": "integer",
1301
+ "minimum": 0,
1302
+ "maximum": 9007199254740991
1303
+ },
1304
+ "failed": {
1305
+ "type": "integer",
1306
+ "minimum": 0,
1307
+ "maximum": 9007199254740991
1308
+ },
1309
+ "cancelled": {
1310
+ "type": "integer",
1311
+ "minimum": 0,
1312
+ "maximum": 9007199254740991
1313
+ }
1314
+ },
1315
+ "required": [
1316
+ "matched",
1317
+ "eligible",
1318
+ "ineligible",
1319
+ "pending",
1320
+ "running",
1321
+ "succeeded",
1322
+ "noOp",
1323
+ "skipped",
1324
+ "conflicted",
1325
+ "failed",
1326
+ "cancelled"
1327
+ ]
1328
+ },
1329
+ "reasons": {
1330
+ "type": "array",
1331
+ "items": {
1332
+ "type": "object",
1333
+ "properties": {
1334
+ "reason": {
1335
+ "type": "string",
1336
+ "enum": [
1337
+ "eligible",
1338
+ "already_active",
1339
+ "already_paused",
1340
+ "already_cancelled",
1341
+ "invalid_state",
1342
+ "unsupported_target",
1343
+ "expired_input",
1344
+ "unauthorized",
1345
+ "concurrently_changed",
1346
+ "past_time",
1347
+ "attempt_limit",
1348
+ "operation_failed",
1349
+ "transient_failure",
1350
+ "selection_too_large",
1351
+ "preparation_incomplete",
1352
+ "preview_expired",
1353
+ "job_expired",
1354
+ "job_cancelled",
1355
+ "quota_exceeded",
1356
+ "spending_limit",
1357
+ "in_flight"
1358
+ ]
1359
+ },
1360
+ "count": {
1361
+ "type": "integer",
1362
+ "minimum": 0,
1363
+ "maximum": 9007199254740991
1364
+ }
1365
+ },
1366
+ "required": ["reason", "count"]
1367
+ }
1368
+ },
1369
+ "warnings": {
1370
+ "type": "array",
1371
+ "items": {
1372
+ "type": "string"
1373
+ }
1374
+ },
1375
+ "samples": {
1376
+ "maxItems": 10,
1377
+ "type": "array",
1378
+ "items": {
1379
+ "type": "object",
1380
+ "properties": {
1381
+ "id": {
1382
+ "type": "string",
1383
+ "minLength": 1
1384
+ },
1385
+ "jobId": {
1386
+ "type": "string",
1387
+ "pattern": "^bjo_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1388
+ },
1389
+ "scheduleId": {
1390
+ "type": "string",
1391
+ "pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1392
+ },
1393
+ "occurrenceId": {
1394
+ "type": "string",
1395
+ "pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1396
+ },
1397
+ "state": {
1398
+ "type": "string",
1399
+ "enum": [
1400
+ "pending",
1401
+ "running",
1402
+ "succeeded",
1403
+ "no_op",
1404
+ "skipped",
1405
+ "conflicted",
1406
+ "failed",
1407
+ "cancelled"
1408
+ ]
1409
+ },
1410
+ "reason": {
1411
+ "type": "string",
1412
+ "enum": [
1413
+ "eligible",
1414
+ "already_active",
1415
+ "already_paused",
1416
+ "already_cancelled",
1417
+ "invalid_state",
1418
+ "unsupported_target",
1419
+ "expired_input",
1420
+ "unauthorized",
1421
+ "concurrently_changed",
1422
+ "past_time",
1423
+ "attempt_limit",
1424
+ "operation_failed",
1425
+ "transient_failure",
1426
+ "selection_too_large",
1427
+ "preparation_incomplete",
1428
+ "preview_expired",
1429
+ "job_expired",
1430
+ "job_cancelled",
1431
+ "quota_exceeded",
1432
+ "spending_limit",
1433
+ "in_flight"
1434
+ ]
1435
+ },
1436
+ "eligible": {
1437
+ "type": "boolean"
1438
+ },
1439
+ "retryable": {
1440
+ "type": "boolean"
1441
+ },
1442
+ "fence": {
1443
+ "type": "string",
1444
+ "minLength": 1
1445
+ },
1446
+ "before": {
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "status": {
1450
+ "type": "string"
1451
+ },
1452
+ "plannedFor": {
1453
+ "type": "string",
1454
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1455
+ },
1456
+ "recurrence": {
1457
+ "type": "string"
1458
+ },
1459
+ "timeZone": {
1460
+ "type": "string"
1461
+ },
1462
+ "affectedFutureRuns": {
1463
+ "type": "integer",
1464
+ "minimum": 0,
1465
+ "maximum": 9007199254740991
1466
+ },
1467
+ "latenessPolicy": {
1468
+ "type": "string",
1469
+ "enum": ["skipAhead", "catchUp"]
1470
+ },
1471
+ "maxStalenessSeconds": {
1472
+ "type": "integer",
1473
+ "minimum": 0,
1474
+ "maximum": 9007199254740991
1475
+ },
1476
+ "overlapPolicy": {
1477
+ "type": "string",
1478
+ "enum": ["skip", "queue"]
1479
+ },
1480
+ "nextRunNote": {
1481
+ "type": "string",
1482
+ "minLength": 1,
1483
+ "maxLength": 1000
1484
+ }
1485
+ }
1486
+ },
1487
+ "after": {
1488
+ "type": "object",
1489
+ "properties": {
1490
+ "status": {
1491
+ "type": "string"
1492
+ },
1493
+ "plannedFor": {
1494
+ "type": "string",
1495
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1496
+ },
1497
+ "recurrence": {
1498
+ "type": "string"
1499
+ },
1500
+ "timeZone": {
1501
+ "type": "string"
1502
+ },
1503
+ "affectedFutureRuns": {
1504
+ "type": "integer",
1505
+ "minimum": 0,
1506
+ "maximum": 9007199254740991
1507
+ },
1508
+ "latenessPolicy": {
1509
+ "type": "string",
1510
+ "enum": ["skipAhead", "catchUp"]
1511
+ },
1512
+ "maxStalenessSeconds": {
1513
+ "type": "integer",
1514
+ "minimum": 0,
1515
+ "maximum": 9007199254740991
1516
+ },
1517
+ "overlapPolicy": {
1518
+ "type": "string",
1519
+ "enum": ["skip", "queue"]
1520
+ },
1521
+ "nextRunNote": {
1522
+ "type": "string",
1523
+ "minLength": 1,
1524
+ "maxLength": 1000
1525
+ }
1526
+ }
1527
+ },
1528
+ "attemptId": {
1529
+ "type": "string",
1530
+ "pattern": "^att_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
1531
+ },
1532
+ "actionId": {
1533
+ "type": "string",
1534
+ "minLength": 1
1535
+ },
1536
+ "updatedAt": {
1537
+ "type": "string",
1538
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1539
+ },
1540
+ "expiresAt": {
1541
+ "type": "string",
1542
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1543
+ }
1544
+ },
1545
+ "required": [
1546
+ "id",
1547
+ "jobId",
1548
+ "scheduleId",
1549
+ "state",
1550
+ "reason",
1551
+ "eligible",
1552
+ "retryable",
1553
+ "fence",
1554
+ "before",
1555
+ "updatedAt"
1556
+ ]
1557
+ }
1558
+ },
1559
+ "limits": {
1560
+ "type": "object",
1561
+ "properties": {
1562
+ "maxTargets": {
1563
+ "type": "integer",
1564
+ "exclusiveMinimum": 0,
1565
+ "maximum": 9007199254740991
1566
+ },
1567
+ "executionLifetimeSeconds": {
1568
+ "type": "integer",
1569
+ "exclusiveMinimum": 0,
1570
+ "maximum": 9007199254740991
1571
+ },
1572
+ "previewLifetimeSeconds": {
1573
+ "type": "integer",
1574
+ "exclusiveMinimum": 0,
1575
+ "maximum": 9007199254740991
1576
+ },
1577
+ "resultRetentionSeconds": {
1578
+ "type": "integer",
1579
+ "minimum": 0,
1580
+ "maximum": 9007199254740991
1581
+ },
1582
+ "batchSize": {
1583
+ "type": "integer",
1584
+ "exclusiveMinimum": 0,
1585
+ "maximum": 9007199254740991
1586
+ },
1587
+ "workerConcurrency": {
1588
+ "type": "integer",
1589
+ "exclusiveMinimum": 0,
1590
+ "maximum": 9007199254740991
1591
+ }
1592
+ },
1593
+ "required": [
1594
+ "maxTargets",
1595
+ "executionLifetimeSeconds",
1596
+ "previewLifetimeSeconds",
1597
+ "resultRetentionSeconds",
1598
+ "batchSize",
1599
+ "workerConcurrency"
1600
+ ]
1601
+ },
1602
+ "billing": {
1603
+ "type": "object",
1604
+ "properties": {
1605
+ "additionalAttemptsMinimum": {
1606
+ "type": "integer",
1607
+ "minimum": 0,
1608
+ "maximum": 9007199254740991
1609
+ },
1610
+ "additionalAttemptsMaximum": {
1611
+ "type": "integer",
1612
+ "minimum": 0,
1613
+ "maximum": 9007199254740991
1614
+ },
1615
+ "currentLimits": {
1616
+ "type": "object",
1617
+ "properties": {
1618
+ "capturedAt": {
1619
+ "type": "string",
1620
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
1621
+ },
1622
+ "billingMode": {
1623
+ "type": "string",
1624
+ "enum": ["disabled", "shadow", "enforced"]
1625
+ },
1626
+ "attemptsPerOccurrence": {
1627
+ "type": "integer",
1628
+ "exclusiveMinimum": 0,
1629
+ "maximum": 9007199254740991
1630
+ },
1631
+ "dailyAttemptQuota": {
1632
+ "type": "string",
1633
+ "const": "none"
1634
+ },
1635
+ "availableCreditMicrodollars": {
1636
+ "type": "string",
1637
+ "pattern": "^(?:0|[1-9]\\d*)$"
1638
+ },
1639
+ "spendingCapMicrodollars": {
1640
+ "anyOf": [
1641
+ {
1642
+ "type": "string",
1643
+ "pattern": "^(?:0|[1-9]\\d*)$"
1644
+ },
1645
+ {
1646
+ "type": "null"
1647
+ }
1648
+ ]
1649
+ },
1650
+ "remainingToSpendingCapMicrodollars": {
1651
+ "type": "string",
1652
+ "pattern": "^(?:0|[1-9]\\d*)$"
1653
+ }
1654
+ },
1655
+ "required": [
1656
+ "capturedAt",
1657
+ "billingMode",
1658
+ "attemptsPerOccurrence",
1659
+ "dailyAttemptQuota"
1660
+ ]
1661
+ },
1662
+ "exactChargeKnown": {
1663
+ "type": "boolean",
1664
+ "const": false
1665
+ },
1666
+ "note": {
1667
+ "type": "string"
1668
+ }
1669
+ },
1670
+ "required": ["additionalAttemptsMinimum", "exactChargeKnown", "note"]
1671
+ },
1672
+ "reason": {
1673
+ "type": "string",
1674
+ "enum": [
1675
+ "eligible",
1676
+ "already_active",
1677
+ "already_paused",
1678
+ "already_cancelled",
1679
+ "invalid_state",
1680
+ "unsupported_target",
1681
+ "expired_input",
1682
+ "unauthorized",
1683
+ "concurrently_changed",
1684
+ "past_time",
1685
+ "attempt_limit",
1686
+ "operation_failed",
1687
+ "transient_failure",
1688
+ "selection_too_large",
1689
+ "preparation_incomplete",
1690
+ "preview_expired",
1691
+ "job_expired",
1692
+ "job_cancelled",
1693
+ "quota_exceeded",
1694
+ "spending_limit",
1695
+ "in_flight"
1696
+ ]
1697
+ }
1698
+ },
1699
+ "required": [
1700
+ "id",
1701
+ "authority",
1702
+ "intent",
1703
+ "state",
1704
+ "version",
1705
+ "createdAt",
1706
+ "updatedAt",
1707
+ "referenceAt",
1708
+ "preparationExpiresAt",
1709
+ "complete",
1710
+ "counts",
1711
+ "reasons",
1712
+ "warnings",
1713
+ "samples",
1714
+ "limits",
1715
+ "billing"
1716
+ ]
1717
+ }