@meshery/schemas 1.3.60 → 1.3.62
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.
- package/README.md +9 -1
- package/dist/cloudApi.d.mts +19666 -6714
- package/dist/cloudApi.d.ts +19666 -6714
- package/dist/cloudApi.js +1 -1
- package/dist/cloudApi.mjs +1 -1
- package/dist/constructs/v1beta1/organization_smtp/OrganizationSmtp.d.ts +2 -2
- package/dist/constructs/v1beta1/organization_smtp/OrganizationSmtpSchema.js +1 -1
- package/dist/constructs/v1beta1/organization_smtp/OrganizationSmtpSchema.mjs +1 -1
- package/dist/constructs/v1beta1/registry/Registry.d.ts +6 -6
- package/dist/constructs/v1beta1/registry/RegistrySchema.js +3 -3
- package/dist/constructs/v1beta1/registry/RegistrySchema.mjs +3 -3
- package/dist/constructs/v1beta3/academy/Academy.d.ts +18 -0
- package/dist/constructs/v1beta3/academy/AcademySchema.js +2 -2
- package/dist/constructs/v1beta3/academy/AcademySchema.mjs +2 -2
- package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBinding.d.ts +462 -0
- package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBinding.js +1 -0
- package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBinding.mjs +0 -0
- package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBindingSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBindingSchema.js +23 -0
- package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBindingSchema.mjs +23 -0
- package/dist/constructs/v1beta3/blowhorn_content/BlowhornContent.d.ts +719 -0
- package/dist/constructs/v1beta3/blowhorn_content/BlowhornContent.js +1 -0
- package/dist/constructs/v1beta3/blowhorn_content/BlowhornContent.mjs +0 -0
- package/dist/constructs/v1beta3/blowhorn_content/BlowhornContentSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/blowhorn_content/BlowhornContentSchema.js +43 -0
- package/dist/constructs/v1beta3/blowhorn_content/BlowhornContentSchema.mjs +43 -0
- package/dist/constructs/v1beta3/blowhorn_destination/BlowhornDestination.d.ts +516 -0
- package/dist/constructs/v1beta3/blowhorn_destination/BlowhornDestination.js +1 -0
- package/dist/constructs/v1beta3/blowhorn_destination/BlowhornDestination.mjs +0 -0
- package/dist/constructs/v1beta3/blowhorn_destination/BlowhornDestinationSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/blowhorn_destination/BlowhornDestinationSchema.js +23 -0
- package/dist/constructs/v1beta3/blowhorn_destination/BlowhornDestinationSchema.mjs +23 -0
- package/dist/constructs/v1beta3/blowhorn_health/BlowhornHealth.d.ts +131 -0
- package/dist/constructs/v1beta3/blowhorn_health/BlowhornHealth.js +1 -0
- package/dist/constructs/v1beta3/blowhorn_health/BlowhornHealth.mjs +0 -0
- package/dist/constructs/v1beta3/blowhorn_health/BlowhornHealthSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/blowhorn_health/BlowhornHealthSchema.js +7 -0
- package/dist/constructs/v1beta3/blowhorn_health/BlowhornHealthSchema.mjs +7 -0
- package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedger.d.ts +1546 -0
- package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedger.js +1 -0
- package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedger.mjs +0 -0
- package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedgerSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedgerSchema.js +69 -0
- package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedgerSchema.mjs +69 -0
- package/dist/constructs/v1beta3/blowhorn_profile/BlowhornProfile.d.ts +776 -0
- package/dist/constructs/v1beta3/blowhorn_profile/BlowhornProfile.js +1 -0
- package/dist/constructs/v1beta3/blowhorn_profile/BlowhornProfile.mjs +0 -0
- package/dist/constructs/v1beta3/blowhorn_profile/BlowhornProfileSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/blowhorn_profile/BlowhornProfileSchema.js +45 -0
- package/dist/constructs/v1beta3/blowhorn_profile/BlowhornProfileSchema.mjs +45 -0
- package/dist/constructs/v1beta3/blowhorn_run/BlowhornRun.d.ts +784 -0
- package/dist/constructs/v1beta3/blowhorn_run/BlowhornRun.js +1 -0
- package/dist/constructs/v1beta3/blowhorn_run/BlowhornRun.mjs +0 -0
- package/dist/constructs/v1beta3/blowhorn_run/BlowhornRunSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/blowhorn_run/BlowhornRunSchema.js +51 -0
- package/dist/constructs/v1beta3/blowhorn_run/BlowhornRunSchema.mjs +51 -0
- package/dist/constructs/v1beta3/connection/Connection.d.ts +14 -14
- package/dist/constructs/v1beta3/connection/ConnectionSchema.js +1 -1
- package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +1 -1
- package/dist/constructs/v1beta3/environment/Environment.d.ts +12 -12
- package/dist/constructs/v1beta3/environment/EnvironmentSchema.js +1 -1
- package/dist/constructs/v1beta3/environment/EnvironmentSchema.mjs +1 -1
- package/dist/constructs/v1beta3/invitation/Invitation.d.ts +66 -0
- package/dist/constructs/v1beta3/invitation/InvitationSchema.js +1 -1
- package/dist/constructs/v1beta3/invitation/InvitationSchema.mjs +1 -1
- package/dist/constructs/v1beta3/job_lease/JobLease.d.ts +2570 -0
- package/dist/constructs/v1beta3/job_lease/JobLease.js +1 -0
- package/dist/constructs/v1beta3/job_lease/JobLease.mjs +0 -0
- package/dist/constructs/v1beta3/job_lease/JobLeaseSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/job_lease/JobLeaseSchema.js +83 -0
- package/dist/constructs/v1beta3/job_lease/JobLeaseSchema.mjs +83 -0
- package/dist/constructs/v1beta3/token/Token.d.ts +4 -2
- package/dist/constructs/v1beta3/token/TokenSchema.js +1 -1
- package/dist/constructs/v1beta3/token/TokenSchema.mjs +1 -1
- package/dist/constructs/v1beta3/workspace/Workspace.d.ts +2 -2
- package/dist/constructs/v1beta3/workspace/WorkspaceSchema.js +1 -1
- package/dist/constructs/v1beta3/workspace/WorkspaceSchema.mjs +1 -1
- package/dist/mesheryApi.d.mts +24 -24
- package/dist/mesheryApi.d.ts +24 -24
- package/dist/mesheryApi.js +1 -1
- package/dist/mesheryApi.mjs +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,2570 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/api/job-leases": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* List job leases
|
|
16
|
+
* @description Returns a paginated list of job leases in the organization of the
|
|
17
|
+
* authenticated session, optionally filtered by status. Each entry projects the computed
|
|
18
|
+
* `locked`, `lockedBy`, `lockedAt` and `lockStale` keys.
|
|
19
|
+
*/
|
|
20
|
+
get: operations["listJobLeases"];
|
|
21
|
+
put?: never;
|
|
22
|
+
/**
|
|
23
|
+
* Create job lease
|
|
24
|
+
* @description Creates a new job lease definition. Claim columns and pause columns
|
|
25
|
+
* are server-managed and refused here; any supplied values are
|
|
26
|
+
* ignored. The `expectedFingerprint` precondition is ignored on
|
|
27
|
+
* create.
|
|
28
|
+
*/
|
|
29
|
+
post: operations["createJobLease"];
|
|
30
|
+
delete?: never;
|
|
31
|
+
options?: never;
|
|
32
|
+
head?: never;
|
|
33
|
+
patch?: never;
|
|
34
|
+
trace?: never;
|
|
35
|
+
};
|
|
36
|
+
"/api/job-leases/claim": {
|
|
37
|
+
parameters: {
|
|
38
|
+
query?: never;
|
|
39
|
+
header?: never;
|
|
40
|
+
path?: never;
|
|
41
|
+
cookie?: never;
|
|
42
|
+
};
|
|
43
|
+
get?: never;
|
|
44
|
+
put?: never;
|
|
45
|
+
/**
|
|
46
|
+
* Claim a due job lease
|
|
47
|
+
* @description Hands one due, unheld, unpaused row to the machine named by
|
|
48
|
+
* `machineId` in a single server-side statement, recording it as
|
|
49
|
+
* `claimedBy`. Answers the row, or null when no row
|
|
50
|
+
* qualifies - a lost race is null, never an error. `force` drops only
|
|
51
|
+
* the due test for trigger-now; a live foreign lease still refuses.
|
|
52
|
+
* `ignorePause` is the single operator override over pause scopes.
|
|
53
|
+
* The holder identity is client-asserted: in v1 the holder check on
|
|
54
|
+
* claim, renew and release is advisory, not an authorization
|
|
55
|
+
* boundary, and calls made with purpose-scoped tokens are audited.
|
|
56
|
+
*/
|
|
57
|
+
post: operations["claimJobLease"];
|
|
58
|
+
delete?: never;
|
|
59
|
+
options?: never;
|
|
60
|
+
head?: never;
|
|
61
|
+
patch?: never;
|
|
62
|
+
trace?: never;
|
|
63
|
+
};
|
|
64
|
+
"/api/job-leases/schedule-pause": {
|
|
65
|
+
parameters: {
|
|
66
|
+
query?: never;
|
|
67
|
+
header?: never;
|
|
68
|
+
path?: never;
|
|
69
|
+
cookie?: never;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Get organization schedule pause
|
|
73
|
+
* @description Returns the organization-wide pause row for the organization of the
|
|
74
|
+
* authenticated session. A 404 is the ordinary answer when no pause is
|
|
75
|
+
* set, and is not an error condition.
|
|
76
|
+
*/
|
|
77
|
+
get: operations["getSchedulePause"];
|
|
78
|
+
/**
|
|
79
|
+
* Set organization schedule pause
|
|
80
|
+
* @description Sets the organization-wide pause for the organization of the
|
|
81
|
+
* authenticated session. While set, no row in the organization is
|
|
82
|
+
* claimed unless the claim carries `ignorePause`.
|
|
83
|
+
*/
|
|
84
|
+
put: operations["setSchedulePause"];
|
|
85
|
+
post?: never;
|
|
86
|
+
/**
|
|
87
|
+
* Clear organization schedule pause
|
|
88
|
+
* @description Clears the organization-wide pause for the organization of the
|
|
89
|
+
* authenticated session so due rows become claimable again.
|
|
90
|
+
*/
|
|
91
|
+
delete: operations["clearSchedulePause"];
|
|
92
|
+
options?: never;
|
|
93
|
+
head?: never;
|
|
94
|
+
patch?: never;
|
|
95
|
+
trace?: never;
|
|
96
|
+
};
|
|
97
|
+
"/api/job-leases/{jobLeaseId}": {
|
|
98
|
+
parameters: {
|
|
99
|
+
query?: never;
|
|
100
|
+
header?: never;
|
|
101
|
+
path?: never;
|
|
102
|
+
cookie?: never;
|
|
103
|
+
};
|
|
104
|
+
/** Get job lease by ID */
|
|
105
|
+
get: operations["getJobLease"];
|
|
106
|
+
/**
|
|
107
|
+
* Update job lease
|
|
108
|
+
* @description Updates the job definition. Claim columns and pause columns are
|
|
109
|
+
* refused here; use the renew, release, pause and resume operations
|
|
110
|
+
* for those. When `expectedFingerprint` is supplied and stale, the
|
|
111
|
+
* update is refused with a 409.
|
|
112
|
+
*/
|
|
113
|
+
put: operations["updateJobLease"];
|
|
114
|
+
post?: never;
|
|
115
|
+
/**
|
|
116
|
+
* Delete job lease
|
|
117
|
+
* @description Soft-deletes the job lease definition.
|
|
118
|
+
*/
|
|
119
|
+
delete: operations["deleteJobLease"];
|
|
120
|
+
options?: never;
|
|
121
|
+
head?: never;
|
|
122
|
+
patch?: never;
|
|
123
|
+
trace?: never;
|
|
124
|
+
};
|
|
125
|
+
"/api/job-leases/{jobLeaseId}/renew": {
|
|
126
|
+
parameters: {
|
|
127
|
+
query?: never;
|
|
128
|
+
header?: never;
|
|
129
|
+
path?: never;
|
|
130
|
+
cookie?: never;
|
|
131
|
+
};
|
|
132
|
+
get?: never;
|
|
133
|
+
put?: never;
|
|
134
|
+
/**
|
|
135
|
+
* Renew a held job lease
|
|
136
|
+
* @description Holder-only liveness: moves only `leaseExpiresAt` for the holder
|
|
137
|
+
* named by `machineId`. Answers the row, or null when the row is not
|
|
138
|
+
* held by that holder - never taken back. `machineId` is
|
|
139
|
+
* client-asserted, so the holder check is advisory in v1; calls made
|
|
140
|
+
* with purpose-scoped tokens are audited.
|
|
141
|
+
*/
|
|
142
|
+
post: operations["renewJobLease"];
|
|
143
|
+
delete?: never;
|
|
144
|
+
options?: never;
|
|
145
|
+
head?: never;
|
|
146
|
+
patch?: never;
|
|
147
|
+
trace?: never;
|
|
148
|
+
};
|
|
149
|
+
"/api/job-leases/{jobLeaseId}/release": {
|
|
150
|
+
parameters: {
|
|
151
|
+
query?: never;
|
|
152
|
+
header?: never;
|
|
153
|
+
path?: never;
|
|
154
|
+
cookie?: never;
|
|
155
|
+
};
|
|
156
|
+
get?: never;
|
|
157
|
+
put?: never;
|
|
158
|
+
/**
|
|
159
|
+
* Release a held job lease
|
|
160
|
+
* @description Clears the claim (`claimedBy`, `claimedAt`, `leaseExpiresAt`) for
|
|
161
|
+
* the holder named by `machineId` and merges the supplied result
|
|
162
|
+
* values. Claim and identity keys are refused here. Holder-only: when
|
|
163
|
+
* `machineId` is not the current holder the release is refused with a
|
|
164
|
+
* 409 and nothing changes - the claim columns and row values are left
|
|
165
|
+
* untouched, so a live foreign claim is never cleared. A holder whose
|
|
166
|
+
* lease lapsed and was re-claimed by another machine therefore gets a
|
|
167
|
+
* 409 when it finishes late. `machineId` is client-asserted, so the
|
|
168
|
+
* holder check is advisory in v1; calls made with purpose-scoped
|
|
169
|
+
* tokens are audited.
|
|
170
|
+
*/
|
|
171
|
+
post: operations["releaseJobLease"];
|
|
172
|
+
delete?: never;
|
|
173
|
+
options?: never;
|
|
174
|
+
head?: never;
|
|
175
|
+
patch?: never;
|
|
176
|
+
trace?: never;
|
|
177
|
+
};
|
|
178
|
+
"/api/job-leases/{jobLeaseId}/pause": {
|
|
179
|
+
parameters: {
|
|
180
|
+
query?: never;
|
|
181
|
+
header?: never;
|
|
182
|
+
path?: never;
|
|
183
|
+
cookie?: never;
|
|
184
|
+
};
|
|
185
|
+
get?: never;
|
|
186
|
+
put?: never;
|
|
187
|
+
/**
|
|
188
|
+
* Pause a job lease row
|
|
189
|
+
* @description Sets the per-row pause. A paused row is claimed only by claims
|
|
190
|
+
* carrying `ignorePause`.
|
|
191
|
+
*/
|
|
192
|
+
post: operations["pauseJobLease"];
|
|
193
|
+
delete?: never;
|
|
194
|
+
options?: never;
|
|
195
|
+
head?: never;
|
|
196
|
+
patch?: never;
|
|
197
|
+
trace?: never;
|
|
198
|
+
};
|
|
199
|
+
"/api/job-leases/{jobLeaseId}/resume": {
|
|
200
|
+
parameters: {
|
|
201
|
+
query?: never;
|
|
202
|
+
header?: never;
|
|
203
|
+
path?: never;
|
|
204
|
+
cookie?: never;
|
|
205
|
+
};
|
|
206
|
+
get?: never;
|
|
207
|
+
put?: never;
|
|
208
|
+
/**
|
|
209
|
+
* Resume a paused job lease row
|
|
210
|
+
* @description Clears the per-row pause so the row becomes claimable again.
|
|
211
|
+
*/
|
|
212
|
+
post: operations["resumeJobLease"];
|
|
213
|
+
delete?: never;
|
|
214
|
+
options?: never;
|
|
215
|
+
head?: never;
|
|
216
|
+
patch?: never;
|
|
217
|
+
trace?: never;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
export type webhooks = Record<string, never>;
|
|
221
|
+
export interface components {
|
|
222
|
+
schemas: {
|
|
223
|
+
/**
|
|
224
|
+
* Job Lease Schema
|
|
225
|
+
* @description Server-returned job lease as persisted by meshery-cloud. A job lease is a
|
|
226
|
+
* due-work row plus time-bound claim state, shared by Layer5 Cloud and
|
|
227
|
+
* Blowhorn: competing consumers claim, renew and release leases on due jobs,
|
|
228
|
+
* and pause scopes gate which rows are claimable. The claim race is decided
|
|
229
|
+
* server-side in a single statement; losing racers receive null, never an
|
|
230
|
+
* error. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause
|
|
231
|
+
* columns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are
|
|
232
|
+
* refused on CRUD paths; they change only through the claim, renew, release,
|
|
233
|
+
* pause and resume operations. `locked`, `lockedBy`, `lockedAt` and
|
|
234
|
+
* `lockStale` are computed projections for schedule screens, not stored
|
|
235
|
+
* columns.
|
|
236
|
+
*/
|
|
237
|
+
JobLease: {
|
|
238
|
+
/**
|
|
239
|
+
* Format: uuid
|
|
240
|
+
* @description Server-generated job lease ID.
|
|
241
|
+
*/
|
|
242
|
+
id: string;
|
|
243
|
+
/**
|
|
244
|
+
* Format: uuid
|
|
245
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
246
|
+
*/
|
|
247
|
+
organizationId: string;
|
|
248
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
249
|
+
rowNumber: number;
|
|
250
|
+
/** @description Job command to execute when the lease is held. */
|
|
251
|
+
command: string;
|
|
252
|
+
/** @description Profile reference the job runs against. */
|
|
253
|
+
profile?: string;
|
|
254
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
255
|
+
platform?: string;
|
|
256
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
257
|
+
params?: Record<string, never>;
|
|
258
|
+
/**
|
|
259
|
+
* Format: date-time
|
|
260
|
+
* @description Time the job becomes due.
|
|
261
|
+
*/
|
|
262
|
+
runAt?: string | null;
|
|
263
|
+
/**
|
|
264
|
+
* Format: date-time
|
|
265
|
+
* @description Next scheduled time for recurring jobs.
|
|
266
|
+
*/
|
|
267
|
+
nextRunAt?: string | null;
|
|
268
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
269
|
+
recurrence?: string;
|
|
270
|
+
/** @description Remaining execution attempts for the job. */
|
|
271
|
+
retryBudget?: number;
|
|
272
|
+
/**
|
|
273
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
274
|
+
* @enum {string}
|
|
275
|
+
*/
|
|
276
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
277
|
+
/** @description Execution driver mode for the job. */
|
|
278
|
+
driverMode?: string;
|
|
279
|
+
/**
|
|
280
|
+
* Format: date-time
|
|
281
|
+
* @description Time of the most recent execution attempt.
|
|
282
|
+
*/
|
|
283
|
+
lastRunAt?: string | null;
|
|
284
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
285
|
+
lastError?: string;
|
|
286
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
287
|
+
claimedBy?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Format: date-time
|
|
290
|
+
* @description Time the lease was claimed. Server-managed.
|
|
291
|
+
*/
|
|
292
|
+
claimedAt?: string | null;
|
|
293
|
+
/**
|
|
294
|
+
* Format: date-time
|
|
295
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
296
|
+
*/
|
|
297
|
+
leaseExpiresAt?: string | null;
|
|
298
|
+
/**
|
|
299
|
+
* Format: date-time
|
|
300
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
301
|
+
*/
|
|
302
|
+
pausedAt?: string | null;
|
|
303
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
304
|
+
pausedBy?: string;
|
|
305
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
306
|
+
pauseReason?: string;
|
|
307
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
308
|
+
fingerprint: string;
|
|
309
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
310
|
+
locked?: boolean;
|
|
311
|
+
/** @description Computed projection of the current lease holder. */
|
|
312
|
+
lockedBy?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Format: date-time
|
|
315
|
+
* @description Computed projection of the current claim time.
|
|
316
|
+
*/
|
|
317
|
+
lockedAt?: string | null;
|
|
318
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
319
|
+
lockStale?: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* Format: date-time
|
|
322
|
+
* @description Timestamp of job lease creation.
|
|
323
|
+
*/
|
|
324
|
+
createdAt: string;
|
|
325
|
+
/**
|
|
326
|
+
* Format: date-time
|
|
327
|
+
* @description Timestamp of last job lease modification.
|
|
328
|
+
*/
|
|
329
|
+
updatedAt: string;
|
|
330
|
+
/**
|
|
331
|
+
* Format: date-time
|
|
332
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
333
|
+
*/
|
|
334
|
+
deletedAt?: string | null;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Schedule Pause Schema
|
|
338
|
+
* @description Server-returned organization-wide schedule pause. While a pause row
|
|
339
|
+
* exists for an organization, none of its job lease rows is claimed unless
|
|
340
|
+
* the claim carries the operator override. Absence of a row means
|
|
341
|
+
* unpaused; there is at most one live row per organization.
|
|
342
|
+
*/
|
|
343
|
+
SchedulePause: {
|
|
344
|
+
/**
|
|
345
|
+
* Format: uuid
|
|
346
|
+
* @description Server-generated schedule pause ID.
|
|
347
|
+
*/
|
|
348
|
+
id: string;
|
|
349
|
+
/**
|
|
350
|
+
* Format: uuid
|
|
351
|
+
* @description Organization the pause applies to. Derived from the authenticated session, never client-settable.
|
|
352
|
+
*/
|
|
353
|
+
organizationId: string;
|
|
354
|
+
/** @description Operator reason for pausing the organization schedule. */
|
|
355
|
+
reason?: string;
|
|
356
|
+
/** @description Identity that set the pause. Server-managed. */
|
|
357
|
+
pausedBy?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Format: date-time
|
|
360
|
+
* @description Timestamp of schedule pause creation.
|
|
361
|
+
*/
|
|
362
|
+
createdAt: string;
|
|
363
|
+
/**
|
|
364
|
+
* Format: date-time
|
|
365
|
+
* @description Timestamp of last schedule pause modification.
|
|
366
|
+
*/
|
|
367
|
+
updatedAt: string;
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* @description Payload for creating or updating a job lease. Contains only
|
|
371
|
+
* client-settable job definition fields; the claim columns, the
|
|
372
|
+
* pause columns, the server-computed `fingerprint` and the
|
|
373
|
+
* server-generated timestamps are intentionally excluded.
|
|
374
|
+
*/
|
|
375
|
+
JobLeasePayload: {
|
|
376
|
+
/**
|
|
377
|
+
* Format: uuid
|
|
378
|
+
* @description Existing job lease ID for updates; omit on create.
|
|
379
|
+
*/
|
|
380
|
+
id?: string;
|
|
381
|
+
/** @description Targetable row number within the organization's job set. */
|
|
382
|
+
rowNumber: number;
|
|
383
|
+
/** @description Job command to execute when the lease is held. */
|
|
384
|
+
command: string;
|
|
385
|
+
/** @description Profile reference the job runs against. */
|
|
386
|
+
profile?: string;
|
|
387
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
388
|
+
platform?: string;
|
|
389
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
390
|
+
params?: Record<string, never>;
|
|
391
|
+
/**
|
|
392
|
+
* Format: date-time
|
|
393
|
+
* @description Time the job becomes due.
|
|
394
|
+
*/
|
|
395
|
+
runAt?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Format: date-time
|
|
398
|
+
* @description Next scheduled time for recurring jobs.
|
|
399
|
+
*/
|
|
400
|
+
nextRunAt?: string;
|
|
401
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
402
|
+
recurrence?: string;
|
|
403
|
+
/** @description Remaining execution attempts for the job. */
|
|
404
|
+
retryBudget?: number;
|
|
405
|
+
/** @description Execution driver mode for the job. */
|
|
406
|
+
driverMode?: string;
|
|
407
|
+
/**
|
|
408
|
+
* @description Optimistic-concurrency precondition for update: when supplied,
|
|
409
|
+
* the update applies only when the stored fingerprint still
|
|
410
|
+
* matches, and is refused with a 409 otherwise. Ignored on
|
|
411
|
+
* create.
|
|
412
|
+
*/
|
|
413
|
+
expectedFingerprint?: string;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* @description Payload for setting the organization-wide schedule pause. The
|
|
417
|
+
* pausing identity and timestamp are server-managed.
|
|
418
|
+
*/
|
|
419
|
+
SchedulePausePayload: {
|
|
420
|
+
/** @description Operator reason for pausing the organization schedule. */
|
|
421
|
+
reason?: string;
|
|
422
|
+
};
|
|
423
|
+
/** @description Claim filter for handing one due row to the caller. */
|
|
424
|
+
JobLeaseClaimRequest: {
|
|
425
|
+
/** @description Machine taking the lease, recorded as `claimedBy`. Client-asserted; the holder check is advisory in v1. */
|
|
426
|
+
machineId: string;
|
|
427
|
+
/** @description Claim only the row with this row number. */
|
|
428
|
+
rowNumber?: number;
|
|
429
|
+
/** @description Trigger-now override that drops only the due test; a live foreign lease still refuses. */
|
|
430
|
+
force?: boolean;
|
|
431
|
+
/** @description Single operator override over the organization-wide and per-row pause scopes. */
|
|
432
|
+
ignorePause?: boolean;
|
|
433
|
+
/** @description Requested lease duration in minutes. When omitted the server applies its default lease duration. */
|
|
434
|
+
leaseMinutes?: number;
|
|
435
|
+
};
|
|
436
|
+
/** @description Holder-only liveness renewal. */
|
|
437
|
+
JobLeaseRenewRequest: {
|
|
438
|
+
/** @description Machine holding the lease. Only the holder may renew. Client-asserted; the holder check is advisory in v1. */
|
|
439
|
+
machineId: string;
|
|
440
|
+
/** @description Requested lease extension in minutes. When omitted the server applies its default lease duration. */
|
|
441
|
+
leaseMinutes?: number;
|
|
442
|
+
};
|
|
443
|
+
/** @description Release payload clearing the claim and landing result values. */
|
|
444
|
+
JobLeaseReleaseRequest: {
|
|
445
|
+
/** @description Machine holding the lease. Only the holder may release; a non-holder is refused with a 409 and nothing changes. Client-asserted; the holder check is advisory in v1. */
|
|
446
|
+
machineId: string;
|
|
447
|
+
/** @description Result values merged into the row on release (e.g. last run outcome and error). */
|
|
448
|
+
values?: Record<string, never>;
|
|
449
|
+
};
|
|
450
|
+
/** @description Per-row pause payload. */
|
|
451
|
+
JobLeasePauseRequest: {
|
|
452
|
+
/** @description Operator reason for pausing the row. */
|
|
453
|
+
reason?: string;
|
|
454
|
+
};
|
|
455
|
+
/**
|
|
456
|
+
* @description Claim and renew outcome. `jobLease` carries the row, or null when
|
|
457
|
+
* nothing was claimed (lost race) or the row is not held by the
|
|
458
|
+
* caller (renew) - never an error.
|
|
459
|
+
*/
|
|
460
|
+
JobLeaseActionResponse: {
|
|
461
|
+
/**
|
|
462
|
+
* Job Lease Schema
|
|
463
|
+
* @description Server-returned job lease as persisted by meshery-cloud. A job lease is a
|
|
464
|
+
* due-work row plus time-bound claim state, shared by Layer5 Cloud and
|
|
465
|
+
* Blowhorn: competing consumers claim, renew and release leases on due jobs,
|
|
466
|
+
* and pause scopes gate which rows are claimable. The claim race is decided
|
|
467
|
+
* server-side in a single statement; losing racers receive null, never an
|
|
468
|
+
* error. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause
|
|
469
|
+
* columns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are
|
|
470
|
+
* refused on CRUD paths; they change only through the claim, renew, release,
|
|
471
|
+
* pause and resume operations. `locked`, `lockedBy`, `lockedAt` and
|
|
472
|
+
* `lockStale` are computed projections for schedule screens, not stored
|
|
473
|
+
* columns.
|
|
474
|
+
*/
|
|
475
|
+
jobLease?: {
|
|
476
|
+
/**
|
|
477
|
+
* Format: uuid
|
|
478
|
+
* @description Server-generated job lease ID.
|
|
479
|
+
*/
|
|
480
|
+
id: string;
|
|
481
|
+
/**
|
|
482
|
+
* Format: uuid
|
|
483
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
484
|
+
*/
|
|
485
|
+
organizationId: string;
|
|
486
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
487
|
+
rowNumber: number;
|
|
488
|
+
/** @description Job command to execute when the lease is held. */
|
|
489
|
+
command: string;
|
|
490
|
+
/** @description Profile reference the job runs against. */
|
|
491
|
+
profile?: string;
|
|
492
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
493
|
+
platform?: string;
|
|
494
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
495
|
+
params?: Record<string, never>;
|
|
496
|
+
/**
|
|
497
|
+
* Format: date-time
|
|
498
|
+
* @description Time the job becomes due.
|
|
499
|
+
*/
|
|
500
|
+
runAt?: string | null;
|
|
501
|
+
/**
|
|
502
|
+
* Format: date-time
|
|
503
|
+
* @description Next scheduled time for recurring jobs.
|
|
504
|
+
*/
|
|
505
|
+
nextRunAt?: string | null;
|
|
506
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
507
|
+
recurrence?: string;
|
|
508
|
+
/** @description Remaining execution attempts for the job. */
|
|
509
|
+
retryBudget?: number;
|
|
510
|
+
/**
|
|
511
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
512
|
+
* @enum {string}
|
|
513
|
+
*/
|
|
514
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
515
|
+
/** @description Execution driver mode for the job. */
|
|
516
|
+
driverMode?: string;
|
|
517
|
+
/**
|
|
518
|
+
* Format: date-time
|
|
519
|
+
* @description Time of the most recent execution attempt.
|
|
520
|
+
*/
|
|
521
|
+
lastRunAt?: string | null;
|
|
522
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
523
|
+
lastError?: string;
|
|
524
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
525
|
+
claimedBy?: string;
|
|
526
|
+
/**
|
|
527
|
+
* Format: date-time
|
|
528
|
+
* @description Time the lease was claimed. Server-managed.
|
|
529
|
+
*/
|
|
530
|
+
claimedAt?: string | null;
|
|
531
|
+
/**
|
|
532
|
+
* Format: date-time
|
|
533
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
534
|
+
*/
|
|
535
|
+
leaseExpiresAt?: string | null;
|
|
536
|
+
/**
|
|
537
|
+
* Format: date-time
|
|
538
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
539
|
+
*/
|
|
540
|
+
pausedAt?: string | null;
|
|
541
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
542
|
+
pausedBy?: string;
|
|
543
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
544
|
+
pauseReason?: string;
|
|
545
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
546
|
+
fingerprint: string;
|
|
547
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
548
|
+
locked?: boolean;
|
|
549
|
+
/** @description Computed projection of the current lease holder. */
|
|
550
|
+
lockedBy?: string;
|
|
551
|
+
/**
|
|
552
|
+
* Format: date-time
|
|
553
|
+
* @description Computed projection of the current claim time.
|
|
554
|
+
*/
|
|
555
|
+
lockedAt?: string | null;
|
|
556
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
557
|
+
lockStale?: boolean;
|
|
558
|
+
/**
|
|
559
|
+
* Format: date-time
|
|
560
|
+
* @description Timestamp of job lease creation.
|
|
561
|
+
*/
|
|
562
|
+
createdAt: string;
|
|
563
|
+
/**
|
|
564
|
+
* Format: date-time
|
|
565
|
+
* @description Timestamp of last job lease modification.
|
|
566
|
+
*/
|
|
567
|
+
updatedAt: string;
|
|
568
|
+
/**
|
|
569
|
+
* Format: date-time
|
|
570
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
571
|
+
*/
|
|
572
|
+
deletedAt?: string | null;
|
|
573
|
+
} | null;
|
|
574
|
+
};
|
|
575
|
+
/** @description Paginated collection of job leases. */
|
|
576
|
+
JobLeasePage: {
|
|
577
|
+
/** @description Current page number of the result set. */
|
|
578
|
+
page?: number;
|
|
579
|
+
/** @description Number of items per page. */
|
|
580
|
+
pageSize?: number;
|
|
581
|
+
/** @description Total number of items available. */
|
|
582
|
+
totalCount?: number;
|
|
583
|
+
/** @description Job leases included on this page of results. */
|
|
584
|
+
jobLeases?: {
|
|
585
|
+
/**
|
|
586
|
+
* Format: uuid
|
|
587
|
+
* @description Server-generated job lease ID.
|
|
588
|
+
*/
|
|
589
|
+
id: string;
|
|
590
|
+
/**
|
|
591
|
+
* Format: uuid
|
|
592
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
593
|
+
*/
|
|
594
|
+
organizationId: string;
|
|
595
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
596
|
+
rowNumber: number;
|
|
597
|
+
/** @description Job command to execute when the lease is held. */
|
|
598
|
+
command: string;
|
|
599
|
+
/** @description Profile reference the job runs against. */
|
|
600
|
+
profile?: string;
|
|
601
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
602
|
+
platform?: string;
|
|
603
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
604
|
+
params?: Record<string, never>;
|
|
605
|
+
/**
|
|
606
|
+
* Format: date-time
|
|
607
|
+
* @description Time the job becomes due.
|
|
608
|
+
*/
|
|
609
|
+
runAt?: string | null;
|
|
610
|
+
/**
|
|
611
|
+
* Format: date-time
|
|
612
|
+
* @description Next scheduled time for recurring jobs.
|
|
613
|
+
*/
|
|
614
|
+
nextRunAt?: string | null;
|
|
615
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
616
|
+
recurrence?: string;
|
|
617
|
+
/** @description Remaining execution attempts for the job. */
|
|
618
|
+
retryBudget?: number;
|
|
619
|
+
/**
|
|
620
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
621
|
+
* @enum {string}
|
|
622
|
+
*/
|
|
623
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
624
|
+
/** @description Execution driver mode for the job. */
|
|
625
|
+
driverMode?: string;
|
|
626
|
+
/**
|
|
627
|
+
* Format: date-time
|
|
628
|
+
* @description Time of the most recent execution attempt.
|
|
629
|
+
*/
|
|
630
|
+
lastRunAt?: string | null;
|
|
631
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
632
|
+
lastError?: string;
|
|
633
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
634
|
+
claimedBy?: string;
|
|
635
|
+
/**
|
|
636
|
+
* Format: date-time
|
|
637
|
+
* @description Time the lease was claimed. Server-managed.
|
|
638
|
+
*/
|
|
639
|
+
claimedAt?: string | null;
|
|
640
|
+
/**
|
|
641
|
+
* Format: date-time
|
|
642
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
643
|
+
*/
|
|
644
|
+
leaseExpiresAt?: string | null;
|
|
645
|
+
/**
|
|
646
|
+
* Format: date-time
|
|
647
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
648
|
+
*/
|
|
649
|
+
pausedAt?: string | null;
|
|
650
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
651
|
+
pausedBy?: string;
|
|
652
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
653
|
+
pauseReason?: string;
|
|
654
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
655
|
+
fingerprint: string;
|
|
656
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
657
|
+
locked?: boolean;
|
|
658
|
+
/** @description Computed projection of the current lease holder. */
|
|
659
|
+
lockedBy?: string;
|
|
660
|
+
/**
|
|
661
|
+
* Format: date-time
|
|
662
|
+
* @description Computed projection of the current claim time.
|
|
663
|
+
*/
|
|
664
|
+
lockedAt?: string | null;
|
|
665
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
666
|
+
lockStale?: boolean;
|
|
667
|
+
/**
|
|
668
|
+
* Format: date-time
|
|
669
|
+
* @description Timestamp of job lease creation.
|
|
670
|
+
*/
|
|
671
|
+
createdAt: string;
|
|
672
|
+
/**
|
|
673
|
+
* Format: date-time
|
|
674
|
+
* @description Timestamp of last job lease modification.
|
|
675
|
+
*/
|
|
676
|
+
updatedAt: string;
|
|
677
|
+
/**
|
|
678
|
+
* Format: date-time
|
|
679
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
680
|
+
*/
|
|
681
|
+
deletedAt?: string | null;
|
|
682
|
+
}[];
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
responses: {
|
|
686
|
+
/** @description Invalid request body or request param */
|
|
687
|
+
400: {
|
|
688
|
+
headers: {
|
|
689
|
+
[name: string]: unknown;
|
|
690
|
+
};
|
|
691
|
+
content: {
|
|
692
|
+
"text/plain": string;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
696
|
+
401: {
|
|
697
|
+
headers: {
|
|
698
|
+
[name: string]: unknown;
|
|
699
|
+
};
|
|
700
|
+
content: {
|
|
701
|
+
"text/plain": string;
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
/** @description Result not found */
|
|
705
|
+
404: {
|
|
706
|
+
headers: {
|
|
707
|
+
[name: string]: unknown;
|
|
708
|
+
};
|
|
709
|
+
content: {
|
|
710
|
+
"text/plain": string;
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
/** @description Conflict - the request conflicts with the current job lease state (stale expectedFingerprint precondition, or release by a machine that is not the current lease holder) */
|
|
714
|
+
409: {
|
|
715
|
+
headers: {
|
|
716
|
+
[name: string]: unknown;
|
|
717
|
+
};
|
|
718
|
+
content: {
|
|
719
|
+
"text/plain": string;
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
/** @description Internal server error */
|
|
723
|
+
500: {
|
|
724
|
+
headers: {
|
|
725
|
+
[name: string]: unknown;
|
|
726
|
+
};
|
|
727
|
+
content: {
|
|
728
|
+
"text/plain": string;
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
parameters: {
|
|
733
|
+
/** @description Job lease ID */
|
|
734
|
+
jobLeaseId: string;
|
|
735
|
+
/** @description Get responses by page */
|
|
736
|
+
page: number;
|
|
737
|
+
/** @description Number of items per page (canonical camelCase form). */
|
|
738
|
+
pageSize: number;
|
|
739
|
+
/**
|
|
740
|
+
* @deprecated
|
|
741
|
+
* @description Number of items per page. Deprecated alias of pageSize;
|
|
742
|
+
* canonical `pageSize` wins when both are present.
|
|
743
|
+
*/
|
|
744
|
+
pagesize: number;
|
|
745
|
+
/** @description Get responses that match search param value */
|
|
746
|
+
search: string;
|
|
747
|
+
/** @description Get ordered responses */
|
|
748
|
+
order: string;
|
|
749
|
+
};
|
|
750
|
+
requestBodies: never;
|
|
751
|
+
headers: never;
|
|
752
|
+
pathItems: never;
|
|
753
|
+
}
|
|
754
|
+
export type $defs = Record<string, never>;
|
|
755
|
+
export interface operations {
|
|
756
|
+
listJobLeases: {
|
|
757
|
+
parameters: {
|
|
758
|
+
query?: {
|
|
759
|
+
/** @description Get responses by page */
|
|
760
|
+
page?: number;
|
|
761
|
+
/** @description Number of items per page (canonical camelCase form). */
|
|
762
|
+
pageSize?: number;
|
|
763
|
+
/**
|
|
764
|
+
* @deprecated
|
|
765
|
+
* @description Number of items per page. Deprecated alias of pageSize;
|
|
766
|
+
* canonical `pageSize` wins when both are present.
|
|
767
|
+
*/
|
|
768
|
+
pagesize?: number;
|
|
769
|
+
/** @description Get responses that match search param value */
|
|
770
|
+
search?: string;
|
|
771
|
+
/** @description Get ordered responses */
|
|
772
|
+
order?: string;
|
|
773
|
+
/** @description Filter by job status (pending, leased, succeeded, failed). */
|
|
774
|
+
status?: string;
|
|
775
|
+
};
|
|
776
|
+
header?: never;
|
|
777
|
+
path?: never;
|
|
778
|
+
cookie?: never;
|
|
779
|
+
};
|
|
780
|
+
requestBody?: never;
|
|
781
|
+
responses: {
|
|
782
|
+
/** @description Job leases page */
|
|
783
|
+
200: {
|
|
784
|
+
headers: {
|
|
785
|
+
[name: string]: unknown;
|
|
786
|
+
};
|
|
787
|
+
content: {
|
|
788
|
+
"application/json": {
|
|
789
|
+
/** @description Current page number of the result set. */
|
|
790
|
+
page?: number;
|
|
791
|
+
/** @description Number of items per page. */
|
|
792
|
+
pageSize?: number;
|
|
793
|
+
/** @description Total number of items available. */
|
|
794
|
+
totalCount?: number;
|
|
795
|
+
/** @description Job leases included on this page of results. */
|
|
796
|
+
jobLeases?: {
|
|
797
|
+
/**
|
|
798
|
+
* Format: uuid
|
|
799
|
+
* @description Server-generated job lease ID.
|
|
800
|
+
*/
|
|
801
|
+
id: string;
|
|
802
|
+
/**
|
|
803
|
+
* Format: uuid
|
|
804
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
805
|
+
*/
|
|
806
|
+
organizationId: string;
|
|
807
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
808
|
+
rowNumber: number;
|
|
809
|
+
/** @description Job command to execute when the lease is held. */
|
|
810
|
+
command: string;
|
|
811
|
+
/** @description Profile reference the job runs against. */
|
|
812
|
+
profile?: string;
|
|
813
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
814
|
+
platform?: string;
|
|
815
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
816
|
+
params?: Record<string, never>;
|
|
817
|
+
/**
|
|
818
|
+
* Format: date-time
|
|
819
|
+
* @description Time the job becomes due.
|
|
820
|
+
*/
|
|
821
|
+
runAt?: string | null;
|
|
822
|
+
/**
|
|
823
|
+
* Format: date-time
|
|
824
|
+
* @description Next scheduled time for recurring jobs.
|
|
825
|
+
*/
|
|
826
|
+
nextRunAt?: string | null;
|
|
827
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
828
|
+
recurrence?: string;
|
|
829
|
+
/** @description Remaining execution attempts for the job. */
|
|
830
|
+
retryBudget?: number;
|
|
831
|
+
/**
|
|
832
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
833
|
+
* @enum {string}
|
|
834
|
+
*/
|
|
835
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
836
|
+
/** @description Execution driver mode for the job. */
|
|
837
|
+
driverMode?: string;
|
|
838
|
+
/**
|
|
839
|
+
* Format: date-time
|
|
840
|
+
* @description Time of the most recent execution attempt.
|
|
841
|
+
*/
|
|
842
|
+
lastRunAt?: string | null;
|
|
843
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
844
|
+
lastError?: string;
|
|
845
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
846
|
+
claimedBy?: string;
|
|
847
|
+
/**
|
|
848
|
+
* Format: date-time
|
|
849
|
+
* @description Time the lease was claimed. Server-managed.
|
|
850
|
+
*/
|
|
851
|
+
claimedAt?: string | null;
|
|
852
|
+
/**
|
|
853
|
+
* Format: date-time
|
|
854
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
855
|
+
*/
|
|
856
|
+
leaseExpiresAt?: string | null;
|
|
857
|
+
/**
|
|
858
|
+
* Format: date-time
|
|
859
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
860
|
+
*/
|
|
861
|
+
pausedAt?: string | null;
|
|
862
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
863
|
+
pausedBy?: string;
|
|
864
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
865
|
+
pauseReason?: string;
|
|
866
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
867
|
+
fingerprint: string;
|
|
868
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
869
|
+
locked?: boolean;
|
|
870
|
+
/** @description Computed projection of the current lease holder. */
|
|
871
|
+
lockedBy?: string;
|
|
872
|
+
/**
|
|
873
|
+
* Format: date-time
|
|
874
|
+
* @description Computed projection of the current claim time.
|
|
875
|
+
*/
|
|
876
|
+
lockedAt?: string | null;
|
|
877
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
878
|
+
lockStale?: boolean;
|
|
879
|
+
/**
|
|
880
|
+
* Format: date-time
|
|
881
|
+
* @description Timestamp of job lease creation.
|
|
882
|
+
*/
|
|
883
|
+
createdAt: string;
|
|
884
|
+
/**
|
|
885
|
+
* Format: date-time
|
|
886
|
+
* @description Timestamp of last job lease modification.
|
|
887
|
+
*/
|
|
888
|
+
updatedAt: string;
|
|
889
|
+
/**
|
|
890
|
+
* Format: date-time
|
|
891
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
892
|
+
*/
|
|
893
|
+
deletedAt?: string | null;
|
|
894
|
+
}[];
|
|
895
|
+
};
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
899
|
+
401: {
|
|
900
|
+
headers: {
|
|
901
|
+
[name: string]: unknown;
|
|
902
|
+
};
|
|
903
|
+
content: {
|
|
904
|
+
"text/plain": string;
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
/** @description Internal server error */
|
|
908
|
+
500: {
|
|
909
|
+
headers: {
|
|
910
|
+
[name: string]: unknown;
|
|
911
|
+
};
|
|
912
|
+
content: {
|
|
913
|
+
"text/plain": string;
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
createJobLease: {
|
|
919
|
+
parameters: {
|
|
920
|
+
query?: never;
|
|
921
|
+
header?: never;
|
|
922
|
+
path?: never;
|
|
923
|
+
cookie?: never;
|
|
924
|
+
};
|
|
925
|
+
requestBody: {
|
|
926
|
+
content: {
|
|
927
|
+
"application/json": {
|
|
928
|
+
/**
|
|
929
|
+
* Format: uuid
|
|
930
|
+
* @description Existing job lease ID for updates; omit on create.
|
|
931
|
+
*/
|
|
932
|
+
id?: string;
|
|
933
|
+
/** @description Targetable row number within the organization's job set. */
|
|
934
|
+
rowNumber: number;
|
|
935
|
+
/** @description Job command to execute when the lease is held. */
|
|
936
|
+
command: string;
|
|
937
|
+
/** @description Profile reference the job runs against. */
|
|
938
|
+
profile?: string;
|
|
939
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
940
|
+
platform?: string;
|
|
941
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
942
|
+
params?: Record<string, never>;
|
|
943
|
+
/**
|
|
944
|
+
* Format: date-time
|
|
945
|
+
* @description Time the job becomes due.
|
|
946
|
+
*/
|
|
947
|
+
runAt?: string;
|
|
948
|
+
/**
|
|
949
|
+
* Format: date-time
|
|
950
|
+
* @description Next scheduled time for recurring jobs.
|
|
951
|
+
*/
|
|
952
|
+
nextRunAt?: string;
|
|
953
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
954
|
+
recurrence?: string;
|
|
955
|
+
/** @description Remaining execution attempts for the job. */
|
|
956
|
+
retryBudget?: number;
|
|
957
|
+
/** @description Execution driver mode for the job. */
|
|
958
|
+
driverMode?: string;
|
|
959
|
+
/**
|
|
960
|
+
* @description Optimistic-concurrency precondition for update: when supplied,
|
|
961
|
+
* the update applies only when the stored fingerprint still
|
|
962
|
+
* matches, and is refused with a 409 otherwise. Ignored on
|
|
963
|
+
* create.
|
|
964
|
+
*/
|
|
965
|
+
expectedFingerprint?: string;
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
responses: {
|
|
970
|
+
/** @description Job lease created */
|
|
971
|
+
201: {
|
|
972
|
+
headers: {
|
|
973
|
+
[name: string]: unknown;
|
|
974
|
+
};
|
|
975
|
+
content: {
|
|
976
|
+
"application/json": {
|
|
977
|
+
/**
|
|
978
|
+
* Format: uuid
|
|
979
|
+
* @description Server-generated job lease ID.
|
|
980
|
+
*/
|
|
981
|
+
id: string;
|
|
982
|
+
/**
|
|
983
|
+
* Format: uuid
|
|
984
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
985
|
+
*/
|
|
986
|
+
organizationId: string;
|
|
987
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
988
|
+
rowNumber: number;
|
|
989
|
+
/** @description Job command to execute when the lease is held. */
|
|
990
|
+
command: string;
|
|
991
|
+
/** @description Profile reference the job runs against. */
|
|
992
|
+
profile?: string;
|
|
993
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
994
|
+
platform?: string;
|
|
995
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
996
|
+
params?: Record<string, never>;
|
|
997
|
+
/**
|
|
998
|
+
* Format: date-time
|
|
999
|
+
* @description Time the job becomes due.
|
|
1000
|
+
*/
|
|
1001
|
+
runAt?: string | null;
|
|
1002
|
+
/**
|
|
1003
|
+
* Format: date-time
|
|
1004
|
+
* @description Next scheduled time for recurring jobs.
|
|
1005
|
+
*/
|
|
1006
|
+
nextRunAt?: string | null;
|
|
1007
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
1008
|
+
recurrence?: string;
|
|
1009
|
+
/** @description Remaining execution attempts for the job. */
|
|
1010
|
+
retryBudget?: number;
|
|
1011
|
+
/**
|
|
1012
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
1013
|
+
* @enum {string}
|
|
1014
|
+
*/
|
|
1015
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
1016
|
+
/** @description Execution driver mode for the job. */
|
|
1017
|
+
driverMode?: string;
|
|
1018
|
+
/**
|
|
1019
|
+
* Format: date-time
|
|
1020
|
+
* @description Time of the most recent execution attempt.
|
|
1021
|
+
*/
|
|
1022
|
+
lastRunAt?: string | null;
|
|
1023
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
1024
|
+
lastError?: string;
|
|
1025
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
1026
|
+
claimedBy?: string;
|
|
1027
|
+
/**
|
|
1028
|
+
* Format: date-time
|
|
1029
|
+
* @description Time the lease was claimed. Server-managed.
|
|
1030
|
+
*/
|
|
1031
|
+
claimedAt?: string | null;
|
|
1032
|
+
/**
|
|
1033
|
+
* Format: date-time
|
|
1034
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
1035
|
+
*/
|
|
1036
|
+
leaseExpiresAt?: string | null;
|
|
1037
|
+
/**
|
|
1038
|
+
* Format: date-time
|
|
1039
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
1040
|
+
*/
|
|
1041
|
+
pausedAt?: string | null;
|
|
1042
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
1043
|
+
pausedBy?: string;
|
|
1044
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
1045
|
+
pauseReason?: string;
|
|
1046
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
1047
|
+
fingerprint: string;
|
|
1048
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
1049
|
+
locked?: boolean;
|
|
1050
|
+
/** @description Computed projection of the current lease holder. */
|
|
1051
|
+
lockedBy?: string;
|
|
1052
|
+
/**
|
|
1053
|
+
* Format: date-time
|
|
1054
|
+
* @description Computed projection of the current claim time.
|
|
1055
|
+
*/
|
|
1056
|
+
lockedAt?: string | null;
|
|
1057
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
1058
|
+
lockStale?: boolean;
|
|
1059
|
+
/**
|
|
1060
|
+
* Format: date-time
|
|
1061
|
+
* @description Timestamp of job lease creation.
|
|
1062
|
+
*/
|
|
1063
|
+
createdAt: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* Format: date-time
|
|
1066
|
+
* @description Timestamp of last job lease modification.
|
|
1067
|
+
*/
|
|
1068
|
+
updatedAt: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* Format: date-time
|
|
1071
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
1072
|
+
*/
|
|
1073
|
+
deletedAt?: string | null;
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
};
|
|
1077
|
+
/** @description Invalid request body or request param */
|
|
1078
|
+
400: {
|
|
1079
|
+
headers: {
|
|
1080
|
+
[name: string]: unknown;
|
|
1081
|
+
};
|
|
1082
|
+
content: {
|
|
1083
|
+
"text/plain": string;
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1087
|
+
401: {
|
|
1088
|
+
headers: {
|
|
1089
|
+
[name: string]: unknown;
|
|
1090
|
+
};
|
|
1091
|
+
content: {
|
|
1092
|
+
"text/plain": string;
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
/** @description Internal server error */
|
|
1096
|
+
500: {
|
|
1097
|
+
headers: {
|
|
1098
|
+
[name: string]: unknown;
|
|
1099
|
+
};
|
|
1100
|
+
content: {
|
|
1101
|
+
"text/plain": string;
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1106
|
+
claimJobLease: {
|
|
1107
|
+
parameters: {
|
|
1108
|
+
query?: never;
|
|
1109
|
+
header?: never;
|
|
1110
|
+
path?: never;
|
|
1111
|
+
cookie?: never;
|
|
1112
|
+
};
|
|
1113
|
+
requestBody: {
|
|
1114
|
+
content: {
|
|
1115
|
+
"application/json": {
|
|
1116
|
+
/** @description Machine taking the lease, recorded as `claimedBy`. Client-asserted; the holder check is advisory in v1. */
|
|
1117
|
+
machineId: string;
|
|
1118
|
+
/** @description Claim only the row with this row number. */
|
|
1119
|
+
rowNumber?: number;
|
|
1120
|
+
/** @description Trigger-now override that drops only the due test; a live foreign lease still refuses. */
|
|
1121
|
+
force?: boolean;
|
|
1122
|
+
/** @description Single operator override over the organization-wide and per-row pause scopes. */
|
|
1123
|
+
ignorePause?: boolean;
|
|
1124
|
+
/** @description Requested lease duration in minutes. When omitted the server applies its default lease duration. */
|
|
1125
|
+
leaseMinutes?: number;
|
|
1126
|
+
};
|
|
1127
|
+
};
|
|
1128
|
+
};
|
|
1129
|
+
responses: {
|
|
1130
|
+
/** @description Claim result holding the row, or null when nothing was claimed */
|
|
1131
|
+
200: {
|
|
1132
|
+
headers: {
|
|
1133
|
+
[name: string]: unknown;
|
|
1134
|
+
};
|
|
1135
|
+
content: {
|
|
1136
|
+
"application/json": {
|
|
1137
|
+
/**
|
|
1138
|
+
* Job Lease Schema
|
|
1139
|
+
* @description Server-returned job lease as persisted by meshery-cloud. A job lease is a
|
|
1140
|
+
* due-work row plus time-bound claim state, shared by Layer5 Cloud and
|
|
1141
|
+
* Blowhorn: competing consumers claim, renew and release leases on due jobs,
|
|
1142
|
+
* and pause scopes gate which rows are claimable. The claim race is decided
|
|
1143
|
+
* server-side in a single statement; losing racers receive null, never an
|
|
1144
|
+
* error. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause
|
|
1145
|
+
* columns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are
|
|
1146
|
+
* refused on CRUD paths; they change only through the claim, renew, release,
|
|
1147
|
+
* pause and resume operations. `locked`, `lockedBy`, `lockedAt` and
|
|
1148
|
+
* `lockStale` are computed projections for schedule screens, not stored
|
|
1149
|
+
* columns.
|
|
1150
|
+
*/
|
|
1151
|
+
jobLease?: {
|
|
1152
|
+
/**
|
|
1153
|
+
* Format: uuid
|
|
1154
|
+
* @description Server-generated job lease ID.
|
|
1155
|
+
*/
|
|
1156
|
+
id: string;
|
|
1157
|
+
/**
|
|
1158
|
+
* Format: uuid
|
|
1159
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
1160
|
+
*/
|
|
1161
|
+
organizationId: string;
|
|
1162
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
1163
|
+
rowNumber: number;
|
|
1164
|
+
/** @description Job command to execute when the lease is held. */
|
|
1165
|
+
command: string;
|
|
1166
|
+
/** @description Profile reference the job runs against. */
|
|
1167
|
+
profile?: string;
|
|
1168
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
1169
|
+
platform?: string;
|
|
1170
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
1171
|
+
params?: Record<string, never>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Format: date-time
|
|
1174
|
+
* @description Time the job becomes due.
|
|
1175
|
+
*/
|
|
1176
|
+
runAt?: string | null;
|
|
1177
|
+
/**
|
|
1178
|
+
* Format: date-time
|
|
1179
|
+
* @description Next scheduled time for recurring jobs.
|
|
1180
|
+
*/
|
|
1181
|
+
nextRunAt?: string | null;
|
|
1182
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
1183
|
+
recurrence?: string;
|
|
1184
|
+
/** @description Remaining execution attempts for the job. */
|
|
1185
|
+
retryBudget?: number;
|
|
1186
|
+
/**
|
|
1187
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
1188
|
+
* @enum {string}
|
|
1189
|
+
*/
|
|
1190
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
1191
|
+
/** @description Execution driver mode for the job. */
|
|
1192
|
+
driverMode?: string;
|
|
1193
|
+
/**
|
|
1194
|
+
* Format: date-time
|
|
1195
|
+
* @description Time of the most recent execution attempt.
|
|
1196
|
+
*/
|
|
1197
|
+
lastRunAt?: string | null;
|
|
1198
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
1199
|
+
lastError?: string;
|
|
1200
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
1201
|
+
claimedBy?: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* Format: date-time
|
|
1204
|
+
* @description Time the lease was claimed. Server-managed.
|
|
1205
|
+
*/
|
|
1206
|
+
claimedAt?: string | null;
|
|
1207
|
+
/**
|
|
1208
|
+
* Format: date-time
|
|
1209
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
1210
|
+
*/
|
|
1211
|
+
leaseExpiresAt?: string | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* Format: date-time
|
|
1214
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
1215
|
+
*/
|
|
1216
|
+
pausedAt?: string | null;
|
|
1217
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
1218
|
+
pausedBy?: string;
|
|
1219
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
1220
|
+
pauseReason?: string;
|
|
1221
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
1222
|
+
fingerprint: string;
|
|
1223
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
1224
|
+
locked?: boolean;
|
|
1225
|
+
/** @description Computed projection of the current lease holder. */
|
|
1226
|
+
lockedBy?: string;
|
|
1227
|
+
/**
|
|
1228
|
+
* Format: date-time
|
|
1229
|
+
* @description Computed projection of the current claim time.
|
|
1230
|
+
*/
|
|
1231
|
+
lockedAt?: string | null;
|
|
1232
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
1233
|
+
lockStale?: boolean;
|
|
1234
|
+
/**
|
|
1235
|
+
* Format: date-time
|
|
1236
|
+
* @description Timestamp of job lease creation.
|
|
1237
|
+
*/
|
|
1238
|
+
createdAt: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* Format: date-time
|
|
1241
|
+
* @description Timestamp of last job lease modification.
|
|
1242
|
+
*/
|
|
1243
|
+
updatedAt: string;
|
|
1244
|
+
/**
|
|
1245
|
+
* Format: date-time
|
|
1246
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
1247
|
+
*/
|
|
1248
|
+
deletedAt?: string | null;
|
|
1249
|
+
} | null;
|
|
1250
|
+
};
|
|
1251
|
+
};
|
|
1252
|
+
};
|
|
1253
|
+
/** @description Invalid request body or request param */
|
|
1254
|
+
400: {
|
|
1255
|
+
headers: {
|
|
1256
|
+
[name: string]: unknown;
|
|
1257
|
+
};
|
|
1258
|
+
content: {
|
|
1259
|
+
"text/plain": string;
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1263
|
+
401: {
|
|
1264
|
+
headers: {
|
|
1265
|
+
[name: string]: unknown;
|
|
1266
|
+
};
|
|
1267
|
+
content: {
|
|
1268
|
+
"text/plain": string;
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
/** @description Internal server error */
|
|
1272
|
+
500: {
|
|
1273
|
+
headers: {
|
|
1274
|
+
[name: string]: unknown;
|
|
1275
|
+
};
|
|
1276
|
+
content: {
|
|
1277
|
+
"text/plain": string;
|
|
1278
|
+
};
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
getSchedulePause: {
|
|
1283
|
+
parameters: {
|
|
1284
|
+
query?: never;
|
|
1285
|
+
header?: never;
|
|
1286
|
+
path?: never;
|
|
1287
|
+
cookie?: never;
|
|
1288
|
+
};
|
|
1289
|
+
requestBody?: never;
|
|
1290
|
+
responses: {
|
|
1291
|
+
/** @description Organization schedule pause */
|
|
1292
|
+
200: {
|
|
1293
|
+
headers: {
|
|
1294
|
+
[name: string]: unknown;
|
|
1295
|
+
};
|
|
1296
|
+
content: {
|
|
1297
|
+
"application/json": {
|
|
1298
|
+
/**
|
|
1299
|
+
* Format: uuid
|
|
1300
|
+
* @description Server-generated schedule pause ID.
|
|
1301
|
+
*/
|
|
1302
|
+
id: string;
|
|
1303
|
+
/**
|
|
1304
|
+
* Format: uuid
|
|
1305
|
+
* @description Organization the pause applies to. Derived from the authenticated session, never client-settable.
|
|
1306
|
+
*/
|
|
1307
|
+
organizationId: string;
|
|
1308
|
+
/** @description Operator reason for pausing the organization schedule. */
|
|
1309
|
+
reason?: string;
|
|
1310
|
+
/** @description Identity that set the pause. Server-managed. */
|
|
1311
|
+
pausedBy?: string;
|
|
1312
|
+
/**
|
|
1313
|
+
* Format: date-time
|
|
1314
|
+
* @description Timestamp of schedule pause creation.
|
|
1315
|
+
*/
|
|
1316
|
+
createdAt: string;
|
|
1317
|
+
/**
|
|
1318
|
+
* Format: date-time
|
|
1319
|
+
* @description Timestamp of last schedule pause modification.
|
|
1320
|
+
*/
|
|
1321
|
+
updatedAt: string;
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1326
|
+
401: {
|
|
1327
|
+
headers: {
|
|
1328
|
+
[name: string]: unknown;
|
|
1329
|
+
};
|
|
1330
|
+
content: {
|
|
1331
|
+
"text/plain": string;
|
|
1332
|
+
};
|
|
1333
|
+
};
|
|
1334
|
+
/** @description Result not found */
|
|
1335
|
+
404: {
|
|
1336
|
+
headers: {
|
|
1337
|
+
[name: string]: unknown;
|
|
1338
|
+
};
|
|
1339
|
+
content: {
|
|
1340
|
+
"text/plain": string;
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
/** @description Internal server error */
|
|
1344
|
+
500: {
|
|
1345
|
+
headers: {
|
|
1346
|
+
[name: string]: unknown;
|
|
1347
|
+
};
|
|
1348
|
+
content: {
|
|
1349
|
+
"text/plain": string;
|
|
1350
|
+
};
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
setSchedulePause: {
|
|
1355
|
+
parameters: {
|
|
1356
|
+
query?: never;
|
|
1357
|
+
header?: never;
|
|
1358
|
+
path?: never;
|
|
1359
|
+
cookie?: never;
|
|
1360
|
+
};
|
|
1361
|
+
requestBody: {
|
|
1362
|
+
content: {
|
|
1363
|
+
"application/json": {
|
|
1364
|
+
/** @description Operator reason for pausing the organization schedule. */
|
|
1365
|
+
reason?: string;
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
responses: {
|
|
1370
|
+
/** @description Organization schedule pause set */
|
|
1371
|
+
200: {
|
|
1372
|
+
headers: {
|
|
1373
|
+
[name: string]: unknown;
|
|
1374
|
+
};
|
|
1375
|
+
content: {
|
|
1376
|
+
"application/json": {
|
|
1377
|
+
/**
|
|
1378
|
+
* Format: uuid
|
|
1379
|
+
* @description Server-generated schedule pause ID.
|
|
1380
|
+
*/
|
|
1381
|
+
id: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Format: uuid
|
|
1384
|
+
* @description Organization the pause applies to. Derived from the authenticated session, never client-settable.
|
|
1385
|
+
*/
|
|
1386
|
+
organizationId: string;
|
|
1387
|
+
/** @description Operator reason for pausing the organization schedule. */
|
|
1388
|
+
reason?: string;
|
|
1389
|
+
/** @description Identity that set the pause. Server-managed. */
|
|
1390
|
+
pausedBy?: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* Format: date-time
|
|
1393
|
+
* @description Timestamp of schedule pause creation.
|
|
1394
|
+
*/
|
|
1395
|
+
createdAt: string;
|
|
1396
|
+
/**
|
|
1397
|
+
* Format: date-time
|
|
1398
|
+
* @description Timestamp of last schedule pause modification.
|
|
1399
|
+
*/
|
|
1400
|
+
updatedAt: string;
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1404
|
+
/** @description Invalid request body or request param */
|
|
1405
|
+
400: {
|
|
1406
|
+
headers: {
|
|
1407
|
+
[name: string]: unknown;
|
|
1408
|
+
};
|
|
1409
|
+
content: {
|
|
1410
|
+
"text/plain": string;
|
|
1411
|
+
};
|
|
1412
|
+
};
|
|
1413
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1414
|
+
401: {
|
|
1415
|
+
headers: {
|
|
1416
|
+
[name: string]: unknown;
|
|
1417
|
+
};
|
|
1418
|
+
content: {
|
|
1419
|
+
"text/plain": string;
|
|
1420
|
+
};
|
|
1421
|
+
};
|
|
1422
|
+
/** @description Internal server error */
|
|
1423
|
+
500: {
|
|
1424
|
+
headers: {
|
|
1425
|
+
[name: string]: unknown;
|
|
1426
|
+
};
|
|
1427
|
+
content: {
|
|
1428
|
+
"text/plain": string;
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
};
|
|
1433
|
+
clearSchedulePause: {
|
|
1434
|
+
parameters: {
|
|
1435
|
+
query?: never;
|
|
1436
|
+
header?: never;
|
|
1437
|
+
path?: never;
|
|
1438
|
+
cookie?: never;
|
|
1439
|
+
};
|
|
1440
|
+
requestBody?: never;
|
|
1441
|
+
responses: {
|
|
1442
|
+
/** @description Organization schedule pause cleared */
|
|
1443
|
+
204: {
|
|
1444
|
+
headers: {
|
|
1445
|
+
[name: string]: unknown;
|
|
1446
|
+
};
|
|
1447
|
+
content?: never;
|
|
1448
|
+
};
|
|
1449
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1450
|
+
401: {
|
|
1451
|
+
headers: {
|
|
1452
|
+
[name: string]: unknown;
|
|
1453
|
+
};
|
|
1454
|
+
content: {
|
|
1455
|
+
"text/plain": string;
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
/** @description Result not found */
|
|
1459
|
+
404: {
|
|
1460
|
+
headers: {
|
|
1461
|
+
[name: string]: unknown;
|
|
1462
|
+
};
|
|
1463
|
+
content: {
|
|
1464
|
+
"text/plain": string;
|
|
1465
|
+
};
|
|
1466
|
+
};
|
|
1467
|
+
/** @description Internal server error */
|
|
1468
|
+
500: {
|
|
1469
|
+
headers: {
|
|
1470
|
+
[name: string]: unknown;
|
|
1471
|
+
};
|
|
1472
|
+
content: {
|
|
1473
|
+
"text/plain": string;
|
|
1474
|
+
};
|
|
1475
|
+
};
|
|
1476
|
+
};
|
|
1477
|
+
};
|
|
1478
|
+
getJobLease: {
|
|
1479
|
+
parameters: {
|
|
1480
|
+
query?: never;
|
|
1481
|
+
header?: never;
|
|
1482
|
+
path: {
|
|
1483
|
+
/** @description Job lease ID */
|
|
1484
|
+
jobLeaseId: string;
|
|
1485
|
+
};
|
|
1486
|
+
cookie?: never;
|
|
1487
|
+
};
|
|
1488
|
+
requestBody?: never;
|
|
1489
|
+
responses: {
|
|
1490
|
+
/** @description Job lease response */
|
|
1491
|
+
200: {
|
|
1492
|
+
headers: {
|
|
1493
|
+
[name: string]: unknown;
|
|
1494
|
+
};
|
|
1495
|
+
content: {
|
|
1496
|
+
"application/json": {
|
|
1497
|
+
/**
|
|
1498
|
+
* Format: uuid
|
|
1499
|
+
* @description Server-generated job lease ID.
|
|
1500
|
+
*/
|
|
1501
|
+
id: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* Format: uuid
|
|
1504
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
1505
|
+
*/
|
|
1506
|
+
organizationId: string;
|
|
1507
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
1508
|
+
rowNumber: number;
|
|
1509
|
+
/** @description Job command to execute when the lease is held. */
|
|
1510
|
+
command: string;
|
|
1511
|
+
/** @description Profile reference the job runs against. */
|
|
1512
|
+
profile?: string;
|
|
1513
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
1514
|
+
platform?: string;
|
|
1515
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
1516
|
+
params?: Record<string, never>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Format: date-time
|
|
1519
|
+
* @description Time the job becomes due.
|
|
1520
|
+
*/
|
|
1521
|
+
runAt?: string | null;
|
|
1522
|
+
/**
|
|
1523
|
+
* Format: date-time
|
|
1524
|
+
* @description Next scheduled time for recurring jobs.
|
|
1525
|
+
*/
|
|
1526
|
+
nextRunAt?: string | null;
|
|
1527
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
1528
|
+
recurrence?: string;
|
|
1529
|
+
/** @description Remaining execution attempts for the job. */
|
|
1530
|
+
retryBudget?: number;
|
|
1531
|
+
/**
|
|
1532
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
1533
|
+
* @enum {string}
|
|
1534
|
+
*/
|
|
1535
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
1536
|
+
/** @description Execution driver mode for the job. */
|
|
1537
|
+
driverMode?: string;
|
|
1538
|
+
/**
|
|
1539
|
+
* Format: date-time
|
|
1540
|
+
* @description Time of the most recent execution attempt.
|
|
1541
|
+
*/
|
|
1542
|
+
lastRunAt?: string | null;
|
|
1543
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
1544
|
+
lastError?: string;
|
|
1545
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
1546
|
+
claimedBy?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Format: date-time
|
|
1549
|
+
* @description Time the lease was claimed. Server-managed.
|
|
1550
|
+
*/
|
|
1551
|
+
claimedAt?: string | null;
|
|
1552
|
+
/**
|
|
1553
|
+
* Format: date-time
|
|
1554
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
1555
|
+
*/
|
|
1556
|
+
leaseExpiresAt?: string | null;
|
|
1557
|
+
/**
|
|
1558
|
+
* Format: date-time
|
|
1559
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
1560
|
+
*/
|
|
1561
|
+
pausedAt?: string | null;
|
|
1562
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
1563
|
+
pausedBy?: string;
|
|
1564
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
1565
|
+
pauseReason?: string;
|
|
1566
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
1567
|
+
fingerprint: string;
|
|
1568
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
1569
|
+
locked?: boolean;
|
|
1570
|
+
/** @description Computed projection of the current lease holder. */
|
|
1571
|
+
lockedBy?: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Format: date-time
|
|
1574
|
+
* @description Computed projection of the current claim time.
|
|
1575
|
+
*/
|
|
1576
|
+
lockedAt?: string | null;
|
|
1577
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
1578
|
+
lockStale?: boolean;
|
|
1579
|
+
/**
|
|
1580
|
+
* Format: date-time
|
|
1581
|
+
* @description Timestamp of job lease creation.
|
|
1582
|
+
*/
|
|
1583
|
+
createdAt: string;
|
|
1584
|
+
/**
|
|
1585
|
+
* Format: date-time
|
|
1586
|
+
* @description Timestamp of last job lease modification.
|
|
1587
|
+
*/
|
|
1588
|
+
updatedAt: string;
|
|
1589
|
+
/**
|
|
1590
|
+
* Format: date-time
|
|
1591
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
1592
|
+
*/
|
|
1593
|
+
deletedAt?: string | null;
|
|
1594
|
+
};
|
|
1595
|
+
};
|
|
1596
|
+
};
|
|
1597
|
+
/** @description Invalid request body or request param */
|
|
1598
|
+
400: {
|
|
1599
|
+
headers: {
|
|
1600
|
+
[name: string]: unknown;
|
|
1601
|
+
};
|
|
1602
|
+
content: {
|
|
1603
|
+
"text/plain": string;
|
|
1604
|
+
};
|
|
1605
|
+
};
|
|
1606
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1607
|
+
401: {
|
|
1608
|
+
headers: {
|
|
1609
|
+
[name: string]: unknown;
|
|
1610
|
+
};
|
|
1611
|
+
content: {
|
|
1612
|
+
"text/plain": string;
|
|
1613
|
+
};
|
|
1614
|
+
};
|
|
1615
|
+
/** @description Result not found */
|
|
1616
|
+
404: {
|
|
1617
|
+
headers: {
|
|
1618
|
+
[name: string]: unknown;
|
|
1619
|
+
};
|
|
1620
|
+
content: {
|
|
1621
|
+
"text/plain": string;
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
/** @description Internal server error */
|
|
1625
|
+
500: {
|
|
1626
|
+
headers: {
|
|
1627
|
+
[name: string]: unknown;
|
|
1628
|
+
};
|
|
1629
|
+
content: {
|
|
1630
|
+
"text/plain": string;
|
|
1631
|
+
};
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
};
|
|
1635
|
+
updateJobLease: {
|
|
1636
|
+
parameters: {
|
|
1637
|
+
query?: never;
|
|
1638
|
+
header?: never;
|
|
1639
|
+
path: {
|
|
1640
|
+
/** @description Job lease ID */
|
|
1641
|
+
jobLeaseId: string;
|
|
1642
|
+
};
|
|
1643
|
+
cookie?: never;
|
|
1644
|
+
};
|
|
1645
|
+
requestBody: {
|
|
1646
|
+
content: {
|
|
1647
|
+
"application/json": {
|
|
1648
|
+
/**
|
|
1649
|
+
* Format: uuid
|
|
1650
|
+
* @description Existing job lease ID for updates; omit on create.
|
|
1651
|
+
*/
|
|
1652
|
+
id?: string;
|
|
1653
|
+
/** @description Targetable row number within the organization's job set. */
|
|
1654
|
+
rowNumber: number;
|
|
1655
|
+
/** @description Job command to execute when the lease is held. */
|
|
1656
|
+
command: string;
|
|
1657
|
+
/** @description Profile reference the job runs against. */
|
|
1658
|
+
profile?: string;
|
|
1659
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
1660
|
+
platform?: string;
|
|
1661
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
1662
|
+
params?: Record<string, never>;
|
|
1663
|
+
/**
|
|
1664
|
+
* Format: date-time
|
|
1665
|
+
* @description Time the job becomes due.
|
|
1666
|
+
*/
|
|
1667
|
+
runAt?: string;
|
|
1668
|
+
/**
|
|
1669
|
+
* Format: date-time
|
|
1670
|
+
* @description Next scheduled time for recurring jobs.
|
|
1671
|
+
*/
|
|
1672
|
+
nextRunAt?: string;
|
|
1673
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
1674
|
+
recurrence?: string;
|
|
1675
|
+
/** @description Remaining execution attempts for the job. */
|
|
1676
|
+
retryBudget?: number;
|
|
1677
|
+
/** @description Execution driver mode for the job. */
|
|
1678
|
+
driverMode?: string;
|
|
1679
|
+
/**
|
|
1680
|
+
* @description Optimistic-concurrency precondition for update: when supplied,
|
|
1681
|
+
* the update applies only when the stored fingerprint still
|
|
1682
|
+
* matches, and is refused with a 409 otherwise. Ignored on
|
|
1683
|
+
* create.
|
|
1684
|
+
*/
|
|
1685
|
+
expectedFingerprint?: string;
|
|
1686
|
+
};
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
responses: {
|
|
1690
|
+
/** @description Job lease updated */
|
|
1691
|
+
200: {
|
|
1692
|
+
headers: {
|
|
1693
|
+
[name: string]: unknown;
|
|
1694
|
+
};
|
|
1695
|
+
content: {
|
|
1696
|
+
"application/json": {
|
|
1697
|
+
/**
|
|
1698
|
+
* Format: uuid
|
|
1699
|
+
* @description Server-generated job lease ID.
|
|
1700
|
+
*/
|
|
1701
|
+
id: string;
|
|
1702
|
+
/**
|
|
1703
|
+
* Format: uuid
|
|
1704
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
1705
|
+
*/
|
|
1706
|
+
organizationId: string;
|
|
1707
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
1708
|
+
rowNumber: number;
|
|
1709
|
+
/** @description Job command to execute when the lease is held. */
|
|
1710
|
+
command: string;
|
|
1711
|
+
/** @description Profile reference the job runs against. */
|
|
1712
|
+
profile?: string;
|
|
1713
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
1714
|
+
platform?: string;
|
|
1715
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
1716
|
+
params?: Record<string, never>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Format: date-time
|
|
1719
|
+
* @description Time the job becomes due.
|
|
1720
|
+
*/
|
|
1721
|
+
runAt?: string | null;
|
|
1722
|
+
/**
|
|
1723
|
+
* Format: date-time
|
|
1724
|
+
* @description Next scheduled time for recurring jobs.
|
|
1725
|
+
*/
|
|
1726
|
+
nextRunAt?: string | null;
|
|
1727
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
1728
|
+
recurrence?: string;
|
|
1729
|
+
/** @description Remaining execution attempts for the job. */
|
|
1730
|
+
retryBudget?: number;
|
|
1731
|
+
/**
|
|
1732
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
1733
|
+
* @enum {string}
|
|
1734
|
+
*/
|
|
1735
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
1736
|
+
/** @description Execution driver mode for the job. */
|
|
1737
|
+
driverMode?: string;
|
|
1738
|
+
/**
|
|
1739
|
+
* Format: date-time
|
|
1740
|
+
* @description Time of the most recent execution attempt.
|
|
1741
|
+
*/
|
|
1742
|
+
lastRunAt?: string | null;
|
|
1743
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
1744
|
+
lastError?: string;
|
|
1745
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
1746
|
+
claimedBy?: string;
|
|
1747
|
+
/**
|
|
1748
|
+
* Format: date-time
|
|
1749
|
+
* @description Time the lease was claimed. Server-managed.
|
|
1750
|
+
*/
|
|
1751
|
+
claimedAt?: string | null;
|
|
1752
|
+
/**
|
|
1753
|
+
* Format: date-time
|
|
1754
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
1755
|
+
*/
|
|
1756
|
+
leaseExpiresAt?: string | null;
|
|
1757
|
+
/**
|
|
1758
|
+
* Format: date-time
|
|
1759
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
1760
|
+
*/
|
|
1761
|
+
pausedAt?: string | null;
|
|
1762
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
1763
|
+
pausedBy?: string;
|
|
1764
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
1765
|
+
pauseReason?: string;
|
|
1766
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
1767
|
+
fingerprint: string;
|
|
1768
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
1769
|
+
locked?: boolean;
|
|
1770
|
+
/** @description Computed projection of the current lease holder. */
|
|
1771
|
+
lockedBy?: string;
|
|
1772
|
+
/**
|
|
1773
|
+
* Format: date-time
|
|
1774
|
+
* @description Computed projection of the current claim time.
|
|
1775
|
+
*/
|
|
1776
|
+
lockedAt?: string | null;
|
|
1777
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
1778
|
+
lockStale?: boolean;
|
|
1779
|
+
/**
|
|
1780
|
+
* Format: date-time
|
|
1781
|
+
* @description Timestamp of job lease creation.
|
|
1782
|
+
*/
|
|
1783
|
+
createdAt: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Format: date-time
|
|
1786
|
+
* @description Timestamp of last job lease modification.
|
|
1787
|
+
*/
|
|
1788
|
+
updatedAt: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* Format: date-time
|
|
1791
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
1792
|
+
*/
|
|
1793
|
+
deletedAt?: string | null;
|
|
1794
|
+
};
|
|
1795
|
+
};
|
|
1796
|
+
};
|
|
1797
|
+
/** @description Invalid request body or request param */
|
|
1798
|
+
400: {
|
|
1799
|
+
headers: {
|
|
1800
|
+
[name: string]: unknown;
|
|
1801
|
+
};
|
|
1802
|
+
content: {
|
|
1803
|
+
"text/plain": string;
|
|
1804
|
+
};
|
|
1805
|
+
};
|
|
1806
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1807
|
+
401: {
|
|
1808
|
+
headers: {
|
|
1809
|
+
[name: string]: unknown;
|
|
1810
|
+
};
|
|
1811
|
+
content: {
|
|
1812
|
+
"text/plain": string;
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
/** @description Result not found */
|
|
1816
|
+
404: {
|
|
1817
|
+
headers: {
|
|
1818
|
+
[name: string]: unknown;
|
|
1819
|
+
};
|
|
1820
|
+
content: {
|
|
1821
|
+
"text/plain": string;
|
|
1822
|
+
};
|
|
1823
|
+
};
|
|
1824
|
+
/** @description Conflict - the request conflicts with the current job lease state (stale expectedFingerprint precondition, or release by a machine that is not the current lease holder) */
|
|
1825
|
+
409: {
|
|
1826
|
+
headers: {
|
|
1827
|
+
[name: string]: unknown;
|
|
1828
|
+
};
|
|
1829
|
+
content: {
|
|
1830
|
+
"text/plain": string;
|
|
1831
|
+
};
|
|
1832
|
+
};
|
|
1833
|
+
/** @description Internal server error */
|
|
1834
|
+
500: {
|
|
1835
|
+
headers: {
|
|
1836
|
+
[name: string]: unknown;
|
|
1837
|
+
};
|
|
1838
|
+
content: {
|
|
1839
|
+
"text/plain": string;
|
|
1840
|
+
};
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
};
|
|
1844
|
+
deleteJobLease: {
|
|
1845
|
+
parameters: {
|
|
1846
|
+
query?: never;
|
|
1847
|
+
header?: never;
|
|
1848
|
+
path: {
|
|
1849
|
+
/** @description Job lease ID */
|
|
1850
|
+
jobLeaseId: string;
|
|
1851
|
+
};
|
|
1852
|
+
cookie?: never;
|
|
1853
|
+
};
|
|
1854
|
+
requestBody?: never;
|
|
1855
|
+
responses: {
|
|
1856
|
+
/** @description Job lease deleted */
|
|
1857
|
+
204: {
|
|
1858
|
+
headers: {
|
|
1859
|
+
[name: string]: unknown;
|
|
1860
|
+
};
|
|
1861
|
+
content?: never;
|
|
1862
|
+
};
|
|
1863
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
1864
|
+
401: {
|
|
1865
|
+
headers: {
|
|
1866
|
+
[name: string]: unknown;
|
|
1867
|
+
};
|
|
1868
|
+
content: {
|
|
1869
|
+
"text/plain": string;
|
|
1870
|
+
};
|
|
1871
|
+
};
|
|
1872
|
+
/** @description Result not found */
|
|
1873
|
+
404: {
|
|
1874
|
+
headers: {
|
|
1875
|
+
[name: string]: unknown;
|
|
1876
|
+
};
|
|
1877
|
+
content: {
|
|
1878
|
+
"text/plain": string;
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
/** @description Internal server error */
|
|
1882
|
+
500: {
|
|
1883
|
+
headers: {
|
|
1884
|
+
[name: string]: unknown;
|
|
1885
|
+
};
|
|
1886
|
+
content: {
|
|
1887
|
+
"text/plain": string;
|
|
1888
|
+
};
|
|
1889
|
+
};
|
|
1890
|
+
};
|
|
1891
|
+
};
|
|
1892
|
+
renewJobLease: {
|
|
1893
|
+
parameters: {
|
|
1894
|
+
query?: never;
|
|
1895
|
+
header?: never;
|
|
1896
|
+
path: {
|
|
1897
|
+
/** @description Job lease ID */
|
|
1898
|
+
jobLeaseId: string;
|
|
1899
|
+
};
|
|
1900
|
+
cookie?: never;
|
|
1901
|
+
};
|
|
1902
|
+
requestBody: {
|
|
1903
|
+
content: {
|
|
1904
|
+
"application/json": {
|
|
1905
|
+
/** @description Machine holding the lease. Only the holder may renew. Client-asserted; the holder check is advisory in v1. */
|
|
1906
|
+
machineId: string;
|
|
1907
|
+
/** @description Requested lease extension in minutes. When omitted the server applies its default lease duration. */
|
|
1908
|
+
leaseMinutes?: number;
|
|
1909
|
+
};
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
responses: {
|
|
1913
|
+
/** @description Renew result holding the row, or null when not held by the caller */
|
|
1914
|
+
200: {
|
|
1915
|
+
headers: {
|
|
1916
|
+
[name: string]: unknown;
|
|
1917
|
+
};
|
|
1918
|
+
content: {
|
|
1919
|
+
"application/json": {
|
|
1920
|
+
/**
|
|
1921
|
+
* Job Lease Schema
|
|
1922
|
+
* @description Server-returned job lease as persisted by meshery-cloud. A job lease is a
|
|
1923
|
+
* due-work row plus time-bound claim state, shared by Layer5 Cloud and
|
|
1924
|
+
* Blowhorn: competing consumers claim, renew and release leases on due jobs,
|
|
1925
|
+
* and pause scopes gate which rows are claimable. The claim race is decided
|
|
1926
|
+
* server-side in a single statement; losing racers receive null, never an
|
|
1927
|
+
* error. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause
|
|
1928
|
+
* columns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are
|
|
1929
|
+
* refused on CRUD paths; they change only through the claim, renew, release,
|
|
1930
|
+
* pause and resume operations. `locked`, `lockedBy`, `lockedAt` and
|
|
1931
|
+
* `lockStale` are computed projections for schedule screens, not stored
|
|
1932
|
+
* columns.
|
|
1933
|
+
*/
|
|
1934
|
+
jobLease?: {
|
|
1935
|
+
/**
|
|
1936
|
+
* Format: uuid
|
|
1937
|
+
* @description Server-generated job lease ID.
|
|
1938
|
+
*/
|
|
1939
|
+
id: string;
|
|
1940
|
+
/**
|
|
1941
|
+
* Format: uuid
|
|
1942
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
1943
|
+
*/
|
|
1944
|
+
organizationId: string;
|
|
1945
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
1946
|
+
rowNumber: number;
|
|
1947
|
+
/** @description Job command to execute when the lease is held. */
|
|
1948
|
+
command: string;
|
|
1949
|
+
/** @description Profile reference the job runs against. */
|
|
1950
|
+
profile?: string;
|
|
1951
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
1952
|
+
platform?: string;
|
|
1953
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
1954
|
+
params?: Record<string, never>;
|
|
1955
|
+
/**
|
|
1956
|
+
* Format: date-time
|
|
1957
|
+
* @description Time the job becomes due.
|
|
1958
|
+
*/
|
|
1959
|
+
runAt?: string | null;
|
|
1960
|
+
/**
|
|
1961
|
+
* Format: date-time
|
|
1962
|
+
* @description Next scheduled time for recurring jobs.
|
|
1963
|
+
*/
|
|
1964
|
+
nextRunAt?: string | null;
|
|
1965
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
1966
|
+
recurrence?: string;
|
|
1967
|
+
/** @description Remaining execution attempts for the job. */
|
|
1968
|
+
retryBudget?: number;
|
|
1969
|
+
/**
|
|
1970
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
1971
|
+
* @enum {string}
|
|
1972
|
+
*/
|
|
1973
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
1974
|
+
/** @description Execution driver mode for the job. */
|
|
1975
|
+
driverMode?: string;
|
|
1976
|
+
/**
|
|
1977
|
+
* Format: date-time
|
|
1978
|
+
* @description Time of the most recent execution attempt.
|
|
1979
|
+
*/
|
|
1980
|
+
lastRunAt?: string | null;
|
|
1981
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
1982
|
+
lastError?: string;
|
|
1983
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
1984
|
+
claimedBy?: string;
|
|
1985
|
+
/**
|
|
1986
|
+
* Format: date-time
|
|
1987
|
+
* @description Time the lease was claimed. Server-managed.
|
|
1988
|
+
*/
|
|
1989
|
+
claimedAt?: string | null;
|
|
1990
|
+
/**
|
|
1991
|
+
* Format: date-time
|
|
1992
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
1993
|
+
*/
|
|
1994
|
+
leaseExpiresAt?: string | null;
|
|
1995
|
+
/**
|
|
1996
|
+
* Format: date-time
|
|
1997
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
1998
|
+
*/
|
|
1999
|
+
pausedAt?: string | null;
|
|
2000
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
2001
|
+
pausedBy?: string;
|
|
2002
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
2003
|
+
pauseReason?: string;
|
|
2004
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
2005
|
+
fingerprint: string;
|
|
2006
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
2007
|
+
locked?: boolean;
|
|
2008
|
+
/** @description Computed projection of the current lease holder. */
|
|
2009
|
+
lockedBy?: string;
|
|
2010
|
+
/**
|
|
2011
|
+
* Format: date-time
|
|
2012
|
+
* @description Computed projection of the current claim time.
|
|
2013
|
+
*/
|
|
2014
|
+
lockedAt?: string | null;
|
|
2015
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
2016
|
+
lockStale?: boolean;
|
|
2017
|
+
/**
|
|
2018
|
+
* Format: date-time
|
|
2019
|
+
* @description Timestamp of job lease creation.
|
|
2020
|
+
*/
|
|
2021
|
+
createdAt: string;
|
|
2022
|
+
/**
|
|
2023
|
+
* Format: date-time
|
|
2024
|
+
* @description Timestamp of last job lease modification.
|
|
2025
|
+
*/
|
|
2026
|
+
updatedAt: string;
|
|
2027
|
+
/**
|
|
2028
|
+
* Format: date-time
|
|
2029
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
2030
|
+
*/
|
|
2031
|
+
deletedAt?: string | null;
|
|
2032
|
+
} | null;
|
|
2033
|
+
};
|
|
2034
|
+
};
|
|
2035
|
+
};
|
|
2036
|
+
/** @description Invalid request body or request param */
|
|
2037
|
+
400: {
|
|
2038
|
+
headers: {
|
|
2039
|
+
[name: string]: unknown;
|
|
2040
|
+
};
|
|
2041
|
+
content: {
|
|
2042
|
+
"text/plain": string;
|
|
2043
|
+
};
|
|
2044
|
+
};
|
|
2045
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
2046
|
+
401: {
|
|
2047
|
+
headers: {
|
|
2048
|
+
[name: string]: unknown;
|
|
2049
|
+
};
|
|
2050
|
+
content: {
|
|
2051
|
+
"text/plain": string;
|
|
2052
|
+
};
|
|
2053
|
+
};
|
|
2054
|
+
/** @description Result not found */
|
|
2055
|
+
404: {
|
|
2056
|
+
headers: {
|
|
2057
|
+
[name: string]: unknown;
|
|
2058
|
+
};
|
|
2059
|
+
content: {
|
|
2060
|
+
"text/plain": string;
|
|
2061
|
+
};
|
|
2062
|
+
};
|
|
2063
|
+
/** @description Internal server error */
|
|
2064
|
+
500: {
|
|
2065
|
+
headers: {
|
|
2066
|
+
[name: string]: unknown;
|
|
2067
|
+
};
|
|
2068
|
+
content: {
|
|
2069
|
+
"text/plain": string;
|
|
2070
|
+
};
|
|
2071
|
+
};
|
|
2072
|
+
};
|
|
2073
|
+
};
|
|
2074
|
+
releaseJobLease: {
|
|
2075
|
+
parameters: {
|
|
2076
|
+
query?: never;
|
|
2077
|
+
header?: never;
|
|
2078
|
+
path: {
|
|
2079
|
+
/** @description Job lease ID */
|
|
2080
|
+
jobLeaseId: string;
|
|
2081
|
+
};
|
|
2082
|
+
cookie?: never;
|
|
2083
|
+
};
|
|
2084
|
+
requestBody: {
|
|
2085
|
+
content: {
|
|
2086
|
+
"application/json": {
|
|
2087
|
+
/** @description Machine holding the lease. Only the holder may release; a non-holder is refused with a 409 and nothing changes. Client-asserted; the holder check is advisory in v1. */
|
|
2088
|
+
machineId: string;
|
|
2089
|
+
/** @description Result values merged into the row on release (e.g. last run outcome and error). */
|
|
2090
|
+
values?: Record<string, never>;
|
|
2091
|
+
};
|
|
2092
|
+
};
|
|
2093
|
+
};
|
|
2094
|
+
responses: {
|
|
2095
|
+
/** @description Job lease released */
|
|
2096
|
+
200: {
|
|
2097
|
+
headers: {
|
|
2098
|
+
[name: string]: unknown;
|
|
2099
|
+
};
|
|
2100
|
+
content: {
|
|
2101
|
+
"application/json": {
|
|
2102
|
+
/**
|
|
2103
|
+
* Format: uuid
|
|
2104
|
+
* @description Server-generated job lease ID.
|
|
2105
|
+
*/
|
|
2106
|
+
id: string;
|
|
2107
|
+
/**
|
|
2108
|
+
* Format: uuid
|
|
2109
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
2110
|
+
*/
|
|
2111
|
+
organizationId: string;
|
|
2112
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
2113
|
+
rowNumber: number;
|
|
2114
|
+
/** @description Job command to execute when the lease is held. */
|
|
2115
|
+
command: string;
|
|
2116
|
+
/** @description Profile reference the job runs against. */
|
|
2117
|
+
profile?: string;
|
|
2118
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
2119
|
+
platform?: string;
|
|
2120
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
2121
|
+
params?: Record<string, never>;
|
|
2122
|
+
/**
|
|
2123
|
+
* Format: date-time
|
|
2124
|
+
* @description Time the job becomes due.
|
|
2125
|
+
*/
|
|
2126
|
+
runAt?: string | null;
|
|
2127
|
+
/**
|
|
2128
|
+
* Format: date-time
|
|
2129
|
+
* @description Next scheduled time for recurring jobs.
|
|
2130
|
+
*/
|
|
2131
|
+
nextRunAt?: string | null;
|
|
2132
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
2133
|
+
recurrence?: string;
|
|
2134
|
+
/** @description Remaining execution attempts for the job. */
|
|
2135
|
+
retryBudget?: number;
|
|
2136
|
+
/**
|
|
2137
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
2138
|
+
* @enum {string}
|
|
2139
|
+
*/
|
|
2140
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
2141
|
+
/** @description Execution driver mode for the job. */
|
|
2142
|
+
driverMode?: string;
|
|
2143
|
+
/**
|
|
2144
|
+
* Format: date-time
|
|
2145
|
+
* @description Time of the most recent execution attempt.
|
|
2146
|
+
*/
|
|
2147
|
+
lastRunAt?: string | null;
|
|
2148
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
2149
|
+
lastError?: string;
|
|
2150
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
2151
|
+
claimedBy?: string;
|
|
2152
|
+
/**
|
|
2153
|
+
* Format: date-time
|
|
2154
|
+
* @description Time the lease was claimed. Server-managed.
|
|
2155
|
+
*/
|
|
2156
|
+
claimedAt?: string | null;
|
|
2157
|
+
/**
|
|
2158
|
+
* Format: date-time
|
|
2159
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
2160
|
+
*/
|
|
2161
|
+
leaseExpiresAt?: string | null;
|
|
2162
|
+
/**
|
|
2163
|
+
* Format: date-time
|
|
2164
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
2165
|
+
*/
|
|
2166
|
+
pausedAt?: string | null;
|
|
2167
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
2168
|
+
pausedBy?: string;
|
|
2169
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
2170
|
+
pauseReason?: string;
|
|
2171
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
2172
|
+
fingerprint: string;
|
|
2173
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
2174
|
+
locked?: boolean;
|
|
2175
|
+
/** @description Computed projection of the current lease holder. */
|
|
2176
|
+
lockedBy?: string;
|
|
2177
|
+
/**
|
|
2178
|
+
* Format: date-time
|
|
2179
|
+
* @description Computed projection of the current claim time.
|
|
2180
|
+
*/
|
|
2181
|
+
lockedAt?: string | null;
|
|
2182
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
2183
|
+
lockStale?: boolean;
|
|
2184
|
+
/**
|
|
2185
|
+
* Format: date-time
|
|
2186
|
+
* @description Timestamp of job lease creation.
|
|
2187
|
+
*/
|
|
2188
|
+
createdAt: string;
|
|
2189
|
+
/**
|
|
2190
|
+
* Format: date-time
|
|
2191
|
+
* @description Timestamp of last job lease modification.
|
|
2192
|
+
*/
|
|
2193
|
+
updatedAt: string;
|
|
2194
|
+
/**
|
|
2195
|
+
* Format: date-time
|
|
2196
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
2197
|
+
*/
|
|
2198
|
+
deletedAt?: string | null;
|
|
2199
|
+
};
|
|
2200
|
+
};
|
|
2201
|
+
};
|
|
2202
|
+
/** @description Invalid request body or request param */
|
|
2203
|
+
400: {
|
|
2204
|
+
headers: {
|
|
2205
|
+
[name: string]: unknown;
|
|
2206
|
+
};
|
|
2207
|
+
content: {
|
|
2208
|
+
"text/plain": string;
|
|
2209
|
+
};
|
|
2210
|
+
};
|
|
2211
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
2212
|
+
401: {
|
|
2213
|
+
headers: {
|
|
2214
|
+
[name: string]: unknown;
|
|
2215
|
+
};
|
|
2216
|
+
content: {
|
|
2217
|
+
"text/plain": string;
|
|
2218
|
+
};
|
|
2219
|
+
};
|
|
2220
|
+
/** @description Result not found */
|
|
2221
|
+
404: {
|
|
2222
|
+
headers: {
|
|
2223
|
+
[name: string]: unknown;
|
|
2224
|
+
};
|
|
2225
|
+
content: {
|
|
2226
|
+
"text/plain": string;
|
|
2227
|
+
};
|
|
2228
|
+
};
|
|
2229
|
+
/** @description Conflict - the request conflicts with the current job lease state (stale expectedFingerprint precondition, or release by a machine that is not the current lease holder) */
|
|
2230
|
+
409: {
|
|
2231
|
+
headers: {
|
|
2232
|
+
[name: string]: unknown;
|
|
2233
|
+
};
|
|
2234
|
+
content: {
|
|
2235
|
+
"text/plain": string;
|
|
2236
|
+
};
|
|
2237
|
+
};
|
|
2238
|
+
/** @description Internal server error */
|
|
2239
|
+
500: {
|
|
2240
|
+
headers: {
|
|
2241
|
+
[name: string]: unknown;
|
|
2242
|
+
};
|
|
2243
|
+
content: {
|
|
2244
|
+
"text/plain": string;
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
2249
|
+
pauseJobLease: {
|
|
2250
|
+
parameters: {
|
|
2251
|
+
query?: never;
|
|
2252
|
+
header?: never;
|
|
2253
|
+
path: {
|
|
2254
|
+
/** @description Job lease ID */
|
|
2255
|
+
jobLeaseId: string;
|
|
2256
|
+
};
|
|
2257
|
+
cookie?: never;
|
|
2258
|
+
};
|
|
2259
|
+
requestBody?: {
|
|
2260
|
+
content: {
|
|
2261
|
+
"application/json": {
|
|
2262
|
+
/** @description Operator reason for pausing the row. */
|
|
2263
|
+
reason?: string;
|
|
2264
|
+
};
|
|
2265
|
+
};
|
|
2266
|
+
};
|
|
2267
|
+
responses: {
|
|
2268
|
+
/** @description Job lease row paused */
|
|
2269
|
+
200: {
|
|
2270
|
+
headers: {
|
|
2271
|
+
[name: string]: unknown;
|
|
2272
|
+
};
|
|
2273
|
+
content: {
|
|
2274
|
+
"application/json": {
|
|
2275
|
+
/**
|
|
2276
|
+
* Format: uuid
|
|
2277
|
+
* @description Server-generated job lease ID.
|
|
2278
|
+
*/
|
|
2279
|
+
id: string;
|
|
2280
|
+
/**
|
|
2281
|
+
* Format: uuid
|
|
2282
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
2283
|
+
*/
|
|
2284
|
+
organizationId: string;
|
|
2285
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
2286
|
+
rowNumber: number;
|
|
2287
|
+
/** @description Job command to execute when the lease is held. */
|
|
2288
|
+
command: string;
|
|
2289
|
+
/** @description Profile reference the job runs against. */
|
|
2290
|
+
profile?: string;
|
|
2291
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
2292
|
+
platform?: string;
|
|
2293
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
2294
|
+
params?: Record<string, never>;
|
|
2295
|
+
/**
|
|
2296
|
+
* Format: date-time
|
|
2297
|
+
* @description Time the job becomes due.
|
|
2298
|
+
*/
|
|
2299
|
+
runAt?: string | null;
|
|
2300
|
+
/**
|
|
2301
|
+
* Format: date-time
|
|
2302
|
+
* @description Next scheduled time for recurring jobs.
|
|
2303
|
+
*/
|
|
2304
|
+
nextRunAt?: string | null;
|
|
2305
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
2306
|
+
recurrence?: string;
|
|
2307
|
+
/** @description Remaining execution attempts for the job. */
|
|
2308
|
+
retryBudget?: number;
|
|
2309
|
+
/**
|
|
2310
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
2311
|
+
* @enum {string}
|
|
2312
|
+
*/
|
|
2313
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
2314
|
+
/** @description Execution driver mode for the job. */
|
|
2315
|
+
driverMode?: string;
|
|
2316
|
+
/**
|
|
2317
|
+
* Format: date-time
|
|
2318
|
+
* @description Time of the most recent execution attempt.
|
|
2319
|
+
*/
|
|
2320
|
+
lastRunAt?: string | null;
|
|
2321
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
2322
|
+
lastError?: string;
|
|
2323
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
2324
|
+
claimedBy?: string;
|
|
2325
|
+
/**
|
|
2326
|
+
* Format: date-time
|
|
2327
|
+
* @description Time the lease was claimed. Server-managed.
|
|
2328
|
+
*/
|
|
2329
|
+
claimedAt?: string | null;
|
|
2330
|
+
/**
|
|
2331
|
+
* Format: date-time
|
|
2332
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
2333
|
+
*/
|
|
2334
|
+
leaseExpiresAt?: string | null;
|
|
2335
|
+
/**
|
|
2336
|
+
* Format: date-time
|
|
2337
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
2338
|
+
*/
|
|
2339
|
+
pausedAt?: string | null;
|
|
2340
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
2341
|
+
pausedBy?: string;
|
|
2342
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
2343
|
+
pauseReason?: string;
|
|
2344
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
2345
|
+
fingerprint: string;
|
|
2346
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
2347
|
+
locked?: boolean;
|
|
2348
|
+
/** @description Computed projection of the current lease holder. */
|
|
2349
|
+
lockedBy?: string;
|
|
2350
|
+
/**
|
|
2351
|
+
* Format: date-time
|
|
2352
|
+
* @description Computed projection of the current claim time.
|
|
2353
|
+
*/
|
|
2354
|
+
lockedAt?: string | null;
|
|
2355
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
2356
|
+
lockStale?: boolean;
|
|
2357
|
+
/**
|
|
2358
|
+
* Format: date-time
|
|
2359
|
+
* @description Timestamp of job lease creation.
|
|
2360
|
+
*/
|
|
2361
|
+
createdAt: string;
|
|
2362
|
+
/**
|
|
2363
|
+
* Format: date-time
|
|
2364
|
+
* @description Timestamp of last job lease modification.
|
|
2365
|
+
*/
|
|
2366
|
+
updatedAt: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* Format: date-time
|
|
2369
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
2370
|
+
*/
|
|
2371
|
+
deletedAt?: string | null;
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
};
|
|
2375
|
+
/** @description Invalid request body or request param */
|
|
2376
|
+
400: {
|
|
2377
|
+
headers: {
|
|
2378
|
+
[name: string]: unknown;
|
|
2379
|
+
};
|
|
2380
|
+
content: {
|
|
2381
|
+
"text/plain": string;
|
|
2382
|
+
};
|
|
2383
|
+
};
|
|
2384
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
2385
|
+
401: {
|
|
2386
|
+
headers: {
|
|
2387
|
+
[name: string]: unknown;
|
|
2388
|
+
};
|
|
2389
|
+
content: {
|
|
2390
|
+
"text/plain": string;
|
|
2391
|
+
};
|
|
2392
|
+
};
|
|
2393
|
+
/** @description Result not found */
|
|
2394
|
+
404: {
|
|
2395
|
+
headers: {
|
|
2396
|
+
[name: string]: unknown;
|
|
2397
|
+
};
|
|
2398
|
+
content: {
|
|
2399
|
+
"text/plain": string;
|
|
2400
|
+
};
|
|
2401
|
+
};
|
|
2402
|
+
/** @description Internal server error */
|
|
2403
|
+
500: {
|
|
2404
|
+
headers: {
|
|
2405
|
+
[name: string]: unknown;
|
|
2406
|
+
};
|
|
2407
|
+
content: {
|
|
2408
|
+
"text/plain": string;
|
|
2409
|
+
};
|
|
2410
|
+
};
|
|
2411
|
+
};
|
|
2412
|
+
};
|
|
2413
|
+
resumeJobLease: {
|
|
2414
|
+
parameters: {
|
|
2415
|
+
query?: never;
|
|
2416
|
+
header?: never;
|
|
2417
|
+
path: {
|
|
2418
|
+
/** @description Job lease ID */
|
|
2419
|
+
jobLeaseId: string;
|
|
2420
|
+
};
|
|
2421
|
+
cookie?: never;
|
|
2422
|
+
};
|
|
2423
|
+
requestBody?: never;
|
|
2424
|
+
responses: {
|
|
2425
|
+
/** @description Job lease row resumed */
|
|
2426
|
+
200: {
|
|
2427
|
+
headers: {
|
|
2428
|
+
[name: string]: unknown;
|
|
2429
|
+
};
|
|
2430
|
+
content: {
|
|
2431
|
+
"application/json": {
|
|
2432
|
+
/**
|
|
2433
|
+
* Format: uuid
|
|
2434
|
+
* @description Server-generated job lease ID.
|
|
2435
|
+
*/
|
|
2436
|
+
id: string;
|
|
2437
|
+
/**
|
|
2438
|
+
* Format: uuid
|
|
2439
|
+
* @description Owning organization ID. Derived from the authenticated session, never client-settable.
|
|
2440
|
+
*/
|
|
2441
|
+
organizationId: string;
|
|
2442
|
+
/** @description Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides. */
|
|
2443
|
+
rowNumber: number;
|
|
2444
|
+
/** @description Job command to execute when the lease is held. */
|
|
2445
|
+
command: string;
|
|
2446
|
+
/** @description Profile reference the job runs against. */
|
|
2447
|
+
profile?: string;
|
|
2448
|
+
/** @description Target platform for the job (e.g. linkedin). */
|
|
2449
|
+
platform?: string;
|
|
2450
|
+
/** @description Arbitrary job parameters, stored as a JSON blob. */
|
|
2451
|
+
params?: Record<string, never>;
|
|
2452
|
+
/**
|
|
2453
|
+
* Format: date-time
|
|
2454
|
+
* @description Time the job becomes due.
|
|
2455
|
+
*/
|
|
2456
|
+
runAt?: string | null;
|
|
2457
|
+
/**
|
|
2458
|
+
* Format: date-time
|
|
2459
|
+
* @description Next scheduled time for recurring jobs.
|
|
2460
|
+
*/
|
|
2461
|
+
nextRunAt?: string | null;
|
|
2462
|
+
/** @description Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs. */
|
|
2463
|
+
recurrence?: string;
|
|
2464
|
+
/** @description Remaining execution attempts for the job. */
|
|
2465
|
+
retryBudget?: number;
|
|
2466
|
+
/**
|
|
2467
|
+
* @description Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.
|
|
2468
|
+
* @enum {string}
|
|
2469
|
+
*/
|
|
2470
|
+
status: "pending" | "leased" | "succeeded" | "failed";
|
|
2471
|
+
/** @description Execution driver mode for the job. */
|
|
2472
|
+
driverMode?: string;
|
|
2473
|
+
/**
|
|
2474
|
+
* Format: date-time
|
|
2475
|
+
* @description Time of the most recent execution attempt.
|
|
2476
|
+
*/
|
|
2477
|
+
lastRunAt?: string | null;
|
|
2478
|
+
/** @description Error reported by the most recent execution attempt. */
|
|
2479
|
+
lastError?: string;
|
|
2480
|
+
/** @description Machine holding the lease. Server-managed; set only by claim, refused on every other path. */
|
|
2481
|
+
claimedBy?: string;
|
|
2482
|
+
/**
|
|
2483
|
+
* Format: date-time
|
|
2484
|
+
* @description Time the lease was claimed. Server-managed.
|
|
2485
|
+
*/
|
|
2486
|
+
claimedAt?: string | null;
|
|
2487
|
+
/**
|
|
2488
|
+
* Format: date-time
|
|
2489
|
+
* @description Time the lease lapses when unrenewed. A holder with a null or expired lease is stale and the row returns to the pool. Server-managed; moved only by renew for the holder.
|
|
2490
|
+
*/
|
|
2491
|
+
leaseExpiresAt?: string | null;
|
|
2492
|
+
/**
|
|
2493
|
+
* Format: date-time
|
|
2494
|
+
* @description Time the row was paused. Server-managed; set only by pause, cleared by resume.
|
|
2495
|
+
*/
|
|
2496
|
+
pausedAt?: string | null;
|
|
2497
|
+
/** @description Identity that paused the row. Server-managed. */
|
|
2498
|
+
pausedBy?: string;
|
|
2499
|
+
/** @description Operator reason for pausing the row. Server-managed. */
|
|
2500
|
+
pauseReason?: string;
|
|
2501
|
+
/** @description Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates. */
|
|
2502
|
+
fingerprint: string;
|
|
2503
|
+
/** @description Computed projection. True while a live lease is held on the row. */
|
|
2504
|
+
locked?: boolean;
|
|
2505
|
+
/** @description Computed projection of the current lease holder. */
|
|
2506
|
+
lockedBy?: string;
|
|
2507
|
+
/**
|
|
2508
|
+
* Format: date-time
|
|
2509
|
+
* @description Computed projection of the current claim time.
|
|
2510
|
+
*/
|
|
2511
|
+
lockedAt?: string | null;
|
|
2512
|
+
/** @description Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable. */
|
|
2513
|
+
lockStale?: boolean;
|
|
2514
|
+
/**
|
|
2515
|
+
* Format: date-time
|
|
2516
|
+
* @description Timestamp of job lease creation.
|
|
2517
|
+
*/
|
|
2518
|
+
createdAt: string;
|
|
2519
|
+
/**
|
|
2520
|
+
* Format: date-time
|
|
2521
|
+
* @description Timestamp of last job lease modification.
|
|
2522
|
+
*/
|
|
2523
|
+
updatedAt: string;
|
|
2524
|
+
/**
|
|
2525
|
+
* Format: date-time
|
|
2526
|
+
* @description Timestamp when the job lease was soft-deleted.
|
|
2527
|
+
*/
|
|
2528
|
+
deletedAt?: string | null;
|
|
2529
|
+
};
|
|
2530
|
+
};
|
|
2531
|
+
};
|
|
2532
|
+
/** @description Invalid request body or request param */
|
|
2533
|
+
400: {
|
|
2534
|
+
headers: {
|
|
2535
|
+
[name: string]: unknown;
|
|
2536
|
+
};
|
|
2537
|
+
content: {
|
|
2538
|
+
"text/plain": string;
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
/** @description Expired JWT token used or insufficient privilege */
|
|
2542
|
+
401: {
|
|
2543
|
+
headers: {
|
|
2544
|
+
[name: string]: unknown;
|
|
2545
|
+
};
|
|
2546
|
+
content: {
|
|
2547
|
+
"text/plain": string;
|
|
2548
|
+
};
|
|
2549
|
+
};
|
|
2550
|
+
/** @description Result not found */
|
|
2551
|
+
404: {
|
|
2552
|
+
headers: {
|
|
2553
|
+
[name: string]: unknown;
|
|
2554
|
+
};
|
|
2555
|
+
content: {
|
|
2556
|
+
"text/plain": string;
|
|
2557
|
+
};
|
|
2558
|
+
};
|
|
2559
|
+
/** @description Internal server error */
|
|
2560
|
+
500: {
|
|
2561
|
+
headers: {
|
|
2562
|
+
[name: string]: unknown;
|
|
2563
|
+
};
|
|
2564
|
+
content: {
|
|
2565
|
+
"text/plain": string;
|
|
2566
|
+
};
|
|
2567
|
+
};
|
|
2568
|
+
};
|
|
2569
|
+
};
|
|
2570
|
+
}
|