@meshery/schemas 1.3.83 → 1.3.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/cloudApi.d.mts +11352 -13637
  2. package/dist/cloudApi.d.ts +11352 -13637
  3. package/dist/cloudApi.js +1 -1
  4. package/dist/cloudApi.mjs +1 -1
  5. package/dist/constructs/v1beta3/content_piece/ContentPiece.d.ts +2 -1
  6. package/dist/constructs/v1beta3/content_piece/ContentPieceSchema.js +1 -1
  7. package/dist/constructs/v1beta3/content_piece/ContentPieceSchema.mjs +1 -1
  8. package/dist/constructs/v1beta3/ledger/Ledger.d.ts +609 -0
  9. package/dist/constructs/v1beta3/ledger/LedgerSchema.d.ts +2 -0
  10. package/dist/constructs/v1beta3/ledger/LedgerSchema.js +22 -0
  11. package/dist/constructs/v1beta3/ledger/LedgerSchema.mjs +22 -0
  12. package/dist/constructs/v1beta3/provider_capability/ProviderCapability.d.ts +243 -0
  13. package/dist/constructs/v1beta3/provider_capability/ProviderCapabilitySchema.d.ts +2 -0
  14. package/dist/constructs/v1beta3/provider_capability/ProviderCapabilitySchema.js +30 -0
  15. package/dist/constructs/v1beta3/provider_capability/ProviderCapabilitySchema.mjs +30 -0
  16. package/package.json +1 -1
  17. package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBinding.d.ts +0 -462
  18. package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBindingSchema.d.ts +0 -2
  19. package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBindingSchema.js +0 -23
  20. package/dist/constructs/v1beta3/blowhorn_binding/BlowhornBindingSchema.mjs +0 -23
  21. package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedger.d.ts +0 -1546
  22. package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedgerSchema.d.ts +0 -2
  23. package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedgerSchema.js +0 -69
  24. package/dist/constructs/v1beta3/blowhorn_ledger/BlowhornLedgerSchema.mjs +0 -69
  25. /package/dist/constructs/v1beta3/{blowhorn_binding/BlowhornBinding.js → ledger/Ledger.js} +0 -0
  26. /package/dist/constructs/v1beta3/{blowhorn_binding/BlowhornBinding.mjs → ledger/Ledger.mjs} +0 -0
  27. /package/dist/constructs/v1beta3/{blowhorn_ledger/BlowhornLedger.js → provider_capability/ProviderCapability.js} +0 -0
  28. /package/dist/constructs/v1beta3/{blowhorn_ledger/BlowhornLedger.mjs → provider_capability/ProviderCapability.mjs} +0 -0
@@ -0,0 +1,22 @@
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"Ledger",description:`OpenAPI schema for organization ledgers: named idempotent sets of keyed
2
+ entries that several workers share, so work done once (a record processed,
3
+ a contact reached) is never done twice. Recording is idempotent on
4
+ (ledger, entryKey), and claim-if-absent hands a key to exactly one
5
+ claimant atomically. Ledgers belong to the organization of the
6
+ authenticated session; any client-supplied organization is ignored.
7
+
8
+ Authorization: ledgers are organization-shared bookkeeping. Any member of
9
+ the organization may record, claim, read and delete entries in that
10
+ organization's ledgers. \`claimant\` is an advisory worker label, not an
11
+ authorization principal: it is not bound to the caller, and a claim or
12
+ delete never checks who holds the key. A key is scoped to (organization,
13
+ ledger), so an entry in another ledger is \`404\`.
14
+ `,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":{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 `claimedBy` 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.
15
+ `,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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
16
+ `,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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 `claimant`. 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 `claimant` already holds it, the call is a replay and returns the entry with `200`. When another claimant holds it, the call is refused with `409` and nothing changes. A claim is permanent: it ends only when the entry is deleted.\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 claimant.",required:["entryKey","claimant"],properties:{entryKey:{type:"string",description:"Key to claim.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},claimant:{type:"string",description:"Advisory label naming the worker taking the key, for example a worker name. It is not bound to the caller.",minLength:1,maxLength:255},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 claimant 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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
18
+ `,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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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"}}}},409:{description:"Conflict - another claimant 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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 claimant holds the ledger entry",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
21
+ `,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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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}}},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.
22
+ `,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 claimant.",required:["entryKey","claimant"],properties:{entryKey:{type:"string",description:"Key to claim.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},claimant:{type:"string",description:"Advisory label naming the worker taking the key, for example a worker name. It is not bound to the caller.",minLength:1,maxLength:255},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;module.exports=t;
@@ -0,0 +1,22 @@
1
+ var e={openapi:"3.0.0",info:{title:"Ledger",description:`OpenAPI schema for organization ledgers: named idempotent sets of keyed
2
+ entries that several workers share, so work done once (a record processed,
3
+ a contact reached) is never done twice. Recording is idempotent on
4
+ (ledger, entryKey), and claim-if-absent hands a key to exactly one
5
+ claimant atomically. Ledgers belong to the organization of the
6
+ authenticated session; any client-supplied organization is ignored.
7
+
8
+ Authorization: ledgers are organization-shared bookkeeping. Any member of
9
+ the organization may record, claim, read and delete entries in that
10
+ organization's ledgers. \`claimant\` is an advisory worker label, not an
11
+ authorization principal: it is not bound to the caller, and a claim or
12
+ delete never checks who holds the key. A key is scoped to (organization,
13
+ ledger), so an entry in another ledger is \`404\`.
14
+ `,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":{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 `claimedBy` 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.
15
+ `,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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
16
+ `,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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 `claimant`. 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 `claimant` already holds it, the call is a replay and returns the entry with `200`. When another claimant holds it, the call is refused with `409` and nothing changes. A claim is permanent: it ends only when the entry is deleted.\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 claimant.",required:["entryKey","claimant"],properties:{entryKey:{type:"string",description:"Key to claim.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},claimant:{type:"string",description:"Advisory label naming the worker taking the key, for example a worker name. It is not bound to the caller.",minLength:1,maxLength:255},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 claimant 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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
18
+ `,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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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"}}}},409:{description:"Conflict - another claimant 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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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 claimant holds the ledger entry",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{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 claimant, so two workers never both act on it. Any organization member may read, claim and delete entries; claimedBy is an advisory label, not an authorization principal.
21
+ `,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},claimedBy:{type:"string",description:"Claimant that holds the entry, if any. Set only by claim-if-absent and never changed afterwards.",maxLength:255,"x-oapi-codegen-extra-tags":{db:"claimed_by"},"x-order":6},claimedAt:{type:"string",format:"date-time",description:"Time the entry was claimed, if any. Set only by claim-if-absent.",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}}},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.
22
+ `,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 claimant.",required:["entryKey","claimant"],properties:{entryKey:{type:"string",description:"Key to claim.",minLength:1,maxLength:1024,"x-go-name":"EntryKey"},claimant:{type:"string",description:"Advisory label naming the worker taking the key, for example a worker name. It is not bound to the caller.",minLength:1,maxLength:255},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};
@@ -0,0 +1,243 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/{version}/capabilities": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * Get the provider's capabilities
16
+ * @description Returns the capabilities document for a client of the given version.
17
+ * Authentication is optional: with a valid token the document reflects
18
+ * the caller's roles, and with a valid token plus `X-Current-Orgid` it
19
+ * also carries `membership`. An invalid or absent token is not an error;
20
+ * the document is returned without `membership`. A malformed
21
+ * `X-Current-Orgid` is a client error and returns 400.
22
+ */
23
+ get: operations["getProviderCapabilities"];
24
+ put?: never;
25
+ post?: never;
26
+ delete?: never;
27
+ options?: never;
28
+ head?: never;
29
+ patch?: never;
30
+ trace?: never;
31
+ };
32
+ }
33
+ export type webhooks = Record<string, never>;
34
+ export interface components {
35
+ schemas: {
36
+ /**
37
+ * Provider Capability Schema
38
+ * @description The remote provider's capabilities document. Existing fields describe the
39
+ * provider and its extensions; `contractVersion` and `membership` let a
40
+ * native client gate on the provider's contract and on its organization
41
+ * membership after authenticating. New fields arrive only with a new
42
+ * `contractVersion`.
43
+ */
44
+ ProviderCapability: {
45
+ /** @description Provider type, for example `remote`. */
46
+ providerType: string;
47
+ /** @description Version of the extension package the provider offers this client. */
48
+ packageVersion?: string;
49
+ /** @description Download URL of that package. */
50
+ packageUrl?: string;
51
+ /** @description Display name of the provider. */
52
+ providerName?: string;
53
+ /** @description Lines describing the provider. */
54
+ providerDescription?: string[];
55
+ /** @description Home page URL of the provider. */
56
+ providerUrl?: string;
57
+ /** @description Redirect targets the provider serves to this client, keyed by name. */
58
+ redirects?: {
59
+ [key: string]: string;
60
+ };
61
+ /**
62
+ * @description Version of the provider's REST contract for native clients, as
63
+ * `MAJOR.MINOR`. A client refuses a provider whose major differs from the
64
+ * one it was built against. A provider that predates this field omits
65
+ * it, which a client treats as not serving the contract.
66
+ */
67
+ contractVersion?: string;
68
+ /**
69
+ * @description Whether the authenticated caller is a live member of the organization
70
+ * named by `X-Current-Orgid`. Present only on an authenticated request
71
+ * that carried that header.
72
+ */
73
+ membership?: {
74
+ /**
75
+ * Format: uuid
76
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
77
+ */
78
+ organizationId: string;
79
+ /** @description True when the caller is a live member of the organization. */
80
+ bound: boolean;
81
+ };
82
+ /** @description Extension points; shape owned by the provider. */
83
+ extensions?: {
84
+ [key: string]: unknown;
85
+ };
86
+ /** @description Features the provider serves and their endpoints. Clients read paths from here instead of hard-coding them. */
87
+ capabilities?: {
88
+ /** @description Feature name, for example `persist-connection`. */
89
+ feature: string;
90
+ /** @description Path that serves the feature, relative to the provider's base URL. */
91
+ endpoint?: string;
92
+ }[];
93
+ /** @description Access restrictions applied to this client; shape owned by the provider. */
94
+ restrictedAccess?: {
95
+ [key: string]: unknown;
96
+ };
97
+ };
98
+ /** @description One feature the provider serves and the endpoint that serves it. */
99
+ ProviderFeature: {
100
+ /** @description Feature name, for example `persist-connection`. */
101
+ feature: string;
102
+ /** @description Path that serves the feature, relative to the provider's base URL. */
103
+ endpoint?: string;
104
+ };
105
+ /**
106
+ * @description Whether the authenticated caller is a live member of the organization
107
+ * named by `X-Current-Orgid`. Present only on an authenticated request
108
+ * that carried that header.
109
+ */
110
+ ProviderMembership: {
111
+ /**
112
+ * Format: uuid
113
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
114
+ */
115
+ organizationId: string;
116
+ /** @description True when the caller is a live member of the organization. */
117
+ bound: boolean;
118
+ };
119
+ };
120
+ responses: {
121
+ /** @description Internal server error */
122
+ 500: {
123
+ headers: {
124
+ [name: string]: unknown;
125
+ };
126
+ content: {
127
+ "text/plain": string;
128
+ };
129
+ };
130
+ };
131
+ parameters: {
132
+ /** @description Version of the requesting client, for example `v0.8.0`. */
133
+ version: string;
134
+ /** @description Organization whose membership the caller wants reported. */
135
+ currentOrgId: string;
136
+ };
137
+ requestBodies: never;
138
+ headers: never;
139
+ pathItems: never;
140
+ }
141
+ export type $defs = Record<string, never>;
142
+ export interface operations {
143
+ getProviderCapabilities: {
144
+ parameters: {
145
+ query?: {
146
+ /** @description Operating system of the client, used to select packages. */
147
+ os?: string;
148
+ };
149
+ header?: {
150
+ /** @description Organization whose membership the caller wants reported. */
151
+ "X-Current-Orgid"?: string;
152
+ };
153
+ path: {
154
+ /** @description Version of the requesting client, for example `v0.8.0`. */
155
+ version: string;
156
+ };
157
+ cookie?: never;
158
+ };
159
+ requestBody?: never;
160
+ responses: {
161
+ /** @description The capabilities document */
162
+ 200: {
163
+ headers: {
164
+ [name: string]: unknown;
165
+ };
166
+ content: {
167
+ "application/json": {
168
+ /** @description Provider type, for example `remote`. */
169
+ providerType: string;
170
+ /** @description Version of the extension package the provider offers this client. */
171
+ packageVersion?: string;
172
+ /** @description Download URL of that package. */
173
+ packageUrl?: string;
174
+ /** @description Display name of the provider. */
175
+ providerName?: string;
176
+ /** @description Lines describing the provider. */
177
+ providerDescription?: string[];
178
+ /** @description Home page URL of the provider. */
179
+ providerUrl?: string;
180
+ /** @description Redirect targets the provider serves to this client, keyed by name. */
181
+ redirects?: {
182
+ [key: string]: string;
183
+ };
184
+ /**
185
+ * @description Version of the provider's REST contract for native clients, as
186
+ * `MAJOR.MINOR`. A client refuses a provider whose major differs from the
187
+ * one it was built against. A provider that predates this field omits
188
+ * it, which a client treats as not serving the contract.
189
+ */
190
+ contractVersion?: string;
191
+ /**
192
+ * @description Whether the authenticated caller is a live member of the organization
193
+ * named by `X-Current-Orgid`. Present only on an authenticated request
194
+ * that carried that header.
195
+ */
196
+ membership?: {
197
+ /**
198
+ * Format: uuid
199
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
200
+ */
201
+ organizationId: string;
202
+ /** @description True when the caller is a live member of the organization. */
203
+ bound: boolean;
204
+ };
205
+ /** @description Extension points; shape owned by the provider. */
206
+ extensions?: {
207
+ [key: string]: unknown;
208
+ };
209
+ /** @description Features the provider serves and their endpoints. Clients read paths from here instead of hard-coding them. */
210
+ capabilities?: {
211
+ /** @description Feature name, for example `persist-connection`. */
212
+ feature: string;
213
+ /** @description Path that serves the feature, relative to the provider's base URL. */
214
+ endpoint?: string;
215
+ }[];
216
+ /** @description Access restrictions applied to this client; shape owned by the provider. */
217
+ restrictedAccess?: {
218
+ [key: string]: unknown;
219
+ };
220
+ };
221
+ };
222
+ };
223
+ /** @description Invalid request body or request param */
224
+ 400: {
225
+ headers: {
226
+ [name: string]: unknown;
227
+ };
228
+ content: {
229
+ "text/plain": string;
230
+ };
231
+ };
232
+ /** @description Internal server error */
233
+ 500: {
234
+ headers: {
235
+ [name: string]: unknown;
236
+ };
237
+ content: {
238
+ "text/plain": string;
239
+ };
240
+ };
241
+ };
242
+ };
243
+ }
@@ -0,0 +1,2 @@
1
+ declare const ProviderCapabilitySchema: Record<string, unknown>;
2
+ export default ProviderCapabilitySchema;
@@ -0,0 +1,30 @@
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"ProviderCapability",description:`OpenAPI schema for the remote provider's capabilities document: what the
2
+ provider supports and where, read by a client right after it
3
+ authenticates. It is the provider-level manifest (provider identity,
4
+ package, extensions, advertised features and their endpoints), not the
5
+ model capability construct. Besides the features list it carries a
6
+ \`contractVersion\`, so a client can refuse a provider whose contract major
7
+ it does not speak, and, for an authenticated request that names an
8
+ organization in \`X-Current-Orgid\`, a \`membership\` block saying whether the
9
+ caller is a live member of that organization. An unauthenticated request
10
+ still receives the document, without \`membership\`, so a client can tell
11
+ "not signed in" from "signed in but not a member" from "old provider"
12
+ (no \`contractVersion\`).
13
+ `,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:"capabilities",description:"Operations related to the provider's capabilities document."}],paths:{"/{version}/capabilities":{get:{"x-internal":["cloud"],tags:["capabilities"],summary:"Get the provider's capabilities",operationId:"getProviderCapabilities",description:"Returns the capabilities document for a client of the given version.\nAuthentication is optional: with a valid token the document reflects\nthe caller's roles, and with a valid token plus `X-Current-Orgid` it\nalso carries `membership`. An invalid or absent token is not an error;\nthe document is returned without `membership`. A malformed\n`X-Current-Orgid` is a client error and returns 400.\n",parameters:[{name:"version",in:"path",description:"Version of the requesting client, for example `v0.8.0`.",required:true,schema:{type:"string",maxLength:64}},{name:"X-Current-Orgid",in:"header",description:"Organization whose membership the caller wants reported.",required:false,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"}}},{name:"os",in:"query",description:"Operating system of the client, used to select packages.",schema:{type:"string",maxLength:64}}],responses:{200:{description:"The capabilities document",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Provider Capability Schema",description:"The remote provider's capabilities document. Existing fields describe the\nprovider and its extensions; `contractVersion` and `membership` let a\nnative client gate on the provider's contract and on its organization\nmembership after authenticating. New fields arrive only with a new\n`contractVersion`.\n",type:"object",additionalProperties:false,required:["providerType"],properties:{providerType:{type:"string",description:"Provider type, for example `remote`.",maxLength:64},packageVersion:{type:"string",description:"Version of the extension package the provider offers this client.",maxLength:64},packageUrl:{type:"string",description:"Download URL of that package.",maxLength:2048},providerName:{type:"string",description:"Display name of the provider.",maxLength:255},providerDescription:{type:"array",description:"Lines describing the provider.",items:{type:"string"}},providerUrl:{type:"string",description:"Home page URL of the provider.",maxLength:2048},redirects:{type:"object",description:"Redirect targets the provider serves to this client, keyed by name.",additionalProperties:{type:"string"}},contractVersion:{type:"string",description:`Version of the provider's REST contract for native clients, as
14
+ \`MAJOR.MINOR\`. A client refuses a provider whose major differs from the
15
+ one it was built against. A provider that predates this field omits
16
+ it, which a client treats as not serving the contract.
17
+ `,pattern:"^[0-9]+\\.[0-9]+$",maxLength:32},membership:{type:"object",description:`Whether the authenticated caller is a live member of the organization
18
+ named by \`X-Current-Orgid\`. Present only on an authenticated request
19
+ that carried that header.
20
+ `,additionalProperties:false,required:["organizationId","bound"],properties:{organizationId:{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"}},bound:{type:"boolean",description:"True when the caller is a live member of the organization."}}},extensions:{type:"object",description:"Extension points; shape owned by the provider.",additionalProperties:true,"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},capabilities:{type:"array",description:"Features the provider serves and their endpoints. Clients read paths from here instead of hard-coding them.",items:{type:"object",description:"One feature the provider serves and the endpoint that serves it.",additionalProperties:false,required:["feature"],properties:{feature:{type:"string",description:"Feature name, for example `persist-connection`.",maxLength:255},endpoint:{type:"string",description:"Path that serves the feature, relative to the provider's base URL.",maxLength:1024}}}},restrictedAccess:{type:"object",description:"Access restrictions applied to this client; shape owned by the provider.",additionalProperties:true,"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}}}}}},400:{description:"Invalid request body or request param",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:{500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{version:{name:"version",in:"path",description:"Version of the requesting client, for example `v0.8.0`.",required:true,schema:{type:"string",maxLength:64}},currentOrgId:{name:"X-Current-Orgid",in:"header",description:"Organization whose membership the caller wants reported.",required:false,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"}}}},schemas:{ProviderCapability:{$schema:"http://json-schema.org/draft-07/schema#",title:"Provider Capability Schema",description:"The remote provider's capabilities document. Existing fields describe the\nprovider and its extensions; `contractVersion` and `membership` let a\nnative client gate on the provider's contract and on its organization\nmembership after authenticating. New fields arrive only with a new\n`contractVersion`.\n",type:"object",additionalProperties:false,required:["providerType"],properties:{providerType:{type:"string",description:"Provider type, for example `remote`.",maxLength:64},packageVersion:{type:"string",description:"Version of the extension package the provider offers this client.",maxLength:64},packageUrl:{type:"string",description:"Download URL of that package.",maxLength:2048},providerName:{type:"string",description:"Display name of the provider.",maxLength:255},providerDescription:{type:"array",description:"Lines describing the provider.",items:{type:"string"}},providerUrl:{type:"string",description:"Home page URL of the provider.",maxLength:2048},redirects:{type:"object",description:"Redirect targets the provider serves to this client, keyed by name.",additionalProperties:{type:"string"}},contractVersion:{type:"string",description:`Version of the provider's REST contract for native clients, as
21
+ \`MAJOR.MINOR\`. A client refuses a provider whose major differs from the
22
+ one it was built against. A provider that predates this field omits
23
+ it, which a client treats as not serving the contract.
24
+ `,pattern:"^[0-9]+\\.[0-9]+$",maxLength:32},membership:{type:"object",description:`Whether the authenticated caller is a live member of the organization
25
+ named by \`X-Current-Orgid\`. Present only on an authenticated request
26
+ that carried that header.
27
+ `,additionalProperties:false,required:["organizationId","bound"],properties:{organizationId:{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"}},bound:{type:"boolean",description:"True when the caller is a live member of the organization."}}},extensions:{type:"object",description:"Extension points; shape owned by the provider.",additionalProperties:true,"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},capabilities:{type:"array",description:"Features the provider serves and their endpoints. Clients read paths from here instead of hard-coding them.",items:{type:"object",description:"One feature the provider serves and the endpoint that serves it.",additionalProperties:false,required:["feature"],properties:{feature:{type:"string",description:"Feature name, for example `persist-connection`.",maxLength:255},endpoint:{type:"string",description:"Path that serves the feature, relative to the provider's base URL.",maxLength:1024}}}},restrictedAccess:{type:"object",description:"Access restrictions applied to this client; shape owned by the provider.",additionalProperties:true,"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}}},ProviderFeature:{type:"object",description:"One feature the provider serves and the endpoint that serves it.",additionalProperties:false,required:["feature"],properties:{feature:{type:"string",description:"Feature name, for example `persist-connection`.",maxLength:255},endpoint:{type:"string",description:"Path that serves the feature, relative to the provider's base URL.",maxLength:1024}}},ProviderMembership:{type:"object",description:`Whether the authenticated caller is a live member of the organization
28
+ named by \`X-Current-Orgid\`. Present only on an authenticated request
29
+ that carried that header.
30
+ `,additionalProperties:false,required:["organizationId","bound"],properties:{organizationId:{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"}},bound:{type:"boolean",description:"True when the caller is a live member of the organization."}}}}}},t=e;module.exports=t;
@@ -0,0 +1,30 @@
1
+ var e={openapi:"3.0.0",info:{title:"ProviderCapability",description:`OpenAPI schema for the remote provider's capabilities document: what the
2
+ provider supports and where, read by a client right after it
3
+ authenticates. It is the provider-level manifest (provider identity,
4
+ package, extensions, advertised features and their endpoints), not the
5
+ model capability construct. Besides the features list it carries a
6
+ \`contractVersion\`, so a client can refuse a provider whose contract major
7
+ it does not speak, and, for an authenticated request that names an
8
+ organization in \`X-Current-Orgid\`, a \`membership\` block saying whether the
9
+ caller is a live member of that organization. An unauthenticated request
10
+ still receives the document, without \`membership\`, so a client can tell
11
+ "not signed in" from "signed in but not a member" from "old provider"
12
+ (no \`contractVersion\`).
13
+ `,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:"capabilities",description:"Operations related to the provider's capabilities document."}],paths:{"/{version}/capabilities":{get:{"x-internal":["cloud"],tags:["capabilities"],summary:"Get the provider's capabilities",operationId:"getProviderCapabilities",description:"Returns the capabilities document for a client of the given version.\nAuthentication is optional: with a valid token the document reflects\nthe caller's roles, and with a valid token plus `X-Current-Orgid` it\nalso carries `membership`. An invalid or absent token is not an error;\nthe document is returned without `membership`. A malformed\n`X-Current-Orgid` is a client error and returns 400.\n",parameters:[{name:"version",in:"path",description:"Version of the requesting client, for example `v0.8.0`.",required:true,schema:{type:"string",maxLength:64}},{name:"X-Current-Orgid",in:"header",description:"Organization whose membership the caller wants reported.",required:false,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"}}},{name:"os",in:"query",description:"Operating system of the client, used to select packages.",schema:{type:"string",maxLength:64}}],responses:{200:{description:"The capabilities document",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Provider Capability Schema",description:"The remote provider's capabilities document. Existing fields describe the\nprovider and its extensions; `contractVersion` and `membership` let a\nnative client gate on the provider's contract and on its organization\nmembership after authenticating. New fields arrive only with a new\n`contractVersion`.\n",type:"object",additionalProperties:false,required:["providerType"],properties:{providerType:{type:"string",description:"Provider type, for example `remote`.",maxLength:64},packageVersion:{type:"string",description:"Version of the extension package the provider offers this client.",maxLength:64},packageUrl:{type:"string",description:"Download URL of that package.",maxLength:2048},providerName:{type:"string",description:"Display name of the provider.",maxLength:255},providerDescription:{type:"array",description:"Lines describing the provider.",items:{type:"string"}},providerUrl:{type:"string",description:"Home page URL of the provider.",maxLength:2048},redirects:{type:"object",description:"Redirect targets the provider serves to this client, keyed by name.",additionalProperties:{type:"string"}},contractVersion:{type:"string",description:`Version of the provider's REST contract for native clients, as
14
+ \`MAJOR.MINOR\`. A client refuses a provider whose major differs from the
15
+ one it was built against. A provider that predates this field omits
16
+ it, which a client treats as not serving the contract.
17
+ `,pattern:"^[0-9]+\\.[0-9]+$",maxLength:32},membership:{type:"object",description:`Whether the authenticated caller is a live member of the organization
18
+ named by \`X-Current-Orgid\`. Present only on an authenticated request
19
+ that carried that header.
20
+ `,additionalProperties:false,required:["organizationId","bound"],properties:{organizationId:{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"}},bound:{type:"boolean",description:"True when the caller is a live member of the organization."}}},extensions:{type:"object",description:"Extension points; shape owned by the provider.",additionalProperties:true,"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},capabilities:{type:"array",description:"Features the provider serves and their endpoints. Clients read paths from here instead of hard-coding them.",items:{type:"object",description:"One feature the provider serves and the endpoint that serves it.",additionalProperties:false,required:["feature"],properties:{feature:{type:"string",description:"Feature name, for example `persist-connection`.",maxLength:255},endpoint:{type:"string",description:"Path that serves the feature, relative to the provider's base URL.",maxLength:1024}}}},restrictedAccess:{type:"object",description:"Access restrictions applied to this client; shape owned by the provider.",additionalProperties:true,"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}}}}}},400:{description:"Invalid request body or request param",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:{500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{version:{name:"version",in:"path",description:"Version of the requesting client, for example `v0.8.0`.",required:true,schema:{type:"string",maxLength:64}},currentOrgId:{name:"X-Current-Orgid",in:"header",description:"Organization whose membership the caller wants reported.",required:false,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"}}}},schemas:{ProviderCapability:{$schema:"http://json-schema.org/draft-07/schema#",title:"Provider Capability Schema",description:"The remote provider's capabilities document. Existing fields describe the\nprovider and its extensions; `contractVersion` and `membership` let a\nnative client gate on the provider's contract and on its organization\nmembership after authenticating. New fields arrive only with a new\n`contractVersion`.\n",type:"object",additionalProperties:false,required:["providerType"],properties:{providerType:{type:"string",description:"Provider type, for example `remote`.",maxLength:64},packageVersion:{type:"string",description:"Version of the extension package the provider offers this client.",maxLength:64},packageUrl:{type:"string",description:"Download URL of that package.",maxLength:2048},providerName:{type:"string",description:"Display name of the provider.",maxLength:255},providerDescription:{type:"array",description:"Lines describing the provider.",items:{type:"string"}},providerUrl:{type:"string",description:"Home page URL of the provider.",maxLength:2048},redirects:{type:"object",description:"Redirect targets the provider serves to this client, keyed by name.",additionalProperties:{type:"string"}},contractVersion:{type:"string",description:`Version of the provider's REST contract for native clients, as
21
+ \`MAJOR.MINOR\`. A client refuses a provider whose major differs from the
22
+ one it was built against. A provider that predates this field omits
23
+ it, which a client treats as not serving the contract.
24
+ `,pattern:"^[0-9]+\\.[0-9]+$",maxLength:32},membership:{type:"object",description:`Whether the authenticated caller is a live member of the organization
25
+ named by \`X-Current-Orgid\`. Present only on an authenticated request
26
+ that carried that header.
27
+ `,additionalProperties:false,required:["organizationId","bound"],properties:{organizationId:{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"}},bound:{type:"boolean",description:"True when the caller is a live member of the organization."}}},extensions:{type:"object",description:"Extension points; shape owned by the provider.",additionalProperties:true,"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},capabilities:{type:"array",description:"Features the provider serves and their endpoints. Clients read paths from here instead of hard-coding them.",items:{type:"object",description:"One feature the provider serves and the endpoint that serves it.",additionalProperties:false,required:["feature"],properties:{feature:{type:"string",description:"Feature name, for example `persist-connection`.",maxLength:255},endpoint:{type:"string",description:"Path that serves the feature, relative to the provider's base URL.",maxLength:1024}}}},restrictedAccess:{type:"object",description:"Access restrictions applied to this client; shape owned by the provider.",additionalProperties:true,"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}}},ProviderFeature:{type:"object",description:"One feature the provider serves and the endpoint that serves it.",additionalProperties:false,required:["feature"],properties:{feature:{type:"string",description:"Feature name, for example `persist-connection`.",maxLength:255},endpoint:{type:"string",description:"Path that serves the feature, relative to the provider's base URL.",maxLength:1024}}},ProviderMembership:{type:"object",description:`Whether the authenticated caller is a live member of the organization
28
+ named by \`X-Current-Orgid\`. Present only on an authenticated request
29
+ that carried that header.
30
+ `,additionalProperties:false,required:["organizationId","bound"],properties:{organizationId:{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"}},bound:{type:"boolean",description:"True when the caller is a live member of the organization."}}}}}},t=e;export{t as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshery/schemas",
3
- "version": "1.3.83",
3
+ "version": "1.3.85",
4
4
  "description": "<p style=\"text-align:center;\" align=\"center\"><a href=\"https://meshery.io\"><picture> <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/meshery/meshery/master/.github/assets/images/readme/meshery-logo-light-text-side.svg\"> <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/meshery/meshery/master/.github/assets/images/readme/meshery-logo-dark-text-side.svg\"> <img src=\"https://raw.githubusercontent.com/meshery/meshery/master/.github/assets/images/readme/meshery-logo-dark-text-side.svg\" alt=\"Meshery Logo\" width=\"70%\" /></picture></a><br /><br /></p> <p align=\"center\"> <a href=\"https://hub.docker.com/r/meshery/meshery\" alt=\"Docker pulls\"> <img src=\"https://img.shields.io/docker/pulls/meshery/meshery.svg\" /></a> <a href=\"https://github.com/issues?q=is%3Aopen+is%3Aissue+archived%3Afalse+org%meshery+org%3Ameshery+org%3Aservice-mesh-performance+org%3Aservice-mesh-patterns+org%3A+label%3A%22help+wanted%22+\" alt=\"GitHub issues by-label\"> <img src=\"https://img.shields.io/github/issues/meshery/meshery/help%20wanted.svg?color=informational\" /></a> <a href=\"https://github.com/meshery/meshery/blob/master/LICENSE\" alt=\"LICENSE\"> <img src=\"https://img.shields.io/github/license/meshery/meshery?color=brightgreen\" /></a> <a href=\"https://artifacthub.io/packages/helm/meshery/meshery\" alt=\"Artifact Hub Meshery\"> <img src=\"https://img.shields.io/endpoint?color=brightgreen&label=Helm%20Chart&style=plastic&url=https%3A%2F%2Fartifacthub.io%2Fbadge%2Frepository%2Fartifact-hub\" /></a> <a href=\"https://goreportcard.com/report/github.com/meshery/meshery\" alt=\"Go Report Card\"> <img src=\"https://goreportcard.com/badge/github.com/meshery/meshery\" /></a> <a href=\"https://github.com/meshery/meshery/actions\" alt=\"Build Status\"> <img src=\"https://img.shields.io/github/actions/workflow/status/meshery/meshery/release-drafter.yml\" /></a> <a href=\"https://bestpractices.coreinfrastructure.org/projects/3564\" alt=\"CLI Best Practices\"> <img src=\"https://bestpractices.coreinfrastructure.org/projects/3564/badge\" /></a> <a href=\"http://discuss.meshery.io\" alt=\"Discuss Users\"> <img src=\"https://img.shields.io/discourse/users?label=discuss&logo=discourse&server=https%3A%2F%2Fdiscuss.meshery.io\" /></a> <a href=\"https://slack.meshery.io\" alt=\"Join Slack\"> <img src=\"https://img.shields.io/badge/Slack-@meshery.svg?logo=slack\" /></a> <a href=\"https://twitter.com/intent/follow?screen_name=mesheryio\" alt=\"Twitter Follow\"> <img src=\"https://img.shields.io/twitter/follow/mesheryio.svg?label=Follow+Meshery&style=social\" /></a> <a href=\"https://github.com/meshery/meshery/releases\" alt=\"Meshery Downloads\"> <img src=\"https://img.shields.io/github/downloads/meshery/meshery/total\" /></a> <!-- <a href=\"https://app.fossa.com/projects/git%2Bgithub.com%2Fmeshery%2Fmeshery?ref=badge_shield\" alt=\"License Scan Report\"> <img src=\"https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmeshery%2Fmeshery.svg?type=shield\"/></a> --> </p>",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",