@meshery/schemas 1.3.91 → 1.3.93
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/dist/cloudApi.d.mts +71 -64
- package/dist/cloudApi.d.ts +71 -64
- package/dist/constructs/v1beta1/organization_smtp/OrganizationSmtp.d.ts +3 -3
- 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 +9 -9
- package/dist/constructs/v1beta1/registry/RegistrySchema.js +3 -3
- package/dist/constructs/v1beta1/registry/RegistrySchema.mjs +3 -3
- package/dist/constructs/v1beta3/connection/Connection.d.ts +27 -27
- package/dist/constructs/v1beta3/connection/ConnectionSchema.js +3 -3
- package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +3 -3
- package/dist/constructs/v1beta3/environment/Environment.d.ts +29 -29
- package/dist/constructs/v1beta3/environment/EnvironmentSchema.js +1 -1
- package/dist/constructs/v1beta3/environment/EnvironmentSchema.mjs +1 -1
- package/dist/constructs/v1beta3/ledger/Ledger.d.ts +74 -35
- package/dist/constructs/v1beta3/ledger/LedgerSchema.js +20 -16
- package/dist/constructs/v1beta3/ledger/LedgerSchema.mjs +20 -16
- package/dist/constructs/v1beta3/profile/Profile.d.ts +3 -3
- package/dist/constructs/v1beta3/profile/ProfileSchema.js +1 -1
- package/dist/constructs/v1beta3/profile/ProfileSchema.mjs +1 -1
- package/dist/constructs/v1beta3/workspace/Workspace.d.ts +3 -3
- package/dist/constructs/v1beta3/workspace/WorkspaceSchema.js +1 -1
- package/dist/constructs/v1beta3/workspace/WorkspaceSchema.mjs +1 -1
- package/dist/mesheryApi.d.mts +44 -44
- package/dist/mesheryApi.d.ts +44 -44
- package/package.json +1 -1
|
@@ -2,23 +2,27 @@ var e={openapi:"3.0.0",info:{title:"Ledger",description:`OpenAPI schema for orga
|
|
|
2
2
|
entries that several workers share, so work done once (a record processed,
|
|
3
3
|
a contact reached) is never done twice. Recording is idempotent on
|
|
4
4
|
(ledger, entryKey), and claim-if-absent hands a key to exactly one
|
|
5
|
-
|
|
5
|
+
claiming connection atomically. Ledgers belong to the organization of the
|
|
6
6
|
authenticated session; any client-supplied organization is ignored.
|
|
7
7
|
|
|
8
8
|
Authorization: ledgers are organization-shared bookkeeping. Any member of
|
|
9
9
|
the organization may record, claim, list, read and delete entries in that
|
|
10
|
-
organization's ledgers.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`,
|
|
17
|
-
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},
|
|
18
|
-
`,
|
|
19
|
-
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},
|
|
20
|
-
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},
|
|
21
|
-
`,
|
|
22
|
-
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},
|
|
23
|
-
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},
|
|
24
|
-
`,required:["entryKey"],properties:{entryKey:{type:"string",description:"Key within the ledger.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},value:{type:"object",description:"Entry value, stored as a JSON
|
|
10
|
+
organization's ledgers. A claim names the connection that takes the key
|
|
11
|
+
(\`connectionId\`), which must be the caller's own live connection in the
|
|
12
|
+
session organization; any other connection, including one that does not
|
|
13
|
+
exist, is \`404\`, the same answer as a missing ledger. A delete never
|
|
14
|
+
checks who holds the key. A key is scoped to (organization, ledger), so an
|
|
15
|
+
entry in another ledger is \`404\`.
|
|
16
|
+
`,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:"ledgers",description:"Operations related to organization ledgers and their entries."}],paths:{"/api/ledgers/{ledger}/entries":{get:{"x-internal":["cloud"],tags:["ledgers"],summary:"List ledger entries",operationId:"listLedgerEntries",description:"Returns a paginated list of the entries in the ledger, in the organization of the authenticated session. `search` matches entry keys that contain the term, ignoring case. `order` sorts by `entryKey`, `createdAt` or `updatedAt` (`asc` or `desc`); the default is `entryKey asc`. A ledger with no entries returns an empty page, and a caller who is not a member of the session organization gets `404`.\n",parameters:[{name:"ledger",in:"path",description:"Name of the ledger, for example `processed-profiles`.",required:true,schema:{type:"string",pattern:"^[a-z0-9][a-z0-9._-]*$",minLength:1,maxLength:255}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",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"}}],responses:{200:{description:"Ledger entries page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of ledger entries.",required:["page","pageSize","totalCount","ledgerEntries"],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},ledgerEntries:{type:"array",items:{"x-go-type":"LedgerEntry",$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
17
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Ledger entries included on this page of results."}}}}}},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"}}}}}},post:{"x-internal":["cloud"],tags:["ledgers"],summary:"Record a ledger entry",operationId:"recordLedgerEntry",description:"Records `entryKey` in the ledger. A new key creates the entry and returns `201`. An existing key never creates a second entry and is not changed: the stored entry is returned unchanged with `200`, and the supplied `value` is ignored. Recording never changes `claimedByConnectionId` or `claimedAt`.\n",parameters:[{name:"ledger",in:"path",description:"Name of the ledger, for example `processed-profiles`.",required:true,schema:{type:"string",pattern:"^[a-z0-9][a-z0-9._-]*$",minLength:1,maxLength:255}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:`Payload for recording a ledger entry. The ledger comes from the path and the organization from the session; claim fields and timestamps are server-owned.
|
|
18
|
+
`,required:["entryKey"],properties:{entryKey:{type:"string",description:"Key within the ledger.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},value:{type:"object",description:"Entry value, stored as a JSON object.","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:"The key was already recorded; the stored entry, unchanged",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
19
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},201:{description:"The key was recorded",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
20
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,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"}}}}}}},"/api/ledgers/{ledger}/claims":{post:{"x-internal":["cloud"],tags:["ledgers"],summary:"Claim a ledger key if absent",operationId:"claimLedgerEntry",description:"Atomically gives `entryKey` to the connection `connectionId`, which must be the caller's own live connection in the session organization; any other connection is `404`. When the key is not in the ledger, the entry is created already claimed and returned with `201`. When it is recorded but unclaimed, it is claimed and returned with `200`. When `connectionId` already holds it, the call is a replay and returns the entry with `200`. When another live connection holds it, the call is refused with `409` and nothing changes. A claim ends when the entry is deleted or when the holding connection is deleted; a key whose holder was deleted can be claimed again.\n",parameters:[{name:"ledger",in:"path",description:"Name of the ledger, for example `processed-profiles`.",required:true,schema:{type:"string",pattern:"^[a-z0-9][a-z0-9._-]*$",minLength:1,maxLength:255}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Claim-if-absent payload giving a key to one connection.",required:["entryKey","connectionId"],properties:{entryKey:{type:"string",description:"Key to claim.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},connectionId:{description:`ID of the connection taking the key: the caller's own live connection in the session organization (for example the connection a desktop client registered for its machine).
|
|
21
|
+
`,"x-go-name":"ConnectionID","x-go-type-skip-optional-pointer":true,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},value:{type:"object",description:"Value stored when the claim creates the entry; ignored when the entry already exists.","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:"The caller's connection now holds the existing entry",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
22
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},201:{description:"The key was absent; it was recorded and claimed",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
23
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,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"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - another connection holds the ledger entry",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/ledgers/{ledger}/entries/{entryKey}":{get:{"x-internal":["cloud"],tags:["ledgers"],summary:"Get a ledger entry",operationId:"getLedgerEntry",description:"Returns the entry recorded under `entryKey` in the ledger, or `404` when the key is not in this ledger.",parameters:[{name:"ledger",in:"path",description:"Name of the ledger, for example `processed-profiles`.",required:true,schema:{type:"string",pattern:"^[a-z0-9][a-z0-9._-]*$",minLength:1,maxLength:255}},{name:"entryKey",in:"path",description:"Key within the ledger. URL-encode keys that contain reserved characters such as `/`.",required:true,schema:{type:"string",minLength:1,maxLength:1024,not:{enum:[".",".."]}}}],responses:{200:{description:"Ledger entry",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
24
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,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"}}}}}},delete:{"x-internal":["cloud"],tags:["ledgers"],summary:"Delete a ledger entry",operationId:"deleteLedgerEntry",description:"Removes the entry, and with it any claim, so its key can be recorded or claimed again. Returns `404` when the key is not in this ledger.",parameters:[{name:"ledger",in:"path",description:"Name of the ledger, for example `processed-profiles`.",required:true,schema:{type:"string",pattern:"^[a-z0-9][a-z0-9._-]*$",minLength:1,maxLength:255}},{name:"entryKey",in:"path",description:"Key within the ledger. URL-encode keys that contain reserved characters such as `/`.",required:true,schema:{type:"string",minLength:1,maxLength:1024,not:{enum:[".",".."]}}}],responses:{204:{description:"Ledger entry 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"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",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 - another connection holds the ledger entry",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",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"}},ledger:{name:"ledger",in:"path",description:"Name of the ledger, for example `processed-profiles`.",required:true,schema:{type:"string",pattern:"^[a-z0-9][a-z0-9._-]*$",minLength:1,maxLength:255}},entryKey:{name:"entryKey",in:"path",description:"Key within the ledger. URL-encode keys that contain reserved characters such as `/`.",required:true,schema:{type:"string",minLength:1,maxLength:1024,not:{enum:[".",".."]}}}},schemas:{LedgerEntry:{$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
25
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},LedgerEntryPage:{type:"object",description:"Paginated collection of ledger entries.",required:["page","pageSize","totalCount","ledgerEntries"],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},ledgerEntries:{type:"array",items:{"x-go-type":"LedgerEntry",$schema:"http://json-schema.org/draft-07/schema#",title:"Ledger Entry Schema",description:`Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
|
|
26
|
+
`,type:"object",additionalProperties:false,required:["id","organizationId","ledger","entryKey","createdAt","updatedAt"],properties:{id:{description:"Server-generated ledger entry 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"}},ledger:{type:"string",description:"Name of the ledger (the idempotent set) the entry belongs to.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"ledger"},"x-order":3},entryKey:{type:"string",description:"Key within the ledger. Unique per (organization, ledger).",minLength:1,maxLength:1024,"x-go-name":"EntryKey","x-oapi-codegen-extra-tags":{db:"entry_key"},"x-order":4},value:{type:"object",description:"Entry value, 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:"value"},"x-order":5},claimedByConnectionId:{description:"ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.\n","x-go-name":"ClaimedByConnectionID","x-oapi-codegen-extra-tags":{db:"claimed_by_connection_id",json:"claimedByConnectionId,omitempty"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},claimedAt:{type:"string",format:"date-time",description:"Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.",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":7},createdAt:{description:"Timestamp of ledger entry creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last ledger entry modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Ledger entries included on this page of results."}}},LedgerEntryPayload:{type:"object",description:`Payload for recording a ledger entry. The ledger comes from the path and the organization from the session; claim fields and timestamps are server-owned.
|
|
27
|
+
`,required:["entryKey"],properties:{entryKey:{type:"string",description:"Key within the ledger.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},value:{type:"object",description:"Entry value, stored as a JSON object.","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}}},LedgerClaimPayload:{type:"object",description:"Claim-if-absent payload giving a key to one connection.",required:["entryKey","connectionId"],properties:{entryKey:{type:"string",description:"Key to claim.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},connectionId:{description:`ID of the connection taking the key: the caller's own live connection in the session organization (for example the connection a desktop client registered for its machine).
|
|
28
|
+
`,"x-go-name":"ConnectionID","x-go-type-skip-optional-pointer":true,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},value:{type:"object",description:"Value stored when the claim creates the entry; ignored when the entry already exists.","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}}}}}},t=e;export{t as default};
|
|
@@ -1383,18 +1383,18 @@ export interface operations {
|
|
|
1383
1383
|
*/
|
|
1384
1384
|
deletedAt?: string | null;
|
|
1385
1385
|
/**
|
|
1386
|
-
* @description What the environment exists for. `user` is an ordinary environment that people create to logically group Connections and their Credentials. `administrative` designates an environment the platform itself provisions to hold organization-level configuration, and which resolvers of that configuration therefore trust.
|
|
1386
|
+
* @description What the environment exists for. `user` is an ordinary environment that people create to logically group Connections and their Credentials. `administrative` designates an environment the platform itself provisions to hold organization-level configuration, and which resolvers of that configuration therefore trust. Profiles are not environments: they are their own construct (`schemas/constructs/v1beta3/profile`, served at `/api/profiles` and assigned to workspaces under `/api/workspaces/{workspaceId}/profiles`).
|
|
1387
1387
|
*
|
|
1388
1388
|
* Absent means `user`. Nothing may read an unset or unrecognised value as administrative: test for the administrative value explicitly rather than for "not user", so the property fails closed.
|
|
1389
1389
|
*
|
|
1390
1390
|
* At most one live environment per organization may carry any single privileged purpose - `administrative`, and each privileged value a later version adds. Name those values explicitly wherever the rule is enforced, including the database index predicate: a "not `user`" test also matches the empty value that unmigrated rows and un-normalised writes read back as, which means ordinary. A resolver that selects an environment by purpose MUST fail closed when more than one live row matches: return an error rather than whichever row the database happened to return first.
|
|
1391
1391
|
*
|
|
1392
|
-
* Privileged values are server-owned and never client-settable. `EnvironmentPayload`, which every environment POST and PUT requestBody references, accepts only the non-privileged
|
|
1392
|
+
* Privileged values are server-owned and never client-settable. `EnvironmentPayload`, which every environment POST and PUT requestBody references, accepts only the non-privileged value `user`, and the create-or-edit form has no field for it, so the environment create and update endpoints cannot designate an environment administrative. That restriction is a codegen guarantee, never access control: the registrant connection inlines the full environment entity, so `registerRegistryComponent` and `registerRegistryRelationship` do carry `purpose` in a request type and consumers MUST refuse it on input there too. Whatever surface a value arrives on, every consumer MUST assign this property only from server-side provisioning or a data migration. Permission to create an environment does not confer the ability to make one administrative.
|
|
1393
1393
|
*
|
|
1394
1394
|
* The database index that enforces the uniqueness invariant, the migration path for environments that are administrative by naming convention today, and each consumer's obligations are specified in https://github.com/meshery/schemas/blob/master/docs/environment-purpose-contract.md.
|
|
1395
1395
|
* @enum {string}
|
|
1396
1396
|
*/
|
|
1397
|
-
purpose?: "user" | "administrative"
|
|
1397
|
+
purpose?: "user" | "administrative";
|
|
1398
1398
|
}[];
|
|
1399
1399
|
/**
|
|
1400
1400
|
* @description Specifies the version of the schema used for the definition.
|