@meshery/schemas 1.3.72 → 1.3.73

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 (46) hide show
  1. package/dist/cloudApi.d.mts +23587 -20833
  2. package/dist/cloudApi.d.ts +23587 -20833
  3. package/dist/cloudApi.js +1 -1
  4. package/dist/cloudApi.mjs +1 -1
  5. package/dist/constructs/v1beta2/schedule/Schedule.d.ts +4 -0
  6. package/dist/constructs/v1beta2/schedule/ScheduleSchema.js +7 -4
  7. package/dist/constructs/v1beta2/schedule/ScheduleSchema.mjs +7 -4
  8. package/dist/constructs/v1beta3/academy/Academy.d.ts +9 -9
  9. package/dist/constructs/v1beta3/academy/AcademySchema.js +2 -2
  10. package/dist/constructs/v1beta3/academy/AcademySchema.mjs +2 -2
  11. package/dist/constructs/v1beta3/claim/Claim.d.ts +919 -0
  12. package/dist/constructs/v1beta3/claim/ClaimSchema.d.ts +2 -0
  13. package/dist/constructs/v1beta3/claim/ClaimSchema.js +88 -0
  14. package/dist/constructs/v1beta3/claim/ClaimSchema.mjs +88 -0
  15. package/dist/constructs/v1beta3/connection/Connection.d.ts +5 -0
  16. package/dist/constructs/v1beta3/connection/ConnectionSchema.js +1 -1
  17. package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +1 -1
  18. package/dist/constructs/v1beta3/{blowhorn_content/BlowhornContent.d.ts → content_piece/ContentPiece.d.ts} +101 -83
  19. package/dist/constructs/v1beta3/content_piece/ContentPieceSchema.d.ts +2 -0
  20. package/dist/constructs/v1beta3/content_piece/ContentPieceSchema.js +48 -0
  21. package/dist/constructs/v1beta3/content_piece/ContentPieceSchema.mjs +48 -0
  22. package/dist/constructs/v1beta3/invitation/Invitation.d.ts +33 -33
  23. package/dist/constructs/v1beta3/invitation/InvitationSchema.js +1 -1
  24. package/dist/constructs/v1beta3/invitation/InvitationSchema.mjs +1 -1
  25. package/dist/constructs/v1beta3/schedule/Schedule.d.ts +3804 -0
  26. package/dist/constructs/v1beta3/schedule/Schedule.js +1 -0
  27. package/dist/constructs/v1beta3/schedule/Schedule.mjs +0 -0
  28. package/dist/constructs/v1beta3/schedule/ScheduleSchema.d.ts +2 -0
  29. package/dist/constructs/v1beta3/schedule/ScheduleSchema.js +61 -0
  30. package/dist/constructs/v1beta3/schedule/ScheduleSchema.mjs +61 -0
  31. package/dist/index.d.mts +17 -1
  32. package/dist/index.d.ts +17 -1
  33. package/dist/index.js +2 -2
  34. package/dist/index.mjs +2 -2
  35. package/package.json +1 -1
  36. package/dist/constructs/v1beta3/blowhorn_content/BlowhornContentSchema.d.ts +0 -2
  37. package/dist/constructs/v1beta3/blowhorn_content/BlowhornContentSchema.js +0 -43
  38. package/dist/constructs/v1beta3/blowhorn_content/BlowhornContentSchema.mjs +0 -43
  39. package/dist/constructs/v1beta3/job_lease/JobLease.d.ts +0 -2570
  40. package/dist/constructs/v1beta3/job_lease/JobLeaseSchema.d.ts +0 -2
  41. package/dist/constructs/v1beta3/job_lease/JobLeaseSchema.js +0 -83
  42. package/dist/constructs/v1beta3/job_lease/JobLeaseSchema.mjs +0 -83
  43. /package/dist/constructs/v1beta3/{blowhorn_content/BlowhornContent.js → claim/Claim.js} +0 -0
  44. /package/dist/constructs/v1beta3/{blowhorn_content/BlowhornContent.mjs → claim/Claim.mjs} +0 -0
  45. /package/dist/constructs/v1beta3/{job_lease/JobLease.js → content_piece/ContentPiece.js} +0 -0
  46. /package/dist/constructs/v1beta3/{job_lease/JobLease.mjs → content_piece/ContentPiece.mjs} +0 -0
@@ -0,0 +1,3804 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/api/schedules": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * List schedules
16
+ * @description Returns a paginated list of the schedules in the organization of the
17
+ * authenticated session, optionally filtered by workspace or status. Each
18
+ * schedule carries its live claim, when one is held.
19
+ */
20
+ get: operations["listSchedules"];
21
+ put?: never;
22
+ /**
23
+ * Create a schedule
24
+ * @description Creates a schedule in the organization of the authenticated session. The
25
+ * claim, the server-managed status values (`assigned`, `claimed`, `running`)
26
+ * and the pause fields are refused here.
27
+ */
28
+ post: operations["createSchedule"];
29
+ delete?: never;
30
+ options?: never;
31
+ head?: never;
32
+ patch?: never;
33
+ trace?: never;
34
+ };
35
+ "/api/schedules/claim": {
36
+ parameters: {
37
+ query?: never;
38
+ header?: never;
39
+ path?: never;
40
+ cookie?: never;
41
+ };
42
+ get?: never;
43
+ put?: never;
44
+ /**
45
+ * Claim the next due schedule
46
+ * @description Claims one due, enabled, unclaimed and unpaused schedule for `claimant`
47
+ * in a single server-side statement, optionally restricted to one
48
+ * workspace, and answers it with its new claim. When no schedule
49
+ * qualifies the answer is 204: a lost race is never an error.
50
+ * `ignorePause` is the single operator override over the pause scopes.
51
+ */
52
+ post: operations["claimNextSchedule"];
53
+ delete?: never;
54
+ options?: never;
55
+ head?: never;
56
+ patch?: never;
57
+ trace?: never;
58
+ };
59
+ "/api/schedules/pause": {
60
+ parameters: {
61
+ query?: never;
62
+ header?: never;
63
+ path?: never;
64
+ cookie?: never;
65
+ };
66
+ /**
67
+ * Get the organization-wide schedule pause
68
+ * @description Returns the organization-wide pause, or 204 when every schedule in the
69
+ * organization may be claimed.
70
+ */
71
+ get: operations["getSchedulePause"];
72
+ /**
73
+ * Pause every schedule in the organization
74
+ * @description Sets the organization-wide pause. While it exists no schedule in the
75
+ * organization is claimed unless the claim request carries `ignorePause`.
76
+ * Setting it again updates the reason and keeps the original time.
77
+ */
78
+ put: operations["setSchedulePause"];
79
+ post?: never;
80
+ /**
81
+ * Lift the organization-wide schedule pause
82
+ * @description Lifts the organization-wide pause. Lifting a pause that does not exist
83
+ * is a no-op.
84
+ */
85
+ delete: operations["clearSchedulePause"];
86
+ options?: never;
87
+ head?: never;
88
+ patch?: never;
89
+ trace?: never;
90
+ };
91
+ "/api/schedules/{scheduleId}": {
92
+ parameters: {
93
+ query?: never;
94
+ header?: never;
95
+ path?: never;
96
+ cookie?: never;
97
+ };
98
+ /**
99
+ * Get a schedule by ID
100
+ * @description Returns the schedule with its live claim, when one is held.
101
+ */
102
+ get: operations["getScheduleById"];
103
+ /**
104
+ * Update a schedule
105
+ * @description Updates the client-settable fields of a schedule. The claim, the
106
+ * server-managed status values and the pause fields are refused here.
107
+ */
108
+ put: operations["updateSchedule"];
109
+ post?: never;
110
+ /**
111
+ * Delete a schedule
112
+ * @description Soft-deletes the schedule. A schedule with a live claim is deleted all the same; its claim is released.
113
+ */
114
+ delete: operations["deleteScheduleById"];
115
+ options?: never;
116
+ head?: never;
117
+ patch?: never;
118
+ trace?: never;
119
+ };
120
+ "/api/schedules/{scheduleId}/claim": {
121
+ parameters: {
122
+ query?: never;
123
+ header?: never;
124
+ path?: never;
125
+ cookie?: never;
126
+ };
127
+ get?: never;
128
+ put?: never;
129
+ /**
130
+ * Claim a schedule
131
+ * @description Claims this schedule for `claimant`. Without `force` the schedule must be
132
+ * due; `force` drops only the due test (trigger now), and a live claim held
133
+ * by another claimant still answers 409. Pauses refuse the claim unless
134
+ * `ignorePause` is set. Answers the schedule with its new claim.
135
+ */
136
+ post: operations["claimSchedule"];
137
+ delete?: never;
138
+ options?: never;
139
+ head?: never;
140
+ patch?: never;
141
+ trace?: never;
142
+ };
143
+ "/api/schedules/{scheduleId}/claim/renew": {
144
+ parameters: {
145
+ query?: never;
146
+ header?: never;
147
+ path?: never;
148
+ cookie?: never;
149
+ };
150
+ get?: never;
151
+ put?: never;
152
+ /**
153
+ * Renew a schedule's claim
154
+ * @description Moves the claim's `expiresAt` forward for the holder only. A claim that
155
+ * is not live or belongs to another claimant answers 409 and is never
156
+ * taken back.
157
+ */
158
+ post: operations["renewScheduleClaim"];
159
+ delete?: never;
160
+ options?: never;
161
+ head?: never;
162
+ patch?: never;
163
+ trace?: never;
164
+ };
165
+ "/api/schedules/{scheduleId}/claim/release": {
166
+ parameters: {
167
+ query?: never;
168
+ header?: never;
169
+ path?: never;
170
+ cookie?: never;
171
+ };
172
+ get?: never;
173
+ put?: never;
174
+ /**
175
+ * Release a schedule's claim
176
+ * @description Releases the holder's claim and applies the run's outcome in the same
177
+ * statement (`status`, `lastRunAt`, `lastError`, `nextRunAt`,
178
+ * `retryCount`). A release by another claimant answers 409.
179
+ */
180
+ post: operations["releaseScheduleClaim"];
181
+ delete?: never;
182
+ options?: never;
183
+ head?: never;
184
+ patch?: never;
185
+ trace?: never;
186
+ };
187
+ "/api/schedules/{scheduleId}/pause": {
188
+ parameters: {
189
+ query?: never;
190
+ header?: never;
191
+ path?: never;
192
+ cookie?: never;
193
+ };
194
+ get?: never;
195
+ put?: never;
196
+ /**
197
+ * Pause a schedule
198
+ * @description Pauses this schedule so it is never claimed until resumed. Pausing a
199
+ * paused schedule keeps its original pause time.
200
+ */
201
+ post: operations["pauseSchedule"];
202
+ delete?: never;
203
+ options?: never;
204
+ head?: never;
205
+ patch?: never;
206
+ trace?: never;
207
+ };
208
+ "/api/schedules/{scheduleId}/resume": {
209
+ parameters: {
210
+ query?: never;
211
+ header?: never;
212
+ path?: never;
213
+ cookie?: never;
214
+ };
215
+ get?: never;
216
+ put?: never;
217
+ /**
218
+ * Resume a schedule
219
+ * @description Clears this schedule's pause. Resuming a schedule that is not paused is a no-op.
220
+ */
221
+ post: operations["resumeSchedule"];
222
+ delete?: never;
223
+ options?: never;
224
+ head?: never;
225
+ patch?: never;
226
+ trace?: never;
227
+ };
228
+ "/api/workspaces/{workspaceId}/schedules": {
229
+ parameters: {
230
+ query?: never;
231
+ header?: never;
232
+ path?: never;
233
+ cookie?: never;
234
+ };
235
+ /**
236
+ * List a workspace's schedules
237
+ * @description Returns a paginated list of the schedules linked to the workspace.
238
+ */
239
+ get: operations["getSchedulesOfWorkspace"];
240
+ put?: never;
241
+ post?: never;
242
+ delete?: never;
243
+ options?: never;
244
+ head?: never;
245
+ patch?: never;
246
+ trace?: never;
247
+ };
248
+ "/api/workspaces/{workspaceId}/schedules/{scheduleId}": {
249
+ parameters: {
250
+ query?: never;
251
+ header?: never;
252
+ path?: never;
253
+ cookie?: never;
254
+ };
255
+ get?: never;
256
+ put?: never;
257
+ /**
258
+ * Link a schedule to a workspace
259
+ * @description Links the schedule to the workspace, replacing any previous workspace link: a schedule belongs to at most one workspace.
260
+ */
261
+ post: operations["assignScheduleToWorkspace"];
262
+ /**
263
+ * Unlink a schedule from a workspace
264
+ * @description Removes the schedule's link to the workspace. The schedule itself is kept.
265
+ */
266
+ delete: operations["unassignScheduleFromWorkspace"];
267
+ options?: never;
268
+ head?: never;
269
+ patch?: never;
270
+ trace?: never;
271
+ };
272
+ }
273
+ export type webhooks = Record<string, never>;
274
+ export interface components {
275
+ schemas: {
276
+ /**
277
+ * Schedule Schema
278
+ * @description Server-returned schedule. A schedule is a job: an action to run with its
279
+ * parameters, when it is due (`runAt`, `nextRunAt`, `recurrence`), its retry
280
+ * budget and its outcome. Schedules belong to an organization and may be
281
+ * linked to a workspace. A worker takes a schedule through a claim (the
282
+ * generic `claim` construct, nested under the schedule); while the claim is
283
+ * live no other worker can take it, and a claim past its `expiresAt` is
284
+ * stale and the schedule is claimable again. The `claim`, the status
285
+ * values `assigned`, `claimed` and `running`, and the pause fields are
286
+ * server-managed: they change only through the claim, release, pause and
287
+ * resume operations and are refused on create and update.
288
+ */
289
+ Schedule: {
290
+ /**
291
+ * Format: uuid
292
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
293
+ */
294
+ id: string;
295
+ /**
296
+ * Format: uuid
297
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
298
+ */
299
+ organizationId: string;
300
+ /**
301
+ * Format: uuid
302
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
303
+ */
304
+ workspaceId?: string;
305
+ /** @description Human-readable name for the schedule. */
306
+ name: string;
307
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
308
+ action: string;
309
+ /** @description Action parameters, stored as a JSON blob. */
310
+ params?: Record<string, never>;
311
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
312
+ enabled: boolean;
313
+ /**
314
+ * Format: date-time
315
+ * @description Time the schedule first becomes due.
316
+ */
317
+ runAt?: string | null;
318
+ /**
319
+ * Format: date-time
320
+ * @description Next time a recurring or retrying schedule becomes due.
321
+ */
322
+ nextRunAt?: string | null;
323
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
324
+ recurrence?: string;
325
+ /**
326
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
327
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
328
+ * particular worker but not yet claimed. `claimed`: a worker holds the
329
+ * claim and has not started. `running`: the claim holder is executing
330
+ * it. `retrying`: the last attempt failed and another is due.
331
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
332
+ * schedule; a recurring schedule returns to `scheduled`.
333
+ * @enum {string}
334
+ */
335
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
336
+ /** @description Attempts already retried for the current run. */
337
+ retryCount: number;
338
+ /** @description Maximum retries before the run is marked failed. */
339
+ maxRetries: number;
340
+ /** @description Minutes to wait before a retry becomes due. */
341
+ retryDelayMinutes?: number;
342
+ /**
343
+ * Format: date-time
344
+ * @description Time of the most recent attempt.
345
+ */
346
+ lastRunAt?: string | null;
347
+ /** @description Error reported by the most recent attempt. */
348
+ lastError?: string;
349
+ /**
350
+ * Claim Schema
351
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
352
+ */
353
+ claim?: {
354
+ /**
355
+ * Format: uuid
356
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
357
+ */
358
+ id: string;
359
+ /**
360
+ * Format: uuid
361
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
362
+ */
363
+ organizationId: string;
364
+ /** @description Type of the claimed resource, for example `schedule`. */
365
+ resourceType: string;
366
+ /**
367
+ * Format: uuid
368
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
369
+ */
370
+ resourceId: string;
371
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
372
+ claimant: string;
373
+ /**
374
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
375
+ * @enum {string}
376
+ */
377
+ status: "active" | "released" | "expired";
378
+ /**
379
+ * Format: date-time
380
+ * @description Time the claim was taken.
381
+ */
382
+ claimedAt: string;
383
+ /**
384
+ * Format: date-time
385
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
386
+ */
387
+ expiresAt: string;
388
+ /**
389
+ * Format: date-time
390
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
391
+ */
392
+ releasedAt?: string | null;
393
+ /**
394
+ * Format: date-time
395
+ * @description Timestamp of claim creation.
396
+ */
397
+ createdAt: string;
398
+ /**
399
+ * Format: date-time
400
+ * @description Timestamp of last claim modification.
401
+ */
402
+ updatedAt: string;
403
+ };
404
+ /**
405
+ * Format: date-time
406
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
407
+ */
408
+ pausedAt?: string | null;
409
+ /** @description Identity that paused the schedule. Server-managed. */
410
+ pausedBy?: string;
411
+ /** @description Reason given for pausing the schedule. Server-managed. */
412
+ pauseReason?: string;
413
+ /**
414
+ * Format: date-time
415
+ * @description Timestamp of schedule creation.
416
+ */
417
+ createdAt: string;
418
+ /**
419
+ * Format: date-time
420
+ * @description Timestamp of last schedule modification.
421
+ */
422
+ updatedAt: string;
423
+ /**
424
+ * Format: date-time
425
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
426
+ */
427
+ deletedAt?: string | null;
428
+ };
429
+ /**
430
+ * Schedule Pause Schema
431
+ * @description Server-returned organization-wide schedule pause. While a pause exists for
432
+ * an organization, none of its schedules is claimed unless the claim
433
+ * request carries the operator override. Absence of a pause means
434
+ * unpaused; there is at most one live pause per organization. A pause on a
435
+ * single schedule is carried on the schedule itself.
436
+ */
437
+ SchedulePause: {
438
+ /**
439
+ * Format: uuid
440
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
441
+ */
442
+ id: string;
443
+ /**
444
+ * Format: uuid
445
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
446
+ */
447
+ organizationId: string;
448
+ /**
449
+ * Format: date-time
450
+ * @description Time the pause was set.
451
+ */
452
+ pausedAt: string;
453
+ /** @description Identity that set the pause. Server-managed. */
454
+ pausedBy?: string;
455
+ /** @description Reason given for pausing every schedule in the organization. */
456
+ reason?: string;
457
+ /**
458
+ * Format: date-time
459
+ * @description Timestamp of schedule pause creation.
460
+ */
461
+ createdAt: string;
462
+ /**
463
+ * Format: date-time
464
+ * @description Timestamp of last schedule pause modification.
465
+ */
466
+ updatedAt: string;
467
+ };
468
+ /**
469
+ * @description Payload for creating or updating a schedule. Contains only
470
+ * client-settable fields; the owning `organizationId`, the claim, the
471
+ * pause fields, `retryCount`, `lastRunAt`, `lastError` and the
472
+ * timestamps are server-managed. `status` accepts only `pending`,
473
+ * `scheduled` and `cancelled` here; the other values are set by the
474
+ * claim and release operations.
475
+ */
476
+ SchedulePayload: {
477
+ /**
478
+ * Format: uuid
479
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
480
+ */
481
+ id?: string;
482
+ /**
483
+ * Format: uuid
484
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
485
+ */
486
+ workspaceId?: string;
487
+ /** @description Human-readable name for the schedule. */
488
+ name: string;
489
+ /** @description The action the worker runs, for example a command name. */
490
+ action: string;
491
+ /** @description Action parameters, stored as a JSON blob. */
492
+ params?: Record<string, never>;
493
+ /** @description Whether the schedule is eligible to run. Defaults to true. */
494
+ enabled?: boolean;
495
+ /**
496
+ * Format: date-time
497
+ * @description Time the schedule first becomes due.
498
+ */
499
+ runAt?: string | null;
500
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
501
+ recurrence?: string;
502
+ /**
503
+ * @description Client-settable status. Omit to let the server choose `scheduled` for a due-timed schedule and `pending` otherwise.
504
+ * @enum {string}
505
+ */
506
+ status?: "pending" | "scheduled" | "cancelled";
507
+ /** @description Maximum retries before the run is marked failed. */
508
+ maxRetries?: number;
509
+ /** @description Minutes to wait before a retry becomes due. */
510
+ retryDelayMinutes?: number;
511
+ };
512
+ /** @description Request to claim the next due schedule. */
513
+ ScheduleClaimRequest: {
514
+ /** @description Identity of the worker taking the claim. */
515
+ claimant: string;
516
+ /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
517
+ durationMinutes?: number;
518
+ /**
519
+ * Format: uuid
520
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
521
+ */
522
+ workspaceId?: string;
523
+ /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
524
+ ignorePause?: boolean;
525
+ };
526
+ /** @description Request to claim one named schedule. */
527
+ ScheduleTargetedClaimRequest: {
528
+ /** @description Identity of the worker taking the claim. */
529
+ claimant: string;
530
+ /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
531
+ durationMinutes?: number;
532
+ /** @description Claim even though the schedule is not yet due (trigger now). A live claim held by another claimant still refuses. */
533
+ force?: boolean;
534
+ /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
535
+ ignorePause?: boolean;
536
+ };
537
+ /** @description Request to release a schedule's claim and record the run's outcome. */
538
+ ScheduleClaimReleaseRequest: {
539
+ /** @description Identity of the holder releasing the claim. */
540
+ claimant: string;
541
+ /**
542
+ * @description Outcome status to record with the release.
543
+ * @enum {string}
544
+ */
545
+ status?: "scheduled" | "retrying" | "completed" | "failed" | "cancelled";
546
+ /**
547
+ * Format: date-time
548
+ * @description Time of the attempt being reported.
549
+ */
550
+ lastRunAt?: string | null;
551
+ /** @description Error reported by the attempt; empty on success. */
552
+ lastError?: string;
553
+ /**
554
+ * Format: date-time
555
+ * @description Next due time for a recurring or retrying schedule.
556
+ */
557
+ nextRunAt?: string | null;
558
+ /** @description Retries used so far for the current run. */
559
+ retryCount?: number;
560
+ };
561
+ /** @description Request to pause a schedule or every schedule in the organization. */
562
+ SchedulePausePayload: {
563
+ /** @description Identity setting the pause; defaults to the authenticated user. */
564
+ pausedBy?: string;
565
+ /** @description Reason for the pause. */
566
+ reason?: string;
567
+ };
568
+ /** @description Paginated collection of schedules. */
569
+ SchedulePage: {
570
+ /** @description Current page number of the result set. */
571
+ page: number;
572
+ /** @description Number of items per page. */
573
+ pageSize: number;
574
+ /** @description Total number of items available. */
575
+ totalCount: number;
576
+ /** @description Schedules included on this page of results. */
577
+ schedules: {
578
+ /**
579
+ * Format: uuid
580
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
581
+ */
582
+ id: string;
583
+ /**
584
+ * Format: uuid
585
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
586
+ */
587
+ organizationId: string;
588
+ /**
589
+ * Format: uuid
590
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
591
+ */
592
+ workspaceId?: string;
593
+ /** @description Human-readable name for the schedule. */
594
+ name: string;
595
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
596
+ action: string;
597
+ /** @description Action parameters, stored as a JSON blob. */
598
+ params?: Record<string, never>;
599
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
600
+ enabled: boolean;
601
+ /**
602
+ * Format: date-time
603
+ * @description Time the schedule first becomes due.
604
+ */
605
+ runAt?: string | null;
606
+ /**
607
+ * Format: date-time
608
+ * @description Next time a recurring or retrying schedule becomes due.
609
+ */
610
+ nextRunAt?: string | null;
611
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
612
+ recurrence?: string;
613
+ /**
614
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
615
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
616
+ * particular worker but not yet claimed. `claimed`: a worker holds the
617
+ * claim and has not started. `running`: the claim holder is executing
618
+ * it. `retrying`: the last attempt failed and another is due.
619
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
620
+ * schedule; a recurring schedule returns to `scheduled`.
621
+ * @enum {string}
622
+ */
623
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
624
+ /** @description Attempts already retried for the current run. */
625
+ retryCount: number;
626
+ /** @description Maximum retries before the run is marked failed. */
627
+ maxRetries: number;
628
+ /** @description Minutes to wait before a retry becomes due. */
629
+ retryDelayMinutes?: number;
630
+ /**
631
+ * Format: date-time
632
+ * @description Time of the most recent attempt.
633
+ */
634
+ lastRunAt?: string | null;
635
+ /** @description Error reported by the most recent attempt. */
636
+ lastError?: string;
637
+ /**
638
+ * Claim Schema
639
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
640
+ */
641
+ claim?: {
642
+ /**
643
+ * Format: uuid
644
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
645
+ */
646
+ id: string;
647
+ /**
648
+ * Format: uuid
649
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
650
+ */
651
+ organizationId: string;
652
+ /** @description Type of the claimed resource, for example `schedule`. */
653
+ resourceType: string;
654
+ /**
655
+ * Format: uuid
656
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
657
+ */
658
+ resourceId: string;
659
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
660
+ claimant: string;
661
+ /**
662
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
663
+ * @enum {string}
664
+ */
665
+ status: "active" | "released" | "expired";
666
+ /**
667
+ * Format: date-time
668
+ * @description Time the claim was taken.
669
+ */
670
+ claimedAt: string;
671
+ /**
672
+ * Format: date-time
673
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
674
+ */
675
+ expiresAt: string;
676
+ /**
677
+ * Format: date-time
678
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
679
+ */
680
+ releasedAt?: string | null;
681
+ /**
682
+ * Format: date-time
683
+ * @description Timestamp of claim creation.
684
+ */
685
+ createdAt: string;
686
+ /**
687
+ * Format: date-time
688
+ * @description Timestamp of last claim modification.
689
+ */
690
+ updatedAt: string;
691
+ };
692
+ /**
693
+ * Format: date-time
694
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
695
+ */
696
+ pausedAt?: string | null;
697
+ /** @description Identity that paused the schedule. Server-managed. */
698
+ pausedBy?: string;
699
+ /** @description Reason given for pausing the schedule. Server-managed. */
700
+ pauseReason?: string;
701
+ /**
702
+ * Format: date-time
703
+ * @description Timestamp of schedule creation.
704
+ */
705
+ createdAt: string;
706
+ /**
707
+ * Format: date-time
708
+ * @description Timestamp of last schedule modification.
709
+ */
710
+ updatedAt: string;
711
+ /**
712
+ * Format: date-time
713
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
714
+ */
715
+ deletedAt?: string | null;
716
+ }[];
717
+ };
718
+ };
719
+ responses: {
720
+ /** @description Invalid request body or request param */
721
+ 400: {
722
+ headers: {
723
+ [name: string]: unknown;
724
+ };
725
+ content: {
726
+ "text/plain": string;
727
+ };
728
+ };
729
+ /** @description Expired JWT token used or insufficient privilege */
730
+ 401: {
731
+ headers: {
732
+ [name: string]: unknown;
733
+ };
734
+ content: {
735
+ "text/plain": string;
736
+ };
737
+ };
738
+ /** @description Result not found */
739
+ 404: {
740
+ headers: {
741
+ [name: string]: unknown;
742
+ };
743
+ content: {
744
+ "text/plain": string;
745
+ };
746
+ };
747
+ /** @description Conflict - the schedule is held by another claimant's live claim, or the caller is not the holder of the claim it tried to renew or release */
748
+ 409: {
749
+ headers: {
750
+ [name: string]: unknown;
751
+ };
752
+ content: {
753
+ "text/plain": string;
754
+ };
755
+ };
756
+ /** @description Internal server error */
757
+ 500: {
758
+ headers: {
759
+ [name: string]: unknown;
760
+ };
761
+ content: {
762
+ "text/plain": string;
763
+ };
764
+ };
765
+ };
766
+ parameters: {
767
+ /** @description Schedule ID */
768
+ scheduleId: string;
769
+ /** @description Workspace ID */
770
+ workspaceId: string;
771
+ /** @description Only schedules linked to this workspace. */
772
+ workspaceIdQuery: string;
773
+ /** @description Only schedules in this status. */
774
+ statusQuery: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
775
+ /** @description Get responses by page */
776
+ page: number;
777
+ /** @description Number of items per page. */
778
+ pageSize: number;
779
+ /** @description Get responses that match search param value */
780
+ search: string;
781
+ /** @description Get ordered responses */
782
+ order: string;
783
+ };
784
+ requestBodies: never;
785
+ headers: never;
786
+ pathItems: never;
787
+ }
788
+ export type $defs = Record<string, never>;
789
+ export interface operations {
790
+ listSchedules: {
791
+ parameters: {
792
+ query?: {
793
+ /** @description Get responses by page */
794
+ page?: number;
795
+ /** @description Number of items per page. */
796
+ pageSize?: number;
797
+ /** @description Get responses that match search param value */
798
+ search?: string;
799
+ /** @description Get ordered responses */
800
+ order?: string;
801
+ /** @description Only schedules linked to this workspace. */
802
+ workspaceId?: string;
803
+ /** @description Only schedules in this status. */
804
+ status?: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
805
+ };
806
+ header?: never;
807
+ path?: never;
808
+ cookie?: never;
809
+ };
810
+ requestBody?: never;
811
+ responses: {
812
+ /** @description Schedules page */
813
+ 200: {
814
+ headers: {
815
+ [name: string]: unknown;
816
+ };
817
+ content: {
818
+ "application/json": {
819
+ /** @description Current page number of the result set. */
820
+ page: number;
821
+ /** @description Number of items per page. */
822
+ pageSize: number;
823
+ /** @description Total number of items available. */
824
+ totalCount: number;
825
+ /** @description Schedules included on this page of results. */
826
+ schedules: {
827
+ /**
828
+ * Format: uuid
829
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
830
+ */
831
+ id: string;
832
+ /**
833
+ * Format: uuid
834
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
835
+ */
836
+ organizationId: string;
837
+ /**
838
+ * Format: uuid
839
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
840
+ */
841
+ workspaceId?: string;
842
+ /** @description Human-readable name for the schedule. */
843
+ name: string;
844
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
845
+ action: string;
846
+ /** @description Action parameters, stored as a JSON blob. */
847
+ params?: Record<string, never>;
848
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
849
+ enabled: boolean;
850
+ /**
851
+ * Format: date-time
852
+ * @description Time the schedule first becomes due.
853
+ */
854
+ runAt?: string | null;
855
+ /**
856
+ * Format: date-time
857
+ * @description Next time a recurring or retrying schedule becomes due.
858
+ */
859
+ nextRunAt?: string | null;
860
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
861
+ recurrence?: string;
862
+ /**
863
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
864
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
865
+ * particular worker but not yet claimed. `claimed`: a worker holds the
866
+ * claim and has not started. `running`: the claim holder is executing
867
+ * it. `retrying`: the last attempt failed and another is due.
868
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
869
+ * schedule; a recurring schedule returns to `scheduled`.
870
+ * @enum {string}
871
+ */
872
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
873
+ /** @description Attempts already retried for the current run. */
874
+ retryCount: number;
875
+ /** @description Maximum retries before the run is marked failed. */
876
+ maxRetries: number;
877
+ /** @description Minutes to wait before a retry becomes due. */
878
+ retryDelayMinutes?: number;
879
+ /**
880
+ * Format: date-time
881
+ * @description Time of the most recent attempt.
882
+ */
883
+ lastRunAt?: string | null;
884
+ /** @description Error reported by the most recent attempt. */
885
+ lastError?: string;
886
+ /**
887
+ * Claim Schema
888
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
889
+ */
890
+ claim?: {
891
+ /**
892
+ * Format: uuid
893
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
894
+ */
895
+ id: string;
896
+ /**
897
+ * Format: uuid
898
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
899
+ */
900
+ organizationId: string;
901
+ /** @description Type of the claimed resource, for example `schedule`. */
902
+ resourceType: string;
903
+ /**
904
+ * Format: uuid
905
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
906
+ */
907
+ resourceId: string;
908
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
909
+ claimant: string;
910
+ /**
911
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
912
+ * @enum {string}
913
+ */
914
+ status: "active" | "released" | "expired";
915
+ /**
916
+ * Format: date-time
917
+ * @description Time the claim was taken.
918
+ */
919
+ claimedAt: string;
920
+ /**
921
+ * Format: date-time
922
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
923
+ */
924
+ expiresAt: string;
925
+ /**
926
+ * Format: date-time
927
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
928
+ */
929
+ releasedAt?: string | null;
930
+ /**
931
+ * Format: date-time
932
+ * @description Timestamp of claim creation.
933
+ */
934
+ createdAt: string;
935
+ /**
936
+ * Format: date-time
937
+ * @description Timestamp of last claim modification.
938
+ */
939
+ updatedAt: string;
940
+ };
941
+ /**
942
+ * Format: date-time
943
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
944
+ */
945
+ pausedAt?: string | null;
946
+ /** @description Identity that paused the schedule. Server-managed. */
947
+ pausedBy?: string;
948
+ /** @description Reason given for pausing the schedule. Server-managed. */
949
+ pauseReason?: string;
950
+ /**
951
+ * Format: date-time
952
+ * @description Timestamp of schedule creation.
953
+ */
954
+ createdAt: string;
955
+ /**
956
+ * Format: date-time
957
+ * @description Timestamp of last schedule modification.
958
+ */
959
+ updatedAt: string;
960
+ /**
961
+ * Format: date-time
962
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
963
+ */
964
+ deletedAt?: string | null;
965
+ }[];
966
+ };
967
+ };
968
+ };
969
+ /** @description Expired JWT token used or insufficient privilege */
970
+ 401: {
971
+ headers: {
972
+ [name: string]: unknown;
973
+ };
974
+ content: {
975
+ "text/plain": string;
976
+ };
977
+ };
978
+ /** @description Result not found */
979
+ 404: {
980
+ headers: {
981
+ [name: string]: unknown;
982
+ };
983
+ content: {
984
+ "text/plain": string;
985
+ };
986
+ };
987
+ /** @description Internal server error */
988
+ 500: {
989
+ headers: {
990
+ [name: string]: unknown;
991
+ };
992
+ content: {
993
+ "text/plain": string;
994
+ };
995
+ };
996
+ };
997
+ };
998
+ createSchedule: {
999
+ parameters: {
1000
+ query?: never;
1001
+ header?: never;
1002
+ path?: never;
1003
+ cookie?: never;
1004
+ };
1005
+ requestBody: {
1006
+ content: {
1007
+ "application/json": {
1008
+ /**
1009
+ * Format: uuid
1010
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1011
+ */
1012
+ id?: string;
1013
+ /**
1014
+ * Format: uuid
1015
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1016
+ */
1017
+ workspaceId?: string;
1018
+ /** @description Human-readable name for the schedule. */
1019
+ name: string;
1020
+ /** @description The action the worker runs, for example a command name. */
1021
+ action: string;
1022
+ /** @description Action parameters, stored as a JSON blob. */
1023
+ params?: Record<string, never>;
1024
+ /** @description Whether the schedule is eligible to run. Defaults to true. */
1025
+ enabled?: boolean;
1026
+ /**
1027
+ * Format: date-time
1028
+ * @description Time the schedule first becomes due.
1029
+ */
1030
+ runAt?: string | null;
1031
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1032
+ recurrence?: string;
1033
+ /**
1034
+ * @description Client-settable status. Omit to let the server choose `scheduled` for a due-timed schedule and `pending` otherwise.
1035
+ * @enum {string}
1036
+ */
1037
+ status?: "pending" | "scheduled" | "cancelled";
1038
+ /** @description Maximum retries before the run is marked failed. */
1039
+ maxRetries?: number;
1040
+ /** @description Minutes to wait before a retry becomes due. */
1041
+ retryDelayMinutes?: number;
1042
+ };
1043
+ };
1044
+ };
1045
+ responses: {
1046
+ /** @description Schedule created */
1047
+ 201: {
1048
+ headers: {
1049
+ [name: string]: unknown;
1050
+ };
1051
+ content: {
1052
+ "application/json": {
1053
+ /**
1054
+ * Format: uuid
1055
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1056
+ */
1057
+ id: string;
1058
+ /**
1059
+ * Format: uuid
1060
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1061
+ */
1062
+ organizationId: string;
1063
+ /**
1064
+ * Format: uuid
1065
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1066
+ */
1067
+ workspaceId?: string;
1068
+ /** @description Human-readable name for the schedule. */
1069
+ name: string;
1070
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1071
+ action: string;
1072
+ /** @description Action parameters, stored as a JSON blob. */
1073
+ params?: Record<string, never>;
1074
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1075
+ enabled: boolean;
1076
+ /**
1077
+ * Format: date-time
1078
+ * @description Time the schedule first becomes due.
1079
+ */
1080
+ runAt?: string | null;
1081
+ /**
1082
+ * Format: date-time
1083
+ * @description Next time a recurring or retrying schedule becomes due.
1084
+ */
1085
+ nextRunAt?: string | null;
1086
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1087
+ recurrence?: string;
1088
+ /**
1089
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1090
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
1091
+ * particular worker but not yet claimed. `claimed`: a worker holds the
1092
+ * claim and has not started. `running`: the claim holder is executing
1093
+ * it. `retrying`: the last attempt failed and another is due.
1094
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
1095
+ * schedule; a recurring schedule returns to `scheduled`.
1096
+ * @enum {string}
1097
+ */
1098
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1099
+ /** @description Attempts already retried for the current run. */
1100
+ retryCount: number;
1101
+ /** @description Maximum retries before the run is marked failed. */
1102
+ maxRetries: number;
1103
+ /** @description Minutes to wait before a retry becomes due. */
1104
+ retryDelayMinutes?: number;
1105
+ /**
1106
+ * Format: date-time
1107
+ * @description Time of the most recent attempt.
1108
+ */
1109
+ lastRunAt?: string | null;
1110
+ /** @description Error reported by the most recent attempt. */
1111
+ lastError?: string;
1112
+ /**
1113
+ * Claim Schema
1114
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1115
+ */
1116
+ claim?: {
1117
+ /**
1118
+ * Format: uuid
1119
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1120
+ */
1121
+ id: string;
1122
+ /**
1123
+ * Format: uuid
1124
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1125
+ */
1126
+ organizationId: string;
1127
+ /** @description Type of the claimed resource, for example `schedule`. */
1128
+ resourceType: string;
1129
+ /**
1130
+ * Format: uuid
1131
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1132
+ */
1133
+ resourceId: string;
1134
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1135
+ claimant: string;
1136
+ /**
1137
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
1138
+ * @enum {string}
1139
+ */
1140
+ status: "active" | "released" | "expired";
1141
+ /**
1142
+ * Format: date-time
1143
+ * @description Time the claim was taken.
1144
+ */
1145
+ claimedAt: string;
1146
+ /**
1147
+ * Format: date-time
1148
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
1149
+ */
1150
+ expiresAt: string;
1151
+ /**
1152
+ * Format: date-time
1153
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
1154
+ */
1155
+ releasedAt?: string | null;
1156
+ /**
1157
+ * Format: date-time
1158
+ * @description Timestamp of claim creation.
1159
+ */
1160
+ createdAt: string;
1161
+ /**
1162
+ * Format: date-time
1163
+ * @description Timestamp of last claim modification.
1164
+ */
1165
+ updatedAt: string;
1166
+ };
1167
+ /**
1168
+ * Format: date-time
1169
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1170
+ */
1171
+ pausedAt?: string | null;
1172
+ /** @description Identity that paused the schedule. Server-managed. */
1173
+ pausedBy?: string;
1174
+ /** @description Reason given for pausing the schedule. Server-managed. */
1175
+ pauseReason?: string;
1176
+ /**
1177
+ * Format: date-time
1178
+ * @description Timestamp of schedule creation.
1179
+ */
1180
+ createdAt: string;
1181
+ /**
1182
+ * Format: date-time
1183
+ * @description Timestamp of last schedule modification.
1184
+ */
1185
+ updatedAt: string;
1186
+ /**
1187
+ * Format: date-time
1188
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
1189
+ */
1190
+ deletedAt?: string | null;
1191
+ };
1192
+ };
1193
+ };
1194
+ /** @description Invalid request body or request param */
1195
+ 400: {
1196
+ headers: {
1197
+ [name: string]: unknown;
1198
+ };
1199
+ content: {
1200
+ "text/plain": string;
1201
+ };
1202
+ };
1203
+ /** @description Expired JWT token used or insufficient privilege */
1204
+ 401: {
1205
+ headers: {
1206
+ [name: string]: unknown;
1207
+ };
1208
+ content: {
1209
+ "text/plain": string;
1210
+ };
1211
+ };
1212
+ /** @description Result not found */
1213
+ 404: {
1214
+ headers: {
1215
+ [name: string]: unknown;
1216
+ };
1217
+ content: {
1218
+ "text/plain": string;
1219
+ };
1220
+ };
1221
+ /** @description Internal server error */
1222
+ 500: {
1223
+ headers: {
1224
+ [name: string]: unknown;
1225
+ };
1226
+ content: {
1227
+ "text/plain": string;
1228
+ };
1229
+ };
1230
+ };
1231
+ };
1232
+ claimNextSchedule: {
1233
+ parameters: {
1234
+ query?: never;
1235
+ header?: never;
1236
+ path?: never;
1237
+ cookie?: never;
1238
+ };
1239
+ requestBody: {
1240
+ content: {
1241
+ "application/json": {
1242
+ /** @description Identity of the worker taking the claim. */
1243
+ claimant: string;
1244
+ /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
1245
+ durationMinutes?: number;
1246
+ /**
1247
+ * Format: uuid
1248
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1249
+ */
1250
+ workspaceId?: string;
1251
+ /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
1252
+ ignorePause?: boolean;
1253
+ };
1254
+ };
1255
+ };
1256
+ responses: {
1257
+ /** @description The claimed schedule */
1258
+ 200: {
1259
+ headers: {
1260
+ [name: string]: unknown;
1261
+ };
1262
+ content: {
1263
+ "application/json": {
1264
+ /**
1265
+ * Format: uuid
1266
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1267
+ */
1268
+ id: string;
1269
+ /**
1270
+ * Format: uuid
1271
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1272
+ */
1273
+ organizationId: string;
1274
+ /**
1275
+ * Format: uuid
1276
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1277
+ */
1278
+ workspaceId?: string;
1279
+ /** @description Human-readable name for the schedule. */
1280
+ name: string;
1281
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1282
+ action: string;
1283
+ /** @description Action parameters, stored as a JSON blob. */
1284
+ params?: Record<string, never>;
1285
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1286
+ enabled: boolean;
1287
+ /**
1288
+ * Format: date-time
1289
+ * @description Time the schedule first becomes due.
1290
+ */
1291
+ runAt?: string | null;
1292
+ /**
1293
+ * Format: date-time
1294
+ * @description Next time a recurring or retrying schedule becomes due.
1295
+ */
1296
+ nextRunAt?: string | null;
1297
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1298
+ recurrence?: string;
1299
+ /**
1300
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1301
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
1302
+ * particular worker but not yet claimed. `claimed`: a worker holds the
1303
+ * claim and has not started. `running`: the claim holder is executing
1304
+ * it. `retrying`: the last attempt failed and another is due.
1305
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
1306
+ * schedule; a recurring schedule returns to `scheduled`.
1307
+ * @enum {string}
1308
+ */
1309
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1310
+ /** @description Attempts already retried for the current run. */
1311
+ retryCount: number;
1312
+ /** @description Maximum retries before the run is marked failed. */
1313
+ maxRetries: number;
1314
+ /** @description Minutes to wait before a retry becomes due. */
1315
+ retryDelayMinutes?: number;
1316
+ /**
1317
+ * Format: date-time
1318
+ * @description Time of the most recent attempt.
1319
+ */
1320
+ lastRunAt?: string | null;
1321
+ /** @description Error reported by the most recent attempt. */
1322
+ lastError?: string;
1323
+ /**
1324
+ * Claim Schema
1325
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1326
+ */
1327
+ claim?: {
1328
+ /**
1329
+ * Format: uuid
1330
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1331
+ */
1332
+ id: string;
1333
+ /**
1334
+ * Format: uuid
1335
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1336
+ */
1337
+ organizationId: string;
1338
+ /** @description Type of the claimed resource, for example `schedule`. */
1339
+ resourceType: string;
1340
+ /**
1341
+ * Format: uuid
1342
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1343
+ */
1344
+ resourceId: string;
1345
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1346
+ claimant: string;
1347
+ /**
1348
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
1349
+ * @enum {string}
1350
+ */
1351
+ status: "active" | "released" | "expired";
1352
+ /**
1353
+ * Format: date-time
1354
+ * @description Time the claim was taken.
1355
+ */
1356
+ claimedAt: string;
1357
+ /**
1358
+ * Format: date-time
1359
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
1360
+ */
1361
+ expiresAt: string;
1362
+ /**
1363
+ * Format: date-time
1364
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
1365
+ */
1366
+ releasedAt?: string | null;
1367
+ /**
1368
+ * Format: date-time
1369
+ * @description Timestamp of claim creation.
1370
+ */
1371
+ createdAt: string;
1372
+ /**
1373
+ * Format: date-time
1374
+ * @description Timestamp of last claim modification.
1375
+ */
1376
+ updatedAt: string;
1377
+ };
1378
+ /**
1379
+ * Format: date-time
1380
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1381
+ */
1382
+ pausedAt?: string | null;
1383
+ /** @description Identity that paused the schedule. Server-managed. */
1384
+ pausedBy?: string;
1385
+ /** @description Reason given for pausing the schedule. Server-managed. */
1386
+ pauseReason?: string;
1387
+ /**
1388
+ * Format: date-time
1389
+ * @description Timestamp of schedule creation.
1390
+ */
1391
+ createdAt: string;
1392
+ /**
1393
+ * Format: date-time
1394
+ * @description Timestamp of last schedule modification.
1395
+ */
1396
+ updatedAt: string;
1397
+ /**
1398
+ * Format: date-time
1399
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
1400
+ */
1401
+ deletedAt?: string | null;
1402
+ };
1403
+ };
1404
+ };
1405
+ /** @description No schedule was due and claimable */
1406
+ 204: {
1407
+ headers: {
1408
+ [name: string]: unknown;
1409
+ };
1410
+ content?: never;
1411
+ };
1412
+ /** @description Invalid request body or request param */
1413
+ 400: {
1414
+ headers: {
1415
+ [name: string]: unknown;
1416
+ };
1417
+ content: {
1418
+ "text/plain": string;
1419
+ };
1420
+ };
1421
+ /** @description Expired JWT token used or insufficient privilege */
1422
+ 401: {
1423
+ headers: {
1424
+ [name: string]: unknown;
1425
+ };
1426
+ content: {
1427
+ "text/plain": string;
1428
+ };
1429
+ };
1430
+ /** @description Result not found */
1431
+ 404: {
1432
+ headers: {
1433
+ [name: string]: unknown;
1434
+ };
1435
+ content: {
1436
+ "text/plain": string;
1437
+ };
1438
+ };
1439
+ /** @description Internal server error */
1440
+ 500: {
1441
+ headers: {
1442
+ [name: string]: unknown;
1443
+ };
1444
+ content: {
1445
+ "text/plain": string;
1446
+ };
1447
+ };
1448
+ };
1449
+ };
1450
+ getSchedulePause: {
1451
+ parameters: {
1452
+ query?: never;
1453
+ header?: never;
1454
+ path?: never;
1455
+ cookie?: never;
1456
+ };
1457
+ requestBody?: never;
1458
+ responses: {
1459
+ /** @description The organization-wide pause */
1460
+ 200: {
1461
+ headers: {
1462
+ [name: string]: unknown;
1463
+ };
1464
+ content: {
1465
+ "application/json": {
1466
+ /**
1467
+ * Format: uuid
1468
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1469
+ */
1470
+ id: string;
1471
+ /**
1472
+ * Format: uuid
1473
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1474
+ */
1475
+ organizationId: string;
1476
+ /**
1477
+ * Format: date-time
1478
+ * @description Time the pause was set.
1479
+ */
1480
+ pausedAt: string;
1481
+ /** @description Identity that set the pause. Server-managed. */
1482
+ pausedBy?: string;
1483
+ /** @description Reason given for pausing every schedule in the organization. */
1484
+ reason?: string;
1485
+ /**
1486
+ * Format: date-time
1487
+ * @description Timestamp of schedule pause creation.
1488
+ */
1489
+ createdAt: string;
1490
+ /**
1491
+ * Format: date-time
1492
+ * @description Timestamp of last schedule pause modification.
1493
+ */
1494
+ updatedAt: string;
1495
+ };
1496
+ };
1497
+ };
1498
+ /** @description The organization is not paused */
1499
+ 204: {
1500
+ headers: {
1501
+ [name: string]: unknown;
1502
+ };
1503
+ content?: never;
1504
+ };
1505
+ /** @description Expired JWT token used or insufficient privilege */
1506
+ 401: {
1507
+ headers: {
1508
+ [name: string]: unknown;
1509
+ };
1510
+ content: {
1511
+ "text/plain": string;
1512
+ };
1513
+ };
1514
+ /** @description Result not found */
1515
+ 404: {
1516
+ headers: {
1517
+ [name: string]: unknown;
1518
+ };
1519
+ content: {
1520
+ "text/plain": string;
1521
+ };
1522
+ };
1523
+ /** @description Internal server error */
1524
+ 500: {
1525
+ headers: {
1526
+ [name: string]: unknown;
1527
+ };
1528
+ content: {
1529
+ "text/plain": string;
1530
+ };
1531
+ };
1532
+ };
1533
+ };
1534
+ setSchedulePause: {
1535
+ parameters: {
1536
+ query?: never;
1537
+ header?: never;
1538
+ path?: never;
1539
+ cookie?: never;
1540
+ };
1541
+ requestBody: {
1542
+ content: {
1543
+ "application/json": {
1544
+ /** @description Identity setting the pause; defaults to the authenticated user. */
1545
+ pausedBy?: string;
1546
+ /** @description Reason for the pause. */
1547
+ reason?: string;
1548
+ };
1549
+ };
1550
+ };
1551
+ responses: {
1552
+ /** @description The organization-wide pause */
1553
+ 200: {
1554
+ headers: {
1555
+ [name: string]: unknown;
1556
+ };
1557
+ content: {
1558
+ "application/json": {
1559
+ /**
1560
+ * Format: uuid
1561
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1562
+ */
1563
+ id: string;
1564
+ /**
1565
+ * Format: uuid
1566
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1567
+ */
1568
+ organizationId: string;
1569
+ /**
1570
+ * Format: date-time
1571
+ * @description Time the pause was set.
1572
+ */
1573
+ pausedAt: string;
1574
+ /** @description Identity that set the pause. Server-managed. */
1575
+ pausedBy?: string;
1576
+ /** @description Reason given for pausing every schedule in the organization. */
1577
+ reason?: string;
1578
+ /**
1579
+ * Format: date-time
1580
+ * @description Timestamp of schedule pause creation.
1581
+ */
1582
+ createdAt: string;
1583
+ /**
1584
+ * Format: date-time
1585
+ * @description Timestamp of last schedule pause modification.
1586
+ */
1587
+ updatedAt: string;
1588
+ };
1589
+ };
1590
+ };
1591
+ /** @description Invalid request body or request param */
1592
+ 400: {
1593
+ headers: {
1594
+ [name: string]: unknown;
1595
+ };
1596
+ content: {
1597
+ "text/plain": string;
1598
+ };
1599
+ };
1600
+ /** @description Expired JWT token used or insufficient privilege */
1601
+ 401: {
1602
+ headers: {
1603
+ [name: string]: unknown;
1604
+ };
1605
+ content: {
1606
+ "text/plain": string;
1607
+ };
1608
+ };
1609
+ /** @description Result not found */
1610
+ 404: {
1611
+ headers: {
1612
+ [name: string]: unknown;
1613
+ };
1614
+ content: {
1615
+ "text/plain": string;
1616
+ };
1617
+ };
1618
+ /** @description Internal server error */
1619
+ 500: {
1620
+ headers: {
1621
+ [name: string]: unknown;
1622
+ };
1623
+ content: {
1624
+ "text/plain": string;
1625
+ };
1626
+ };
1627
+ };
1628
+ };
1629
+ clearSchedulePause: {
1630
+ parameters: {
1631
+ query?: never;
1632
+ header?: never;
1633
+ path?: never;
1634
+ cookie?: never;
1635
+ };
1636
+ requestBody?: never;
1637
+ responses: {
1638
+ /** @description The organization is not paused */
1639
+ 204: {
1640
+ headers: {
1641
+ [name: string]: unknown;
1642
+ };
1643
+ content?: never;
1644
+ };
1645
+ /** @description Expired JWT token used or insufficient privilege */
1646
+ 401: {
1647
+ headers: {
1648
+ [name: string]: unknown;
1649
+ };
1650
+ content: {
1651
+ "text/plain": string;
1652
+ };
1653
+ };
1654
+ /** @description Result not found */
1655
+ 404: {
1656
+ headers: {
1657
+ [name: string]: unknown;
1658
+ };
1659
+ content: {
1660
+ "text/plain": string;
1661
+ };
1662
+ };
1663
+ /** @description Internal server error */
1664
+ 500: {
1665
+ headers: {
1666
+ [name: string]: unknown;
1667
+ };
1668
+ content: {
1669
+ "text/plain": string;
1670
+ };
1671
+ };
1672
+ };
1673
+ };
1674
+ getScheduleById: {
1675
+ parameters: {
1676
+ query?: never;
1677
+ header?: never;
1678
+ path: {
1679
+ /** @description Schedule ID */
1680
+ scheduleId: string;
1681
+ };
1682
+ cookie?: never;
1683
+ };
1684
+ requestBody?: never;
1685
+ responses: {
1686
+ /** @description Schedule response */
1687
+ 200: {
1688
+ headers: {
1689
+ [name: string]: unknown;
1690
+ };
1691
+ content: {
1692
+ "application/json": {
1693
+ /**
1694
+ * Format: uuid
1695
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1696
+ */
1697
+ id: string;
1698
+ /**
1699
+ * Format: uuid
1700
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1701
+ */
1702
+ organizationId: string;
1703
+ /**
1704
+ * Format: uuid
1705
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1706
+ */
1707
+ workspaceId?: string;
1708
+ /** @description Human-readable name for the schedule. */
1709
+ name: string;
1710
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1711
+ action: string;
1712
+ /** @description Action parameters, stored as a JSON blob. */
1713
+ params?: Record<string, never>;
1714
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1715
+ enabled: boolean;
1716
+ /**
1717
+ * Format: date-time
1718
+ * @description Time the schedule first becomes due.
1719
+ */
1720
+ runAt?: string | null;
1721
+ /**
1722
+ * Format: date-time
1723
+ * @description Next time a recurring or retrying schedule becomes due.
1724
+ */
1725
+ nextRunAt?: string | null;
1726
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1727
+ recurrence?: string;
1728
+ /**
1729
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1730
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
1731
+ * particular worker but not yet claimed. `claimed`: a worker holds the
1732
+ * claim and has not started. `running`: the claim holder is executing
1733
+ * it. `retrying`: the last attempt failed and another is due.
1734
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
1735
+ * schedule; a recurring schedule returns to `scheduled`.
1736
+ * @enum {string}
1737
+ */
1738
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1739
+ /** @description Attempts already retried for the current run. */
1740
+ retryCount: number;
1741
+ /** @description Maximum retries before the run is marked failed. */
1742
+ maxRetries: number;
1743
+ /** @description Minutes to wait before a retry becomes due. */
1744
+ retryDelayMinutes?: number;
1745
+ /**
1746
+ * Format: date-time
1747
+ * @description Time of the most recent attempt.
1748
+ */
1749
+ lastRunAt?: string | null;
1750
+ /** @description Error reported by the most recent attempt. */
1751
+ lastError?: string;
1752
+ /**
1753
+ * Claim Schema
1754
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1755
+ */
1756
+ claim?: {
1757
+ /**
1758
+ * Format: uuid
1759
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1760
+ */
1761
+ id: string;
1762
+ /**
1763
+ * Format: uuid
1764
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1765
+ */
1766
+ organizationId: string;
1767
+ /** @description Type of the claimed resource, for example `schedule`. */
1768
+ resourceType: string;
1769
+ /**
1770
+ * Format: uuid
1771
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1772
+ */
1773
+ resourceId: string;
1774
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1775
+ claimant: string;
1776
+ /**
1777
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
1778
+ * @enum {string}
1779
+ */
1780
+ status: "active" | "released" | "expired";
1781
+ /**
1782
+ * Format: date-time
1783
+ * @description Time the claim was taken.
1784
+ */
1785
+ claimedAt: string;
1786
+ /**
1787
+ * Format: date-time
1788
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
1789
+ */
1790
+ expiresAt: string;
1791
+ /**
1792
+ * Format: date-time
1793
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
1794
+ */
1795
+ releasedAt?: string | null;
1796
+ /**
1797
+ * Format: date-time
1798
+ * @description Timestamp of claim creation.
1799
+ */
1800
+ createdAt: string;
1801
+ /**
1802
+ * Format: date-time
1803
+ * @description Timestamp of last claim modification.
1804
+ */
1805
+ updatedAt: string;
1806
+ };
1807
+ /**
1808
+ * Format: date-time
1809
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1810
+ */
1811
+ pausedAt?: string | null;
1812
+ /** @description Identity that paused the schedule. Server-managed. */
1813
+ pausedBy?: string;
1814
+ /** @description Reason given for pausing the schedule. Server-managed. */
1815
+ pauseReason?: string;
1816
+ /**
1817
+ * Format: date-time
1818
+ * @description Timestamp of schedule creation.
1819
+ */
1820
+ createdAt: string;
1821
+ /**
1822
+ * Format: date-time
1823
+ * @description Timestamp of last schedule modification.
1824
+ */
1825
+ updatedAt: string;
1826
+ /**
1827
+ * Format: date-time
1828
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
1829
+ */
1830
+ deletedAt?: string | null;
1831
+ };
1832
+ };
1833
+ };
1834
+ /** @description Expired JWT token used or insufficient privilege */
1835
+ 401: {
1836
+ headers: {
1837
+ [name: string]: unknown;
1838
+ };
1839
+ content: {
1840
+ "text/plain": string;
1841
+ };
1842
+ };
1843
+ /** @description Result not found */
1844
+ 404: {
1845
+ headers: {
1846
+ [name: string]: unknown;
1847
+ };
1848
+ content: {
1849
+ "text/plain": string;
1850
+ };
1851
+ };
1852
+ /** @description Internal server error */
1853
+ 500: {
1854
+ headers: {
1855
+ [name: string]: unknown;
1856
+ };
1857
+ content: {
1858
+ "text/plain": string;
1859
+ };
1860
+ };
1861
+ };
1862
+ };
1863
+ updateSchedule: {
1864
+ parameters: {
1865
+ query?: never;
1866
+ header?: never;
1867
+ path: {
1868
+ /** @description Schedule ID */
1869
+ scheduleId: string;
1870
+ };
1871
+ cookie?: never;
1872
+ };
1873
+ requestBody: {
1874
+ content: {
1875
+ "application/json": {
1876
+ /**
1877
+ * Format: uuid
1878
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1879
+ */
1880
+ id?: string;
1881
+ /**
1882
+ * Format: uuid
1883
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1884
+ */
1885
+ workspaceId?: string;
1886
+ /** @description Human-readable name for the schedule. */
1887
+ name: string;
1888
+ /** @description The action the worker runs, for example a command name. */
1889
+ action: string;
1890
+ /** @description Action parameters, stored as a JSON blob. */
1891
+ params?: Record<string, never>;
1892
+ /** @description Whether the schedule is eligible to run. Defaults to true. */
1893
+ enabled?: boolean;
1894
+ /**
1895
+ * Format: date-time
1896
+ * @description Time the schedule first becomes due.
1897
+ */
1898
+ runAt?: string | null;
1899
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1900
+ recurrence?: string;
1901
+ /**
1902
+ * @description Client-settable status. Omit to let the server choose `scheduled` for a due-timed schedule and `pending` otherwise.
1903
+ * @enum {string}
1904
+ */
1905
+ status?: "pending" | "scheduled" | "cancelled";
1906
+ /** @description Maximum retries before the run is marked failed. */
1907
+ maxRetries?: number;
1908
+ /** @description Minutes to wait before a retry becomes due. */
1909
+ retryDelayMinutes?: number;
1910
+ };
1911
+ };
1912
+ };
1913
+ responses: {
1914
+ /** @description Schedule updated */
1915
+ 200: {
1916
+ headers: {
1917
+ [name: string]: unknown;
1918
+ };
1919
+ content: {
1920
+ "application/json": {
1921
+ /**
1922
+ * Format: uuid
1923
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1924
+ */
1925
+ id: string;
1926
+ /**
1927
+ * Format: uuid
1928
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1929
+ */
1930
+ organizationId: string;
1931
+ /**
1932
+ * Format: uuid
1933
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1934
+ */
1935
+ workspaceId?: string;
1936
+ /** @description Human-readable name for the schedule. */
1937
+ name: string;
1938
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1939
+ action: string;
1940
+ /** @description Action parameters, stored as a JSON blob. */
1941
+ params?: Record<string, never>;
1942
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1943
+ enabled: boolean;
1944
+ /**
1945
+ * Format: date-time
1946
+ * @description Time the schedule first becomes due.
1947
+ */
1948
+ runAt?: string | null;
1949
+ /**
1950
+ * Format: date-time
1951
+ * @description Next time a recurring or retrying schedule becomes due.
1952
+ */
1953
+ nextRunAt?: string | null;
1954
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1955
+ recurrence?: string;
1956
+ /**
1957
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1958
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
1959
+ * particular worker but not yet claimed. `claimed`: a worker holds the
1960
+ * claim and has not started. `running`: the claim holder is executing
1961
+ * it. `retrying`: the last attempt failed and another is due.
1962
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
1963
+ * schedule; a recurring schedule returns to `scheduled`.
1964
+ * @enum {string}
1965
+ */
1966
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1967
+ /** @description Attempts already retried for the current run. */
1968
+ retryCount: number;
1969
+ /** @description Maximum retries before the run is marked failed. */
1970
+ maxRetries: number;
1971
+ /** @description Minutes to wait before a retry becomes due. */
1972
+ retryDelayMinutes?: number;
1973
+ /**
1974
+ * Format: date-time
1975
+ * @description Time of the most recent attempt.
1976
+ */
1977
+ lastRunAt?: string | null;
1978
+ /** @description Error reported by the most recent attempt. */
1979
+ lastError?: string;
1980
+ /**
1981
+ * Claim Schema
1982
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1983
+ */
1984
+ claim?: {
1985
+ /**
1986
+ * Format: uuid
1987
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1988
+ */
1989
+ id: string;
1990
+ /**
1991
+ * Format: uuid
1992
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1993
+ */
1994
+ organizationId: string;
1995
+ /** @description Type of the claimed resource, for example `schedule`. */
1996
+ resourceType: string;
1997
+ /**
1998
+ * Format: uuid
1999
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2000
+ */
2001
+ resourceId: string;
2002
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2003
+ claimant: string;
2004
+ /**
2005
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2006
+ * @enum {string}
2007
+ */
2008
+ status: "active" | "released" | "expired";
2009
+ /**
2010
+ * Format: date-time
2011
+ * @description Time the claim was taken.
2012
+ */
2013
+ claimedAt: string;
2014
+ /**
2015
+ * Format: date-time
2016
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
2017
+ */
2018
+ expiresAt: string;
2019
+ /**
2020
+ * Format: date-time
2021
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
2022
+ */
2023
+ releasedAt?: string | null;
2024
+ /**
2025
+ * Format: date-time
2026
+ * @description Timestamp of claim creation.
2027
+ */
2028
+ createdAt: string;
2029
+ /**
2030
+ * Format: date-time
2031
+ * @description Timestamp of last claim modification.
2032
+ */
2033
+ updatedAt: string;
2034
+ };
2035
+ /**
2036
+ * Format: date-time
2037
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2038
+ */
2039
+ pausedAt?: string | null;
2040
+ /** @description Identity that paused the schedule. Server-managed. */
2041
+ pausedBy?: string;
2042
+ /** @description Reason given for pausing the schedule. Server-managed. */
2043
+ pauseReason?: string;
2044
+ /**
2045
+ * Format: date-time
2046
+ * @description Timestamp of schedule creation.
2047
+ */
2048
+ createdAt: string;
2049
+ /**
2050
+ * Format: date-time
2051
+ * @description Timestamp of last schedule modification.
2052
+ */
2053
+ updatedAt: string;
2054
+ /**
2055
+ * Format: date-time
2056
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
2057
+ */
2058
+ deletedAt?: string | null;
2059
+ };
2060
+ };
2061
+ };
2062
+ /** @description Invalid request body or request param */
2063
+ 400: {
2064
+ headers: {
2065
+ [name: string]: unknown;
2066
+ };
2067
+ content: {
2068
+ "text/plain": string;
2069
+ };
2070
+ };
2071
+ /** @description Expired JWT token used or insufficient privilege */
2072
+ 401: {
2073
+ headers: {
2074
+ [name: string]: unknown;
2075
+ };
2076
+ content: {
2077
+ "text/plain": string;
2078
+ };
2079
+ };
2080
+ /** @description Result not found */
2081
+ 404: {
2082
+ headers: {
2083
+ [name: string]: unknown;
2084
+ };
2085
+ content: {
2086
+ "text/plain": string;
2087
+ };
2088
+ };
2089
+ /** @description Internal server error */
2090
+ 500: {
2091
+ headers: {
2092
+ [name: string]: unknown;
2093
+ };
2094
+ content: {
2095
+ "text/plain": string;
2096
+ };
2097
+ };
2098
+ };
2099
+ };
2100
+ deleteScheduleById: {
2101
+ parameters: {
2102
+ query?: never;
2103
+ header?: never;
2104
+ path: {
2105
+ /** @description Schedule ID */
2106
+ scheduleId: string;
2107
+ };
2108
+ cookie?: never;
2109
+ };
2110
+ requestBody?: never;
2111
+ responses: {
2112
+ /** @description Schedule deleted */
2113
+ 204: {
2114
+ headers: {
2115
+ [name: string]: unknown;
2116
+ };
2117
+ content?: never;
2118
+ };
2119
+ /** @description Expired JWT token used or insufficient privilege */
2120
+ 401: {
2121
+ headers: {
2122
+ [name: string]: unknown;
2123
+ };
2124
+ content: {
2125
+ "text/plain": string;
2126
+ };
2127
+ };
2128
+ /** @description Result not found */
2129
+ 404: {
2130
+ headers: {
2131
+ [name: string]: unknown;
2132
+ };
2133
+ content: {
2134
+ "text/plain": string;
2135
+ };
2136
+ };
2137
+ /** @description Internal server error */
2138
+ 500: {
2139
+ headers: {
2140
+ [name: string]: unknown;
2141
+ };
2142
+ content: {
2143
+ "text/plain": string;
2144
+ };
2145
+ };
2146
+ };
2147
+ };
2148
+ claimSchedule: {
2149
+ parameters: {
2150
+ query?: never;
2151
+ header?: never;
2152
+ path: {
2153
+ /** @description Schedule ID */
2154
+ scheduleId: string;
2155
+ };
2156
+ cookie?: never;
2157
+ };
2158
+ requestBody: {
2159
+ content: {
2160
+ "application/json": {
2161
+ /** @description Identity of the worker taking the claim. */
2162
+ claimant: string;
2163
+ /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
2164
+ durationMinutes?: number;
2165
+ /** @description Claim even though the schedule is not yet due (trigger now). A live claim held by another claimant still refuses. */
2166
+ force?: boolean;
2167
+ /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
2168
+ ignorePause?: boolean;
2169
+ };
2170
+ };
2171
+ };
2172
+ responses: {
2173
+ /** @description The claimed schedule */
2174
+ 200: {
2175
+ headers: {
2176
+ [name: string]: unknown;
2177
+ };
2178
+ content: {
2179
+ "application/json": {
2180
+ /**
2181
+ * Format: uuid
2182
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2183
+ */
2184
+ id: string;
2185
+ /**
2186
+ * Format: uuid
2187
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2188
+ */
2189
+ organizationId: string;
2190
+ /**
2191
+ * Format: uuid
2192
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2193
+ */
2194
+ workspaceId?: string;
2195
+ /** @description Human-readable name for the schedule. */
2196
+ name: string;
2197
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2198
+ action: string;
2199
+ /** @description Action parameters, stored as a JSON blob. */
2200
+ params?: Record<string, never>;
2201
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2202
+ enabled: boolean;
2203
+ /**
2204
+ * Format: date-time
2205
+ * @description Time the schedule first becomes due.
2206
+ */
2207
+ runAt?: string | null;
2208
+ /**
2209
+ * Format: date-time
2210
+ * @description Next time a recurring or retrying schedule becomes due.
2211
+ */
2212
+ nextRunAt?: string | null;
2213
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2214
+ recurrence?: string;
2215
+ /**
2216
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2217
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
2218
+ * particular worker but not yet claimed. `claimed`: a worker holds the
2219
+ * claim and has not started. `running`: the claim holder is executing
2220
+ * it. `retrying`: the last attempt failed and another is due.
2221
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
2222
+ * schedule; a recurring schedule returns to `scheduled`.
2223
+ * @enum {string}
2224
+ */
2225
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2226
+ /** @description Attempts already retried for the current run. */
2227
+ retryCount: number;
2228
+ /** @description Maximum retries before the run is marked failed. */
2229
+ maxRetries: number;
2230
+ /** @description Minutes to wait before a retry becomes due. */
2231
+ retryDelayMinutes?: number;
2232
+ /**
2233
+ * Format: date-time
2234
+ * @description Time of the most recent attempt.
2235
+ */
2236
+ lastRunAt?: string | null;
2237
+ /** @description Error reported by the most recent attempt. */
2238
+ lastError?: string;
2239
+ /**
2240
+ * Claim Schema
2241
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2242
+ */
2243
+ claim?: {
2244
+ /**
2245
+ * Format: uuid
2246
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2247
+ */
2248
+ id: string;
2249
+ /**
2250
+ * Format: uuid
2251
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2252
+ */
2253
+ organizationId: string;
2254
+ /** @description Type of the claimed resource, for example `schedule`. */
2255
+ resourceType: string;
2256
+ /**
2257
+ * Format: uuid
2258
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2259
+ */
2260
+ resourceId: string;
2261
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2262
+ claimant: string;
2263
+ /**
2264
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2265
+ * @enum {string}
2266
+ */
2267
+ status: "active" | "released" | "expired";
2268
+ /**
2269
+ * Format: date-time
2270
+ * @description Time the claim was taken.
2271
+ */
2272
+ claimedAt: string;
2273
+ /**
2274
+ * Format: date-time
2275
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
2276
+ */
2277
+ expiresAt: string;
2278
+ /**
2279
+ * Format: date-time
2280
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
2281
+ */
2282
+ releasedAt?: string | null;
2283
+ /**
2284
+ * Format: date-time
2285
+ * @description Timestamp of claim creation.
2286
+ */
2287
+ createdAt: string;
2288
+ /**
2289
+ * Format: date-time
2290
+ * @description Timestamp of last claim modification.
2291
+ */
2292
+ updatedAt: string;
2293
+ };
2294
+ /**
2295
+ * Format: date-time
2296
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2297
+ */
2298
+ pausedAt?: string | null;
2299
+ /** @description Identity that paused the schedule. Server-managed. */
2300
+ pausedBy?: string;
2301
+ /** @description Reason given for pausing the schedule. Server-managed. */
2302
+ pauseReason?: string;
2303
+ /**
2304
+ * Format: date-time
2305
+ * @description Timestamp of schedule creation.
2306
+ */
2307
+ createdAt: string;
2308
+ /**
2309
+ * Format: date-time
2310
+ * @description Timestamp of last schedule modification.
2311
+ */
2312
+ updatedAt: string;
2313
+ /**
2314
+ * Format: date-time
2315
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
2316
+ */
2317
+ deletedAt?: string | null;
2318
+ };
2319
+ };
2320
+ };
2321
+ /** @description Invalid request body or request param */
2322
+ 400: {
2323
+ headers: {
2324
+ [name: string]: unknown;
2325
+ };
2326
+ content: {
2327
+ "text/plain": string;
2328
+ };
2329
+ };
2330
+ /** @description Expired JWT token used or insufficient privilege */
2331
+ 401: {
2332
+ headers: {
2333
+ [name: string]: unknown;
2334
+ };
2335
+ content: {
2336
+ "text/plain": string;
2337
+ };
2338
+ };
2339
+ /** @description Result not found */
2340
+ 404: {
2341
+ headers: {
2342
+ [name: string]: unknown;
2343
+ };
2344
+ content: {
2345
+ "text/plain": string;
2346
+ };
2347
+ };
2348
+ /** @description Conflict - the schedule is held by another claimant's live claim, or the caller is not the holder of the claim it tried to renew or release */
2349
+ 409: {
2350
+ headers: {
2351
+ [name: string]: unknown;
2352
+ };
2353
+ content: {
2354
+ "text/plain": string;
2355
+ };
2356
+ };
2357
+ /** @description Internal server error */
2358
+ 500: {
2359
+ headers: {
2360
+ [name: string]: unknown;
2361
+ };
2362
+ content: {
2363
+ "text/plain": string;
2364
+ };
2365
+ };
2366
+ };
2367
+ };
2368
+ renewScheduleClaim: {
2369
+ parameters: {
2370
+ query?: never;
2371
+ header?: never;
2372
+ path: {
2373
+ /** @description Schedule ID */
2374
+ scheduleId: string;
2375
+ };
2376
+ cookie?: never;
2377
+ };
2378
+ requestBody: {
2379
+ content: {
2380
+ "application/json": {
2381
+ /** @description Identity of the holder renewing the claim. */
2382
+ claimant: string;
2383
+ /** @description Requested extension in minutes from now; the server applies its default when omitted and may cap it. */
2384
+ durationMinutes?: number;
2385
+ };
2386
+ };
2387
+ };
2388
+ responses: {
2389
+ /** @description The schedule with its renewed claim */
2390
+ 200: {
2391
+ headers: {
2392
+ [name: string]: unknown;
2393
+ };
2394
+ content: {
2395
+ "application/json": {
2396
+ /**
2397
+ * Format: uuid
2398
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2399
+ */
2400
+ id: string;
2401
+ /**
2402
+ * Format: uuid
2403
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2404
+ */
2405
+ organizationId: string;
2406
+ /**
2407
+ * Format: uuid
2408
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2409
+ */
2410
+ workspaceId?: string;
2411
+ /** @description Human-readable name for the schedule. */
2412
+ name: string;
2413
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2414
+ action: string;
2415
+ /** @description Action parameters, stored as a JSON blob. */
2416
+ params?: Record<string, never>;
2417
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2418
+ enabled: boolean;
2419
+ /**
2420
+ * Format: date-time
2421
+ * @description Time the schedule first becomes due.
2422
+ */
2423
+ runAt?: string | null;
2424
+ /**
2425
+ * Format: date-time
2426
+ * @description Next time a recurring or retrying schedule becomes due.
2427
+ */
2428
+ nextRunAt?: string | null;
2429
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2430
+ recurrence?: string;
2431
+ /**
2432
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2433
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
2434
+ * particular worker but not yet claimed. `claimed`: a worker holds the
2435
+ * claim and has not started. `running`: the claim holder is executing
2436
+ * it. `retrying`: the last attempt failed and another is due.
2437
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
2438
+ * schedule; a recurring schedule returns to `scheduled`.
2439
+ * @enum {string}
2440
+ */
2441
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2442
+ /** @description Attempts already retried for the current run. */
2443
+ retryCount: number;
2444
+ /** @description Maximum retries before the run is marked failed. */
2445
+ maxRetries: number;
2446
+ /** @description Minutes to wait before a retry becomes due. */
2447
+ retryDelayMinutes?: number;
2448
+ /**
2449
+ * Format: date-time
2450
+ * @description Time of the most recent attempt.
2451
+ */
2452
+ lastRunAt?: string | null;
2453
+ /** @description Error reported by the most recent attempt. */
2454
+ lastError?: string;
2455
+ /**
2456
+ * Claim Schema
2457
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2458
+ */
2459
+ claim?: {
2460
+ /**
2461
+ * Format: uuid
2462
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2463
+ */
2464
+ id: string;
2465
+ /**
2466
+ * Format: uuid
2467
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2468
+ */
2469
+ organizationId: string;
2470
+ /** @description Type of the claimed resource, for example `schedule`. */
2471
+ resourceType: string;
2472
+ /**
2473
+ * Format: uuid
2474
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2475
+ */
2476
+ resourceId: string;
2477
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2478
+ claimant: string;
2479
+ /**
2480
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2481
+ * @enum {string}
2482
+ */
2483
+ status: "active" | "released" | "expired";
2484
+ /**
2485
+ * Format: date-time
2486
+ * @description Time the claim was taken.
2487
+ */
2488
+ claimedAt: string;
2489
+ /**
2490
+ * Format: date-time
2491
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
2492
+ */
2493
+ expiresAt: string;
2494
+ /**
2495
+ * Format: date-time
2496
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
2497
+ */
2498
+ releasedAt?: string | null;
2499
+ /**
2500
+ * Format: date-time
2501
+ * @description Timestamp of claim creation.
2502
+ */
2503
+ createdAt: string;
2504
+ /**
2505
+ * Format: date-time
2506
+ * @description Timestamp of last claim modification.
2507
+ */
2508
+ updatedAt: string;
2509
+ };
2510
+ /**
2511
+ * Format: date-time
2512
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2513
+ */
2514
+ pausedAt?: string | null;
2515
+ /** @description Identity that paused the schedule. Server-managed. */
2516
+ pausedBy?: string;
2517
+ /** @description Reason given for pausing the schedule. Server-managed. */
2518
+ pauseReason?: string;
2519
+ /**
2520
+ * Format: date-time
2521
+ * @description Timestamp of schedule creation.
2522
+ */
2523
+ createdAt: string;
2524
+ /**
2525
+ * Format: date-time
2526
+ * @description Timestamp of last schedule modification.
2527
+ */
2528
+ updatedAt: string;
2529
+ /**
2530
+ * Format: date-time
2531
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
2532
+ */
2533
+ deletedAt?: string | null;
2534
+ };
2535
+ };
2536
+ };
2537
+ /** @description Invalid request body or request param */
2538
+ 400: {
2539
+ headers: {
2540
+ [name: string]: unknown;
2541
+ };
2542
+ content: {
2543
+ "text/plain": string;
2544
+ };
2545
+ };
2546
+ /** @description Expired JWT token used or insufficient privilege */
2547
+ 401: {
2548
+ headers: {
2549
+ [name: string]: unknown;
2550
+ };
2551
+ content: {
2552
+ "text/plain": string;
2553
+ };
2554
+ };
2555
+ /** @description Result not found */
2556
+ 404: {
2557
+ headers: {
2558
+ [name: string]: unknown;
2559
+ };
2560
+ content: {
2561
+ "text/plain": string;
2562
+ };
2563
+ };
2564
+ /** @description Conflict - the schedule is held by another claimant's live claim, or the caller is not the holder of the claim it tried to renew or release */
2565
+ 409: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content: {
2570
+ "text/plain": string;
2571
+ };
2572
+ };
2573
+ /** @description Internal server error */
2574
+ 500: {
2575
+ headers: {
2576
+ [name: string]: unknown;
2577
+ };
2578
+ content: {
2579
+ "text/plain": string;
2580
+ };
2581
+ };
2582
+ };
2583
+ };
2584
+ releaseScheduleClaim: {
2585
+ parameters: {
2586
+ query?: never;
2587
+ header?: never;
2588
+ path: {
2589
+ /** @description Schedule ID */
2590
+ scheduleId: string;
2591
+ };
2592
+ cookie?: never;
2593
+ };
2594
+ requestBody: {
2595
+ content: {
2596
+ "application/json": {
2597
+ /** @description Identity of the holder releasing the claim. */
2598
+ claimant: string;
2599
+ /**
2600
+ * @description Outcome status to record with the release.
2601
+ * @enum {string}
2602
+ */
2603
+ status?: "scheduled" | "retrying" | "completed" | "failed" | "cancelled";
2604
+ /**
2605
+ * Format: date-time
2606
+ * @description Time of the attempt being reported.
2607
+ */
2608
+ lastRunAt?: string | null;
2609
+ /** @description Error reported by the attempt; empty on success. */
2610
+ lastError?: string;
2611
+ /**
2612
+ * Format: date-time
2613
+ * @description Next due time for a recurring or retrying schedule.
2614
+ */
2615
+ nextRunAt?: string | null;
2616
+ /** @description Retries used so far for the current run. */
2617
+ retryCount?: number;
2618
+ };
2619
+ };
2620
+ };
2621
+ responses: {
2622
+ /** @description The released schedule */
2623
+ 200: {
2624
+ headers: {
2625
+ [name: string]: unknown;
2626
+ };
2627
+ content: {
2628
+ "application/json": {
2629
+ /**
2630
+ * Format: uuid
2631
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2632
+ */
2633
+ id: string;
2634
+ /**
2635
+ * Format: uuid
2636
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2637
+ */
2638
+ organizationId: string;
2639
+ /**
2640
+ * Format: uuid
2641
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2642
+ */
2643
+ workspaceId?: string;
2644
+ /** @description Human-readable name for the schedule. */
2645
+ name: string;
2646
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2647
+ action: string;
2648
+ /** @description Action parameters, stored as a JSON blob. */
2649
+ params?: Record<string, never>;
2650
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2651
+ enabled: boolean;
2652
+ /**
2653
+ * Format: date-time
2654
+ * @description Time the schedule first becomes due.
2655
+ */
2656
+ runAt?: string | null;
2657
+ /**
2658
+ * Format: date-time
2659
+ * @description Next time a recurring or retrying schedule becomes due.
2660
+ */
2661
+ nextRunAt?: string | null;
2662
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2663
+ recurrence?: string;
2664
+ /**
2665
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2666
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
2667
+ * particular worker but not yet claimed. `claimed`: a worker holds the
2668
+ * claim and has not started. `running`: the claim holder is executing
2669
+ * it. `retrying`: the last attempt failed and another is due.
2670
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
2671
+ * schedule; a recurring schedule returns to `scheduled`.
2672
+ * @enum {string}
2673
+ */
2674
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2675
+ /** @description Attempts already retried for the current run. */
2676
+ retryCount: number;
2677
+ /** @description Maximum retries before the run is marked failed. */
2678
+ maxRetries: number;
2679
+ /** @description Minutes to wait before a retry becomes due. */
2680
+ retryDelayMinutes?: number;
2681
+ /**
2682
+ * Format: date-time
2683
+ * @description Time of the most recent attempt.
2684
+ */
2685
+ lastRunAt?: string | null;
2686
+ /** @description Error reported by the most recent attempt. */
2687
+ lastError?: string;
2688
+ /**
2689
+ * Claim Schema
2690
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2691
+ */
2692
+ claim?: {
2693
+ /**
2694
+ * Format: uuid
2695
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2696
+ */
2697
+ id: string;
2698
+ /**
2699
+ * Format: uuid
2700
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2701
+ */
2702
+ organizationId: string;
2703
+ /** @description Type of the claimed resource, for example `schedule`. */
2704
+ resourceType: string;
2705
+ /**
2706
+ * Format: uuid
2707
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2708
+ */
2709
+ resourceId: string;
2710
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2711
+ claimant: string;
2712
+ /**
2713
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2714
+ * @enum {string}
2715
+ */
2716
+ status: "active" | "released" | "expired";
2717
+ /**
2718
+ * Format: date-time
2719
+ * @description Time the claim was taken.
2720
+ */
2721
+ claimedAt: string;
2722
+ /**
2723
+ * Format: date-time
2724
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
2725
+ */
2726
+ expiresAt: string;
2727
+ /**
2728
+ * Format: date-time
2729
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
2730
+ */
2731
+ releasedAt?: string | null;
2732
+ /**
2733
+ * Format: date-time
2734
+ * @description Timestamp of claim creation.
2735
+ */
2736
+ createdAt: string;
2737
+ /**
2738
+ * Format: date-time
2739
+ * @description Timestamp of last claim modification.
2740
+ */
2741
+ updatedAt: string;
2742
+ };
2743
+ /**
2744
+ * Format: date-time
2745
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2746
+ */
2747
+ pausedAt?: string | null;
2748
+ /** @description Identity that paused the schedule. Server-managed. */
2749
+ pausedBy?: string;
2750
+ /** @description Reason given for pausing the schedule. Server-managed. */
2751
+ pauseReason?: string;
2752
+ /**
2753
+ * Format: date-time
2754
+ * @description Timestamp of schedule creation.
2755
+ */
2756
+ createdAt: string;
2757
+ /**
2758
+ * Format: date-time
2759
+ * @description Timestamp of last schedule modification.
2760
+ */
2761
+ updatedAt: string;
2762
+ /**
2763
+ * Format: date-time
2764
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
2765
+ */
2766
+ deletedAt?: string | null;
2767
+ };
2768
+ };
2769
+ };
2770
+ /** @description Invalid request body or request param */
2771
+ 400: {
2772
+ headers: {
2773
+ [name: string]: unknown;
2774
+ };
2775
+ content: {
2776
+ "text/plain": string;
2777
+ };
2778
+ };
2779
+ /** @description Expired JWT token used or insufficient privilege */
2780
+ 401: {
2781
+ headers: {
2782
+ [name: string]: unknown;
2783
+ };
2784
+ content: {
2785
+ "text/plain": string;
2786
+ };
2787
+ };
2788
+ /** @description Result not found */
2789
+ 404: {
2790
+ headers: {
2791
+ [name: string]: unknown;
2792
+ };
2793
+ content: {
2794
+ "text/plain": string;
2795
+ };
2796
+ };
2797
+ /** @description Conflict - the schedule is held by another claimant's live claim, or the caller is not the holder of the claim it tried to renew or release */
2798
+ 409: {
2799
+ headers: {
2800
+ [name: string]: unknown;
2801
+ };
2802
+ content: {
2803
+ "text/plain": string;
2804
+ };
2805
+ };
2806
+ /** @description Internal server error */
2807
+ 500: {
2808
+ headers: {
2809
+ [name: string]: unknown;
2810
+ };
2811
+ content: {
2812
+ "text/plain": string;
2813
+ };
2814
+ };
2815
+ };
2816
+ };
2817
+ pauseSchedule: {
2818
+ parameters: {
2819
+ query?: never;
2820
+ header?: never;
2821
+ path: {
2822
+ /** @description Schedule ID */
2823
+ scheduleId: string;
2824
+ };
2825
+ cookie?: never;
2826
+ };
2827
+ requestBody: {
2828
+ content: {
2829
+ "application/json": {
2830
+ /** @description Identity setting the pause; defaults to the authenticated user. */
2831
+ pausedBy?: string;
2832
+ /** @description Reason for the pause. */
2833
+ reason?: string;
2834
+ };
2835
+ };
2836
+ };
2837
+ responses: {
2838
+ /** @description The paused schedule */
2839
+ 200: {
2840
+ headers: {
2841
+ [name: string]: unknown;
2842
+ };
2843
+ content: {
2844
+ "application/json": {
2845
+ /**
2846
+ * Format: uuid
2847
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2848
+ */
2849
+ id: string;
2850
+ /**
2851
+ * Format: uuid
2852
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2853
+ */
2854
+ organizationId: string;
2855
+ /**
2856
+ * Format: uuid
2857
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2858
+ */
2859
+ workspaceId?: string;
2860
+ /** @description Human-readable name for the schedule. */
2861
+ name: string;
2862
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2863
+ action: string;
2864
+ /** @description Action parameters, stored as a JSON blob. */
2865
+ params?: Record<string, never>;
2866
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2867
+ enabled: boolean;
2868
+ /**
2869
+ * Format: date-time
2870
+ * @description Time the schedule first becomes due.
2871
+ */
2872
+ runAt?: string | null;
2873
+ /**
2874
+ * Format: date-time
2875
+ * @description Next time a recurring or retrying schedule becomes due.
2876
+ */
2877
+ nextRunAt?: string | null;
2878
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2879
+ recurrence?: string;
2880
+ /**
2881
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2882
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
2883
+ * particular worker but not yet claimed. `claimed`: a worker holds the
2884
+ * claim and has not started. `running`: the claim holder is executing
2885
+ * it. `retrying`: the last attempt failed and another is due.
2886
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
2887
+ * schedule; a recurring schedule returns to `scheduled`.
2888
+ * @enum {string}
2889
+ */
2890
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2891
+ /** @description Attempts already retried for the current run. */
2892
+ retryCount: number;
2893
+ /** @description Maximum retries before the run is marked failed. */
2894
+ maxRetries: number;
2895
+ /** @description Minutes to wait before a retry becomes due. */
2896
+ retryDelayMinutes?: number;
2897
+ /**
2898
+ * Format: date-time
2899
+ * @description Time of the most recent attempt.
2900
+ */
2901
+ lastRunAt?: string | null;
2902
+ /** @description Error reported by the most recent attempt. */
2903
+ lastError?: string;
2904
+ /**
2905
+ * Claim Schema
2906
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2907
+ */
2908
+ claim?: {
2909
+ /**
2910
+ * Format: uuid
2911
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2912
+ */
2913
+ id: string;
2914
+ /**
2915
+ * Format: uuid
2916
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2917
+ */
2918
+ organizationId: string;
2919
+ /** @description Type of the claimed resource, for example `schedule`. */
2920
+ resourceType: string;
2921
+ /**
2922
+ * Format: uuid
2923
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2924
+ */
2925
+ resourceId: string;
2926
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2927
+ claimant: string;
2928
+ /**
2929
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2930
+ * @enum {string}
2931
+ */
2932
+ status: "active" | "released" | "expired";
2933
+ /**
2934
+ * Format: date-time
2935
+ * @description Time the claim was taken.
2936
+ */
2937
+ claimedAt: string;
2938
+ /**
2939
+ * Format: date-time
2940
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
2941
+ */
2942
+ expiresAt: string;
2943
+ /**
2944
+ * Format: date-time
2945
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
2946
+ */
2947
+ releasedAt?: string | null;
2948
+ /**
2949
+ * Format: date-time
2950
+ * @description Timestamp of claim creation.
2951
+ */
2952
+ createdAt: string;
2953
+ /**
2954
+ * Format: date-time
2955
+ * @description Timestamp of last claim modification.
2956
+ */
2957
+ updatedAt: string;
2958
+ };
2959
+ /**
2960
+ * Format: date-time
2961
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2962
+ */
2963
+ pausedAt?: string | null;
2964
+ /** @description Identity that paused the schedule. Server-managed. */
2965
+ pausedBy?: string;
2966
+ /** @description Reason given for pausing the schedule. Server-managed. */
2967
+ pauseReason?: string;
2968
+ /**
2969
+ * Format: date-time
2970
+ * @description Timestamp of schedule creation.
2971
+ */
2972
+ createdAt: string;
2973
+ /**
2974
+ * Format: date-time
2975
+ * @description Timestamp of last schedule modification.
2976
+ */
2977
+ updatedAt: string;
2978
+ /**
2979
+ * Format: date-time
2980
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
2981
+ */
2982
+ deletedAt?: string | null;
2983
+ };
2984
+ };
2985
+ };
2986
+ /** @description Invalid request body or request param */
2987
+ 400: {
2988
+ headers: {
2989
+ [name: string]: unknown;
2990
+ };
2991
+ content: {
2992
+ "text/plain": string;
2993
+ };
2994
+ };
2995
+ /** @description Expired JWT token used or insufficient privilege */
2996
+ 401: {
2997
+ headers: {
2998
+ [name: string]: unknown;
2999
+ };
3000
+ content: {
3001
+ "text/plain": string;
3002
+ };
3003
+ };
3004
+ /** @description Result not found */
3005
+ 404: {
3006
+ headers: {
3007
+ [name: string]: unknown;
3008
+ };
3009
+ content: {
3010
+ "text/plain": string;
3011
+ };
3012
+ };
3013
+ /** @description Internal server error */
3014
+ 500: {
3015
+ headers: {
3016
+ [name: string]: unknown;
3017
+ };
3018
+ content: {
3019
+ "text/plain": string;
3020
+ };
3021
+ };
3022
+ };
3023
+ };
3024
+ resumeSchedule: {
3025
+ parameters: {
3026
+ query?: never;
3027
+ header?: never;
3028
+ path: {
3029
+ /** @description Schedule ID */
3030
+ scheduleId: string;
3031
+ };
3032
+ cookie?: never;
3033
+ };
3034
+ requestBody?: never;
3035
+ responses: {
3036
+ /** @description The resumed schedule */
3037
+ 200: {
3038
+ headers: {
3039
+ [name: string]: unknown;
3040
+ };
3041
+ content: {
3042
+ "application/json": {
3043
+ /**
3044
+ * Format: uuid
3045
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3046
+ */
3047
+ id: string;
3048
+ /**
3049
+ * Format: uuid
3050
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3051
+ */
3052
+ organizationId: string;
3053
+ /**
3054
+ * Format: uuid
3055
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3056
+ */
3057
+ workspaceId?: string;
3058
+ /** @description Human-readable name for the schedule. */
3059
+ name: string;
3060
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
3061
+ action: string;
3062
+ /** @description Action parameters, stored as a JSON blob. */
3063
+ params?: Record<string, never>;
3064
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
3065
+ enabled: boolean;
3066
+ /**
3067
+ * Format: date-time
3068
+ * @description Time the schedule first becomes due.
3069
+ */
3070
+ runAt?: string | null;
3071
+ /**
3072
+ * Format: date-time
3073
+ * @description Next time a recurring or retrying schedule becomes due.
3074
+ */
3075
+ nextRunAt?: string | null;
3076
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
3077
+ recurrence?: string;
3078
+ /**
3079
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
3080
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
3081
+ * particular worker but not yet claimed. `claimed`: a worker holds the
3082
+ * claim and has not started. `running`: the claim holder is executing
3083
+ * it. `retrying`: the last attempt failed and another is due.
3084
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
3085
+ * schedule; a recurring schedule returns to `scheduled`.
3086
+ * @enum {string}
3087
+ */
3088
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
3089
+ /** @description Attempts already retried for the current run. */
3090
+ retryCount: number;
3091
+ /** @description Maximum retries before the run is marked failed. */
3092
+ maxRetries: number;
3093
+ /** @description Minutes to wait before a retry becomes due. */
3094
+ retryDelayMinutes?: number;
3095
+ /**
3096
+ * Format: date-time
3097
+ * @description Time of the most recent attempt.
3098
+ */
3099
+ lastRunAt?: string | null;
3100
+ /** @description Error reported by the most recent attempt. */
3101
+ lastError?: string;
3102
+ /**
3103
+ * Claim Schema
3104
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
3105
+ */
3106
+ claim?: {
3107
+ /**
3108
+ * Format: uuid
3109
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3110
+ */
3111
+ id: string;
3112
+ /**
3113
+ * Format: uuid
3114
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3115
+ */
3116
+ organizationId: string;
3117
+ /** @description Type of the claimed resource, for example `schedule`. */
3118
+ resourceType: string;
3119
+ /**
3120
+ * Format: uuid
3121
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3122
+ */
3123
+ resourceId: string;
3124
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
3125
+ claimant: string;
3126
+ /**
3127
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
3128
+ * @enum {string}
3129
+ */
3130
+ status: "active" | "released" | "expired";
3131
+ /**
3132
+ * Format: date-time
3133
+ * @description Time the claim was taken.
3134
+ */
3135
+ claimedAt: string;
3136
+ /**
3137
+ * Format: date-time
3138
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
3139
+ */
3140
+ expiresAt: string;
3141
+ /**
3142
+ * Format: date-time
3143
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
3144
+ */
3145
+ releasedAt?: string | null;
3146
+ /**
3147
+ * Format: date-time
3148
+ * @description Timestamp of claim creation.
3149
+ */
3150
+ createdAt: string;
3151
+ /**
3152
+ * Format: date-time
3153
+ * @description Timestamp of last claim modification.
3154
+ */
3155
+ updatedAt: string;
3156
+ };
3157
+ /**
3158
+ * Format: date-time
3159
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
3160
+ */
3161
+ pausedAt?: string | null;
3162
+ /** @description Identity that paused the schedule. Server-managed. */
3163
+ pausedBy?: string;
3164
+ /** @description Reason given for pausing the schedule. Server-managed. */
3165
+ pauseReason?: string;
3166
+ /**
3167
+ * Format: date-time
3168
+ * @description Timestamp of schedule creation.
3169
+ */
3170
+ createdAt: string;
3171
+ /**
3172
+ * Format: date-time
3173
+ * @description Timestamp of last schedule modification.
3174
+ */
3175
+ updatedAt: string;
3176
+ /**
3177
+ * Format: date-time
3178
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
3179
+ */
3180
+ deletedAt?: string | null;
3181
+ };
3182
+ };
3183
+ };
3184
+ /** @description Expired JWT token used or insufficient privilege */
3185
+ 401: {
3186
+ headers: {
3187
+ [name: string]: unknown;
3188
+ };
3189
+ content: {
3190
+ "text/plain": string;
3191
+ };
3192
+ };
3193
+ /** @description Result not found */
3194
+ 404: {
3195
+ headers: {
3196
+ [name: string]: unknown;
3197
+ };
3198
+ content: {
3199
+ "text/plain": string;
3200
+ };
3201
+ };
3202
+ /** @description Internal server error */
3203
+ 500: {
3204
+ headers: {
3205
+ [name: string]: unknown;
3206
+ };
3207
+ content: {
3208
+ "text/plain": string;
3209
+ };
3210
+ };
3211
+ };
3212
+ };
3213
+ getSchedulesOfWorkspace: {
3214
+ parameters: {
3215
+ query?: {
3216
+ /** @description Get responses by page */
3217
+ page?: number;
3218
+ /** @description Number of items per page. */
3219
+ pageSize?: number;
3220
+ /** @description Get responses that match search param value */
3221
+ search?: string;
3222
+ /** @description Get ordered responses */
3223
+ order?: string;
3224
+ /** @description Only schedules in this status. */
3225
+ status?: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
3226
+ };
3227
+ header?: never;
3228
+ path: {
3229
+ /** @description Workspace ID */
3230
+ workspaceId: string;
3231
+ };
3232
+ cookie?: never;
3233
+ };
3234
+ requestBody?: never;
3235
+ responses: {
3236
+ /** @description Schedules page */
3237
+ 200: {
3238
+ headers: {
3239
+ [name: string]: unknown;
3240
+ };
3241
+ content: {
3242
+ "application/json": {
3243
+ /** @description Current page number of the result set. */
3244
+ page: number;
3245
+ /** @description Number of items per page. */
3246
+ pageSize: number;
3247
+ /** @description Total number of items available. */
3248
+ totalCount: number;
3249
+ /** @description Schedules included on this page of results. */
3250
+ schedules: {
3251
+ /**
3252
+ * Format: uuid
3253
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3254
+ */
3255
+ id: string;
3256
+ /**
3257
+ * Format: uuid
3258
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3259
+ */
3260
+ organizationId: string;
3261
+ /**
3262
+ * Format: uuid
3263
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3264
+ */
3265
+ workspaceId?: string;
3266
+ /** @description Human-readable name for the schedule. */
3267
+ name: string;
3268
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
3269
+ action: string;
3270
+ /** @description Action parameters, stored as a JSON blob. */
3271
+ params?: Record<string, never>;
3272
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
3273
+ enabled: boolean;
3274
+ /**
3275
+ * Format: date-time
3276
+ * @description Time the schedule first becomes due.
3277
+ */
3278
+ runAt?: string | null;
3279
+ /**
3280
+ * Format: date-time
3281
+ * @description Next time a recurring or retrying schedule becomes due.
3282
+ */
3283
+ nextRunAt?: string | null;
3284
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
3285
+ recurrence?: string;
3286
+ /**
3287
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
3288
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
3289
+ * particular worker but not yet claimed. `claimed`: a worker holds the
3290
+ * claim and has not started. `running`: the claim holder is executing
3291
+ * it. `retrying`: the last attempt failed and another is due.
3292
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
3293
+ * schedule; a recurring schedule returns to `scheduled`.
3294
+ * @enum {string}
3295
+ */
3296
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
3297
+ /** @description Attempts already retried for the current run. */
3298
+ retryCount: number;
3299
+ /** @description Maximum retries before the run is marked failed. */
3300
+ maxRetries: number;
3301
+ /** @description Minutes to wait before a retry becomes due. */
3302
+ retryDelayMinutes?: number;
3303
+ /**
3304
+ * Format: date-time
3305
+ * @description Time of the most recent attempt.
3306
+ */
3307
+ lastRunAt?: string | null;
3308
+ /** @description Error reported by the most recent attempt. */
3309
+ lastError?: string;
3310
+ /**
3311
+ * Claim Schema
3312
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
3313
+ */
3314
+ claim?: {
3315
+ /**
3316
+ * Format: uuid
3317
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3318
+ */
3319
+ id: string;
3320
+ /**
3321
+ * Format: uuid
3322
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3323
+ */
3324
+ organizationId: string;
3325
+ /** @description Type of the claimed resource, for example `schedule`. */
3326
+ resourceType: string;
3327
+ /**
3328
+ * Format: uuid
3329
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3330
+ */
3331
+ resourceId: string;
3332
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
3333
+ claimant: string;
3334
+ /**
3335
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
3336
+ * @enum {string}
3337
+ */
3338
+ status: "active" | "released" | "expired";
3339
+ /**
3340
+ * Format: date-time
3341
+ * @description Time the claim was taken.
3342
+ */
3343
+ claimedAt: string;
3344
+ /**
3345
+ * Format: date-time
3346
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
3347
+ */
3348
+ expiresAt: string;
3349
+ /**
3350
+ * Format: date-time
3351
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
3352
+ */
3353
+ releasedAt?: string | null;
3354
+ /**
3355
+ * Format: date-time
3356
+ * @description Timestamp of claim creation.
3357
+ */
3358
+ createdAt: string;
3359
+ /**
3360
+ * Format: date-time
3361
+ * @description Timestamp of last claim modification.
3362
+ */
3363
+ updatedAt: string;
3364
+ };
3365
+ /**
3366
+ * Format: date-time
3367
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
3368
+ */
3369
+ pausedAt?: string | null;
3370
+ /** @description Identity that paused the schedule. Server-managed. */
3371
+ pausedBy?: string;
3372
+ /** @description Reason given for pausing the schedule. Server-managed. */
3373
+ pauseReason?: string;
3374
+ /**
3375
+ * Format: date-time
3376
+ * @description Timestamp of schedule creation.
3377
+ */
3378
+ createdAt: string;
3379
+ /**
3380
+ * Format: date-time
3381
+ * @description Timestamp of last schedule modification.
3382
+ */
3383
+ updatedAt: string;
3384
+ /**
3385
+ * Format: date-time
3386
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
3387
+ */
3388
+ deletedAt?: string | null;
3389
+ }[];
3390
+ };
3391
+ };
3392
+ };
3393
+ /** @description Expired JWT token used or insufficient privilege */
3394
+ 401: {
3395
+ headers: {
3396
+ [name: string]: unknown;
3397
+ };
3398
+ content: {
3399
+ "text/plain": string;
3400
+ };
3401
+ };
3402
+ /** @description Result not found */
3403
+ 404: {
3404
+ headers: {
3405
+ [name: string]: unknown;
3406
+ };
3407
+ content: {
3408
+ "text/plain": string;
3409
+ };
3410
+ };
3411
+ /** @description Internal server error */
3412
+ 500: {
3413
+ headers: {
3414
+ [name: string]: unknown;
3415
+ };
3416
+ content: {
3417
+ "text/plain": string;
3418
+ };
3419
+ };
3420
+ };
3421
+ };
3422
+ assignScheduleToWorkspace: {
3423
+ parameters: {
3424
+ query?: never;
3425
+ header?: never;
3426
+ path: {
3427
+ /** @description Workspace ID */
3428
+ workspaceId: string;
3429
+ /** @description Schedule ID */
3430
+ scheduleId: string;
3431
+ };
3432
+ cookie?: never;
3433
+ };
3434
+ requestBody?: never;
3435
+ responses: {
3436
+ /** @description The linked schedule */
3437
+ 200: {
3438
+ headers: {
3439
+ [name: string]: unknown;
3440
+ };
3441
+ content: {
3442
+ "application/json": {
3443
+ /**
3444
+ * Format: uuid
3445
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3446
+ */
3447
+ id: string;
3448
+ /**
3449
+ * Format: uuid
3450
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3451
+ */
3452
+ organizationId: string;
3453
+ /**
3454
+ * Format: uuid
3455
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3456
+ */
3457
+ workspaceId?: string;
3458
+ /** @description Human-readable name for the schedule. */
3459
+ name: string;
3460
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
3461
+ action: string;
3462
+ /** @description Action parameters, stored as a JSON blob. */
3463
+ params?: Record<string, never>;
3464
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
3465
+ enabled: boolean;
3466
+ /**
3467
+ * Format: date-time
3468
+ * @description Time the schedule first becomes due.
3469
+ */
3470
+ runAt?: string | null;
3471
+ /**
3472
+ * Format: date-time
3473
+ * @description Next time a recurring or retrying schedule becomes due.
3474
+ */
3475
+ nextRunAt?: string | null;
3476
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
3477
+ recurrence?: string;
3478
+ /**
3479
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
3480
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
3481
+ * particular worker but not yet claimed. `claimed`: a worker holds the
3482
+ * claim and has not started. `running`: the claim holder is executing
3483
+ * it. `retrying`: the last attempt failed and another is due.
3484
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
3485
+ * schedule; a recurring schedule returns to `scheduled`.
3486
+ * @enum {string}
3487
+ */
3488
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
3489
+ /** @description Attempts already retried for the current run. */
3490
+ retryCount: number;
3491
+ /** @description Maximum retries before the run is marked failed. */
3492
+ maxRetries: number;
3493
+ /** @description Minutes to wait before a retry becomes due. */
3494
+ retryDelayMinutes?: number;
3495
+ /**
3496
+ * Format: date-time
3497
+ * @description Time of the most recent attempt.
3498
+ */
3499
+ lastRunAt?: string | null;
3500
+ /** @description Error reported by the most recent attempt. */
3501
+ lastError?: string;
3502
+ /**
3503
+ * Claim Schema
3504
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
3505
+ */
3506
+ claim?: {
3507
+ /**
3508
+ * Format: uuid
3509
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3510
+ */
3511
+ id: string;
3512
+ /**
3513
+ * Format: uuid
3514
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3515
+ */
3516
+ organizationId: string;
3517
+ /** @description Type of the claimed resource, for example `schedule`. */
3518
+ resourceType: string;
3519
+ /**
3520
+ * Format: uuid
3521
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3522
+ */
3523
+ resourceId: string;
3524
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
3525
+ claimant: string;
3526
+ /**
3527
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
3528
+ * @enum {string}
3529
+ */
3530
+ status: "active" | "released" | "expired";
3531
+ /**
3532
+ * Format: date-time
3533
+ * @description Time the claim was taken.
3534
+ */
3535
+ claimedAt: string;
3536
+ /**
3537
+ * Format: date-time
3538
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
3539
+ */
3540
+ expiresAt: string;
3541
+ /**
3542
+ * Format: date-time
3543
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
3544
+ */
3545
+ releasedAt?: string | null;
3546
+ /**
3547
+ * Format: date-time
3548
+ * @description Timestamp of claim creation.
3549
+ */
3550
+ createdAt: string;
3551
+ /**
3552
+ * Format: date-time
3553
+ * @description Timestamp of last claim modification.
3554
+ */
3555
+ updatedAt: string;
3556
+ };
3557
+ /**
3558
+ * Format: date-time
3559
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
3560
+ */
3561
+ pausedAt?: string | null;
3562
+ /** @description Identity that paused the schedule. Server-managed. */
3563
+ pausedBy?: string;
3564
+ /** @description Reason given for pausing the schedule. Server-managed. */
3565
+ pauseReason?: string;
3566
+ /**
3567
+ * Format: date-time
3568
+ * @description Timestamp of schedule creation.
3569
+ */
3570
+ createdAt: string;
3571
+ /**
3572
+ * Format: date-time
3573
+ * @description Timestamp of last schedule modification.
3574
+ */
3575
+ updatedAt: string;
3576
+ /**
3577
+ * Format: date-time
3578
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
3579
+ */
3580
+ deletedAt?: string | null;
3581
+ };
3582
+ };
3583
+ };
3584
+ /** @description Expired JWT token used or insufficient privilege */
3585
+ 401: {
3586
+ headers: {
3587
+ [name: string]: unknown;
3588
+ };
3589
+ content: {
3590
+ "text/plain": string;
3591
+ };
3592
+ };
3593
+ /** @description Result not found */
3594
+ 404: {
3595
+ headers: {
3596
+ [name: string]: unknown;
3597
+ };
3598
+ content: {
3599
+ "text/plain": string;
3600
+ };
3601
+ };
3602
+ /** @description Internal server error */
3603
+ 500: {
3604
+ headers: {
3605
+ [name: string]: unknown;
3606
+ };
3607
+ content: {
3608
+ "text/plain": string;
3609
+ };
3610
+ };
3611
+ };
3612
+ };
3613
+ unassignScheduleFromWorkspace: {
3614
+ parameters: {
3615
+ query?: never;
3616
+ header?: never;
3617
+ path: {
3618
+ /** @description Workspace ID */
3619
+ workspaceId: string;
3620
+ /** @description Schedule ID */
3621
+ scheduleId: string;
3622
+ };
3623
+ cookie?: never;
3624
+ };
3625
+ requestBody?: never;
3626
+ responses: {
3627
+ /** @description The unlinked schedule */
3628
+ 200: {
3629
+ headers: {
3630
+ [name: string]: unknown;
3631
+ };
3632
+ content: {
3633
+ "application/json": {
3634
+ /**
3635
+ * Format: uuid
3636
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3637
+ */
3638
+ id: string;
3639
+ /**
3640
+ * Format: uuid
3641
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3642
+ */
3643
+ organizationId: string;
3644
+ /**
3645
+ * Format: uuid
3646
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3647
+ */
3648
+ workspaceId?: string;
3649
+ /** @description Human-readable name for the schedule. */
3650
+ name: string;
3651
+ /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
3652
+ action: string;
3653
+ /** @description Action parameters, stored as a JSON blob. */
3654
+ params?: Record<string, never>;
3655
+ /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
3656
+ enabled: boolean;
3657
+ /**
3658
+ * Format: date-time
3659
+ * @description Time the schedule first becomes due.
3660
+ */
3661
+ runAt?: string | null;
3662
+ /**
3663
+ * Format: date-time
3664
+ * @description Next time a recurring or retrying schedule becomes due.
3665
+ */
3666
+ nextRunAt?: string | null;
3667
+ /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
3668
+ recurrence?: string;
3669
+ /**
3670
+ * @description Lifecycle status. `pending`: created, not yet due-scheduled.
3671
+ * `scheduled`: waiting for its due time. `assigned`: designated for a
3672
+ * particular worker but not yet claimed. `claimed`: a worker holds the
3673
+ * claim and has not started. `running`: the claim holder is executing
3674
+ * it. `retrying`: the last attempt failed and another is due.
3675
+ * `completed`, `failed` and `cancelled` are terminal for a run-once
3676
+ * schedule; a recurring schedule returns to `scheduled`.
3677
+ * @enum {string}
3678
+ */
3679
+ status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
3680
+ /** @description Attempts already retried for the current run. */
3681
+ retryCount: number;
3682
+ /** @description Maximum retries before the run is marked failed. */
3683
+ maxRetries: number;
3684
+ /** @description Minutes to wait before a retry becomes due. */
3685
+ retryDelayMinutes?: number;
3686
+ /**
3687
+ * Format: date-time
3688
+ * @description Time of the most recent attempt.
3689
+ */
3690
+ lastRunAt?: string | null;
3691
+ /** @description Error reported by the most recent attempt. */
3692
+ lastError?: string;
3693
+ /**
3694
+ * Claim Schema
3695
+ * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
3696
+ */
3697
+ claim?: {
3698
+ /**
3699
+ * Format: uuid
3700
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3701
+ */
3702
+ id: string;
3703
+ /**
3704
+ * Format: uuid
3705
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3706
+ */
3707
+ organizationId: string;
3708
+ /** @description Type of the claimed resource, for example `schedule`. */
3709
+ resourceType: string;
3710
+ /**
3711
+ * Format: uuid
3712
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3713
+ */
3714
+ resourceId: string;
3715
+ /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
3716
+ claimant: string;
3717
+ /**
3718
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
3719
+ * @enum {string}
3720
+ */
3721
+ status: "active" | "released" | "expired";
3722
+ /**
3723
+ * Format: date-time
3724
+ * @description Time the claim was taken.
3725
+ */
3726
+ claimedAt: string;
3727
+ /**
3728
+ * Format: date-time
3729
+ * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
3730
+ */
3731
+ expiresAt: string;
3732
+ /**
3733
+ * Format: date-time
3734
+ * @description Time the holder released the claim. Null while the claim is active or after it expired.
3735
+ */
3736
+ releasedAt?: string | null;
3737
+ /**
3738
+ * Format: date-time
3739
+ * @description Timestamp of claim creation.
3740
+ */
3741
+ createdAt: string;
3742
+ /**
3743
+ * Format: date-time
3744
+ * @description Timestamp of last claim modification.
3745
+ */
3746
+ updatedAt: string;
3747
+ };
3748
+ /**
3749
+ * Format: date-time
3750
+ * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
3751
+ */
3752
+ pausedAt?: string | null;
3753
+ /** @description Identity that paused the schedule. Server-managed. */
3754
+ pausedBy?: string;
3755
+ /** @description Reason given for pausing the schedule. Server-managed. */
3756
+ pauseReason?: string;
3757
+ /**
3758
+ * Format: date-time
3759
+ * @description Timestamp of schedule creation.
3760
+ */
3761
+ createdAt: string;
3762
+ /**
3763
+ * Format: date-time
3764
+ * @description Timestamp of last schedule modification.
3765
+ */
3766
+ updatedAt: string;
3767
+ /**
3768
+ * Format: date-time
3769
+ * @description Timestamp when the schedule was soft-deleted. Null while live.
3770
+ */
3771
+ deletedAt?: string | null;
3772
+ };
3773
+ };
3774
+ };
3775
+ /** @description Expired JWT token used or insufficient privilege */
3776
+ 401: {
3777
+ headers: {
3778
+ [name: string]: unknown;
3779
+ };
3780
+ content: {
3781
+ "text/plain": string;
3782
+ };
3783
+ };
3784
+ /** @description Result not found */
3785
+ 404: {
3786
+ headers: {
3787
+ [name: string]: unknown;
3788
+ };
3789
+ content: {
3790
+ "text/plain": string;
3791
+ };
3792
+ };
3793
+ /** @description Internal server error */
3794
+ 500: {
3795
+ headers: {
3796
+ [name: string]: unknown;
3797
+ };
3798
+ content: {
3799
+ "text/plain": string;
3800
+ };
3801
+ };
3802
+ };
3803
+ };
3804
+ }