@meshery/schemas 1.3.96 → 1.3.98

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 (54) hide show
  1. package/dist/cloudApi.d.mts +1246 -1458
  2. package/dist/cloudApi.d.ts +1246 -1458
  3. package/dist/cloudApi.js +1 -1
  4. package/dist/cloudApi.mjs +1 -1
  5. package/dist/constructs/v1beta2/organization/Organization.d.ts +1 -1
  6. package/dist/constructs/v1beta2/organization/OrganizationSchema.js +1 -1
  7. package/dist/constructs/v1beta2/organization/OrganizationSchema.mjs +1 -1
  8. package/dist/constructs/v1beta3/claim/Claim.d.ts +492 -80
  9. package/dist/constructs/v1beta3/claim/ClaimSchema.js +25 -84
  10. package/dist/constructs/v1beta3/claim/ClaimSchema.mjs +25 -84
  11. package/dist/constructs/v1beta3/connection/Connection.d.ts +171 -0
  12. package/dist/constructs/v1beta3/connection/ConnectionSchema.js +2 -2
  13. package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +2 -2
  14. package/dist/constructs/v1beta3/content_item/ContentItem.d.ts +30 -0
  15. package/dist/constructs/v1beta3/content_item/ContentItemSchema.js +12 -6
  16. package/dist/constructs/v1beta3/content_item/ContentItemSchema.mjs +12 -6
  17. package/dist/constructs/v1beta3/content_metrics/ContentMetrics.d.ts +151 -0
  18. package/dist/constructs/v1beta3/content_metrics/ContentMetrics.js +1 -0
  19. package/dist/constructs/v1beta3/content_metrics/ContentMetrics.mjs +0 -0
  20. package/dist/constructs/v1beta3/content_metrics/ContentMetricsSchema.d.ts +2 -0
  21. package/dist/constructs/v1beta3/content_metrics/ContentMetricsSchema.js +16 -0
  22. package/dist/constructs/v1beta3/content_metrics/ContentMetricsSchema.mjs +16 -0
  23. package/dist/constructs/v1beta3/design/Design.d.ts +2 -2
  24. package/dist/constructs/v1beta3/design/DesignSchema.js +2 -2
  25. package/dist/constructs/v1beta3/design/DesignSchema.mjs +2 -2
  26. package/dist/constructs/v1beta3/event/Event.d.ts +7 -7
  27. package/dist/constructs/v1beta3/event/EventSchema.js +5 -2
  28. package/dist/constructs/v1beta3/event/EventSchema.mjs +5 -2
  29. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographics.d.ts +94 -0
  30. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographics.js +1 -0
  31. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographics.mjs +0 -0
  32. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographicsSchema.d.ts +2 -0
  33. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographicsSchema.js +25 -0
  34. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographicsSchema.mjs +25 -0
  35. package/dist/constructs/v1beta3/follower_metrics/FollowerMetrics.d.ts +90 -0
  36. package/dist/constructs/v1beta3/follower_metrics/FollowerMetrics.js +1 -0
  37. package/dist/constructs/v1beta3/follower_metrics/FollowerMetrics.mjs +0 -0
  38. package/dist/constructs/v1beta3/follower_metrics/FollowerMetricsSchema.d.ts +2 -0
  39. package/dist/constructs/v1beta3/follower_metrics/FollowerMetricsSchema.js +16 -0
  40. package/dist/constructs/v1beta3/follower_metrics/FollowerMetricsSchema.mjs +16 -0
  41. package/dist/constructs/v1beta3/ledger/Ledger.d.ts +157 -11
  42. package/dist/constructs/v1beta3/ledger/LedgerSchema.js +19 -27
  43. package/dist/constructs/v1beta3/ledger/LedgerSchema.mjs +19 -27
  44. package/dist/constructs/v1beta3/schedule/Schedule.d.ts +1342 -1586
  45. package/dist/constructs/v1beta3/schedule/ScheduleSchema.js +10 -34
  46. package/dist/constructs/v1beta3/schedule/ScheduleSchema.mjs +10 -34
  47. package/dist/constructs/v1beta3/token/Token.d.ts +17 -77
  48. package/dist/constructs/v1beta3/token/TokenSchema.js +3 -3
  49. package/dist/constructs/v1beta3/token/TokenSchema.mjs +3 -3
  50. package/dist/index.d.mts +1 -1
  51. package/dist/index.d.ts +1 -1
  52. package/dist/mesheryApi.d.mts +4 -2
  53. package/dist/mesheryApi.d.ts +4 -2
  54. package/package.json +1 -1
@@ -21,11 +21,13 @@ export interface paths {
21
21
  put?: never;
22
22
  /**
23
23
  * Create a schedule
24
- * @description Creates a schedule in the organization of the authenticated session. The
25
- * server-managed fields (the claim, `pausedAt`, `pausedBy`, `retryCount`,
26
- * `lastRunAt`, `lastError`, `organizationId` and the timestamps) are ignored
27
- * on input. `status` accepts only `pending`, `scheduled` and `cancelled`.
28
- * Send `paused: true` to create the schedule already paused.
24
+ * @description Creates a schedule in the organization of the authenticated session,
25
+ * owned by the session user (`createdBy`). `status` accepts only
26
+ * `pending`, `scheduled` and `cancelled`; omitted, the server picks
27
+ * `scheduled` when the schedule has a due time and `pending` otherwise.
28
+ * `nextRunAt` defaults to `runAt`. A `targetId` must name a live
29
+ * resource of `targetType` in the organization, else 400. Send
30
+ * `paused: true` to create the schedule already paused.
29
31
  */
30
32
  post: operations["createSchedule"];
31
33
  delete?: never;
@@ -34,30 +36,6 @@ export interface paths {
34
36
  patch?: never;
35
37
  trace?: never;
36
38
  };
37
- "/api/schedules/claim": {
38
- parameters: {
39
- query?: never;
40
- header?: never;
41
- path?: never;
42
- cookie?: never;
43
- };
44
- get?: never;
45
- put?: never;
46
- /**
47
- * Claim the next due schedule
48
- * @description Claims one due, enabled, unclaimed and unpaused schedule for `claimant`
49
- * in a single server-side statement, optionally restricted to one
50
- * workspace, and answers it with its new claim. When no schedule
51
- * qualifies the answer is 204: a lost race is never an error.
52
- * `ignorePause` is the single operator override over the pause scopes.
53
- */
54
- post: operations["claimNextSchedule"];
55
- delete?: never;
56
- options?: never;
57
- head?: never;
58
- patch?: never;
59
- trace?: never;
60
- };
61
39
  "/api/schedules/{scheduleId}": {
62
40
  parameters: {
63
41
  query?: never;
@@ -67,25 +45,31 @@ export interface paths {
67
45
  };
68
46
  /**
69
47
  * Get a schedule by ID
70
- * @description Returns the schedule with its live claim, when one is held.
48
+ * @description Returns the schedule with its live claim, when one is held, and its
49
+ * entity tag in the `ETag` header.
71
50
  */
72
51
  get: operations["getScheduleById"];
73
52
  /**
74
53
  * Update a schedule
75
- * @description Updates the client-settable fields of a schedule. The server-managed
76
- * fields (the claim, `pausedAt`, `pausedBy`, `retryCount`, `lastRunAt`,
77
- * `lastError`, `organizationId` and the timestamps) are ignored on input.
78
- * `status` accepts only `pending`, `scheduled` and `cancelled`. Pause or resume the
79
- * schedule by setting `paused` (with an optional `pauseReason`); the
80
- * server then records `pausedAt` and `pausedBy`. Pausing a paused
81
- * schedule keeps its original `pausedAt`; omitting `paused` leaves the
82
- * pause unchanged.
54
+ * @description Updates the client-settable fields present in the payload; an
55
+ * omitted optional field keeps its stored value, and `null` clears a
56
+ * nullable one (`workspaceId`, `runAt`, `nextRunAt`, and `targetType`
57
+ * with `targetId`). `status` accepts only
58
+ * `pending`, `scheduled` and `cancelled`. Pause or resume the schedule
59
+ * by setting `paused` (with an optional `pauseReason`); the server then
60
+ * records `pausedAt` and `pausedBy`. Pausing a paused schedule keeps
61
+ * its original `pausedAt`; omitting `paused` leaves the pause
62
+ * unchanged. The optional `If-Match` header makes the write
63
+ * conditional on the entity tag the schedule carried when it was read:
64
+ * when it no longer matches, the request is refused with 412 and
65
+ * nothing is written. Without `If-Match` the write is unconditional.
83
66
  */
84
67
  put: operations["updateSchedule"];
85
68
  post?: never;
86
69
  /**
87
70
  * Delete a schedule
88
- * @description Soft-deletes the schedule. A schedule with a live claim is deleted all the same; its claim is released.
71
+ * @description Soft-deletes the schedule. A schedule with a live claim is deleted
72
+ * all the same, and that claim is expired in the same transaction.
89
73
  */
90
74
  delete: operations["deleteScheduleById"];
91
75
  options?: never;
@@ -93,73 +77,6 @@ export interface paths {
93
77
  patch?: never;
94
78
  trace?: never;
95
79
  };
96
- "/api/schedules/{scheduleId}/claim": {
97
- parameters: {
98
- query?: never;
99
- header?: never;
100
- path?: never;
101
- cookie?: never;
102
- };
103
- get?: never;
104
- put?: never;
105
- /**
106
- * Claim a schedule
107
- * @description Claims this schedule for `claimant`. Without `force` the schedule must be
108
- * due; `force` drops only the due test (trigger now), and a live claim held
109
- * by another claimant still answers 409. Pauses refuse the claim unless
110
- * `ignorePause` is set. Answers the schedule with its new claim.
111
- */
112
- post: operations["claimSchedule"];
113
- delete?: never;
114
- options?: never;
115
- head?: never;
116
- patch?: never;
117
- trace?: never;
118
- };
119
- "/api/schedules/{scheduleId}/claim/renew": {
120
- parameters: {
121
- query?: never;
122
- header?: never;
123
- path?: never;
124
- cookie?: never;
125
- };
126
- get?: never;
127
- put?: never;
128
- /**
129
- * Renew a schedule's claim
130
- * @description Moves the claim's `expiresAt` forward for the holder only. A claim that
131
- * is not live or belongs to another claimant answers 409 and is never
132
- * taken back.
133
- */
134
- post: operations["renewScheduleClaim"];
135
- delete?: never;
136
- options?: never;
137
- head?: never;
138
- patch?: never;
139
- trace?: never;
140
- };
141
- "/api/schedules/{scheduleId}/claim/release": {
142
- parameters: {
143
- query?: never;
144
- header?: never;
145
- path?: never;
146
- cookie?: never;
147
- };
148
- get?: never;
149
- put?: never;
150
- /**
151
- * Release a schedule's claim
152
- * @description Releases the holder's claim and applies the run's outcome in the same
153
- * statement (`status`, `lastRunAt`, `lastError`, `nextRunAt`,
154
- * `retryCount`). A release by another claimant answers 409.
155
- */
156
- post: operations["releaseScheduleClaim"];
157
- delete?: never;
158
- options?: never;
159
- head?: never;
160
- patch?: never;
161
- trace?: never;
162
- };
163
80
  "/api/workspaces/{workspaceId}/schedules": {
164
81
  parameters: {
165
82
  query?: never;
@@ -191,12 +108,15 @@ export interface paths {
191
108
  put?: never;
192
109
  /**
193
110
  * Link a schedule to a workspace
194
- * @description Links the schedule to the workspace, replacing any previous workspace link: a schedule belongs to at most one workspace.
111
+ * @description Links the schedule to the workspace, replacing any previous
112
+ * workspace link: a schedule belongs to at most one workspace. The
113
+ * workspace must be in the schedule's organization.
195
114
  */
196
115
  post: operations["assignScheduleToWorkspace"];
197
116
  /**
198
117
  * Unlink a schedule from a workspace
199
- * @description Removes the schedule's link to the workspace. The schedule itself is kept.
118
+ * @description Removes the schedule's link to the workspace. The schedule itself is
119
+ * kept. A schedule that is not linked to this workspace answers 404.
200
120
  */
201
121
  delete: operations["unassignScheduleFromWorkspace"];
202
122
  options?: never;
@@ -210,41 +130,66 @@ export interface components {
210
130
  schemas: {
211
131
  /**
212
132
  * Schedule Schema
213
- * @description Server-returned schedule. A schedule is a job: an action to run with its
214
- * parameters, when it is due (`runAt`, `nextRunAt`, `recurrence`), its retry
215
- * budget and its outcome. Schedules belong to an organization and may be
216
- * linked to a workspace. A worker takes a schedule through a claim (the
217
- * generic `claim` construct, nested under the schedule); while the claim is
218
- * live no other worker can take it, and a claim past its `expiresAt` is
219
- * stale and the schedule is claimable again. The `claim` and the status
220
- * values `assigned`, `claimed` and `running` are server-managed and change
221
- * only through the claim and release operations. Pausing is data, not an
222
- * operation: a client sets `paused` (and optionally `pauseReason`) on create
223
- * or update, and the server records `pausedAt` and `pausedBy`.
133
+ * @description Server-returned schedule. A schedule is a job: an action to run, what it
134
+ * acts on (`targetType`, `targetId`) and its parameters, when it is due
135
+ * (`runAt`, `nextRunAt`, `recurrence` in `timezone`), its retry budget and
136
+ * its outcome. Schedules belong to an organization and may be linked to a
137
+ * workspace. A worker takes a schedule through the generic `claim`
138
+ * construct (`POST /api/claims` with `resourceType` `schedule`); there is
139
+ * no schedule-specific claim route. While the claim is live no other worker
140
+ * can take the schedule, and a claim past its `expiresAt` is stale so the
141
+ * schedule is claimable again. Releasing the claim records the run's
142
+ * outcome on the schedule in the same transaction (see `status`). The
143
+ * `claim` and the status values `assigned`, `claimed` and `running` are
144
+ * server-managed. Pausing is data, not an operation: a client sets `paused`
145
+ * (and optionally `pauseReason`) on create or update, and the server
146
+ * records `pausedAt` and `pausedBy`. Fields marked readOnly are
147
+ * server-managed and ignored on input.
224
148
  */
225
149
  Schedule: {
226
150
  /**
227
151
  * Format: uuid
228
152
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
229
153
  */
230
- id: string;
154
+ readonly id: string;
231
155
  /**
232
156
  * Format: uuid
233
157
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
234
158
  */
235
- organizationId: string;
159
+ readonly organizationId: string;
236
160
  /**
237
161
  * Format: uuid
238
162
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
239
163
  */
240
164
  workspaceId?: string;
165
+ /**
166
+ * Format: uuid
167
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
168
+ */
169
+ readonly createdBy?: string;
241
170
  /** @description Human-readable name for the schedule. */
242
171
  name: string;
243
172
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
244
173
  action: string;
245
- /** @description Action parameters, stored as a JSON blob. */
174
+ /**
175
+ * @description Type of the resource the schedule acts on, named the way a claim's
176
+ * `resourceType` is (lowercase snake_case construct name, for example
177
+ * `content_item` or `profile`). A server verifies the target types it
178
+ * serves and refuses others with 400. Set together with `targetId` or
179
+ * not at all.
180
+ */
181
+ targetType?: string;
182
+ /**
183
+ * Format: uuid
184
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
185
+ */
186
+ targetId?: string;
187
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
246
188
  params?: Record<string, never>;
247
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
189
+ /**
190
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
191
+ * @default true
192
+ */
248
193
  enabled: boolean;
249
194
  /**
250
195
  * Format: date-time
@@ -253,40 +198,69 @@ export interface components {
253
198
  runAt?: string | null;
254
199
  /**
255
200
  * Format: date-time
256
- * @description Next time a recurring or retrying schedule becomes due.
201
+ * @description Next time the schedule becomes due. Null when it is never due again.
257
202
  */
258
203
  nextRunAt?: string | null;
259
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
260
- recurrence?: string;
261
204
  /**
262
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
263
- * `scheduled`: waiting for its due time. `assigned`: designated for a
264
- * particular worker but not yet claimed. `claimed`: a worker holds the
265
- * claim and has not started. `running`: the claim holder is executing
266
- * it. `retrying`: the last attempt failed and another is due.
267
- * `completed`, `failed` and `cancelled` are terminal for a run-once
268
- * schedule; a recurring schedule returns to `scheduled`.
205
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
206
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
207
+ * `monthly` repeat at the same wall-clock time one calendar day, week
208
+ * or month later in the schedule's `timezone`, so a daily schedule
209
+ * keeps its local time across daylight-saving changes. `every:<n>`
210
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
211
+ * from `runAt` (else from the current `nextRunAt`); the next due time
212
+ * is the first occurrence after the run is released, so missed runs
213
+ * are not replayed.
214
+ * @default
215
+ */
216
+ recurrence: string;
217
+ /**
218
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
219
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
220
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
221
+ * refuses a name it does not know with 400.
222
+ * @default UTC
223
+ */
224
+ timezone: string;
225
+ /**
226
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
227
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
228
+ * designated for a particular worker but not yet claimed. `claimed`: a
229
+ * worker holds the claim and has not started. `running`: the claim
230
+ * holder is executing it. `retrying`: the last attempt failed and
231
+ * another is due. `completed`, `failed` and `cancelled` are terminal
232
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
233
+ * when its claim is released with a `completed` outcome.
269
234
  * @enum {string}
270
235
  */
271
236
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
272
- /** @description Attempts already retried for the current run. */
237
+ /**
238
+ * @description Attempts already retried for the current run.
239
+ * @default 0
240
+ */
273
241
  retryCount: number;
274
- /** @description Maximum retries before the run is marked failed. */
242
+ /**
243
+ * @description Maximum retries before the run is marked failed.
244
+ * @default 0
245
+ */
275
246
  maxRetries: number;
276
- /** @description Minutes to wait before a retry becomes due. */
277
- retryDelayMinutes?: number;
247
+ /**
248
+ * @description Minutes to wait before a retry becomes due.
249
+ * @default 0
250
+ */
251
+ retryDelayMinutes: number;
278
252
  /**
279
253
  * Format: date-time
280
- * @description Time of the most recent attempt.
254
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
281
255
  */
282
- lastRunAt?: string | null;
283
- /** @description Error reported by the most recent attempt. */
284
- lastError?: string;
256
+ readonly lastRunAt?: string | null;
257
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
258
+ readonly lastError?: string;
285
259
  /**
286
260
  * Claim Schema
287
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
261
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
288
262
  */
289
- claim?: {
263
+ readonly claim?: {
290
264
  /**
291
265
  * Format: uuid
292
266
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -297,17 +271,25 @@ export interface components {
297
271
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
298
272
  */
299
273
  organizationId: string;
300
- /** @description Type of the claimed resource, for example `schedule`. */
274
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
301
275
  resourceType: string;
302
276
  /**
303
277
  * Format: uuid
304
278
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
305
279
  */
306
280
  resourceId: string;
307
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
308
- claimant: string;
309
281
  /**
310
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
282
+ * Format: uuid
283
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
284
+ */
285
+ claimantConnectionId?: string;
286
+ /**
287
+ * Format: uuid
288
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
289
+ */
290
+ claimantUserId?: string;
291
+ /**
292
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
311
293
  * @enum {string}
312
294
  */
313
295
  status: "active" | "released" | "expired";
@@ -323,9 +305,31 @@ export interface components {
323
305
  expiresAt: string;
324
306
  /**
325
307
  * Format: date-time
326
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
308
+ * @description Time of the last renewal. Null until the claim is first renewed.
309
+ */
310
+ renewedAt?: string | null;
311
+ /**
312
+ * Format: date-time
313
+ * @description Time the claim was released. Null while the claim is active or after it expired.
327
314
  */
328
315
  releasedAt?: string | null;
316
+ /**
317
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
318
+ * @enum {string}
319
+ */
320
+ outcome?: "completed" | "failed" | "cancelled";
321
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
322
+ outcomeError?: string;
323
+ /**
324
+ * Format: uuid
325
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
326
+ */
327
+ outcomeEventId?: string;
328
+ /**
329
+ * Format: uuid
330
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
331
+ */
332
+ releasedBy?: string;
329
333
  /**
330
334
  * Format: date-time
331
335
  * @description Timestamp of claim creation.
@@ -341,36 +345,80 @@ export interface components {
341
345
  * Format: date-time
342
346
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
343
347
  */
344
- pausedAt?: string | null;
345
- /** @description Identity that paused the schedule. Server-managed. */
346
- pausedBy?: string;
348
+ readonly pausedAt?: string | null;
349
+ /**
350
+ * Format: uuid
351
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
352
+ */
353
+ readonly pausedBy?: string;
347
354
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
348
355
  pauseReason?: string;
349
356
  /**
350
357
  * Format: date-time
351
358
  * @description Timestamp of schedule creation.
352
359
  */
353
- createdAt: string;
360
+ readonly createdAt: string;
354
361
  /**
355
362
  * Format: date-time
356
363
  * @description Timestamp of last schedule modification.
357
364
  */
358
- updatedAt: string;
365
+ readonly updatedAt: string;
359
366
  /**
360
367
  * Format: date-time
361
368
  * @description Timestamp when the schedule was soft-deleted. Null while live.
362
369
  */
363
- deletedAt?: string | null;
370
+ readonly deletedAt?: string | null;
364
371
  };
372
+ /**
373
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
374
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
375
+ * designated for a particular worker but not yet claimed. `claimed`: a
376
+ * worker holds the claim and has not started. `running`: the claim
377
+ * holder is executing it. `retrying`: the last attempt failed and
378
+ * another is due. `completed`, `failed` and `cancelled` are terminal
379
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
380
+ * when its claim is released with a `completed` outcome.
381
+ * @enum {string}
382
+ */
383
+ ScheduleStatus: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
384
+ /**
385
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
386
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
387
+ * `monthly` repeat at the same wall-clock time one calendar day, week
388
+ * or month later in the schedule's `timezone`, so a daily schedule
389
+ * keeps its local time across daylight-saving changes. `every:<n>`
390
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
391
+ * from `runAt` (else from the current `nextRunAt`); the next due time
392
+ * is the first occurrence after the run is released, so missed runs
393
+ * are not replayed.
394
+ * @default
395
+ */
396
+ ScheduleRecurrence: string;
397
+ /**
398
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
399
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
400
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
401
+ * refuses a name it does not know with 400.
402
+ * @default UTC
403
+ */
404
+ ScheduleTimezone: string;
405
+ /**
406
+ * @description Type of the resource the schedule acts on, named the way a claim's
407
+ * `resourceType` is (lowercase snake_case construct name, for example
408
+ * `content_item` or `profile`). A server verifies the target types it
409
+ * serves and refuses others with 400. Set together with `targetId` or
410
+ * not at all.
411
+ */
412
+ ScheduleTargetType: string;
365
413
  /**
366
414
  * @description Payload for creating or updating a schedule. Contains only
367
- * client-settable fields; the owning `organizationId`, the claim,
368
- * `pausedAt`, `pausedBy`, `retryCount`, `lastRunAt`, `lastError` and the
369
- * timestamps are server-managed. The server ignores them on input. Pausing
370
- * is a field, not an operation: `paused` pauses or resumes the schedule.
371
- * `status` accepts only `pending`,
372
- * `scheduled` and `cancelled` here; the other values are set by the
373
- * claim and release operations.
415
+ * client-settable fields; the owning `organizationId`, `createdBy`, the
416
+ * claim, `pausedAt`, `pausedBy`, `lastRunAt`, `lastError` and the
417
+ * timestamps are server-managed and refused as unknown fields. Pausing
418
+ * is a field, not an operation: `paused` pauses or resumes the
419
+ * schedule. `status` accepts only `pending`, `scheduled` and
420
+ * `cancelled` here (otherwise 400); the other values are set by the
421
+ * server as the schedule is claimed and released.
374
422
  */
375
423
  SchedulePayload: {
376
424
  /**
@@ -387,83 +435,89 @@ export interface components {
387
435
  name: string;
388
436
  /** @description The action the worker runs, for example a command name. */
389
437
  action: string;
438
+ /**
439
+ * @description Type of the resource the schedule acts on, named the way a claim's
440
+ * `resourceType` is (lowercase snake_case construct name, for example
441
+ * `content_item` or `profile`). A server verifies the target types it
442
+ * serves and refuses others with 400. Set together with `targetId` or
443
+ * not at all.
444
+ */
445
+ targetType?: string;
446
+ /**
447
+ * Format: uuid
448
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
449
+ */
450
+ targetId?: string;
390
451
  /** @description Action parameters, stored as a JSON blob. */
391
452
  params?: Record<string, never>;
392
- /** @description Whether the schedule is eligible to run. Defaults to true. */
393
- enabled?: boolean;
453
+ /**
454
+ * @description Whether the schedule is eligible to run.
455
+ * @default true
456
+ */
457
+ enabled: boolean;
394
458
  /**
395
459
  * Format: date-time
396
460
  * @description Time the schedule first becomes due.
397
461
  */
398
462
  runAt?: string | null;
399
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
400
- recurrence?: string;
401
463
  /**
402
- * @description Client-settable status. Omit to let the server choose `scheduled` for a due-timed schedule and `pending` otherwise.
403
- * @enum {string}
464
+ * Format: date-time
465
+ * @description Next time the schedule becomes due. Omitted on create, it defaults to `runAt`; omitted on update, it is kept. Send null for never due again.
404
466
  */
405
- status?: "pending" | "scheduled" | "cancelled";
406
- /** @description Maximum retries before the run is marked failed. */
407
- maxRetries?: number;
408
- /** @description Minutes to wait before a retry becomes due. */
409
- retryDelayMinutes?: number;
467
+ nextRunAt?: string | null;
410
468
  /**
411
- * @description `true` pauses the schedule so it is never claimed (unless a claim
412
- * carries `ignorePause`); `false` resumes it. Omit to leave the pause
413
- * unchanged. The server records `pausedAt` and `pausedBy`.
469
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
470
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
471
+ * `monthly` repeat at the same wall-clock time one calendar day, week
472
+ * or month later in the schedule's `timezone`, so a daily schedule
473
+ * keeps its local time across daylight-saving changes. `every:<n>`
474
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
475
+ * from `runAt` (else from the current `nextRunAt`); the next due time
476
+ * is the first occurrence after the run is released, so missed runs
477
+ * are not replayed.
478
+ * @default
414
479
  */
415
- paused?: boolean;
416
- /** @description Reason for pausing; stored only while `paused` is true and cleared on resume. */
417
- pauseReason?: string;
418
- };
419
- /** @description Request to claim the next due schedule. */
420
- ScheduleClaimRequest: {
421
- /** @description Identity of the worker taking the claim. */
422
- claimant: string;
423
- /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
424
- durationMinutes?: number;
480
+ recurrence: string;
425
481
  /**
426
- * Format: uuid
427
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
482
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
483
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
484
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
485
+ * refuses a name it does not know with 400.
486
+ * @default UTC
428
487
  */
429
- workspaceId?: string;
430
- /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
431
- ignorePause?: boolean;
432
- };
433
- /** @description Request to claim one named schedule. */
434
- ScheduleTargetedClaimRequest: {
435
- /** @description Identity of the worker taking the claim. */
436
- claimant: string;
437
- /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
438
- durationMinutes?: number;
439
- /** @description Claim even though the schedule is not yet due (trigger now). A live claim held by another claimant still refuses. */
440
- force?: boolean;
441
- /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
442
- ignorePause?: boolean;
443
- };
444
- /** @description Request to release a schedule's claim and record the run's outcome. */
445
- ScheduleClaimReleaseRequest: {
446
- /** @description Identity of the holder releasing the claim. */
447
- claimant: string;
488
+ timezone: string;
448
489
  /**
449
- * @description Outcome status to record with the release.
490
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
491
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
492
+ * designated for a particular worker but not yet claimed. `claimed`: a
493
+ * worker holds the claim and has not started. `running`: the claim
494
+ * holder is executing it. `retrying`: the last attempt failed and
495
+ * another is due. `completed`, `failed` and `cancelled` are terminal
496
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
497
+ * when its claim is released with a `completed` outcome.
450
498
  * @enum {string}
451
499
  */
452
- status?: "scheduled" | "retrying" | "completed" | "failed" | "cancelled";
500
+ status?: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
501
+ /** @description Retries used so far for the current run, for example 0 to re-arm a schedule. Omitted on update, it is kept. */
502
+ retryCount?: number;
453
503
  /**
454
- * Format: date-time
455
- * @description Time of the attempt being reported.
504
+ * @description Maximum retries before the run is marked failed.
505
+ * @default 0
456
506
  */
457
- lastRunAt?: string | null;
458
- /** @description Error reported by the attempt; empty on success. */
459
- lastError?: string;
507
+ maxRetries: number;
460
508
  /**
461
- * Format: date-time
462
- * @description Next due time for a recurring or retrying schedule.
509
+ * @description Minutes to wait before a retry becomes due.
510
+ * @default 0
463
511
  */
464
- nextRunAt?: string | null;
465
- /** @description Retries used so far for the current run. */
466
- retryCount?: number;
512
+ retryDelayMinutes: number;
513
+ /**
514
+ * @description `true` pauses the schedule so it is never claimed; `false`
515
+ * resumes it. Omit to leave the pause unchanged. The server records
516
+ * `pausedAt` and `pausedBy`.
517
+ */
518
+ paused?: boolean;
519
+ /** @description Reason for pausing; stored only while `paused` is true and cleared on resume. */
520
+ pauseReason?: string;
467
521
  };
468
522
  /** @description Paginated collection of schedules. */
469
523
  SchedulePage: {
@@ -479,24 +533,45 @@ export interface components {
479
533
  * Format: uuid
480
534
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
481
535
  */
482
- id: string;
536
+ readonly id: string;
483
537
  /**
484
538
  * Format: uuid
485
539
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
486
540
  */
487
- organizationId: string;
541
+ readonly organizationId: string;
488
542
  /**
489
543
  * Format: uuid
490
544
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
491
545
  */
492
546
  workspaceId?: string;
547
+ /**
548
+ * Format: uuid
549
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
550
+ */
551
+ readonly createdBy?: string;
493
552
  /** @description Human-readable name for the schedule. */
494
553
  name: string;
495
554
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
496
555
  action: string;
497
- /** @description Action parameters, stored as a JSON blob. */
556
+ /**
557
+ * @description Type of the resource the schedule acts on, named the way a claim's
558
+ * `resourceType` is (lowercase snake_case construct name, for example
559
+ * `content_item` or `profile`). A server verifies the target types it
560
+ * serves and refuses others with 400. Set together with `targetId` or
561
+ * not at all.
562
+ */
563
+ targetType?: string;
564
+ /**
565
+ * Format: uuid
566
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
567
+ */
568
+ targetId?: string;
569
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
498
570
  params?: Record<string, never>;
499
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
571
+ /**
572
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
573
+ * @default true
574
+ */
500
575
  enabled: boolean;
501
576
  /**
502
577
  * Format: date-time
@@ -505,40 +580,69 @@ export interface components {
505
580
  runAt?: string | null;
506
581
  /**
507
582
  * Format: date-time
508
- * @description Next time a recurring or retrying schedule becomes due.
583
+ * @description Next time the schedule becomes due. Null when it is never due again.
509
584
  */
510
585
  nextRunAt?: string | null;
511
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
512
- recurrence?: string;
513
586
  /**
514
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
515
- * `scheduled`: waiting for its due time. `assigned`: designated for a
516
- * particular worker but not yet claimed. `claimed`: a worker holds the
517
- * claim and has not started. `running`: the claim holder is executing
518
- * it. `retrying`: the last attempt failed and another is due.
519
- * `completed`, `failed` and `cancelled` are terminal for a run-once
520
- * schedule; a recurring schedule returns to `scheduled`.
587
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
588
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
589
+ * `monthly` repeat at the same wall-clock time one calendar day, week
590
+ * or month later in the schedule's `timezone`, so a daily schedule
591
+ * keeps its local time across daylight-saving changes. `every:<n>`
592
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
593
+ * from `runAt` (else from the current `nextRunAt`); the next due time
594
+ * is the first occurrence after the run is released, so missed runs
595
+ * are not replayed.
596
+ * @default
597
+ */
598
+ recurrence: string;
599
+ /**
600
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
601
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
602
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
603
+ * refuses a name it does not know with 400.
604
+ * @default UTC
605
+ */
606
+ timezone: string;
607
+ /**
608
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
609
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
610
+ * designated for a particular worker but not yet claimed. `claimed`: a
611
+ * worker holds the claim and has not started. `running`: the claim
612
+ * holder is executing it. `retrying`: the last attempt failed and
613
+ * another is due. `completed`, `failed` and `cancelled` are terminal
614
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
615
+ * when its claim is released with a `completed` outcome.
521
616
  * @enum {string}
522
617
  */
523
618
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
524
- /** @description Attempts already retried for the current run. */
619
+ /**
620
+ * @description Attempts already retried for the current run.
621
+ * @default 0
622
+ */
525
623
  retryCount: number;
526
- /** @description Maximum retries before the run is marked failed. */
624
+ /**
625
+ * @description Maximum retries before the run is marked failed.
626
+ * @default 0
627
+ */
527
628
  maxRetries: number;
528
- /** @description Minutes to wait before a retry becomes due. */
529
- retryDelayMinutes?: number;
629
+ /**
630
+ * @description Minutes to wait before a retry becomes due.
631
+ * @default 0
632
+ */
633
+ retryDelayMinutes: number;
530
634
  /**
531
635
  * Format: date-time
532
- * @description Time of the most recent attempt.
636
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
533
637
  */
534
- lastRunAt?: string | null;
535
- /** @description Error reported by the most recent attempt. */
536
- lastError?: string;
638
+ readonly lastRunAt?: string | null;
639
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
640
+ readonly lastError?: string;
537
641
  /**
538
642
  * Claim Schema
539
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
643
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
540
644
  */
541
- claim?: {
645
+ readonly claim?: {
542
646
  /**
543
647
  * Format: uuid
544
648
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -549,17 +653,25 @@ export interface components {
549
653
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
550
654
  */
551
655
  organizationId: string;
552
- /** @description Type of the claimed resource, for example `schedule`. */
656
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
553
657
  resourceType: string;
554
658
  /**
555
659
  * Format: uuid
556
660
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
557
661
  */
558
662
  resourceId: string;
559
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
560
- claimant: string;
561
663
  /**
562
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
664
+ * Format: uuid
665
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
666
+ */
667
+ claimantConnectionId?: string;
668
+ /**
669
+ * Format: uuid
670
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
671
+ */
672
+ claimantUserId?: string;
673
+ /**
674
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
563
675
  * @enum {string}
564
676
  */
565
677
  status: "active" | "released" | "expired";
@@ -575,9 +687,31 @@ export interface components {
575
687
  expiresAt: string;
576
688
  /**
577
689
  * Format: date-time
578
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
690
+ * @description Time of the last renewal. Null until the claim is first renewed.
691
+ */
692
+ renewedAt?: string | null;
693
+ /**
694
+ * Format: date-time
695
+ * @description Time the claim was released. Null while the claim is active or after it expired.
579
696
  */
580
697
  releasedAt?: string | null;
698
+ /**
699
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
700
+ * @enum {string}
701
+ */
702
+ outcome?: "completed" | "failed" | "cancelled";
703
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
704
+ outcomeError?: string;
705
+ /**
706
+ * Format: uuid
707
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
708
+ */
709
+ outcomeEventId?: string;
710
+ /**
711
+ * Format: uuid
712
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
713
+ */
714
+ releasedBy?: string;
581
715
  /**
582
716
  * Format: date-time
583
717
  * @description Timestamp of claim creation.
@@ -593,26 +727,29 @@ export interface components {
593
727
  * Format: date-time
594
728
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
595
729
  */
596
- pausedAt?: string | null;
597
- /** @description Identity that paused the schedule. Server-managed. */
598
- pausedBy?: string;
730
+ readonly pausedAt?: string | null;
731
+ /**
732
+ * Format: uuid
733
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
734
+ */
735
+ readonly pausedBy?: string;
599
736
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
600
737
  pauseReason?: string;
601
738
  /**
602
739
  * Format: date-time
603
740
  * @description Timestamp of schedule creation.
604
741
  */
605
- createdAt: string;
742
+ readonly createdAt: string;
606
743
  /**
607
744
  * Format: date-time
608
745
  * @description Timestamp of last schedule modification.
609
746
  */
610
- updatedAt: string;
747
+ readonly updatedAt: string;
611
748
  /**
612
749
  * Format: date-time
613
750
  * @description Timestamp when the schedule was soft-deleted. Null while live.
614
751
  */
615
- deletedAt?: string | null;
752
+ readonly deletedAt?: string | null;
616
753
  }[];
617
754
  };
618
755
  };
@@ -644,15 +781,6 @@ export interface components {
644
781
  "text/plain": string;
645
782
  };
646
783
  };
647
- /** @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 */
648
- 409: {
649
- headers: {
650
- [name: string]: unknown;
651
- };
652
- content: {
653
- "text/plain": string;
654
- };
655
- };
656
784
  /** @description Internal server error */
657
785
  500: {
658
786
  headers: {
@@ -664,6 +792,8 @@ export interface components {
664
792
  };
665
793
  };
666
794
  parameters: {
795
+ /** @description Entity tag of the schedule as last read, from the `ETag` header of getScheduleById, createSchedule or updateSchedule. When present the write applies only if it still matches; otherwise 412. */
796
+ ifMatch: string;
667
797
  /** @description Schedule ID */
668
798
  scheduleId: string;
669
799
  /** @description Workspace ID */
@@ -682,7 +812,10 @@ export interface components {
682
812
  order: string;
683
813
  };
684
814
  requestBodies: never;
685
- headers: never;
815
+ headers: {
816
+ /** @description Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional. */
817
+ ScheduleETag: string;
818
+ };
686
819
  pathItems: never;
687
820
  }
688
821
  export type $defs = Record<string, never>;
@@ -728,24 +861,45 @@ export interface operations {
728
861
  * Format: uuid
729
862
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
730
863
  */
731
- id: string;
864
+ readonly id: string;
732
865
  /**
733
866
  * Format: uuid
734
867
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
735
868
  */
736
- organizationId: string;
869
+ readonly organizationId: string;
737
870
  /**
738
871
  * Format: uuid
739
872
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
740
873
  */
741
874
  workspaceId?: string;
875
+ /**
876
+ * Format: uuid
877
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
878
+ */
879
+ readonly createdBy?: string;
742
880
  /** @description Human-readable name for the schedule. */
743
881
  name: string;
744
882
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
745
883
  action: string;
746
- /** @description Action parameters, stored as a JSON blob. */
884
+ /**
885
+ * @description Type of the resource the schedule acts on, named the way a claim's
886
+ * `resourceType` is (lowercase snake_case construct name, for example
887
+ * `content_item` or `profile`). A server verifies the target types it
888
+ * serves and refuses others with 400. Set together with `targetId` or
889
+ * not at all.
890
+ */
891
+ targetType?: string;
892
+ /**
893
+ * Format: uuid
894
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
895
+ */
896
+ targetId?: string;
897
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
747
898
  params?: Record<string, never>;
748
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
899
+ /**
900
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
901
+ * @default true
902
+ */
749
903
  enabled: boolean;
750
904
  /**
751
905
  * Format: date-time
@@ -754,40 +908,69 @@ export interface operations {
754
908
  runAt?: string | null;
755
909
  /**
756
910
  * Format: date-time
757
- * @description Next time a recurring or retrying schedule becomes due.
911
+ * @description Next time the schedule becomes due. Null when it is never due again.
758
912
  */
759
913
  nextRunAt?: string | null;
760
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
761
- recurrence?: string;
762
- /**
763
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
764
- * `scheduled`: waiting for its due time. `assigned`: designated for a
765
- * particular worker but not yet claimed. `claimed`: a worker holds the
766
- * claim and has not started. `running`: the claim holder is executing
767
- * it. `retrying`: the last attempt failed and another is due.
768
- * `completed`, `failed` and `cancelled` are terminal for a run-once
769
- * schedule; a recurring schedule returns to `scheduled`.
914
+ /**
915
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
916
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
917
+ * `monthly` repeat at the same wall-clock time one calendar day, week
918
+ * or month later in the schedule's `timezone`, so a daily schedule
919
+ * keeps its local time across daylight-saving changes. `every:<n>`
920
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
921
+ * from `runAt` (else from the current `nextRunAt`); the next due time
922
+ * is the first occurrence after the run is released, so missed runs
923
+ * are not replayed.
924
+ * @default
925
+ */
926
+ recurrence: string;
927
+ /**
928
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
929
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
930
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
931
+ * refuses a name it does not know with 400.
932
+ * @default UTC
933
+ */
934
+ timezone: string;
935
+ /**
936
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
937
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
938
+ * designated for a particular worker but not yet claimed. `claimed`: a
939
+ * worker holds the claim and has not started. `running`: the claim
940
+ * holder is executing it. `retrying`: the last attempt failed and
941
+ * another is due. `completed`, `failed` and `cancelled` are terminal
942
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
943
+ * when its claim is released with a `completed` outcome.
770
944
  * @enum {string}
771
945
  */
772
946
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
773
- /** @description Attempts already retried for the current run. */
947
+ /**
948
+ * @description Attempts already retried for the current run.
949
+ * @default 0
950
+ */
774
951
  retryCount: number;
775
- /** @description Maximum retries before the run is marked failed. */
952
+ /**
953
+ * @description Maximum retries before the run is marked failed.
954
+ * @default 0
955
+ */
776
956
  maxRetries: number;
777
- /** @description Minutes to wait before a retry becomes due. */
778
- retryDelayMinutes?: number;
957
+ /**
958
+ * @description Minutes to wait before a retry becomes due.
959
+ * @default 0
960
+ */
961
+ retryDelayMinutes: number;
779
962
  /**
780
963
  * Format: date-time
781
- * @description Time of the most recent attempt.
964
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
782
965
  */
783
- lastRunAt?: string | null;
784
- /** @description Error reported by the most recent attempt. */
785
- lastError?: string;
966
+ readonly lastRunAt?: string | null;
967
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
968
+ readonly lastError?: string;
786
969
  /**
787
970
  * Claim Schema
788
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
971
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
789
972
  */
790
- claim?: {
973
+ readonly claim?: {
791
974
  /**
792
975
  * Format: uuid
793
976
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -798,17 +981,25 @@ export interface operations {
798
981
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
799
982
  */
800
983
  organizationId: string;
801
- /** @description Type of the claimed resource, for example `schedule`. */
984
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
802
985
  resourceType: string;
803
986
  /**
804
987
  * Format: uuid
805
988
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
806
989
  */
807
990
  resourceId: string;
808
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
809
- claimant: string;
810
991
  /**
811
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
992
+ * Format: uuid
993
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
994
+ */
995
+ claimantConnectionId?: string;
996
+ /**
997
+ * Format: uuid
998
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
999
+ */
1000
+ claimantUserId?: string;
1001
+ /**
1002
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
812
1003
  * @enum {string}
813
1004
  */
814
1005
  status: "active" | "released" | "expired";
@@ -824,9 +1015,31 @@ export interface operations {
824
1015
  expiresAt: string;
825
1016
  /**
826
1017
  * Format: date-time
827
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
1018
+ * @description Time of the last renewal. Null until the claim is first renewed.
1019
+ */
1020
+ renewedAt?: string | null;
1021
+ /**
1022
+ * Format: date-time
1023
+ * @description Time the claim was released. Null while the claim is active or after it expired.
828
1024
  */
829
1025
  releasedAt?: string | null;
1026
+ /**
1027
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
1028
+ * @enum {string}
1029
+ */
1030
+ outcome?: "completed" | "failed" | "cancelled";
1031
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
1032
+ outcomeError?: string;
1033
+ /**
1034
+ * Format: uuid
1035
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1036
+ */
1037
+ outcomeEventId?: string;
1038
+ /**
1039
+ * Format: uuid
1040
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1041
+ */
1042
+ releasedBy?: string;
830
1043
  /**
831
1044
  * Format: date-time
832
1045
  * @description Timestamp of claim creation.
@@ -842,30 +1055,42 @@ export interface operations {
842
1055
  * Format: date-time
843
1056
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
844
1057
  */
845
- pausedAt?: string | null;
846
- /** @description Identity that paused the schedule. Server-managed. */
847
- pausedBy?: string;
1058
+ readonly pausedAt?: string | null;
1059
+ /**
1060
+ * Format: uuid
1061
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1062
+ */
1063
+ readonly pausedBy?: string;
848
1064
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
849
1065
  pauseReason?: string;
850
1066
  /**
851
1067
  * Format: date-time
852
1068
  * @description Timestamp of schedule creation.
853
1069
  */
854
- createdAt: string;
1070
+ readonly createdAt: string;
855
1071
  /**
856
1072
  * Format: date-time
857
1073
  * @description Timestamp of last schedule modification.
858
1074
  */
859
- updatedAt: string;
1075
+ readonly updatedAt: string;
860
1076
  /**
861
1077
  * Format: date-time
862
1078
  * @description Timestamp when the schedule was soft-deleted. Null while live.
863
1079
  */
864
- deletedAt?: string | null;
1080
+ readonly deletedAt?: string | null;
865
1081
  }[];
866
1082
  };
867
1083
  };
868
1084
  };
1085
+ /** @description Invalid request body or request param */
1086
+ 400: {
1087
+ headers: {
1088
+ [name: string]: unknown;
1089
+ };
1090
+ content: {
1091
+ "text/plain": string;
1092
+ };
1093
+ };
869
1094
  /** @description Expired JWT token used or insufficient privilege */
870
1095
  401: {
871
1096
  headers: {
@@ -919,30 +1144,85 @@ export interface operations {
919
1144
  name: string;
920
1145
  /** @description The action the worker runs, for example a command name. */
921
1146
  action: string;
1147
+ /**
1148
+ * @description Type of the resource the schedule acts on, named the way a claim's
1149
+ * `resourceType` is (lowercase snake_case construct name, for example
1150
+ * `content_item` or `profile`). A server verifies the target types it
1151
+ * serves and refuses others with 400. Set together with `targetId` or
1152
+ * not at all.
1153
+ */
1154
+ targetType?: string;
1155
+ /**
1156
+ * Format: uuid
1157
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1158
+ */
1159
+ targetId?: string;
922
1160
  /** @description Action parameters, stored as a JSON blob. */
923
1161
  params?: Record<string, never>;
924
- /** @description Whether the schedule is eligible to run. Defaults to true. */
1162
+ /**
1163
+ * @description Whether the schedule is eligible to run.
1164
+ * @default true
1165
+ */
925
1166
  enabled?: boolean;
926
1167
  /**
927
1168
  * Format: date-time
928
1169
  * @description Time the schedule first becomes due.
929
1170
  */
930
1171
  runAt?: string | null;
931
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1172
+ /**
1173
+ * Format: date-time
1174
+ * @description Next time the schedule becomes due. Omitted on create, it defaults to `runAt`; omitted on update, it is kept. Send null for never due again.
1175
+ */
1176
+ nextRunAt?: string | null;
1177
+ /**
1178
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
1179
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
1180
+ * `monthly` repeat at the same wall-clock time one calendar day, week
1181
+ * or month later in the schedule's `timezone`, so a daily schedule
1182
+ * keeps its local time across daylight-saving changes. `every:<n>`
1183
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
1184
+ * from `runAt` (else from the current `nextRunAt`); the next due time
1185
+ * is the first occurrence after the run is released, so missed runs
1186
+ * are not replayed.
1187
+ * @default
1188
+ */
932
1189
  recurrence?: string;
933
1190
  /**
934
- * @description Client-settable status. Omit to let the server choose `scheduled` for a due-timed schedule and `pending` otherwise.
1191
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
1192
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
1193
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
1194
+ * refuses a name it does not know with 400.
1195
+ * @default UTC
1196
+ */
1197
+ timezone?: string;
1198
+ /**
1199
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
1200
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
1201
+ * designated for a particular worker but not yet claimed. `claimed`: a
1202
+ * worker holds the claim and has not started. `running`: the claim
1203
+ * holder is executing it. `retrying`: the last attempt failed and
1204
+ * another is due. `completed`, `failed` and `cancelled` are terminal
1205
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
1206
+ * when its claim is released with a `completed` outcome.
935
1207
  * @enum {string}
936
1208
  */
937
- status?: "pending" | "scheduled" | "cancelled";
938
- /** @description Maximum retries before the run is marked failed. */
1209
+ status?: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1210
+ /** @description Retries used so far for the current run, for example 0 to re-arm a schedule. Omitted on update, it is kept. */
1211
+ retryCount?: number;
1212
+ /**
1213
+ * @description Maximum retries before the run is marked failed.
1214
+ * @default 0
1215
+ */
939
1216
  maxRetries?: number;
940
- /** @description Minutes to wait before a retry becomes due. */
1217
+ /**
1218
+ * @description Minutes to wait before a retry becomes due.
1219
+ * @default 0
1220
+ */
941
1221
  retryDelayMinutes?: number;
942
1222
  /**
943
- * @description `true` pauses the schedule so it is never claimed (unless a claim
944
- * carries `ignorePause`); `false` resumes it. Omit to leave the pause
945
- * unchanged. The server records `pausedAt` and `pausedBy`.
1223
+ * @description `true` pauses the schedule so it is never claimed; `false`
1224
+ * resumes it. Omit to leave the pause unchanged. The server records
1225
+ * `pausedAt` and `pausedBy`.
946
1226
  */
947
1227
  paused?: boolean;
948
1228
  /** @description Reason for pausing; stored only while `paused` is true and cleared on resume. */
@@ -954,6 +1234,8 @@ export interface operations {
954
1234
  /** @description Schedule created */
955
1235
  201: {
956
1236
  headers: {
1237
+ /** @description Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional. */
1238
+ ETag?: string;
957
1239
  [name: string]: unknown;
958
1240
  };
959
1241
  content: {
@@ -962,24 +1244,45 @@ export interface operations {
962
1244
  * Format: uuid
963
1245
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
964
1246
  */
965
- id: string;
1247
+ readonly id: string;
966
1248
  /**
967
1249
  * Format: uuid
968
1250
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
969
1251
  */
970
- organizationId: string;
1252
+ readonly organizationId: string;
971
1253
  /**
972
1254
  * Format: uuid
973
1255
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
974
1256
  */
975
1257
  workspaceId?: string;
1258
+ /**
1259
+ * Format: uuid
1260
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1261
+ */
1262
+ readonly createdBy?: string;
976
1263
  /** @description Human-readable name for the schedule. */
977
1264
  name: string;
978
1265
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
979
1266
  action: string;
980
- /** @description Action parameters, stored as a JSON blob. */
1267
+ /**
1268
+ * @description Type of the resource the schedule acts on, named the way a claim's
1269
+ * `resourceType` is (lowercase snake_case construct name, for example
1270
+ * `content_item` or `profile`). A server verifies the target types it
1271
+ * serves and refuses others with 400. Set together with `targetId` or
1272
+ * not at all.
1273
+ */
1274
+ targetType?: string;
1275
+ /**
1276
+ * Format: uuid
1277
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1278
+ */
1279
+ targetId?: string;
1280
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
981
1281
  params?: Record<string, never>;
982
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1282
+ /**
1283
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
1284
+ * @default true
1285
+ */
983
1286
  enabled: boolean;
984
1287
  /**
985
1288
  * Format: date-time
@@ -988,40 +1291,69 @@ export interface operations {
988
1291
  runAt?: string | null;
989
1292
  /**
990
1293
  * Format: date-time
991
- * @description Next time a recurring or retrying schedule becomes due.
1294
+ * @description Next time the schedule becomes due. Null when it is never due again.
992
1295
  */
993
1296
  nextRunAt?: string | null;
994
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
995
- recurrence?: string;
996
- /**
997
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
998
- * `scheduled`: waiting for its due time. `assigned`: designated for a
999
- * particular worker but not yet claimed. `claimed`: a worker holds the
1000
- * claim and has not started. `running`: the claim holder is executing
1001
- * it. `retrying`: the last attempt failed and another is due.
1002
- * `completed`, `failed` and `cancelled` are terminal for a run-once
1003
- * schedule; a recurring schedule returns to `scheduled`.
1297
+ /**
1298
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
1299
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
1300
+ * `monthly` repeat at the same wall-clock time one calendar day, week
1301
+ * or month later in the schedule's `timezone`, so a daily schedule
1302
+ * keeps its local time across daylight-saving changes. `every:<n>`
1303
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
1304
+ * from `runAt` (else from the current `nextRunAt`); the next due time
1305
+ * is the first occurrence after the run is released, so missed runs
1306
+ * are not replayed.
1307
+ * @default
1308
+ */
1309
+ recurrence: string;
1310
+ /**
1311
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
1312
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
1313
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
1314
+ * refuses a name it does not know with 400.
1315
+ * @default UTC
1316
+ */
1317
+ timezone: string;
1318
+ /**
1319
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
1320
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
1321
+ * designated for a particular worker but not yet claimed. `claimed`: a
1322
+ * worker holds the claim and has not started. `running`: the claim
1323
+ * holder is executing it. `retrying`: the last attempt failed and
1324
+ * another is due. `completed`, `failed` and `cancelled` are terminal
1325
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
1326
+ * when its claim is released with a `completed` outcome.
1004
1327
  * @enum {string}
1005
1328
  */
1006
1329
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1007
- /** @description Attempts already retried for the current run. */
1330
+ /**
1331
+ * @description Attempts already retried for the current run.
1332
+ * @default 0
1333
+ */
1008
1334
  retryCount: number;
1009
- /** @description Maximum retries before the run is marked failed. */
1335
+ /**
1336
+ * @description Maximum retries before the run is marked failed.
1337
+ * @default 0
1338
+ */
1010
1339
  maxRetries: number;
1011
- /** @description Minutes to wait before a retry becomes due. */
1012
- retryDelayMinutes?: number;
1340
+ /**
1341
+ * @description Minutes to wait before a retry becomes due.
1342
+ * @default 0
1343
+ */
1344
+ retryDelayMinutes: number;
1013
1345
  /**
1014
1346
  * Format: date-time
1015
- * @description Time of the most recent attempt.
1347
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
1016
1348
  */
1017
- lastRunAt?: string | null;
1018
- /** @description Error reported by the most recent attempt. */
1019
- lastError?: string;
1349
+ readonly lastRunAt?: string | null;
1350
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
1351
+ readonly lastError?: string;
1020
1352
  /**
1021
1353
  * Claim Schema
1022
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1354
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
1023
1355
  */
1024
- claim?: {
1356
+ readonly claim?: {
1025
1357
  /**
1026
1358
  * Format: uuid
1027
1359
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -1032,17 +1364,25 @@ export interface operations {
1032
1364
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1033
1365
  */
1034
1366
  organizationId: string;
1035
- /** @description Type of the claimed resource, for example `schedule`. */
1367
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
1036
1368
  resourceType: string;
1037
1369
  /**
1038
1370
  * Format: uuid
1039
1371
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1040
1372
  */
1041
1373
  resourceId: string;
1042
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1043
- claimant: string;
1044
1374
  /**
1045
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
1375
+ * Format: uuid
1376
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1377
+ */
1378
+ claimantConnectionId?: string;
1379
+ /**
1380
+ * Format: uuid
1381
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1382
+ */
1383
+ claimantUserId?: string;
1384
+ /**
1385
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
1046
1386
  * @enum {string}
1047
1387
  */
1048
1388
  status: "active" | "released" | "expired";
@@ -1058,9 +1398,31 @@ export interface operations {
1058
1398
  expiresAt: string;
1059
1399
  /**
1060
1400
  * Format: date-time
1061
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
1401
+ * @description Time of the last renewal. Null until the claim is first renewed.
1402
+ */
1403
+ renewedAt?: string | null;
1404
+ /**
1405
+ * Format: date-time
1406
+ * @description Time the claim was released. Null while the claim is active or after it expired.
1062
1407
  */
1063
1408
  releasedAt?: string | null;
1409
+ /**
1410
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
1411
+ * @enum {string}
1412
+ */
1413
+ outcome?: "completed" | "failed" | "cancelled";
1414
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
1415
+ outcomeError?: string;
1416
+ /**
1417
+ * Format: uuid
1418
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1419
+ */
1420
+ outcomeEventId?: string;
1421
+ /**
1422
+ * Format: uuid
1423
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1424
+ */
1425
+ releasedBy?: string;
1064
1426
  /**
1065
1427
  * Format: date-time
1066
1428
  * @description Timestamp of claim creation.
@@ -1076,26 +1438,29 @@ export interface operations {
1076
1438
  * Format: date-time
1077
1439
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1078
1440
  */
1079
- pausedAt?: string | null;
1080
- /** @description Identity that paused the schedule. Server-managed. */
1081
- pausedBy?: string;
1441
+ readonly pausedAt?: string | null;
1442
+ /**
1443
+ * Format: uuid
1444
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1445
+ */
1446
+ readonly pausedBy?: string;
1082
1447
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
1083
1448
  pauseReason?: string;
1084
1449
  /**
1085
1450
  * Format: date-time
1086
1451
  * @description Timestamp of schedule creation.
1087
1452
  */
1088
- createdAt: string;
1453
+ readonly createdAt: string;
1089
1454
  /**
1090
1455
  * Format: date-time
1091
1456
  * @description Timestamp of last schedule modification.
1092
1457
  */
1093
- updatedAt: string;
1458
+ readonly updatedAt: string;
1094
1459
  /**
1095
1460
  * Format: date-time
1096
1461
  * @description Timestamp when the schedule was soft-deleted. Null while live.
1097
1462
  */
1098
- deletedAt?: string | null;
1463
+ readonly deletedAt?: string | null;
1099
1464
  };
1100
1465
  };
1101
1466
  };
@@ -1137,34 +1502,23 @@ export interface operations {
1137
1502
  };
1138
1503
  };
1139
1504
  };
1140
- claimNextSchedule: {
1505
+ getScheduleById: {
1141
1506
  parameters: {
1142
1507
  query?: never;
1143
1508
  header?: never;
1144
- path?: never;
1145
- cookie?: never;
1146
- };
1147
- requestBody: {
1148
- content: {
1149
- "application/json": {
1150
- /** @description Identity of the worker taking the claim. */
1151
- claimant: string;
1152
- /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
1153
- durationMinutes?: number;
1154
- /**
1155
- * Format: uuid
1156
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1157
- */
1158
- workspaceId?: string;
1159
- /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
1160
- ignorePause?: boolean;
1161
- };
1509
+ path: {
1510
+ /** @description Schedule ID */
1511
+ scheduleId: string;
1162
1512
  };
1513
+ cookie?: never;
1163
1514
  };
1515
+ requestBody?: never;
1164
1516
  responses: {
1165
- /** @description The claimed schedule */
1517
+ /** @description Schedule response */
1166
1518
  200: {
1167
1519
  headers: {
1520
+ /** @description Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional. */
1521
+ ETag?: string;
1168
1522
  [name: string]: unknown;
1169
1523
  };
1170
1524
  content: {
@@ -1173,24 +1527,45 @@ export interface operations {
1173
1527
  * Format: uuid
1174
1528
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1175
1529
  */
1176
- id: string;
1530
+ readonly id: string;
1177
1531
  /**
1178
1532
  * Format: uuid
1179
1533
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1180
1534
  */
1181
- organizationId: string;
1535
+ readonly organizationId: string;
1182
1536
  /**
1183
1537
  * Format: uuid
1184
1538
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1185
1539
  */
1186
1540
  workspaceId?: string;
1541
+ /**
1542
+ * Format: uuid
1543
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1544
+ */
1545
+ readonly createdBy?: string;
1187
1546
  /** @description Human-readable name for the schedule. */
1188
1547
  name: string;
1189
1548
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1190
1549
  action: string;
1191
- /** @description Action parameters, stored as a JSON blob. */
1550
+ /**
1551
+ * @description Type of the resource the schedule acts on, named the way a claim's
1552
+ * `resourceType` is (lowercase snake_case construct name, for example
1553
+ * `content_item` or `profile`). A server verifies the target types it
1554
+ * serves and refuses others with 400. Set together with `targetId` or
1555
+ * not at all.
1556
+ */
1557
+ targetType?: string;
1558
+ /**
1559
+ * Format: uuid
1560
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1561
+ */
1562
+ targetId?: string;
1563
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
1192
1564
  params?: Record<string, never>;
1193
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1565
+ /**
1566
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
1567
+ * @default true
1568
+ */
1194
1569
  enabled: boolean;
1195
1570
  /**
1196
1571
  * Format: date-time
@@ -1199,40 +1574,69 @@ export interface operations {
1199
1574
  runAt?: string | null;
1200
1575
  /**
1201
1576
  * Format: date-time
1202
- * @description Next time a recurring or retrying schedule becomes due.
1577
+ * @description Next time the schedule becomes due. Null when it is never due again.
1203
1578
  */
1204
1579
  nextRunAt?: string | null;
1205
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1206
- recurrence?: string;
1207
- /**
1208
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1209
- * `scheduled`: waiting for its due time. `assigned`: designated for a
1210
- * particular worker but not yet claimed. `claimed`: a worker holds the
1211
- * claim and has not started. `running`: the claim holder is executing
1212
- * it. `retrying`: the last attempt failed and another is due.
1213
- * `completed`, `failed` and `cancelled` are terminal for a run-once
1214
- * schedule; a recurring schedule returns to `scheduled`.
1580
+ /**
1581
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
1582
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
1583
+ * `monthly` repeat at the same wall-clock time one calendar day, week
1584
+ * or month later in the schedule's `timezone`, so a daily schedule
1585
+ * keeps its local time across daylight-saving changes. `every:<n>`
1586
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
1587
+ * from `runAt` (else from the current `nextRunAt`); the next due time
1588
+ * is the first occurrence after the run is released, so missed runs
1589
+ * are not replayed.
1590
+ * @default
1591
+ */
1592
+ recurrence: string;
1593
+ /**
1594
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
1595
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
1596
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
1597
+ * refuses a name it does not know with 400.
1598
+ * @default UTC
1599
+ */
1600
+ timezone: string;
1601
+ /**
1602
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
1603
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
1604
+ * designated for a particular worker but not yet claimed. `claimed`: a
1605
+ * worker holds the claim and has not started. `running`: the claim
1606
+ * holder is executing it. `retrying`: the last attempt failed and
1607
+ * another is due. `completed`, `failed` and `cancelled` are terminal
1608
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
1609
+ * when its claim is released with a `completed` outcome.
1215
1610
  * @enum {string}
1216
1611
  */
1217
1612
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1218
- /** @description Attempts already retried for the current run. */
1613
+ /**
1614
+ * @description Attempts already retried for the current run.
1615
+ * @default 0
1616
+ */
1219
1617
  retryCount: number;
1220
- /** @description Maximum retries before the run is marked failed. */
1618
+ /**
1619
+ * @description Maximum retries before the run is marked failed.
1620
+ * @default 0
1621
+ */
1221
1622
  maxRetries: number;
1222
- /** @description Minutes to wait before a retry becomes due. */
1223
- retryDelayMinutes?: number;
1623
+ /**
1624
+ * @description Minutes to wait before a retry becomes due.
1625
+ * @default 0
1626
+ */
1627
+ retryDelayMinutes: number;
1224
1628
  /**
1225
1629
  * Format: date-time
1226
- * @description Time of the most recent attempt.
1630
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
1227
1631
  */
1228
- lastRunAt?: string | null;
1229
- /** @description Error reported by the most recent attempt. */
1230
- lastError?: string;
1632
+ readonly lastRunAt?: string | null;
1633
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
1634
+ readonly lastError?: string;
1231
1635
  /**
1232
1636
  * Claim Schema
1233
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1637
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
1234
1638
  */
1235
- claim?: {
1639
+ readonly claim?: {
1236
1640
  /**
1237
1641
  * Format: uuid
1238
1642
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -1243,17 +1647,25 @@ export interface operations {
1243
1647
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1244
1648
  */
1245
1649
  organizationId: string;
1246
- /** @description Type of the claimed resource, for example `schedule`. */
1650
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
1247
1651
  resourceType: string;
1248
1652
  /**
1249
1653
  * Format: uuid
1250
1654
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1251
1655
  */
1252
1656
  resourceId: string;
1253
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1254
- claimant: string;
1255
1657
  /**
1256
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
1658
+ * Format: uuid
1659
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1660
+ */
1661
+ claimantConnectionId?: string;
1662
+ /**
1663
+ * Format: uuid
1664
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1665
+ */
1666
+ claimantUserId?: string;
1667
+ /**
1668
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
1257
1669
  * @enum {string}
1258
1670
  */
1259
1671
  status: "active" | "released" | "expired";
@@ -1269,9 +1681,31 @@ export interface operations {
1269
1681
  expiresAt: string;
1270
1682
  /**
1271
1683
  * Format: date-time
1272
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
1684
+ * @description Time of the last renewal. Null until the claim is first renewed.
1685
+ */
1686
+ renewedAt?: string | null;
1687
+ /**
1688
+ * Format: date-time
1689
+ * @description Time the claim was released. Null while the claim is active or after it expired.
1273
1690
  */
1274
1691
  releasedAt?: string | null;
1692
+ /**
1693
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
1694
+ * @enum {string}
1695
+ */
1696
+ outcome?: "completed" | "failed" | "cancelled";
1697
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
1698
+ outcomeError?: string;
1699
+ /**
1700
+ * Format: uuid
1701
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1702
+ */
1703
+ outcomeEventId?: string;
1704
+ /**
1705
+ * Format: uuid
1706
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1707
+ */
1708
+ releasedBy?: string;
1275
1709
  /**
1276
1710
  * Format: date-time
1277
1711
  * @description Timestamp of claim creation.
@@ -1287,45 +1721,32 @@ export interface operations {
1287
1721
  * Format: date-time
1288
1722
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1289
1723
  */
1290
- pausedAt?: string | null;
1291
- /** @description Identity that paused the schedule. Server-managed. */
1292
- pausedBy?: string;
1724
+ readonly pausedAt?: string | null;
1725
+ /**
1726
+ * Format: uuid
1727
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1728
+ */
1729
+ readonly pausedBy?: string;
1293
1730
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
1294
1731
  pauseReason?: string;
1295
1732
  /**
1296
1733
  * Format: date-time
1297
1734
  * @description Timestamp of schedule creation.
1298
1735
  */
1299
- createdAt: string;
1736
+ readonly createdAt: string;
1300
1737
  /**
1301
1738
  * Format: date-time
1302
1739
  * @description Timestamp of last schedule modification.
1303
1740
  */
1304
- updatedAt: string;
1741
+ readonly updatedAt: string;
1305
1742
  /**
1306
1743
  * Format: date-time
1307
1744
  * @description Timestamp when the schedule was soft-deleted. Null while live.
1308
1745
  */
1309
- deletedAt?: string | null;
1746
+ readonly deletedAt?: string | null;
1310
1747
  };
1311
1748
  };
1312
1749
  };
1313
- /** @description No schedule was due and claimable */
1314
- 204: {
1315
- headers: {
1316
- [name: string]: unknown;
1317
- };
1318
- content?: never;
1319
- };
1320
- /** @description Invalid request body or request param */
1321
- 400: {
1322
- headers: {
1323
- [name: string]: unknown;
1324
- };
1325
- content: {
1326
- "text/plain": string;
1327
- };
1328
- };
1329
1750
  /** @description Expired JWT token used or insufficient privilege */
1330
1751
  401: {
1331
1752
  headers: {
@@ -1355,21 +1776,128 @@ export interface operations {
1355
1776
  };
1356
1777
  };
1357
1778
  };
1358
- getScheduleById: {
1779
+ updateSchedule: {
1359
1780
  parameters: {
1360
1781
  query?: never;
1361
- header?: never;
1782
+ header?: {
1783
+ /** @description Entity tag of the schedule as last read, from the `ETag` header of getScheduleById, createSchedule or updateSchedule. When present the write applies only if it still matches; otherwise 412. */
1784
+ "If-Match"?: string;
1785
+ };
1362
1786
  path: {
1363
1787
  /** @description Schedule ID */
1364
1788
  scheduleId: string;
1365
1789
  };
1366
1790
  cookie?: never;
1367
1791
  };
1368
- requestBody?: never;
1792
+ requestBody: {
1793
+ content: {
1794
+ "application/json": {
1795
+ /**
1796
+ * Format: uuid
1797
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1798
+ */
1799
+ id?: string;
1800
+ /**
1801
+ * Format: uuid
1802
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1803
+ */
1804
+ workspaceId?: string;
1805
+ /** @description Human-readable name for the schedule. */
1806
+ name: string;
1807
+ /** @description The action the worker runs, for example a command name. */
1808
+ action: string;
1809
+ /**
1810
+ * @description Type of the resource the schedule acts on, named the way a claim's
1811
+ * `resourceType` is (lowercase snake_case construct name, for example
1812
+ * `content_item` or `profile`). A server verifies the target types it
1813
+ * serves and refuses others with 400. Set together with `targetId` or
1814
+ * not at all.
1815
+ */
1816
+ targetType?: string;
1817
+ /**
1818
+ * Format: uuid
1819
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1820
+ */
1821
+ targetId?: string;
1822
+ /** @description Action parameters, stored as a JSON blob. */
1823
+ params?: Record<string, never>;
1824
+ /**
1825
+ * @description Whether the schedule is eligible to run.
1826
+ * @default true
1827
+ */
1828
+ enabled?: boolean;
1829
+ /**
1830
+ * Format: date-time
1831
+ * @description Time the schedule first becomes due.
1832
+ */
1833
+ runAt?: string | null;
1834
+ /**
1835
+ * Format: date-time
1836
+ * @description Next time the schedule becomes due. Omitted on create, it defaults to `runAt`; omitted on update, it is kept. Send null for never due again.
1837
+ */
1838
+ nextRunAt?: string | null;
1839
+ /**
1840
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
1841
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
1842
+ * `monthly` repeat at the same wall-clock time one calendar day, week
1843
+ * or month later in the schedule's `timezone`, so a daily schedule
1844
+ * keeps its local time across daylight-saving changes. `every:<n>`
1845
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
1846
+ * from `runAt` (else from the current `nextRunAt`); the next due time
1847
+ * is the first occurrence after the run is released, so missed runs
1848
+ * are not replayed.
1849
+ * @default
1850
+ */
1851
+ recurrence?: string;
1852
+ /**
1853
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
1854
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
1855
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
1856
+ * refuses a name it does not know with 400.
1857
+ * @default UTC
1858
+ */
1859
+ timezone?: string;
1860
+ /**
1861
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
1862
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
1863
+ * designated for a particular worker but not yet claimed. `claimed`: a
1864
+ * worker holds the claim and has not started. `running`: the claim
1865
+ * holder is executing it. `retrying`: the last attempt failed and
1866
+ * another is due. `completed`, `failed` and `cancelled` are terminal
1867
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
1868
+ * when its claim is released with a `completed` outcome.
1869
+ * @enum {string}
1870
+ */
1871
+ status?: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1872
+ /** @description Retries used so far for the current run, for example 0 to re-arm a schedule. Omitted on update, it is kept. */
1873
+ retryCount?: number;
1874
+ /**
1875
+ * @description Maximum retries before the run is marked failed.
1876
+ * @default 0
1877
+ */
1878
+ maxRetries?: number;
1879
+ /**
1880
+ * @description Minutes to wait before a retry becomes due.
1881
+ * @default 0
1882
+ */
1883
+ retryDelayMinutes?: number;
1884
+ /**
1885
+ * @description `true` pauses the schedule so it is never claimed; `false`
1886
+ * resumes it. Omit to leave the pause unchanged. The server records
1887
+ * `pausedAt` and `pausedBy`.
1888
+ */
1889
+ paused?: boolean;
1890
+ /** @description Reason for pausing; stored only while `paused` is true and cleared on resume. */
1891
+ pauseReason?: string;
1892
+ };
1893
+ };
1894
+ };
1369
1895
  responses: {
1370
- /** @description Schedule response */
1896
+ /** @description Schedule updated */
1371
1897
  200: {
1372
1898
  headers: {
1899
+ /** @description Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional. */
1900
+ ETag?: string;
1373
1901
  [name: string]: unknown;
1374
1902
  };
1375
1903
  content: {
@@ -1378,24 +1906,45 @@ export interface operations {
1378
1906
  * Format: uuid
1379
1907
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1380
1908
  */
1381
- id: string;
1909
+ readonly id: string;
1382
1910
  /**
1383
1911
  * Format: uuid
1384
1912
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1385
1913
  */
1386
- organizationId: string;
1914
+ readonly organizationId: string;
1387
1915
  /**
1388
1916
  * Format: uuid
1389
1917
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1390
1918
  */
1391
1919
  workspaceId?: string;
1920
+ /**
1921
+ * Format: uuid
1922
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1923
+ */
1924
+ readonly createdBy?: string;
1392
1925
  /** @description Human-readable name for the schedule. */
1393
1926
  name: string;
1394
1927
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1395
1928
  action: string;
1396
- /** @description Action parameters, stored as a JSON blob. */
1929
+ /**
1930
+ * @description Type of the resource the schedule acts on, named the way a claim's
1931
+ * `resourceType` is (lowercase snake_case construct name, for example
1932
+ * `content_item` or `profile`). A server verifies the target types it
1933
+ * serves and refuses others with 400. Set together with `targetId` or
1934
+ * not at all.
1935
+ */
1936
+ targetType?: string;
1937
+ /**
1938
+ * Format: uuid
1939
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1940
+ */
1941
+ targetId?: string;
1942
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
1397
1943
  params?: Record<string, never>;
1398
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1944
+ /**
1945
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
1946
+ * @default true
1947
+ */
1399
1948
  enabled: boolean;
1400
1949
  /**
1401
1950
  * Format: date-time
@@ -1404,40 +1953,69 @@ export interface operations {
1404
1953
  runAt?: string | null;
1405
1954
  /**
1406
1955
  * Format: date-time
1407
- * @description Next time a recurring or retrying schedule becomes due.
1956
+ * @description Next time the schedule becomes due. Null when it is never due again.
1408
1957
  */
1409
1958
  nextRunAt?: string | null;
1410
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1411
- recurrence?: string;
1412
- /**
1413
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1414
- * `scheduled`: waiting for its due time. `assigned`: designated for a
1415
- * particular worker but not yet claimed. `claimed`: a worker holds the
1416
- * claim and has not started. `running`: the claim holder is executing
1417
- * it. `retrying`: the last attempt failed and another is due.
1418
- * `completed`, `failed` and `cancelled` are terminal for a run-once
1419
- * schedule; a recurring schedule returns to `scheduled`.
1959
+ /**
1960
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
1961
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
1962
+ * `monthly` repeat at the same wall-clock time one calendar day, week
1963
+ * or month later in the schedule's `timezone`, so a daily schedule
1964
+ * keeps its local time across daylight-saving changes. `every:<n>`
1965
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
1966
+ * from `runAt` (else from the current `nextRunAt`); the next due time
1967
+ * is the first occurrence after the run is released, so missed runs
1968
+ * are not replayed.
1969
+ * @default
1970
+ */
1971
+ recurrence: string;
1972
+ /**
1973
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
1974
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
1975
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
1976
+ * refuses a name it does not know with 400.
1977
+ * @default UTC
1978
+ */
1979
+ timezone: string;
1980
+ /**
1981
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
1982
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
1983
+ * designated for a particular worker but not yet claimed. `claimed`: a
1984
+ * worker holds the claim and has not started. `running`: the claim
1985
+ * holder is executing it. `retrying`: the last attempt failed and
1986
+ * another is due. `completed`, `failed` and `cancelled` are terminal
1987
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
1988
+ * when its claim is released with a `completed` outcome.
1420
1989
  * @enum {string}
1421
1990
  */
1422
1991
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1423
- /** @description Attempts already retried for the current run. */
1992
+ /**
1993
+ * @description Attempts already retried for the current run.
1994
+ * @default 0
1995
+ */
1424
1996
  retryCount: number;
1425
- /** @description Maximum retries before the run is marked failed. */
1997
+ /**
1998
+ * @description Maximum retries before the run is marked failed.
1999
+ * @default 0
2000
+ */
1426
2001
  maxRetries: number;
1427
- /** @description Minutes to wait before a retry becomes due. */
1428
- retryDelayMinutes?: number;
2002
+ /**
2003
+ * @description Minutes to wait before a retry becomes due.
2004
+ * @default 0
2005
+ */
2006
+ retryDelayMinutes: number;
1429
2007
  /**
1430
2008
  * Format: date-time
1431
- * @description Time of the most recent attempt.
2009
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
1432
2010
  */
1433
- lastRunAt?: string | null;
1434
- /** @description Error reported by the most recent attempt. */
1435
- lastError?: string;
2011
+ readonly lastRunAt?: string | null;
2012
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
2013
+ readonly lastError?: string;
1436
2014
  /**
1437
2015
  * Claim Schema
1438
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2016
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
1439
2017
  */
1440
- claim?: {
2018
+ readonly claim?: {
1441
2019
  /**
1442
2020
  * Format: uuid
1443
2021
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -1448,17 +2026,25 @@ export interface operations {
1448
2026
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1449
2027
  */
1450
2028
  organizationId: string;
1451
- /** @description Type of the claimed resource, for example `schedule`. */
2029
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
1452
2030
  resourceType: string;
1453
2031
  /**
1454
2032
  * Format: uuid
1455
2033
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1456
2034
  */
1457
2035
  resourceId: string;
1458
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1459
- claimant: string;
1460
2036
  /**
1461
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2037
+ * Format: uuid
2038
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2039
+ */
2040
+ claimantConnectionId?: string;
2041
+ /**
2042
+ * Format: uuid
2043
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2044
+ */
2045
+ claimantUserId?: string;
2046
+ /**
2047
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
1462
2048
  * @enum {string}
1463
2049
  */
1464
2050
  status: "active" | "released" | "expired";
@@ -1474,720 +2060,31 @@ export interface operations {
1474
2060
  expiresAt: string;
1475
2061
  /**
1476
2062
  * Format: date-time
1477
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
2063
+ * @description Time of the last renewal. Null until the claim is first renewed.
1478
2064
  */
1479
- releasedAt?: string | null;
2065
+ renewedAt?: string | null;
1480
2066
  /**
1481
2067
  * Format: date-time
1482
- * @description Timestamp of claim creation.
2068
+ * @description Time the claim was released. Null while the claim is active or after it expired.
1483
2069
  */
1484
- createdAt: string;
1485
- /**
1486
- * Format: date-time
1487
- * @description Timestamp of last claim modification.
1488
- */
1489
- updatedAt: string;
1490
- };
1491
- /**
1492
- * Format: date-time
1493
- * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1494
- */
1495
- pausedAt?: string | null;
1496
- /** @description Identity that paused the schedule. Server-managed. */
1497
- pausedBy?: string;
1498
- /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
1499
- pauseReason?: string;
1500
- /**
1501
- * Format: date-time
1502
- * @description Timestamp of schedule creation.
1503
- */
1504
- createdAt: string;
1505
- /**
1506
- * Format: date-time
1507
- * @description Timestamp of last schedule modification.
1508
- */
1509
- updatedAt: string;
1510
- /**
1511
- * Format: date-time
1512
- * @description Timestamp when the schedule was soft-deleted. Null while live.
1513
- */
1514
- deletedAt?: string | null;
1515
- };
1516
- };
1517
- };
1518
- /** @description Expired JWT token used or insufficient privilege */
1519
- 401: {
1520
- headers: {
1521
- [name: string]: unknown;
1522
- };
1523
- content: {
1524
- "text/plain": string;
1525
- };
1526
- };
1527
- /** @description Result not found */
1528
- 404: {
1529
- headers: {
1530
- [name: string]: unknown;
1531
- };
1532
- content: {
1533
- "text/plain": string;
1534
- };
1535
- };
1536
- /** @description Internal server error */
1537
- 500: {
1538
- headers: {
1539
- [name: string]: unknown;
1540
- };
1541
- content: {
1542
- "text/plain": string;
1543
- };
1544
- };
1545
- };
1546
- };
1547
- updateSchedule: {
1548
- parameters: {
1549
- query?: never;
1550
- header?: never;
1551
- path: {
1552
- /** @description Schedule ID */
1553
- scheduleId: string;
1554
- };
1555
- cookie?: never;
1556
- };
1557
- requestBody: {
1558
- content: {
1559
- "application/json": {
1560
- /**
1561
- * Format: uuid
1562
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1563
- */
1564
- id?: string;
1565
- /**
1566
- * Format: uuid
1567
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1568
- */
1569
- workspaceId?: string;
1570
- /** @description Human-readable name for the schedule. */
1571
- name: string;
1572
- /** @description The action the worker runs, for example a command name. */
1573
- action: string;
1574
- /** @description Action parameters, stored as a JSON blob. */
1575
- params?: Record<string, never>;
1576
- /** @description Whether the schedule is eligible to run. Defaults to true. */
1577
- enabled?: boolean;
1578
- /**
1579
- * Format: date-time
1580
- * @description Time the schedule first becomes due.
1581
- */
1582
- runAt?: string | null;
1583
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1584
- recurrence?: string;
1585
- /**
1586
- * @description Client-settable status. Omit to let the server choose `scheduled` for a due-timed schedule and `pending` otherwise.
1587
- * @enum {string}
1588
- */
1589
- status?: "pending" | "scheduled" | "cancelled";
1590
- /** @description Maximum retries before the run is marked failed. */
1591
- maxRetries?: number;
1592
- /** @description Minutes to wait before a retry becomes due. */
1593
- retryDelayMinutes?: number;
1594
- /**
1595
- * @description `true` pauses the schedule so it is never claimed (unless a claim
1596
- * carries `ignorePause`); `false` resumes it. Omit to leave the pause
1597
- * unchanged. The server records `pausedAt` and `pausedBy`.
1598
- */
1599
- paused?: boolean;
1600
- /** @description Reason for pausing; stored only while `paused` is true and cleared on resume. */
1601
- pauseReason?: string;
1602
- };
1603
- };
1604
- };
1605
- responses: {
1606
- /** @description Schedule updated */
1607
- 200: {
1608
- headers: {
1609
- [name: string]: unknown;
1610
- };
1611
- content: {
1612
- "application/json": {
1613
- /**
1614
- * Format: uuid
1615
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1616
- */
1617
- id: string;
1618
- /**
1619
- * Format: uuid
1620
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1621
- */
1622
- organizationId: string;
1623
- /**
1624
- * Format: uuid
1625
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1626
- */
1627
- workspaceId?: string;
1628
- /** @description Human-readable name for the schedule. */
1629
- name: string;
1630
- /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1631
- action: string;
1632
- /** @description Action parameters, stored as a JSON blob. */
1633
- params?: Record<string, never>;
1634
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1635
- enabled: boolean;
1636
- /**
1637
- * Format: date-time
1638
- * @description Time the schedule first becomes due.
1639
- */
1640
- runAt?: string | null;
1641
- /**
1642
- * Format: date-time
1643
- * @description Next time a recurring or retrying schedule becomes due.
1644
- */
1645
- nextRunAt?: string | null;
1646
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1647
- recurrence?: string;
1648
- /**
1649
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1650
- * `scheduled`: waiting for its due time. `assigned`: designated for a
1651
- * particular worker but not yet claimed. `claimed`: a worker holds the
1652
- * claim and has not started. `running`: the claim holder is executing
1653
- * it. `retrying`: the last attempt failed and another is due.
1654
- * `completed`, `failed` and `cancelled` are terminal for a run-once
1655
- * schedule; a recurring schedule returns to `scheduled`.
1656
- * @enum {string}
1657
- */
1658
- status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1659
- /** @description Attempts already retried for the current run. */
1660
- retryCount: number;
1661
- /** @description Maximum retries before the run is marked failed. */
1662
- maxRetries: number;
1663
- /** @description Minutes to wait before a retry becomes due. */
1664
- retryDelayMinutes?: number;
1665
- /**
1666
- * Format: date-time
1667
- * @description Time of the most recent attempt.
1668
- */
1669
- lastRunAt?: string | null;
1670
- /** @description Error reported by the most recent attempt. */
1671
- lastError?: string;
1672
- /**
1673
- * Claim Schema
1674
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1675
- */
1676
- claim?: {
1677
- /**
1678
- * Format: uuid
1679
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1680
- */
1681
- id: string;
1682
- /**
1683
- * Format: uuid
1684
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1685
- */
1686
- organizationId: string;
1687
- /** @description Type of the claimed resource, for example `schedule`. */
1688
- resourceType: string;
1689
- /**
1690
- * Format: uuid
1691
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1692
- */
1693
- resourceId: string;
1694
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1695
- claimant: string;
1696
- /**
1697
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
1698
- * @enum {string}
1699
- */
1700
- status: "active" | "released" | "expired";
1701
- /**
1702
- * Format: date-time
1703
- * @description Time the claim was taken.
1704
- */
1705
- claimedAt: string;
1706
- /**
1707
- * Format: date-time
1708
- * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
1709
- */
1710
- expiresAt: string;
1711
- /**
1712
- * Format: date-time
1713
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
1714
- */
1715
- releasedAt?: string | null;
1716
- /**
1717
- * Format: date-time
1718
- * @description Timestamp of claim creation.
1719
- */
1720
- createdAt: string;
1721
- /**
1722
- * Format: date-time
1723
- * @description Timestamp of last claim modification.
1724
- */
1725
- updatedAt: string;
1726
- };
1727
- /**
1728
- * Format: date-time
1729
- * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1730
- */
1731
- pausedAt?: string | null;
1732
- /** @description Identity that paused the schedule. Server-managed. */
1733
- pausedBy?: string;
1734
- /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
1735
- pauseReason?: string;
1736
- /**
1737
- * Format: date-time
1738
- * @description Timestamp of schedule creation.
1739
- */
1740
- createdAt: string;
1741
- /**
1742
- * Format: date-time
1743
- * @description Timestamp of last schedule modification.
1744
- */
1745
- updatedAt: string;
1746
- /**
1747
- * Format: date-time
1748
- * @description Timestamp when the schedule was soft-deleted. Null while live.
1749
- */
1750
- deletedAt?: string | null;
1751
- };
1752
- };
1753
- };
1754
- /** @description Invalid request body or request param */
1755
- 400: {
1756
- headers: {
1757
- [name: string]: unknown;
1758
- };
1759
- content: {
1760
- "text/plain": string;
1761
- };
1762
- };
1763
- /** @description Expired JWT token used or insufficient privilege */
1764
- 401: {
1765
- headers: {
1766
- [name: string]: unknown;
1767
- };
1768
- content: {
1769
- "text/plain": string;
1770
- };
1771
- };
1772
- /** @description Result not found */
1773
- 404: {
1774
- headers: {
1775
- [name: string]: unknown;
1776
- };
1777
- content: {
1778
- "text/plain": string;
1779
- };
1780
- };
1781
- /** @description Internal server error */
1782
- 500: {
1783
- headers: {
1784
- [name: string]: unknown;
1785
- };
1786
- content: {
1787
- "text/plain": string;
1788
- };
1789
- };
1790
- };
1791
- };
1792
- deleteScheduleById: {
1793
- parameters: {
1794
- query?: never;
1795
- header?: never;
1796
- path: {
1797
- /** @description Schedule ID */
1798
- scheduleId: string;
1799
- };
1800
- cookie?: never;
1801
- };
1802
- requestBody?: never;
1803
- responses: {
1804
- /** @description Schedule deleted */
1805
- 204: {
1806
- headers: {
1807
- [name: string]: unknown;
1808
- };
1809
- content?: never;
1810
- };
1811
- /** @description Expired JWT token used or insufficient privilege */
1812
- 401: {
1813
- headers: {
1814
- [name: string]: unknown;
1815
- };
1816
- content: {
1817
- "text/plain": string;
1818
- };
1819
- };
1820
- /** @description Result not found */
1821
- 404: {
1822
- headers: {
1823
- [name: string]: unknown;
1824
- };
1825
- content: {
1826
- "text/plain": string;
1827
- };
1828
- };
1829
- /** @description Internal server error */
1830
- 500: {
1831
- headers: {
1832
- [name: string]: unknown;
1833
- };
1834
- content: {
1835
- "text/plain": string;
1836
- };
1837
- };
1838
- };
1839
- };
1840
- claimSchedule: {
1841
- parameters: {
1842
- query?: never;
1843
- header?: never;
1844
- path: {
1845
- /** @description Schedule ID */
1846
- scheduleId: string;
1847
- };
1848
- cookie?: never;
1849
- };
1850
- requestBody: {
1851
- content: {
1852
- "application/json": {
1853
- /** @description Identity of the worker taking the claim. */
1854
- claimant: string;
1855
- /** @description Requested claim duration in minutes; the server applies its default when omitted and may cap it. */
1856
- durationMinutes?: number;
1857
- /** @description Claim even though the schedule is not yet due (trigger now). A live claim held by another claimant still refuses. */
1858
- force?: boolean;
1859
- /** @description Operator override that claims through the organization-wide and per-schedule pauses. */
1860
- ignorePause?: boolean;
1861
- };
1862
- };
1863
- };
1864
- responses: {
1865
- /** @description The claimed schedule */
1866
- 200: {
1867
- headers: {
1868
- [name: string]: unknown;
1869
- };
1870
- content: {
1871
- "application/json": {
1872
- /**
1873
- * Format: uuid
1874
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1875
- */
1876
- id: string;
1877
- /**
1878
- * Format: uuid
1879
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1880
- */
1881
- organizationId: string;
1882
- /**
1883
- * Format: uuid
1884
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1885
- */
1886
- workspaceId?: string;
1887
- /** @description Human-readable name for the schedule. */
1888
- name: string;
1889
- /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
1890
- action: string;
1891
- /** @description Action parameters, stored as a JSON blob. */
1892
- params?: Record<string, never>;
1893
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
1894
- enabled: boolean;
1895
- /**
1896
- * Format: date-time
1897
- * @description Time the schedule first becomes due.
1898
- */
1899
- runAt?: string | null;
1900
- /**
1901
- * Format: date-time
1902
- * @description Next time a recurring or retrying schedule becomes due.
1903
- */
1904
- nextRunAt?: string | null;
1905
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
1906
- recurrence?: string;
1907
- /**
1908
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
1909
- * `scheduled`: waiting for its due time. `assigned`: designated for a
1910
- * particular worker but not yet claimed. `claimed`: a worker holds the
1911
- * claim and has not started. `running`: the claim holder is executing
1912
- * it. `retrying`: the last attempt failed and another is due.
1913
- * `completed`, `failed` and `cancelled` are terminal for a run-once
1914
- * schedule; a recurring schedule returns to `scheduled`.
1915
- * @enum {string}
1916
- */
1917
- status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
1918
- /** @description Attempts already retried for the current run. */
1919
- retryCount: number;
1920
- /** @description Maximum retries before the run is marked failed. */
1921
- maxRetries: number;
1922
- /** @description Minutes to wait before a retry becomes due. */
1923
- retryDelayMinutes?: number;
1924
- /**
1925
- * Format: date-time
1926
- * @description Time of the most recent attempt.
1927
- */
1928
- lastRunAt?: string | null;
1929
- /** @description Error reported by the most recent attempt. */
1930
- lastError?: string;
1931
- /**
1932
- * Claim Schema
1933
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
1934
- */
1935
- claim?: {
1936
- /**
1937
- * Format: uuid
1938
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1939
- */
1940
- id: string;
1941
- /**
1942
- * Format: uuid
1943
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1944
- */
1945
- organizationId: string;
1946
- /** @description Type of the claimed resource, for example `schedule`. */
1947
- resourceType: string;
1948
- /**
1949
- * Format: uuid
1950
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1951
- */
1952
- resourceId: string;
1953
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
1954
- claimant: string;
1955
- /**
1956
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
1957
- * @enum {string}
1958
- */
1959
- status: "active" | "released" | "expired";
1960
- /**
1961
- * Format: date-time
1962
- * @description Time the claim was taken.
1963
- */
1964
- claimedAt: string;
1965
- /**
1966
- * Format: date-time
1967
- * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
1968
- */
1969
- expiresAt: string;
1970
- /**
1971
- * Format: date-time
1972
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
1973
- */
1974
- releasedAt?: string | null;
1975
- /**
1976
- * Format: date-time
1977
- * @description Timestamp of claim creation.
1978
- */
1979
- createdAt: string;
1980
- /**
1981
- * Format: date-time
1982
- * @description Timestamp of last claim modification.
1983
- */
1984
- updatedAt: string;
1985
- };
1986
- /**
1987
- * Format: date-time
1988
- * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
1989
- */
1990
- pausedAt?: string | null;
1991
- /** @description Identity that paused the schedule. Server-managed. */
1992
- pausedBy?: string;
1993
- /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
1994
- pauseReason?: string;
1995
- /**
1996
- * Format: date-time
1997
- * @description Timestamp of schedule creation.
1998
- */
1999
- createdAt: string;
2000
- /**
2001
- * Format: date-time
2002
- * @description Timestamp of last schedule modification.
2003
- */
2004
- updatedAt: string;
2005
- /**
2006
- * Format: date-time
2007
- * @description Timestamp when the schedule was soft-deleted. Null while live.
2008
- */
2009
- deletedAt?: string | null;
2010
- };
2011
- };
2012
- };
2013
- /** @description Invalid request body or request param */
2014
- 400: {
2015
- headers: {
2016
- [name: string]: unknown;
2017
- };
2018
- content: {
2019
- "text/plain": string;
2020
- };
2021
- };
2022
- /** @description Expired JWT token used or insufficient privilege */
2023
- 401: {
2024
- headers: {
2025
- [name: string]: unknown;
2026
- };
2027
- content: {
2028
- "text/plain": string;
2029
- };
2030
- };
2031
- /** @description Result not found */
2032
- 404: {
2033
- headers: {
2034
- [name: string]: unknown;
2035
- };
2036
- content: {
2037
- "text/plain": string;
2038
- };
2039
- };
2040
- /** @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 */
2041
- 409: {
2042
- headers: {
2043
- [name: string]: unknown;
2044
- };
2045
- content: {
2046
- "text/plain": string;
2047
- };
2048
- };
2049
- /** @description Internal server error */
2050
- 500: {
2051
- headers: {
2052
- [name: string]: unknown;
2053
- };
2054
- content: {
2055
- "text/plain": string;
2056
- };
2057
- };
2058
- };
2059
- };
2060
- renewScheduleClaim: {
2061
- parameters: {
2062
- query?: never;
2063
- header?: never;
2064
- path: {
2065
- /** @description Schedule ID */
2066
- scheduleId: string;
2067
- };
2068
- cookie?: never;
2069
- };
2070
- requestBody: {
2071
- content: {
2072
- "application/json": {
2073
- /** @description Identity of the holder renewing the claim. */
2074
- claimant: string;
2075
- /** @description Requested extension in minutes from now; the server applies its default when omitted and may cap it. */
2076
- durationMinutes?: number;
2077
- };
2078
- };
2079
- };
2080
- responses: {
2081
- /** @description The schedule with its renewed claim */
2082
- 200: {
2083
- headers: {
2084
- [name: string]: unknown;
2085
- };
2086
- content: {
2087
- "application/json": {
2088
- /**
2089
- * Format: uuid
2090
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2091
- */
2092
- id: string;
2093
- /**
2094
- * Format: uuid
2095
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2096
- */
2097
- organizationId: string;
2098
- /**
2099
- * Format: uuid
2100
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2101
- */
2102
- workspaceId?: string;
2103
- /** @description Human-readable name for the schedule. */
2104
- name: string;
2105
- /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2106
- action: string;
2107
- /** @description Action parameters, stored as a JSON blob. */
2108
- params?: Record<string, never>;
2109
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2110
- enabled: boolean;
2111
- /**
2112
- * Format: date-time
2113
- * @description Time the schedule first becomes due.
2114
- */
2115
- runAt?: string | null;
2116
- /**
2117
- * Format: date-time
2118
- * @description Next time a recurring or retrying schedule becomes due.
2119
- */
2120
- nextRunAt?: string | null;
2121
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2122
- recurrence?: string;
2123
- /**
2124
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2125
- * `scheduled`: waiting for its due time. `assigned`: designated for a
2126
- * particular worker but not yet claimed. `claimed`: a worker holds the
2127
- * claim and has not started. `running`: the claim holder is executing
2128
- * it. `retrying`: the last attempt failed and another is due.
2129
- * `completed`, `failed` and `cancelled` are terminal for a run-once
2130
- * schedule; a recurring schedule returns to `scheduled`.
2131
- * @enum {string}
2132
- */
2133
- status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2134
- /** @description Attempts already retried for the current run. */
2135
- retryCount: number;
2136
- /** @description Maximum retries before the run is marked failed. */
2137
- maxRetries: number;
2138
- /** @description Minutes to wait before a retry becomes due. */
2139
- retryDelayMinutes?: number;
2140
- /**
2141
- * Format: date-time
2142
- * @description Time of the most recent attempt.
2143
- */
2144
- lastRunAt?: string | null;
2145
- /** @description Error reported by the most recent attempt. */
2146
- lastError?: string;
2147
- /**
2148
- * Claim Schema
2149
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2150
- */
2151
- claim?: {
2070
+ releasedAt?: string | null;
2152
2071
  /**
2153
- * Format: uuid
2154
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2072
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
2073
+ * @enum {string}
2155
2074
  */
2156
- id: string;
2075
+ outcome?: "completed" | "failed" | "cancelled";
2076
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
2077
+ outcomeError?: string;
2157
2078
  /**
2158
2079
  * Format: uuid
2159
2080
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2160
2081
  */
2161
- organizationId: string;
2162
- /** @description Type of the claimed resource, for example `schedule`. */
2163
- resourceType: string;
2082
+ outcomeEventId?: string;
2164
2083
  /**
2165
2084
  * Format: uuid
2166
2085
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2167
2086
  */
2168
- resourceId: string;
2169
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2170
- claimant: string;
2171
- /**
2172
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2173
- * @enum {string}
2174
- */
2175
- status: "active" | "released" | "expired";
2176
- /**
2177
- * Format: date-time
2178
- * @description Time the claim was taken.
2179
- */
2180
- claimedAt: string;
2181
- /**
2182
- * Format: date-time
2183
- * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
2184
- */
2185
- expiresAt: string;
2186
- /**
2187
- * Format: date-time
2188
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
2189
- */
2190
- releasedAt?: string | null;
2087
+ releasedBy?: string;
2191
2088
  /**
2192
2089
  * Format: date-time
2193
2090
  * @description Timestamp of claim creation.
@@ -2203,26 +2100,29 @@ export interface operations {
2203
2100
  * Format: date-time
2204
2101
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2205
2102
  */
2206
- pausedAt?: string | null;
2207
- /** @description Identity that paused the schedule. Server-managed. */
2208
- pausedBy?: string;
2103
+ readonly pausedAt?: string | null;
2104
+ /**
2105
+ * Format: uuid
2106
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2107
+ */
2108
+ readonly pausedBy?: string;
2209
2109
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
2210
2110
  pauseReason?: string;
2211
2111
  /**
2212
2112
  * Format: date-time
2213
2113
  * @description Timestamp of schedule creation.
2214
2114
  */
2215
- createdAt: string;
2115
+ readonly createdAt: string;
2216
2116
  /**
2217
2117
  * Format: date-time
2218
2118
  * @description Timestamp of last schedule modification.
2219
2119
  */
2220
- updatedAt: string;
2120
+ readonly updatedAt: string;
2221
2121
  /**
2222
2122
  * Format: date-time
2223
2123
  * @description Timestamp when the schedule was soft-deleted. Null while live.
2224
2124
  */
2225
- deletedAt?: string | null;
2125
+ readonly deletedAt?: string | null;
2226
2126
  };
2227
2127
  };
2228
2128
  };
@@ -2253,214 +2153,15 @@ export interface operations {
2253
2153
  "text/plain": string;
2254
2154
  };
2255
2155
  };
2256
- /** @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 */
2257
- 409: {
2258
- headers: {
2259
- [name: string]: unknown;
2260
- };
2261
- content: {
2262
- "text/plain": string;
2263
- };
2264
- };
2265
- /** @description Internal server error */
2266
- 500: {
2267
- headers: {
2268
- [name: string]: unknown;
2269
- };
2270
- content: {
2271
- "text/plain": string;
2272
- };
2273
- };
2274
- };
2275
- };
2276
- releaseScheduleClaim: {
2277
- parameters: {
2278
- query?: never;
2279
- header?: never;
2280
- path: {
2281
- /** @description Schedule ID */
2282
- scheduleId: string;
2283
- };
2284
- cookie?: never;
2285
- };
2286
- requestBody: {
2287
- content: {
2288
- "application/json": {
2289
- /** @description Identity of the holder releasing the claim. */
2290
- claimant: string;
2291
- /**
2292
- * @description Outcome status to record with the release.
2293
- * @enum {string}
2294
- */
2295
- status?: "scheduled" | "retrying" | "completed" | "failed" | "cancelled";
2296
- /**
2297
- * Format: date-time
2298
- * @description Time of the attempt being reported.
2299
- */
2300
- lastRunAt?: string | null;
2301
- /** @description Error reported by the attempt; empty on success. */
2302
- lastError?: string;
2303
- /**
2304
- * Format: date-time
2305
- * @description Next due time for a recurring or retrying schedule.
2306
- */
2307
- nextRunAt?: string | null;
2308
- /** @description Retries used so far for the current run. */
2309
- retryCount?: number;
2310
- };
2311
- };
2312
- };
2313
- responses: {
2314
- /** @description The released schedule */
2315
- 200: {
2316
- headers: {
2317
- [name: string]: unknown;
2318
- };
2319
- content: {
2320
- "application/json": {
2321
- /**
2322
- * Format: uuid
2323
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2324
- */
2325
- id: string;
2326
- /**
2327
- * Format: uuid
2328
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2329
- */
2330
- organizationId: string;
2331
- /**
2332
- * Format: uuid
2333
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2334
- */
2335
- workspaceId?: string;
2336
- /** @description Human-readable name for the schedule. */
2337
- name: string;
2338
- /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2339
- action: string;
2340
- /** @description Action parameters, stored as a JSON blob. */
2341
- params?: Record<string, never>;
2342
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2343
- enabled: boolean;
2344
- /**
2345
- * Format: date-time
2346
- * @description Time the schedule first becomes due.
2347
- */
2348
- runAt?: string | null;
2349
- /**
2350
- * Format: date-time
2351
- * @description Next time a recurring or retrying schedule becomes due.
2352
- */
2353
- nextRunAt?: string | null;
2354
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2355
- recurrence?: string;
2356
- /**
2357
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2358
- * `scheduled`: waiting for its due time. `assigned`: designated for a
2359
- * particular worker but not yet claimed. `claimed`: a worker holds the
2360
- * claim and has not started. `running`: the claim holder is executing
2361
- * it. `retrying`: the last attempt failed and another is due.
2362
- * `completed`, `failed` and `cancelled` are terminal for a run-once
2363
- * schedule; a recurring schedule returns to `scheduled`.
2364
- * @enum {string}
2365
- */
2366
- status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2367
- /** @description Attempts already retried for the current run. */
2368
- retryCount: number;
2369
- /** @description Maximum retries before the run is marked failed. */
2370
- maxRetries: number;
2371
- /** @description Minutes to wait before a retry becomes due. */
2372
- retryDelayMinutes?: number;
2373
- /**
2374
- * Format: date-time
2375
- * @description Time of the most recent attempt.
2376
- */
2377
- lastRunAt?: string | null;
2378
- /** @description Error reported by the most recent attempt. */
2379
- lastError?: string;
2380
- /**
2381
- * Claim Schema
2382
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2383
- */
2384
- claim?: {
2385
- /**
2386
- * Format: uuid
2387
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2388
- */
2389
- id: string;
2390
- /**
2391
- * Format: uuid
2392
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2393
- */
2394
- organizationId: string;
2395
- /** @description Type of the claimed resource, for example `schedule`. */
2396
- resourceType: string;
2397
- /**
2398
- * Format: uuid
2399
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2400
- */
2401
- resourceId: string;
2402
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2403
- claimant: string;
2404
- /**
2405
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2406
- * @enum {string}
2407
- */
2408
- status: "active" | "released" | "expired";
2409
- /**
2410
- * Format: date-time
2411
- * @description Time the claim was taken.
2412
- */
2413
- claimedAt: string;
2414
- /**
2415
- * Format: date-time
2416
- * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
2417
- */
2418
- expiresAt: string;
2419
- /**
2420
- * Format: date-time
2421
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
2422
- */
2423
- releasedAt?: string | null;
2424
- /**
2425
- * Format: date-time
2426
- * @description Timestamp of claim creation.
2427
- */
2428
- createdAt: string;
2429
- /**
2430
- * Format: date-time
2431
- * @description Timestamp of last claim modification.
2432
- */
2433
- updatedAt: string;
2434
- };
2435
- /**
2436
- * Format: date-time
2437
- * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2438
- */
2439
- pausedAt?: string | null;
2440
- /** @description Identity that paused the schedule. Server-managed. */
2441
- pausedBy?: string;
2442
- /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
2443
- pauseReason?: string;
2444
- /**
2445
- * Format: date-time
2446
- * @description Timestamp of schedule creation.
2447
- */
2448
- createdAt: string;
2449
- /**
2450
- * Format: date-time
2451
- * @description Timestamp of last schedule modification.
2452
- */
2453
- updatedAt: string;
2454
- /**
2455
- * Format: date-time
2456
- * @description Timestamp when the schedule was soft-deleted. Null while live.
2457
- */
2458
- deletedAt?: string | null;
2459
- };
2156
+ /** @description Precondition failed - `If-Match` does not match the schedule's current entity tag, so nothing was written. Read the schedule again and reapply the change. */
2157
+ 412: {
2158
+ headers: {
2159
+ [name: string]: unknown;
2460
2160
  };
2161
+ content?: never;
2461
2162
  };
2462
- /** @description Invalid request body or request param */
2463
- 400: {
2163
+ /** @description Internal server error */
2164
+ 500: {
2464
2165
  headers: {
2465
2166
  [name: string]: unknown;
2466
2167
  };
@@ -2468,17 +2169,29 @@ export interface operations {
2468
2169
  "text/plain": string;
2469
2170
  };
2470
2171
  };
2471
- /** @description Expired JWT token used or insufficient privilege */
2472
- 401: {
2172
+ };
2173
+ };
2174
+ deleteScheduleById: {
2175
+ parameters: {
2176
+ query?: never;
2177
+ header?: never;
2178
+ path: {
2179
+ /** @description Schedule ID */
2180
+ scheduleId: string;
2181
+ };
2182
+ cookie?: never;
2183
+ };
2184
+ requestBody?: never;
2185
+ responses: {
2186
+ /** @description Schedule deleted */
2187
+ 204: {
2473
2188
  headers: {
2474
2189
  [name: string]: unknown;
2475
2190
  };
2476
- content: {
2477
- "text/plain": string;
2478
- };
2191
+ content?: never;
2479
2192
  };
2480
- /** @description Result not found */
2481
- 404: {
2193
+ /** @description Expired JWT token used or insufficient privilege */
2194
+ 401: {
2482
2195
  headers: {
2483
2196
  [name: string]: unknown;
2484
2197
  };
@@ -2486,8 +2199,8 @@ export interface operations {
2486
2199
  "text/plain": string;
2487
2200
  };
2488
2201
  };
2489
- /** @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 */
2490
- 409: {
2202
+ /** @description Result not found */
2203
+ 404: {
2491
2204
  headers: {
2492
2205
  [name: string]: unknown;
2493
2206
  };
@@ -2548,24 +2261,45 @@ export interface operations {
2548
2261
  * Format: uuid
2549
2262
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2550
2263
  */
2551
- id: string;
2264
+ readonly id: string;
2552
2265
  /**
2553
2266
  * Format: uuid
2554
2267
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2555
2268
  */
2556
- organizationId: string;
2269
+ readonly organizationId: string;
2557
2270
  /**
2558
2271
  * Format: uuid
2559
2272
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2560
2273
  */
2561
2274
  workspaceId?: string;
2275
+ /**
2276
+ * Format: uuid
2277
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2278
+ */
2279
+ readonly createdBy?: string;
2562
2280
  /** @description Human-readable name for the schedule. */
2563
2281
  name: string;
2564
2282
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2565
2283
  action: string;
2566
- /** @description Action parameters, stored as a JSON blob. */
2284
+ /**
2285
+ * @description Type of the resource the schedule acts on, named the way a claim's
2286
+ * `resourceType` is (lowercase snake_case construct name, for example
2287
+ * `content_item` or `profile`). A server verifies the target types it
2288
+ * serves and refuses others with 400. Set together with `targetId` or
2289
+ * not at all.
2290
+ */
2291
+ targetType?: string;
2292
+ /**
2293
+ * Format: uuid
2294
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2295
+ */
2296
+ targetId?: string;
2297
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
2567
2298
  params?: Record<string, never>;
2568
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2299
+ /**
2300
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
2301
+ * @default true
2302
+ */
2569
2303
  enabled: boolean;
2570
2304
  /**
2571
2305
  * Format: date-time
@@ -2574,40 +2308,69 @@ export interface operations {
2574
2308
  runAt?: string | null;
2575
2309
  /**
2576
2310
  * Format: date-time
2577
- * @description Next time a recurring or retrying schedule becomes due.
2311
+ * @description Next time the schedule becomes due. Null when it is never due again.
2578
2312
  */
2579
2313
  nextRunAt?: string | null;
2580
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2581
- recurrence?: string;
2582
- /**
2583
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2584
- * `scheduled`: waiting for its due time. `assigned`: designated for a
2585
- * particular worker but not yet claimed. `claimed`: a worker holds the
2586
- * claim and has not started. `running`: the claim holder is executing
2587
- * it. `retrying`: the last attempt failed and another is due.
2588
- * `completed`, `failed` and `cancelled` are terminal for a run-once
2589
- * schedule; a recurring schedule returns to `scheduled`.
2314
+ /**
2315
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
2316
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
2317
+ * `monthly` repeat at the same wall-clock time one calendar day, week
2318
+ * or month later in the schedule's `timezone`, so a daily schedule
2319
+ * keeps its local time across daylight-saving changes. `every:<n>`
2320
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
2321
+ * from `runAt` (else from the current `nextRunAt`); the next due time
2322
+ * is the first occurrence after the run is released, so missed runs
2323
+ * are not replayed.
2324
+ * @default
2325
+ */
2326
+ recurrence: string;
2327
+ /**
2328
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
2329
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
2330
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
2331
+ * refuses a name it does not know with 400.
2332
+ * @default UTC
2333
+ */
2334
+ timezone: string;
2335
+ /**
2336
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
2337
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
2338
+ * designated for a particular worker but not yet claimed. `claimed`: a
2339
+ * worker holds the claim and has not started. `running`: the claim
2340
+ * holder is executing it. `retrying`: the last attempt failed and
2341
+ * another is due. `completed`, `failed` and `cancelled` are terminal
2342
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
2343
+ * when its claim is released with a `completed` outcome.
2590
2344
  * @enum {string}
2591
2345
  */
2592
2346
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2593
- /** @description Attempts already retried for the current run. */
2347
+ /**
2348
+ * @description Attempts already retried for the current run.
2349
+ * @default 0
2350
+ */
2594
2351
  retryCount: number;
2595
- /** @description Maximum retries before the run is marked failed. */
2352
+ /**
2353
+ * @description Maximum retries before the run is marked failed.
2354
+ * @default 0
2355
+ */
2596
2356
  maxRetries: number;
2597
- /** @description Minutes to wait before a retry becomes due. */
2598
- retryDelayMinutes?: number;
2357
+ /**
2358
+ * @description Minutes to wait before a retry becomes due.
2359
+ * @default 0
2360
+ */
2361
+ retryDelayMinutes: number;
2599
2362
  /**
2600
2363
  * Format: date-time
2601
- * @description Time of the most recent attempt.
2364
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
2602
2365
  */
2603
- lastRunAt?: string | null;
2604
- /** @description Error reported by the most recent attempt. */
2605
- lastError?: string;
2366
+ readonly lastRunAt?: string | null;
2367
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
2368
+ readonly lastError?: string;
2606
2369
  /**
2607
2370
  * Claim Schema
2608
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2371
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
2609
2372
  */
2610
- claim?: {
2373
+ readonly claim?: {
2611
2374
  /**
2612
2375
  * Format: uuid
2613
2376
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -2618,17 +2381,25 @@ export interface operations {
2618
2381
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2619
2382
  */
2620
2383
  organizationId: string;
2621
- /** @description Type of the claimed resource, for example `schedule`. */
2384
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
2622
2385
  resourceType: string;
2623
2386
  /**
2624
2387
  * Format: uuid
2625
2388
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2626
2389
  */
2627
2390
  resourceId: string;
2628
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2629
- claimant: string;
2630
2391
  /**
2631
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2392
+ * Format: uuid
2393
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2394
+ */
2395
+ claimantConnectionId?: string;
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
+ claimantUserId?: string;
2401
+ /**
2402
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
2632
2403
  * @enum {string}
2633
2404
  */
2634
2405
  status: "active" | "released" | "expired";
@@ -2644,9 +2415,31 @@ export interface operations {
2644
2415
  expiresAt: string;
2645
2416
  /**
2646
2417
  * Format: date-time
2647
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
2418
+ * @description Time of the last renewal. Null until the claim is first renewed.
2419
+ */
2420
+ renewedAt?: string | null;
2421
+ /**
2422
+ * Format: date-time
2423
+ * @description Time the claim was released. Null while the claim is active or after it expired.
2648
2424
  */
2649
2425
  releasedAt?: string | null;
2426
+ /**
2427
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
2428
+ * @enum {string}
2429
+ */
2430
+ outcome?: "completed" | "failed" | "cancelled";
2431
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
2432
+ outcomeError?: string;
2433
+ /**
2434
+ * Format: uuid
2435
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2436
+ */
2437
+ outcomeEventId?: string;
2438
+ /**
2439
+ * Format: uuid
2440
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2441
+ */
2442
+ releasedBy?: string;
2650
2443
  /**
2651
2444
  * Format: date-time
2652
2445
  * @description Timestamp of claim creation.
@@ -2662,30 +2455,42 @@ export interface operations {
2662
2455
  * Format: date-time
2663
2456
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2664
2457
  */
2665
- pausedAt?: string | null;
2666
- /** @description Identity that paused the schedule. Server-managed. */
2667
- pausedBy?: string;
2458
+ readonly pausedAt?: string | null;
2459
+ /**
2460
+ * Format: uuid
2461
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2462
+ */
2463
+ readonly pausedBy?: string;
2668
2464
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
2669
2465
  pauseReason?: string;
2670
2466
  /**
2671
2467
  * Format: date-time
2672
2468
  * @description Timestamp of schedule creation.
2673
2469
  */
2674
- createdAt: string;
2470
+ readonly createdAt: string;
2675
2471
  /**
2676
2472
  * Format: date-time
2677
2473
  * @description Timestamp of last schedule modification.
2678
2474
  */
2679
- updatedAt: string;
2475
+ readonly updatedAt: string;
2680
2476
  /**
2681
2477
  * Format: date-time
2682
2478
  * @description Timestamp when the schedule was soft-deleted. Null while live.
2683
2479
  */
2684
- deletedAt?: string | null;
2480
+ readonly deletedAt?: string | null;
2685
2481
  }[];
2686
2482
  };
2687
2483
  };
2688
2484
  };
2485
+ /** @description Invalid request body or request param */
2486
+ 400: {
2487
+ headers: {
2488
+ [name: string]: unknown;
2489
+ };
2490
+ content: {
2491
+ "text/plain": string;
2492
+ };
2493
+ };
2689
2494
  /** @description Expired JWT token used or insufficient privilege */
2690
2495
  401: {
2691
2496
  headers: {
@@ -2740,24 +2545,45 @@ export interface operations {
2740
2545
  * Format: uuid
2741
2546
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2742
2547
  */
2743
- id: string;
2548
+ readonly id: string;
2744
2549
  /**
2745
2550
  * Format: uuid
2746
2551
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2747
2552
  */
2748
- organizationId: string;
2553
+ readonly organizationId: string;
2749
2554
  /**
2750
2555
  * Format: uuid
2751
2556
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2752
2557
  */
2753
2558
  workspaceId?: string;
2559
+ /**
2560
+ * Format: uuid
2561
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2562
+ */
2563
+ readonly createdBy?: string;
2754
2564
  /** @description Human-readable name for the schedule. */
2755
2565
  name: string;
2756
2566
  /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2757
2567
  action: string;
2758
- /** @description Action parameters, stored as a JSON blob. */
2568
+ /**
2569
+ * @description Type of the resource the schedule acts on, named the way a claim's
2570
+ * `resourceType` is (lowercase snake_case construct name, for example
2571
+ * `content_item` or `profile`). A server verifies the target types it
2572
+ * serves and refuses others with 400. Set together with `targetId` or
2573
+ * not at all.
2574
+ */
2575
+ targetType?: string;
2576
+ /**
2577
+ * Format: uuid
2578
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2579
+ */
2580
+ targetId?: string;
2581
+ /** @description Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here. */
2759
2582
  params?: Record<string, never>;
2760
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2583
+ /**
2584
+ * @description Whether the schedule is eligible to run. A disabled schedule is never claimed.
2585
+ * @default true
2586
+ */
2761
2587
  enabled: boolean;
2762
2588
  /**
2763
2589
  * Format: date-time
@@ -2766,40 +2592,69 @@ export interface operations {
2766
2592
  runAt?: string | null;
2767
2593
  /**
2768
2594
  * Format: date-time
2769
- * @description Next time a recurring or retrying schedule becomes due.
2595
+ * @description Next time the schedule becomes due. Null when it is never due again.
2770
2596
  */
2771
2597
  nextRunAt?: string | null;
2772
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2773
- recurrence?: string;
2774
- /**
2775
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2776
- * `scheduled`: waiting for its due time. `assigned`: designated for a
2777
- * particular worker but not yet claimed. `claimed`: a worker holds the
2778
- * claim and has not started. `running`: the claim holder is executing
2779
- * it. `retrying`: the last attempt failed and another is due.
2780
- * `completed`, `failed` and `cancelled` are terminal for a run-once
2781
- * schedule; a recurring schedule returns to `scheduled`.
2598
+ /**
2599
+ * @description How the schedule repeats once it has run. Empty, `once` and `none`
2600
+ * mean run once. `hourly` repeats every hour; `daily`, `weekly` and
2601
+ * `monthly` repeat at the same wall-clock time one calendar day, week
2602
+ * or month later in the schedule's `timezone`, so a daily schedule
2603
+ * keeps its local time across daylight-saving changes. `every:<n>`
2604
+ * repeats every `n` minutes (1 to 999999). Occurrences are counted
2605
+ * from `runAt` (else from the current `nextRunAt`); the next due time
2606
+ * is the first occurrence after the run is released, so missed runs
2607
+ * are not replayed.
2608
+ * @default
2609
+ */
2610
+ recurrence: string;
2611
+ /**
2612
+ * @description IANA time zone name (for example `UTC` or `America/Chicago`) in which
2613
+ * `daily`, `weekly` and `monthly` recurrences keep their wall-clock
2614
+ * time. Instants (`runAt`, `nextRunAt`) are always absolute. The server
2615
+ * refuses a name it does not know with 400.
2616
+ * @default UTC
2617
+ */
2618
+ timezone: string;
2619
+ /**
2620
+ * @description Lifecycle status of a schedule. `pending`: created, not yet
2621
+ * due-scheduled. `scheduled`: waiting for its due time. `assigned`:
2622
+ * designated for a particular worker but not yet claimed. `claimed`: a
2623
+ * worker holds the claim and has not started. `running`: the claim
2624
+ * holder is executing it. `retrying`: the last attempt failed and
2625
+ * another is due. `completed`, `failed` and `cancelled` are terminal
2626
+ * for a run-once schedule; a recurring schedule returns to `scheduled`
2627
+ * when its claim is released with a `completed` outcome.
2782
2628
  * @enum {string}
2783
2629
  */
2784
2630
  status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2785
- /** @description Attempts already retried for the current run. */
2631
+ /**
2632
+ * @description Attempts already retried for the current run.
2633
+ * @default 0
2634
+ */
2786
2635
  retryCount: number;
2787
- /** @description Maximum retries before the run is marked failed. */
2636
+ /**
2637
+ * @description Maximum retries before the run is marked failed.
2638
+ * @default 0
2639
+ */
2788
2640
  maxRetries: number;
2789
- /** @description Minutes to wait before a retry becomes due. */
2790
- retryDelayMinutes?: number;
2641
+ /**
2642
+ * @description Minutes to wait before a retry becomes due.
2643
+ * @default 0
2644
+ */
2645
+ retryDelayMinutes: number;
2791
2646
  /**
2792
2647
  * Format: date-time
2793
- * @description Time of the most recent attempt.
2648
+ * @description Time the most recent attempt ended (the release time of its claim). Server-managed.
2794
2649
  */
2795
- lastRunAt?: string | null;
2796
- /** @description Error reported by the most recent attempt. */
2797
- lastError?: string;
2650
+ readonly lastRunAt?: string | null;
2651
+ /** @description Error reported by the most recent attempt; empty after a successful one. Server-managed. */
2652
+ readonly lastError?: string;
2798
2653
  /**
2799
2654
  * Claim Schema
2800
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2655
+ * @description The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.
2801
2656
  */
2802
- claim?: {
2657
+ readonly claim?: {
2803
2658
  /**
2804
2659
  * Format: uuid
2805
2660
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -2810,17 +2665,25 @@ export interface operations {
2810
2665
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2811
2666
  */
2812
2667
  organizationId: string;
2813
- /** @description Type of the claimed resource, for example `schedule`. */
2668
+ /** @description Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`. */
2814
2669
  resourceType: string;
2815
2670
  /**
2816
2671
  * Format: uuid
2817
2672
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2818
2673
  */
2819
2674
  resourceId: string;
2820
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
2821
- claimant: string;
2822
2675
  /**
2823
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
2676
+ * Format: uuid
2677
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2678
+ */
2679
+ claimantConnectionId?: string;
2680
+ /**
2681
+ * Format: uuid
2682
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2683
+ */
2684
+ claimantUserId?: string;
2685
+ /**
2686
+ * @description Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.
2824
2687
  * @enum {string}
2825
2688
  */
2826
2689
  status: "active" | "released" | "expired";
@@ -2836,9 +2699,31 @@ export interface operations {
2836
2699
  expiresAt: string;
2837
2700
  /**
2838
2701
  * Format: date-time
2839
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
2702
+ * @description Time of the last renewal. Null until the claim is first renewed.
2703
+ */
2704
+ renewedAt?: string | null;
2705
+ /**
2706
+ * Format: date-time
2707
+ * @description Time the claim was released. Null while the claim is active or after it expired.
2840
2708
  */
2841
2709
  releasedAt?: string | null;
2710
+ /**
2711
+ * @description What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.
2712
+ * @enum {string}
2713
+ */
2714
+ outcome?: "completed" | "failed" | "cancelled";
2715
+ /** @description Error reported with a `failed` outcome. Omitted otherwise. */
2716
+ outcomeError?: string;
2717
+ /**
2718
+ * Format: uuid
2719
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2720
+ */
2721
+ outcomeEventId?: string;
2722
+ /**
2723
+ * Format: uuid
2724
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2725
+ */
2726
+ releasedBy?: string;
2842
2727
  /**
2843
2728
  * Format: date-time
2844
2729
  * @description Timestamp of claim creation.
@@ -2854,29 +2739,41 @@ export interface operations {
2854
2739
  * Format: date-time
2855
2740
  * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
2856
2741
  */
2857
- pausedAt?: string | null;
2858
- /** @description Identity that paused the schedule. Server-managed. */
2859
- pausedBy?: string;
2742
+ readonly pausedAt?: string | null;
2743
+ /**
2744
+ * Format: uuid
2745
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2746
+ */
2747
+ readonly pausedBy?: string;
2860
2748
  /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
2861
2749
  pauseReason?: string;
2862
2750
  /**
2863
2751
  * Format: date-time
2864
2752
  * @description Timestamp of schedule creation.
2865
2753
  */
2866
- createdAt: string;
2754
+ readonly createdAt: string;
2867
2755
  /**
2868
2756
  * Format: date-time
2869
2757
  * @description Timestamp of last schedule modification.
2870
2758
  */
2871
- updatedAt: string;
2759
+ readonly updatedAt: string;
2872
2760
  /**
2873
2761
  * Format: date-time
2874
2762
  * @description Timestamp when the schedule was soft-deleted. Null while live.
2875
2763
  */
2876
- deletedAt?: string | null;
2764
+ readonly deletedAt?: string | null;
2877
2765
  };
2878
2766
  };
2879
2767
  };
2768
+ /** @description Invalid request body or request param */
2769
+ 400: {
2770
+ headers: {
2771
+ [name: string]: unknown;
2772
+ };
2773
+ content: {
2774
+ "text/plain": string;
2775
+ };
2776
+ };
2880
2777
  /** @description Expired JWT token used or insufficient privilege */
2881
2778
  401: {
2882
2779
  headers: {
@@ -2920,153 +2817,12 @@ export interface operations {
2920
2817
  };
2921
2818
  requestBody?: never;
2922
2819
  responses: {
2923
- /** @description The unlinked schedule */
2924
- 200: {
2820
+ /** @description Schedule unlinked */
2821
+ 204: {
2925
2822
  headers: {
2926
2823
  [name: string]: unknown;
2927
2824
  };
2928
- content: {
2929
- "application/json": {
2930
- /**
2931
- * Format: uuid
2932
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2933
- */
2934
- id: string;
2935
- /**
2936
- * Format: uuid
2937
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2938
- */
2939
- organizationId: string;
2940
- /**
2941
- * Format: uuid
2942
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2943
- */
2944
- workspaceId?: string;
2945
- /** @description Human-readable name for the schedule. */
2946
- name: string;
2947
- /** @description The action the worker runs when it holds the schedule's claim, for example a command name. */
2948
- action: string;
2949
- /** @description Action parameters, stored as a JSON blob. */
2950
- params?: Record<string, never>;
2951
- /** @description Whether the schedule is eligible to run. A disabled schedule is never claimed. */
2952
- enabled: boolean;
2953
- /**
2954
- * Format: date-time
2955
- * @description Time the schedule first becomes due.
2956
- */
2957
- runAt?: string | null;
2958
- /**
2959
- * Format: date-time
2960
- * @description Next time a recurring or retrying schedule becomes due.
2961
- */
2962
- nextRunAt?: string | null;
2963
- /** @description Recurrence rule for repeating schedules. Empty for a run-once schedule. */
2964
- recurrence?: string;
2965
- /**
2966
- * @description Lifecycle status. `pending`: created, not yet due-scheduled.
2967
- * `scheduled`: waiting for its due time. `assigned`: designated for a
2968
- * particular worker but not yet claimed. `claimed`: a worker holds the
2969
- * claim and has not started. `running`: the claim holder is executing
2970
- * it. `retrying`: the last attempt failed and another is due.
2971
- * `completed`, `failed` and `cancelled` are terminal for a run-once
2972
- * schedule; a recurring schedule returns to `scheduled`.
2973
- * @enum {string}
2974
- */
2975
- status: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
2976
- /** @description Attempts already retried for the current run. */
2977
- retryCount: number;
2978
- /** @description Maximum retries before the run is marked failed. */
2979
- maxRetries: number;
2980
- /** @description Minutes to wait before a retry becomes due. */
2981
- retryDelayMinutes?: number;
2982
- /**
2983
- * Format: date-time
2984
- * @description Time of the most recent attempt.
2985
- */
2986
- lastRunAt?: string | null;
2987
- /** @description Error reported by the most recent attempt. */
2988
- lastError?: string;
2989
- /**
2990
- * Claim Schema
2991
- * @description The schedule's live claim, when one is held. Server-managed; omitted when the schedule is unclaimed.
2992
- */
2993
- claim?: {
2994
- /**
2995
- * Format: uuid
2996
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2997
- */
2998
- id: string;
2999
- /**
3000
- * Format: uuid
3001
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3002
- */
3003
- organizationId: string;
3004
- /** @description Type of the claimed resource, for example `schedule`. */
3005
- resourceType: string;
3006
- /**
3007
- * Format: uuid
3008
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
3009
- */
3010
- resourceId: string;
3011
- /** @description Identity of the holder, as asserted by the worker that took the claim (for example a machine and process identifier). */
3012
- claimant: string;
3013
- /**
3014
- * @description Lifecycle of the claim. `active` while held, `released` once the holder lets it go, `expired` once `expiresAt` passed without a renewal.
3015
- * @enum {string}
3016
- */
3017
- status: "active" | "released" | "expired";
3018
- /**
3019
- * Format: date-time
3020
- * @description Time the claim was taken.
3021
- */
3022
- claimedAt: string;
3023
- /**
3024
- * Format: date-time
3025
- * @description Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.
3026
- */
3027
- expiresAt: string;
3028
- /**
3029
- * Format: date-time
3030
- * @description Time the holder released the claim. Null while the claim is active or after it expired.
3031
- */
3032
- releasedAt?: string | null;
3033
- /**
3034
- * Format: date-time
3035
- * @description Timestamp of claim creation.
3036
- */
3037
- createdAt: string;
3038
- /**
3039
- * Format: date-time
3040
- * @description Timestamp of last claim modification.
3041
- */
3042
- updatedAt: string;
3043
- };
3044
- /**
3045
- * Format: date-time
3046
- * @description Time the schedule was paused. Null when the schedule is not paused. Server-managed.
3047
- */
3048
- pausedAt?: string | null;
3049
- /** @description Identity that paused the schedule. Server-managed. */
3050
- pausedBy?: string;
3051
- /** @description Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused. */
3052
- pauseReason?: string;
3053
- /**
3054
- * Format: date-time
3055
- * @description Timestamp of schedule creation.
3056
- */
3057
- createdAt: string;
3058
- /**
3059
- * Format: date-time
3060
- * @description Timestamp of last schedule modification.
3061
- */
3062
- updatedAt: string;
3063
- /**
3064
- * Format: date-time
3065
- * @description Timestamp when the schedule was soft-deleted. Null while live.
3066
- */
3067
- deletedAt?: string | null;
3068
- };
3069
- };
2825
+ content?: never;
3070
2826
  };
3071
2827
  /** @description Expired JWT token used or insufficient privilege */
3072
2828
  401: {