@meshery/schemas 1.3.59 → 1.3.61
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 +19652 -6718
- package/dist/cloudApi.d.ts +19652 -6718
- package/dist/cloudApi.js +1 -1
- package/dist/cloudApi.mjs +1 -1
- package/dist/constructs/v1beta1/feature/Feature.d.ts +10 -10
- package/dist/constructs/v1beta1/feature/FeatureSchema.js +1 -1
- package/dist/constructs/v1beta1/feature/FeatureSchema.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/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/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/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- 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/dist/permissions.d.mts +211 -1
- package/dist/permissions.d.ts +211 -1
- package/dist/permissions.js +1 -1
- package/dist/permissions.mjs +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var e={openapi:"3.0.0",info:{title:"JobLease",description:`OpenAPI schema for shared job leases - time-bound claims on due jobs
|
|
2
|
+
with pause scopes, used by Layer5 Cloud and Blowhorn alike. Competing
|
|
3
|
+
consumers claim due, unheld, unpaused rows; a dead holder's row returns
|
|
4
|
+
to the pool when its lease lapses. The claim race is decided server-side
|
|
5
|
+
in a single statement: losing racers receive null, never an error.
|
|
6
|
+
Machine-local pause stays on the machine and is never sent; the
|
|
7
|
+
organization-wide pause and per-row pause live here.
|
|
8
|
+
`,version:"v1beta3",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},security:[{jwt:[]}],tags:[{name:"jobLeases",description:"Operations related to shared job leases."}],paths:{"/api/job-leases":{get:{"x-internal":["cloud"],tags:["jobLeases"],summary:"List job leases",operationId:"listJobLeases",description:"Returns a paginated list of job leases in the organization of the\nauthenticated session, optionally filtered by status. Each entry projects the computed\n`locked`, `lockedBy`, `lockedAt` and `lockStale` keys.\n",parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page (canonical camelCase form).",schema:{type:"integer",minimum:1}},{name:"pagesize",in:"query",description:"Number of items per page. Deprecated alias of pageSize;\ncanonical `pageSize` wins when both are present.\n",deprecated:true,schema:{type:"integer",minimum:1}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",required:false,description:"Filter by job status (pending, leased, succeeded, failed).",schema:{type:"string"}}],responses:{200:{description:"Job leases page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of job leases.",properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},pageSize:{type:"integer",description:"Number of items per page.",minimum:1},totalCount:{type:"integer",description:"Total number of items available.",minimum:0},jobLeases:{type:"array",items:{"x-go-type":"JobLease",$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}},description:"Job leases included on this page of results."}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Create job lease",operationId:"createJobLease",description:`Creates a new job lease definition. Claim columns and pause columns
|
|
9
|
+
are server-managed and refused here; any supplied values are
|
|
10
|
+
ignored. The \`expectedFingerprint\` precondition is ignored on
|
|
11
|
+
create.
|
|
12
|
+
`,requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:`Payload for creating or updating a job lease. Contains only
|
|
13
|
+
client-settable job definition fields; the claim columns, the
|
|
14
|
+
pause columns, the server-computed \`fingerprint\` and the
|
|
15
|
+
server-generated timestamps are intentionally excluded.
|
|
16
|
+
`,required:["rowNumber","command"],properties:{id:{description:"Existing job lease ID for updates; omit on create.","x-oapi-codegen-extra-tags":{json:"id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set.",minimum:0},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true},runAt:{type:"string",format:"date-time",description:"Time the job becomes due."},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs."},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255},expectedFingerprint:{type:"string",description:`Optimistic-concurrency precondition for update: when supplied,
|
|
17
|
+
the update applies only when the stored fingerprint still
|
|
18
|
+
matches, and is refused with a 409 otherwise. Ignored on
|
|
19
|
+
create.
|
|
20
|
+
`,maxLength:255}}}}}},responses:{201:{description:"Job lease created",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/job-leases/claim":{post:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Claim a due job lease",operationId:"claimJobLease",description:`Hands one due, unheld, unpaused row to the machine named by
|
|
21
|
+
\`machineId\` in a single server-side statement, recording it as
|
|
22
|
+
\`claimedBy\`. Answers the row, or null when no row
|
|
23
|
+
qualifies - a lost race is null, never an error. \`force\` drops only
|
|
24
|
+
the due test for trigger-now; a live foreign lease still refuses.
|
|
25
|
+
\`ignorePause\` is the single operator override over pause scopes.
|
|
26
|
+
The holder identity is client-asserted: in v1 the holder check on
|
|
27
|
+
claim, renew and release is advisory, not an authorization
|
|
28
|
+
boundary, and calls made with purpose-scoped tokens are audited.
|
|
29
|
+
`,requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Claim filter for handing one due row to the caller.",required:["machineId"],properties:{machineId:{type:"string",description:"Machine taking the lease, recorded as `claimedBy`. Client-asserted; the holder check is advisory in v1.",minLength:1,maxLength:255},rowNumber:{type:"integer",description:"Claim only the row with this row number.",minimum:0},force:{type:"boolean",description:"Trigger-now override that drops only the due test; a live foreign lease still refuses."},ignorePause:{type:"boolean",description:"Single operator override over the organization-wide and per-row pause scopes."},leaseMinutes:{type:"integer",description:"Requested lease duration in minutes. When omitted the server applies its default lease duration.",minimum:1}}}}}},responses:{200:{description:"Claim result holding the row, or null when nothing was claimed",content:{"application/json":{schema:{type:"object",description:`Claim and renew outcome. \`jobLease\` carries the row, or null when
|
|
30
|
+
nothing was claimed (lost race) or the row is not held by the
|
|
31
|
+
caller (renew) - never an error.
|
|
32
|
+
`,properties:{jobLease:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}},nullable:true,"x-go-type":"JobLease","x-oapi-codegen-extra-tags":{json:"jobLease",yaml:"jobLease"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/job-leases/schedule-pause":{get:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Get organization schedule pause",operationId:"getSchedulePause",description:`Returns the organization-wide pause row for the organization of the
|
|
33
|
+
authenticated session. A 404 is the ordinary answer when no pause is
|
|
34
|
+
set, and is not an error condition.
|
|
35
|
+
`,responses:{200:{description:"Organization schedule pause",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Pause Schema",description:`Server-returned organization-wide schedule pause. While a pause row
|
|
36
|
+
exists for an organization, none of its job lease rows is claimed unless
|
|
37
|
+
the claim carries the operator override. Absence of a row means
|
|
38
|
+
unpaused; there is at most one live row per organization.
|
|
39
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","createdAt","updatedAt"],properties:{id:{description:"Server-generated schedule pause ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Organization the pause applies to. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},reason:{type:"string",description:"Operator reason for pausing the organization schedule.","x-oapi-codegen-extra-tags":{db:"reason"},"x-order":3},pausedBy:{type:"string",description:"Identity that set the pause. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":4},createdAt:{description:"Timestamp of schedule pause creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":5,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule pause modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":6,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Set organization schedule pause",operationId:"setSchedulePause",description:`Sets the organization-wide pause for the organization of the
|
|
40
|
+
authenticated session. While set, no row in the organization is
|
|
41
|
+
claimed unless the claim carries \`ignorePause\`.
|
|
42
|
+
`,requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:`Payload for setting the organization-wide schedule pause. The
|
|
43
|
+
pausing identity and timestamp are server-managed.
|
|
44
|
+
`,properties:{reason:{type:"string",description:"Operator reason for pausing the organization schedule."}}}}}},responses:{200:{description:"Organization schedule pause set",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Pause Schema",description:`Server-returned organization-wide schedule pause. While a pause row
|
|
45
|
+
exists for an organization, none of its job lease rows is claimed unless
|
|
46
|
+
the claim carries the operator override. Absence of a row means
|
|
47
|
+
unpaused; there is at most one live row per organization.
|
|
48
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","createdAt","updatedAt"],properties:{id:{description:"Server-generated schedule pause ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Organization the pause applies to. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},reason:{type:"string",description:"Operator reason for pausing the organization schedule.","x-oapi-codegen-extra-tags":{db:"reason"},"x-order":3},pausedBy:{type:"string",description:"Identity that set the pause. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":4},createdAt:{description:"Timestamp of schedule pause creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":5,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule pause modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":6,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Clear organization schedule pause",operationId:"clearSchedulePause",description:`Clears the organization-wide pause for the organization of the
|
|
49
|
+
authenticated session so due rows become claimable again.
|
|
50
|
+
`,responses:{204:{description:"Organization schedule pause cleared"},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/job-leases/{jobLeaseId}":{get:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Get job lease by ID",operationId:"getJobLease",parameters:[{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Job lease response",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Update job lease",operationId:"updateJobLease",description:`Updates the job definition. Claim columns and pause columns are
|
|
51
|
+
refused here; use the renew, release, pause and resume operations
|
|
52
|
+
for those. When \`expectedFingerprint\` is supplied and stale, the
|
|
53
|
+
update is refused with a 409.
|
|
54
|
+
`,parameters:[{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:`Payload for creating or updating a job lease. Contains only
|
|
55
|
+
client-settable job definition fields; the claim columns, the
|
|
56
|
+
pause columns, the server-computed \`fingerprint\` and the
|
|
57
|
+
server-generated timestamps are intentionally excluded.
|
|
58
|
+
`,required:["rowNumber","command"],properties:{id:{description:"Existing job lease ID for updates; omit on create.","x-oapi-codegen-extra-tags":{json:"id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set.",minimum:0},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true},runAt:{type:"string",format:"date-time",description:"Time the job becomes due."},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs."},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255},expectedFingerprint:{type:"string",description:`Optimistic-concurrency precondition for update: when supplied,
|
|
59
|
+
the update applies only when the stored fingerprint still
|
|
60
|
+
matches, and is refused with a 409 otherwise. Ignored on
|
|
61
|
+
create.
|
|
62
|
+
`,maxLength:255}}}}}},responses:{200:{description:"Job lease updated",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{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)",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Delete job lease",operationId:"deleteJobLease",description:"Soft-deletes the job lease definition.",parameters:[{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{204:{description:"Job lease deleted"},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/job-leases/{jobLeaseId}/renew":{post:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Renew a held job lease",operationId:"renewJobLease",description:"Holder-only liveness: moves only `leaseExpiresAt` for the holder\nnamed by `machineId`. Answers the row, or null when the row is not\nheld by that holder - never taken back. `machineId` is\nclient-asserted, so the holder check is advisory in v1; calls made\nwith purpose-scoped tokens are audited.\n",parameters:[{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Holder-only liveness renewal.",required:["machineId"],properties:{machineId:{type:"string",description:"Machine holding the lease. Only the holder may renew. Client-asserted; the holder check is advisory in v1.",minLength:1,maxLength:255},leaseMinutes:{type:"integer",description:"Requested lease extension in minutes. When omitted the server applies its default lease duration.",minimum:1}}}}}},responses:{200:{description:"Renew result holding the row, or null when not held by the caller",content:{"application/json":{schema:{type:"object",description:`Claim and renew outcome. \`jobLease\` carries the row, or null when
|
|
63
|
+
nothing was claimed (lost race) or the row is not held by the
|
|
64
|
+
caller (renew) - never an error.
|
|
65
|
+
`,properties:{jobLease:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}},nullable:true,"x-go-type":"JobLease","x-oapi-codegen-extra-tags":{json:"jobLease",yaml:"jobLease"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/job-leases/{jobLeaseId}/release":{post:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Release a held job lease",operationId:"releaseJobLease",description:"Clears the claim (`claimedBy`, `claimedAt`, `leaseExpiresAt`) for\nthe holder named by `machineId` and merges the supplied result\nvalues. Claim and identity keys are refused here. Holder-only: when\n`machineId` is not the current holder the release is refused with a\n409 and nothing changes - the claim columns and row values are left\nuntouched, so a live foreign claim is never cleared. A holder whose\nlease lapsed and was re-claimed by another machine therefore gets a\n409 when it finishes late. `machineId` is client-asserted, so the\nholder check is advisory in v1; calls made with purpose-scoped\ntokens are audited.\n",parameters:[{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Release payload clearing the claim and landing result values.",required:["machineId"],properties:{machineId:{type:"string",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.",minLength:1,maxLength:255},values:{type:"object",description:"Result values merged into the row on release (e.g. last run outcome and error).","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true}}}}}},responses:{200:{description:"Job lease released",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{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)",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/job-leases/{jobLeaseId}/pause":{post:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Pause a job lease row",operationId:"pauseJobLease",description:"Sets the per-row pause. A paused row is claimed only by claims\ncarrying `ignorePause`.\n",parameters:[{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",description:"Per-row pause payload.",properties:{reason:{type:"string",description:"Operator reason for pausing the row."}}}}}},responses:{200:{description:"Job lease row paused",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/job-leases/{jobLeaseId}/resume":{post:{"x-internal":["cloud"],tags:["jobLeases"],summary:"Resume a paused job lease row",operationId:"resumeJobLease",description:"Clears the per-row pause so the row becomes claimable again.",parameters:[{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Job lease row resumed",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{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)",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{jobLeaseId:{name:"jobLeaseId",in:"path",description:"Job lease ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of items per page (canonical camelCase form).",schema:{type:"integer",minimum:1}},pagesize:{name:"pagesize",in:"query",description:"Number of items per page. Deprecated alias of pageSize;\ncanonical `pageSize` wins when both are present.\n",deprecated:true,schema:{type:"integer",minimum:1}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{JobLease:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}},SchedulePause:{$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Pause Schema",description:`Server-returned organization-wide schedule pause. While a pause row
|
|
66
|
+
exists for an organization, none of its job lease rows is claimed unless
|
|
67
|
+
the claim carries the operator override. Absence of a row means
|
|
68
|
+
unpaused; there is at most one live row per organization.
|
|
69
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","createdAt","updatedAt"],properties:{id:{description:"Server-generated schedule pause ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Organization the pause applies to. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},reason:{type:"string",description:"Operator reason for pausing the organization schedule.","x-oapi-codegen-extra-tags":{db:"reason"},"x-order":3},pausedBy:{type:"string",description:"Identity that set the pause. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":4},createdAt:{description:"Timestamp of schedule pause creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":5,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule pause modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":6,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},JobLeasePayload:{type:"object",description:`Payload for creating or updating a job lease. Contains only
|
|
70
|
+
client-settable job definition fields; the claim columns, the
|
|
71
|
+
pause columns, the server-computed \`fingerprint\` and the
|
|
72
|
+
server-generated timestamps are intentionally excluded.
|
|
73
|
+
`,required:["rowNumber","command"],properties:{id:{description:"Existing job lease ID for updates; omit on create.","x-oapi-codegen-extra-tags":{json:"id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set.",minimum:0},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true},runAt:{type:"string",format:"date-time",description:"Time the job becomes due."},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs."},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255},expectedFingerprint:{type:"string",description:`Optimistic-concurrency precondition for update: when supplied,
|
|
74
|
+
the update applies only when the stored fingerprint still
|
|
75
|
+
matches, and is refused with a 409 otherwise. Ignored on
|
|
76
|
+
create.
|
|
77
|
+
`,maxLength:255}}},SchedulePausePayload:{type:"object",description:`Payload for setting the organization-wide schedule pause. The
|
|
78
|
+
pausing identity and timestamp are server-managed.
|
|
79
|
+
`,properties:{reason:{type:"string",description:"Operator reason for pausing the organization schedule."}}},JobLeaseClaimRequest:{type:"object",description:"Claim filter for handing one due row to the caller.",required:["machineId"],properties:{machineId:{type:"string",description:"Machine taking the lease, recorded as `claimedBy`. Client-asserted; the holder check is advisory in v1.",minLength:1,maxLength:255},rowNumber:{type:"integer",description:"Claim only the row with this row number.",minimum:0},force:{type:"boolean",description:"Trigger-now override that drops only the due test; a live foreign lease still refuses."},ignorePause:{type:"boolean",description:"Single operator override over the organization-wide and per-row pause scopes."},leaseMinutes:{type:"integer",description:"Requested lease duration in minutes. When omitted the server applies its default lease duration.",minimum:1}}},JobLeaseRenewRequest:{type:"object",description:"Holder-only liveness renewal.",required:["machineId"],properties:{machineId:{type:"string",description:"Machine holding the lease. Only the holder may renew. Client-asserted; the holder check is advisory in v1.",minLength:1,maxLength:255},leaseMinutes:{type:"integer",description:"Requested lease extension in minutes. When omitted the server applies its default lease duration.",minimum:1}}},JobLeaseReleaseRequest:{type:"object",description:"Release payload clearing the claim and landing result values.",required:["machineId"],properties:{machineId:{type:"string",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.",minLength:1,maxLength:255},values:{type:"object",description:"Result values merged into the row on release (e.g. last run outcome and error).","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true}}},JobLeasePauseRequest:{type:"object",description:"Per-row pause payload.",properties:{reason:{type:"string",description:"Operator reason for pausing the row."}}},JobLeaseActionResponse:{type:"object",description:`Claim and renew outcome. \`jobLease\` carries the row, or null when
|
|
80
|
+
nothing was claimed (lost race) or the row is not held by the
|
|
81
|
+
caller (renew) - never an error.
|
|
82
|
+
`,properties:{jobLease:{$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}},nullable:true,"x-go-type":"JobLease","x-oapi-codegen-extra-tags":{json:"jobLease",yaml:"jobLease"}}}},JobLeasePage:{type:"object",description:"Paginated collection of job leases.",properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},pageSize:{type:"integer",description:"Number of items per page.",minimum:1},totalCount:{type:"integer",description:"Total number of items available.",minimum:0},jobLeases:{type:"array",items:{"x-go-type":"JobLease",$schema:"http://json-schema.org/draft-07/schema#",title:"Job Lease Schema",description:"Server-returned job lease as persisted by meshery-cloud. A job lease is a\ndue-work row plus time-bound claim state, shared by Layer5 Cloud and\nBlowhorn: competing consumers claim, renew and release leases on due jobs,\nand pause scopes gate which rows are claimable. The claim race is decided\nserver-side in a single statement; losing racers receive null, never an\nerror. Claim columns (`claimedBy`, `claimedAt`, `leaseExpiresAt`) and pause\ncolumns (`pausedAt`, `pausedBy`, `pauseReason`) are server-managed and are\nrefused on CRUD paths; they change only through the claim, renew, release,\npause and resume operations. `locked`, `lockedBy`, `lockedAt` and\n`lockStale` are computed projections for schedule screens, not stored\ncolumns.\n",type:"object",additionalProperties:false,required:["id","organizationId","rowNumber","command","status","fingerprint","createdAt","updatedAt"],properties:{id:{description:"Server-generated job lease ID.","x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the authenticated session, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},rowNumber:{type:"integer",description:"Targetable row number within the organization's job set. Used for per-row claims and trigger-now overrides.",minimum:0,"x-oapi-codegen-extra-tags":{db:"row_number"},"x-order":3},command:{type:"string",description:"Job command to execute when the lease is held.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"command"},"x-order":4},profile:{type:"string",description:"Profile reference the job runs against.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"profile"},"x-order":5},platform:{type:"string",description:"Target platform for the job (e.g. linkedin).",maxLength:255,"x-oapi-codegen-extra-tags":{db:"platform"},"x-order":6},params:{type:"object",description:"Arbitrary job parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":7},runAt:{type:"string",format:"date-time",description:"Time the job becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":8},nextRunAt:{type:"string",format:"date-time",description:"Next scheduled time for recurring jobs.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run_at"},"x-order":9},recurrence:{type:"string",description:"Recurrence rule (cron expression) for repeating jobs. Absent for one-shot jobs.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":10},retryBudget:{type:"integer",description:"Remaining execution attempts for the job.",minimum:0,"x-oapi-codegen-extra-tags":{db:"retry_budget"},"x-order":11},status:{type:"string",description:"Lifecycle status of the job. Managed server-side through the claim, renew, release, pause and resume operations.",enum:["pending","leased","succeeded","failed"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":12},driverMode:{type:"string",description:"Execution driver mode for the job.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"driver_mode"},"x-order":13},lastRunAt:{type:"string",format:"date-time",description:"Time of the most recent execution attempt.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run_at"},"x-order":14},lastError:{type:"string",description:"Error reported by the most recent execution attempt.","x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":15},claimedBy:{type:"string",description:"Machine holding the lease. Server-managed; set only by claim, refused on every other path.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":16},claimedAt:{type:"string",format:"date-time",description:"Time the lease was claimed. Server-managed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":17},leaseExpiresAt:{type:"string",format:"date-time",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.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"lease_expires_at"},"x-order":18},pausedAt:{type:"string",format:"date-time",description:"Time the row was paused. Server-managed; set only by pause, cleared by resume.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":19},pausedBy:{type:"string",description:"Identity that paused the row. Server-managed.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"paused_by"},"x-order":20},pauseReason:{type:"string",description:"Operator reason for pausing the row. Server-managed.","x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":21},fingerprint:{type:"string",description:"Hex digest over the canonical job values, typed so null, empty string, zero and false differ. Server-computed; used for conditional updates.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"fingerprint"},"x-order":22},locked:{type:"boolean",description:"Computed projection. True while a live lease is held on the row.","x-order":23},lockedBy:{type:"string",description:"Computed projection of the current lease holder.",maxLength:255,"x-order":24},lockedAt:{type:"string",format:"date-time",description:"Computed projection of the current claim time.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-order":25},lockStale:{type:"boolean",description:"Computed projection. True when the row carries a holder whose lease is null or expired, marking the row reclaimable.","x-order":26},createdAt:{description:"Timestamp of job lease creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":27,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last job lease modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":28,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the job lease was soft-deleted.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt,omitempty"},"x-order":29}}},description:"Job leases included on this page of results."}}}}}},t=e;
|
|
83
|
+
export{t as default};
|
|
@@ -220,7 +220,7 @@ export interface components {
|
|
|
220
220
|
isOauth: boolean;
|
|
221
221
|
/** @description Name of the token. */
|
|
222
222
|
name: string;
|
|
223
|
-
/** @description
|
|
223
|
+
/** @description Token purpose. Tokens are minted with this purpose on generate, and listed tokens are filtered to this purpose on list (e.g. blowhorn device tokens). */
|
|
224
224
|
purpose: string;
|
|
225
225
|
};
|
|
226
226
|
requestBodies: never;
|
|
@@ -234,6 +234,8 @@ export interface operations {
|
|
|
234
234
|
query?: {
|
|
235
235
|
/** @description Whether to retrieve OAuth-backed sessions instead of API tokens. */
|
|
236
236
|
isOauth?: boolean;
|
|
237
|
+
/** @description Token purpose. Tokens are minted with this purpose on generate, and listed tokens are filtered to this purpose on list (e.g. blowhorn device tokens). */
|
|
238
|
+
purpose?: string;
|
|
237
239
|
/** @description Get responses by page */
|
|
238
240
|
page?: number;
|
|
239
241
|
/** @description Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`. */
|
|
@@ -330,7 +332,7 @@ export interface operations {
|
|
|
330
332
|
query: {
|
|
331
333
|
/** @description Name of the token. */
|
|
332
334
|
name: string;
|
|
333
|
-
/** @description
|
|
335
|
+
/** @description Token purpose. Tokens are minted with this purpose on generate, and listed tokens are filtered to this purpose on list (e.g. blowhorn device tokens). */
|
|
334
336
|
purpose?: string;
|
|
335
337
|
};
|
|
336
338
|
header?: never;
|