@meshery/schemas 1.3.123 → 1.3.125
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 +20 -18
- package/dist/cloudApi.d.ts +20 -18
- package/dist/constructs/v1alpha1/core/Core.d.ts +22 -0
- package/dist/constructs/v1alpha1/core/CoreSchema.js +1 -1
- package/dist/constructs/v1alpha1/core/CoreSchema.mjs +1 -1
- package/dist/constructs/v1beta1/feature/Feature.d.ts +3 -3
- package/dist/constructs/v1beta1/feature/FeatureSchema.js +1 -1
- package/dist/constructs/v1beta1/feature/FeatureSchema.mjs +1 -1
- package/dist/constructs/v1beta2/core/Core.d.ts +52 -1
- package/dist/constructs/v1beta2/core/CoreSchema.js +1 -1
- package/dist/constructs/v1beta2/core/CoreSchema.mjs +1 -1
- package/dist/constructs/v1beta2/user/User.d.ts +60 -2
- package/dist/constructs/v1beta2/user/UserSchema.js +1 -1
- package/dist/constructs/v1beta2/user/UserSchema.mjs +1 -1
- package/dist/constructs/v1beta3/connection/Connection.d.ts +92 -5
- package/dist/constructs/v1beta3/connection/ConnectionSchema.js +5 -5
- package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +5 -5
- package/dist/constructs/v1beta3/content_item/ContentItem.d.ts +90 -3
- package/dist/constructs/v1beta3/content_item/ContentItemSchema.js +6 -6
- package/dist/constructs/v1beta3/content_item/ContentItemSchema.mjs +6 -6
- package/dist/constructs/v1beta3/event/Event.d.ts +60 -2
- package/dist/constructs/v1beta3/event/EventSchema.js +3 -3
- package/dist/constructs/v1beta3/event/EventSchema.mjs +3 -3
- package/dist/constructs/v1beta3/oauth_consent_request/OauthConsentRequest.d.ts +36 -17
- package/dist/constructs/v1beta3/oauth_consent_request/OauthConsentRequestSchema.js +27 -15
- package/dist/constructs/v1beta3/oauth_consent_request/OauthConsentRequestSchema.mjs +27 -15
- package/dist/constructs/v1beta3/request/Request.d.ts +5 -5
- package/dist/constructs/v1beta3/request/RequestSchema.js +5 -5
- package/dist/constructs/v1beta3/request/RequestSchema.mjs +5 -5
- package/dist/constructs/v1beta3/schedule/Schedule.d.ts +90 -3
- package/dist/constructs/v1beta3/schedule/ScheduleSchema.js +5 -5
- package/dist/constructs/v1beta3/schedule/ScheduleSchema.mjs +5 -5
- package/dist/index.d.mts +53 -2
- package/dist/index.d.ts +53 -2
- package/dist/mesheryApi.d.mts +2 -2
- package/dist/mesheryApi.d.ts +2 -2
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ Delete Content Item for the writes); a caller without it receives a
|
|
|
31
31
|
a live content item of the organization, and a caller who is not a
|
|
32
32
|
live member of it, receive the same 404, so the existence of another
|
|
33
33
|
organization's rows is never disclosed.
|
|
34
|
-
`,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:"contentItems",description:"Operations related to content items."}],paths:{"/api/content-items":{get:{"x-internal":["cloud"],tags:["contentItems"],summary:"List content items",operationId:"listContentItems","x-mcp":{expose:true,title:"List content items",scope:"content:read",description:"Read-only. Returns a paginated list of the live content items in the organization of the authenticated session, ordered by `rowNumber` unless `order` names another column (`rowNumber`, `createdAt`, `updatedAt`). `search` matches the profile or the content values, case-insensitively. `threadId` returns one whole thread: the root item it names and every live item whose `threadId` names it, ordered by `threadIndex` (the root first) unless `order` names another column. A `threadId` or `X-Current-Orgid` that is not a UUID answers 400."},description:"Returns a paginated list of the live content items in the\norganization of the authenticated session, ordered by `rowNumber`\nunless `order` names another column (`rowNumber`, `createdAt`,\n`updatedAt`). `search` matches the profile or the content values,\ncase-insensitively. `threadId` returns one whole thread: the root\nitem it names and every live item whose `threadId` names it,\nordered by `threadIndex` (the root first) unless `order` names\nanother column. A `threadId` or `X-Current-Orgid` that is not a\nUUID answers 400.\n",parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page (canonical camelCase form).",schema:{type:"integer",minimum:1}},{name:"pagesize",in:"query",description:"Number of items per page. Deprecated alias of pageSize;\ncanonical `pageSize` wins when both are present.\n",deprecated:true,schema:{type:"integer",minimum:1}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"profile",in:"query",required:false,description:"Filter by owning profile subject (exact match).",schema:{type:"string"}},{name:"threadId",in:"query",required:false,description:"Return one thread: the root item this ID names and every live item\nwhose `threadId` names it.\n",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:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}}],responses:{200:{description:"Content item page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of content items.",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},contentItems:{type:"array",items:{"x-go-type":"ContentItem",$schema:"http://json-schema.org/draft-07/schema#",title:"Content Item Schema",description:`Server-returned content item as persisted by the owning service.
|
|
34
|
+
`,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:"contentItems",description:"Operations related to content items."}],paths:{"/api/content-items":{get:{"x-internal":["cloud"],tags:["contentItems"],summary:"List content items",operationId:"listContentItems","x-mcp":{expose:true,title:"List content items",scope:"content:read",description:"Read-only. Returns a paginated list of the live content items in the organization of the authenticated session, ordered by `rowNumber` unless `order` names another column (`rowNumber`, `createdAt`, `updatedAt`). `search` matches the profile or the content values, case-insensitively. `threadId` returns one whole thread: the root item it names and every live item whose `threadId` names it, ordered by `threadIndex` (the root first) unless `order` names another column. A `threadId` or `X-Current-Orgid` that is not a UUID answers 400."},description:"Returns a paginated list of the live content items in the\norganization of the authenticated session, ordered by `rowNumber`\nunless `order` names another column (`rowNumber`, `createdAt`,\n`updatedAt`). `search` matches the profile or the content values,\ncase-insensitively. `threadId` returns one whole thread: the root\nitem it names and every live item whose `threadId` names it,\nordered by `threadIndex` (the root first) unless `order` names\nanother column. A `threadId` or `X-Current-Orgid` that is not a\nUUID answers 400.\n",parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page (canonical camelCase form).",schema:{type:"integer",minimum:1}},{name:"pagesize",in:"query",description:"Number of items per page. Deprecated alias of pageSize;\ncanonical `pageSize` wins when both are present.\n",deprecated:true,schema:{type:"integer",minimum:1}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"profile",in:"query",required:false,description:"Filter by owning profile subject (exact match).",schema:{type:"string"}},{name:"threadId",in:"query",required:false,description:"Return one thread: the root item this ID names and every live item\nwhose `threadId` names it.\n",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:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}}],responses:{200:{description:"Content item page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of content items.",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},contentItems:{type:"array",items:{"x-go-type":"ContentItem",$schema:"http://json-schema.org/draft-07/schema#",title:"Content Item Schema",description:`Server-returned content item as persisted by the owning service.
|
|
35
35
|
Content items carry a row number and a server-computed fingerprint over
|
|
36
36
|
their canonical values; updates are conditional on the fingerprint the
|
|
37
37
|
writer read, so stale writes are refused rather than silently applied.
|
|
@@ -47,7 +47,7 @@ changed; present, the item's rules read as adjusted.
|
|
|
47
47
|
`,type:"object",additionalProperties:false,properties:{pace:{type:"string",description:"Typing and interaction pace.",enum:["slow","normal","fast"],"x-enum-varnames":["ContentItemPaceSlow","ContentItemPaceNormal","ContentItemPaceFast"]},minDelaySeconds:{type:"integer",description:"Least time, in seconds, between two public actions on one platform for one profile.",minimum:0,maximum:86400},quietHours:{description:"Local hours with no public actions.",type:"object",additionalProperties:false,required:["start","end"],properties:{start:{type:"integer",description:"Local hour the window opens.",minimum:0,maximum:23},end:{type:"integer",description:"Local hour the window closes.",minimum:0,maximum:23}}},capFraction:{type:"number",format:"double",description:"Share of each built-in daily cap the item may use, above 0 and at most 1.",minimum:0,exclusiveMinimum:true,maximum:1},noMouseMove:{type:"boolean",description:"Whether the item runs without pointer movement."}}}}},threadId:{type:"string",format:"uuid","x-go-type":"core.Uuid","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},description:`ID of the root item of the thread this item belongs to: the first post of a split thread, or the first transmission of a conversation between profiles. Omitted on a standalone item and on a root itself; a root is the item other items name here. Set on insert only.
|
|
48
48
|
`,"x-go-name":"ThreadID","x-oapi-codegen-extra-tags":{db:"thread_id",json:"threadId,omitempty"},"x-order":12},replyToId:{type:"string",format:"uuid","x-go-type":"core.Uuid","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},description:"ID of the item this item answers directly: the thread root or another item of the same thread. A split thread's part names the part before it; a reply in a conversation between profiles names the transmission above it. Omitted when the item answers nothing. Never set without `threadId`. Set on insert only.\n","x-go-name":"ReplyToID","x-oapi-codegen-extra-tags":{db:"reply_to_id",json:"replyToId,omitempty"},"x-order":13},threadIndex:{type:"integer",description:"Position of the item in its thread, counting the root as 0. Present exactly when `threadId` is, unique among the live items of the thread, and greater than the position of the item named by `replyToId`. Set on insert only.\n",minimum:1,"x-oapi-codegen-extra-tags":{db:"thread_index",json:"threadIndex,omitempty"},"x-order":14},mediaAssetIds:{type:"array",uniqueItems:true,maxItems:20,"x-go-type":"pq.StringArray","x-go-type-import":{path:"github.com/lib/pq"},"x-go-type-skip-optional-pointer":true,items:{type:"string",format:"uuid",description:"ID of a media_asset in the same organization."},description:`The media assets the item posts, in posting order. Ids only, never URLs. Omitted when the item posts no file.
|
|
49
49
|
`,"x-oapi-codegen-extra-tags":{db:"media_asset_ids",json:"mediaAssetIds,omitempty"},"x-order":15},approved:{type:"boolean",description:"Whether the item is approved to run. Server-set and read-only: it is not in ContentItemPayload. At insert the server sets it from the effective approval, which is resolved at insert, again at each content edit, and again when `approvalPolicy` changes: `false` with a pending `content_item_approval` request when `approvalRequired` is true, and `true` with no request when it is false. Afterwards `approveRequest` in the request construct sets it to true, and so does the one-time backfill of a row written before this field shipped (see below); that operation needs the Decide Content Item Approvals key and is never an AI app tool. A content edit that resolves to required sets it back to false. Any content edit that leaves it unapproved supersedes an open request with a fresh pending one, so after the edit an unapproved item has an open request (see updateContentItem). A change to `approvalPolicy` whose resolved result is required does the same to an approved item. The client that runs the queue reads this field. For one release after this field ships, servers mirror it into the free-form `Approved?` column in `data` for older readers, and backfill `approved` once from that column for rows written before the field shipped, so every row carries a value. A client-sent `Approved?` never approves an item. New readers read this field only. See docs/content-item-contract.md.\n",default:false,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"approved",json:"approved"},"x-order":16},createdByClient:{type:"string",description:`OAuth client ID of the AI app that created the item. Server-set from the access token, never client-settable, and never changed by an update. Empty or omitted on an item a person created.
|
|
50
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":17},approvalPolicy:{description:"The item's own approval policy. Absent means inherit. An explicit `required` or `not_required` wins over every higher-level setting; `inherit` or absent inherits from higher-level settings (platform, workspace, profile), hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365. Interim: until the upstream policies exist, `inherit` or absent resolves to `required`. Only a person with Decide Content Item Approvals may write a value that changes the stored one; an AI app never can. Changing it alone re-resolves the approval. A change whose result is required (`required`, or `inherit` or absent in the interim, which resolves to required) resets an approved item and opens its request. A change whose result is not required never changes `approved`, and any change leaves an unapproved item with an open request, whatever the result (see updateContentItem). Stored in the nullable `approval_policy` column; null means inherit, and a written `inherit` is stored as null, so reads return it absent.\n","x-oapi-codegen-extra-tags":{db:"approval_policy",json:"approvalPolicy,omitempty"},"x-order":18,type:"string",enum:["required","not_required","inherit"],"x-enum-varnames":["ApprovalPolicyRequired","ApprovalPolicyNotRequired","ApprovalPolicyInherit"]},approvalRequired:{type:"boolean",readOnly:true,description:"Server-computed and read-only: whether the item needs a person's approval, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem) from its `approvalPolicy` and the higher-level settings (hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365). Stored in the `approval_required` column. Never in a payload. A change to `approvalPolicy` alone re-resolves it; a higher-level setting alone does not, and the next content edit resolves it again. Interim: until the upstream policies exist, an absent or `inherit` policy resolves to `true` (approval source `fallback`). Absent on items inserted before this field shipped.\n","x-oapi-codegen-extra-tags":{db:"approval_required",json:"approvalRequired,omitempty"},"x-order":19},approvalPolicySource:{type:"string",readOnly:true,description:"Server-computed and read-only: the level that decided `approvalRequired`, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem), stored in the `approval_policy_source` column. `item` when the item's own `approvalPolicy` was explicit; `fallback` when no level set a value and approval is required. The other levels name the higher level that set the value: `workspace`, `profile`, `organization` and `platform`, listed in their planned order (the hierarchy is defined in https://github.com/layer5io/meshery-cloud/issues/6365). Interim: until the upstream policies exist, only `item` and `fallback` are active (an absent or `inherit` policy resolves to `fallback`). The other four levels become active as that hierarchy lands. Never in a payload. Absent on items inserted before this field shipped.\n",enum:["item","workspace","profile","organization","platform","fallback"],"x-enum-varnames":["ApprovalPolicySourceItem","ApprovalPolicySourceWorkspace","ApprovalPolicySourceProfile","ApprovalPolicySourceOrganization","ApprovalPolicySourcePlatform","ApprovalPolicySourceFallback"],"x-oapi-codegen-extra-tags":{db:"approval_policy_source",json:"approvalPolicySource,omitempty"},"x-order":20}}},description:"Content items 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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["contentItems"],summary:"Insert a content item",operationId:"insertContentItem",parameters:[{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}}],description:"Inserts a new content item. Insert-only: any supplied\n`id` and `expectedFingerprint` are ignored; existing rows change\nonly through the conditional `updateContentItem`. The\n`fingerprint` is server-computed. Row numbers are unique across\nthe live content items of the organization, whatever their\n`profile`. When `rowNumber` is omitted the server assigns the next\nrow number of the organization (one more than the highest row\nnumber the organization has used, counting soft-deleted content\nitems so a deleted item's number is not handed out again by\nassignment), atomically with the insert, so\nconcurrent inserts never receive the same number. An organization\nthat has never had a content item is assigned row number 1 first.\nA supplied\n`rowNumber` that another live content item of the organization\nalready holds refuses the insert with a 409 (`code`\n`row_number_taken`).\nA `rulesOfEngagement` outside its schema (an unknown preset or\ndial, or a value out of range) is refused with a 400, on insert\nand on update alike.\nEach `mediaAssetIds` entry must name a media asset of the session\norganization, else 400 (the same 400 for a missing, another\norganization's and a deleted asset), on insert and on update alike.\nThe server does not require the asset to be ready at write time:\ndeleting an asset does not check content item references, and such\nan item is refused by name when it posts, so the posting client\nchecks readiness.\nThread fields are checked against the organization's live content\nitems in the same transaction as the insert, and a violation is\nrefused with a 400: `threadId` must name a live item of the\norganization that is not itself part of a thread; `replyToId`\nrequires `threadId` and must name that root or a live item of the\nsame thread; `threadIndex` is required exactly when `threadId` is\ngiven and must exceed the position of the item `replyToId` names\n(the root counts as 0). An item of another organization, a deleted\nitem and a missing one receive the same 400. A `threadIndex` that\nanother live item of the same thread already holds refuses the\ninsert with a 409 (`code` `thread_index_taken`).\nThe optional `Idempotency-Key` header makes the insert safe to\nretry: within 24 hours the same key with the same request hash\nreturns the first response without inserting again, and the same\nkey with a different request hash answers 422 and inserts nothing.\nA retry with the same key that arrives while the first request with\nthat key is still being processed answers 409 with the body `code`\n`idempotency_key_in_flight` and inserts nothing. Once the first request\nhas finished without a 5xx, a retry receives the stored response; after\na 5xx, a retry is processed as new. Precedence: while the\nfirst request with a key is in flight, every retry with that key\nanswers 409 whatever its body; only once the first request has finished\ndoes a retry with a different body answer 422. An in-flight claim on a\nrequest that never finished expires 24 hours after it was taken, the\nsame TTL as the stored response (no shorter in-flight lease applies),\nand a retry after that is processed as new. The permanent 409s of\nthis operation carry `row_number_taken` and `thread_index_taken`, so\na client tells the in-flight case by its `code`.\nA caller whose effective keys lack Decide Content Item Approvals in\nthe session organization who sends `approvalPolicy` `required` or\n`not_required` gets a 403 and nothing is inserted; a caller holding\nthat key may send any value. Omitted or `inherit`, the item inherits\n(the server stores both as null, so they are the same value). The server resolves the effective approval once,\nhere: when it is required the item lands `approved` false with a\npending `content_item_approval` request; when it is not required the\nserver sets `approved` true and opens no request. Interim: until the\nupstream policies exist, inherit resolves to required.\n`approved` is never in the payload (docs/content-item-contract.md,\nApproval policy).\n",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for inserting or updating a content item.\nContains only client-settable fields; the owning\n`organizationId` (derived from the authenticated session), the\nserver-computed `fingerprint`, the server-set `createdByClient`,\n`approved` (set only by `approveRequest` in the request construct),\nthe server-computed `approvalRequired` and `approvalPolicySource`\nand the server-generated `createdAt` / `updatedAt` timestamps are\nintentionally excluded. `approvalPolicy` is the one approval field a\nwrite carries; a caller without Decide Content Item Approvals may send\nonly the stored value, or omit it (docs/content-item-contract.md,\nApproval policy).\n",required:["profile"],properties:{id:{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"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},profile:{type:"string",description:"Subject of the owning profile.",minLength:1,maxLength:255},rowNumber:{type:"integer",description:`Row number of the content item, unique across the live content
|
|
50
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":17},approvalPolicy:{description:"The item's own approval policy. Absent means inherit. An explicit `required` or `not_required` wins over every higher-level setting; `inherit` or absent inherits from higher-level settings (platform, workspace, profile), hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365. Interim: until the upstream policies exist, `inherit` or absent resolves to `required`. Only a person with Decide Content Item Approvals may write a value that changes the stored one; an AI app never can. Changing it alone re-resolves the approval. A change whose result is required (`required`, or `inherit` or absent in the interim, which resolves to required) resets an approved item and opens its request. A change whose result is not required never changes `approved`, and any change leaves an unapproved item with an open request, whatever the result (see updateContentItem). Stored in the nullable `approval_policy` column; null means inherit, and a written `inherit` is stored as null, so reads return it absent.\n","x-oapi-codegen-extra-tags":{db:"approval_policy",json:"approvalPolicy,omitempty"},"x-order":18,type:"string",enum:["required","not_required","inherit"],"x-enum-varnames":["ApprovalPolicyRequired","ApprovalPolicyNotRequired","ApprovalPolicyInherit"]},approvalRequired:{type:"boolean",readOnly:true,description:"Server-computed and read-only: whether the item needs a person's approval, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem) from its `approvalPolicy` and the higher-level settings (hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365). Stored in the `approval_required` column. Never in a payload. A change to `approvalPolicy` alone re-resolves it; a higher-level setting alone does not, and the next content edit resolves it again. Interim: until the upstream policies exist, an absent or `inherit` policy resolves to `true` (approval source `fallback`). Absent on items inserted before this field shipped.\n","x-oapi-codegen-extra-tags":{db:"approval_required",json:"approvalRequired,omitempty"},"x-order":19},approvalPolicySource:{type:"string",readOnly:true,description:"Server-computed and read-only: the level that decided `approvalRequired`, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem), stored in the `approval_policy_source` column. `item` when the item's own `approvalPolicy` was explicit; `fallback` when no level set a value and approval is required. The other levels name the higher level that set the value: `workspace`, `profile`, `organization` and `platform`, listed in their planned order (the hierarchy is defined in https://github.com/layer5io/meshery-cloud/issues/6365). Interim: until the upstream policies exist, only `item` and `fallback` are active (an absent or `inherit` policy resolves to `fallback`). The other four levels become active as that hierarchy lands. Never in a payload. Absent on items inserted before this field shipped.\n",enum:["item","workspace","profile","organization","platform","fallback"],"x-enum-varnames":["ApprovalPolicySourceItem","ApprovalPolicySourceWorkspace","ApprovalPolicySourceProfile","ApprovalPolicySourceOrganization","ApprovalPolicySourcePlatform","ApprovalPolicySourceFallback"],"x-oapi-codegen-extra-tags":{db:"approval_policy_source",json:"approvalPolicySource,omitempty"},"x-order":20}}},description:"Content items 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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`.",content:{"application/json":{schema:{type:"object",description:"The call needs an acting organization, the caller named none, and more than one of the caller's live organizations qualifies. Nothing was done by this request. Repeat it naming one of `choices` as `X-Current-Orgid` (the `organizationId` tool argument).",required:["code","message","choices"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `organization_selection_required` for this body.",enum:["organization_selection_required"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."},choices:{type:"array",minItems:2,description:"The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`.",items:{type:"object",description:"An organization the call could act in. Same fields as AvailableOrganization.",required:["id","name","description"],additionalProperties:false,properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},description:"Organization ID.","x-go-name":"ID"},name:{type:"string",description:"Name of the organization."},description:{type:"string",description:"Description of the organization."}}}}}}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["contentItems"],summary:"Insert a content item",operationId:"insertContentItem",parameters:[{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}}],description:"Inserts a new content item. Insert-only: any supplied\n`id` and `expectedFingerprint` are ignored; existing rows change\nonly through the conditional `updateContentItem`. The\n`fingerprint` is server-computed. Row numbers are unique across\nthe live content items of the organization, whatever their\n`profile`. When `rowNumber` is omitted the server assigns the next\nrow number of the organization (one more than the highest row\nnumber the organization has used, counting soft-deleted content\nitems so a deleted item's number is not handed out again by\nassignment), atomically with the insert, so\nconcurrent inserts never receive the same number. An organization\nthat has never had a content item is assigned row number 1 first.\nA supplied\n`rowNumber` that another live content item of the organization\nalready holds refuses the insert with a 409 (`code`\n`row_number_taken`).\nA `rulesOfEngagement` outside its schema (an unknown preset or\ndial, or a value out of range) is refused with a 400, on insert\nand on update alike.\nEach `mediaAssetIds` entry must name a media asset of the session\norganization, else 400 (the same 400 for a missing, another\norganization's and a deleted asset), on insert and on update alike.\nThe server does not require the asset to be ready at write time:\ndeleting an asset does not check content item references, and such\nan item is refused by name when it posts, so the posting client\nchecks readiness.\nThread fields are checked against the organization's live content\nitems in the same transaction as the insert, and a violation is\nrefused with a 400: `threadId` must name a live item of the\norganization that is not itself part of a thread; `replyToId`\nrequires `threadId` and must name that root or a live item of the\nsame thread; `threadIndex` is required exactly when `threadId` is\ngiven and must exceed the position of the item `replyToId` names\n(the root counts as 0). An item of another organization, a deleted\nitem and a missing one receive the same 400. A `threadIndex` that\nanother live item of the same thread already holds refuses the\ninsert with a 409 (`code` `thread_index_taken`).\nThe optional `Idempotency-Key` header makes the insert safe to\nretry: within 24 hours the same key with the same request hash\nreturns the first response without inserting again, and the same\nkey with a different request hash answers 422 and inserts nothing.\nA retry with the same key that arrives while the first request with\nthat key is still being processed answers 409 with the body `code`\n`idempotency_key_in_flight` and inserts nothing. Once the first request\nhas finished without a 5xx, a retry receives the stored response; after\na 5xx, a retry is processed as new. Precedence: while the\nfirst request with a key is in flight, every retry with that key\nanswers 409 whatever its body; only once the first request has finished\ndoes a retry with a different body answer 422. An in-flight claim on a\nrequest that never finished expires 24 hours after it was taken, the\nsame TTL as the stored response (no shorter in-flight lease applies),\nand a retry after that is processed as new. The permanent 409s of\nthis operation carry `row_number_taken` and `thread_index_taken`, so\na client tells the in-flight case by its `code`.\nA caller whose effective keys lack Decide Content Item Approvals in\nthe session organization who sends `approvalPolicy` `required` or\n`not_required` gets a 403 and nothing is inserted; a caller holding\nthat key may send any value. Omitted or `inherit`, the item inherits\n(the server stores both as null, so they are the same value). The server resolves the effective approval once,\nhere: when it is required the item lands `approved` false with a\npending `content_item_approval` request; when it is not required the\nserver sets `approved` true and opens no request. Interim: until the\nupstream policies exist, inherit resolves to required.\n`approved` is never in the payload (docs/content-item-contract.md,\nApproval policy).\n",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for inserting or updating a content item.\nContains only client-settable fields; the owning\n`organizationId` (derived from the authenticated session), the\nserver-computed `fingerprint`, the server-set `createdByClient`,\n`approved` (set only by `approveRequest` in the request construct),\nthe server-computed `approvalRequired` and `approvalPolicySource`\nand the server-generated `createdAt` / `updatedAt` timestamps are\nintentionally excluded. `approvalPolicy` is the one approval field a\nwrite carries; a caller without Decide Content Item Approvals may send\nonly the stored value, or omit it (docs/content-item-contract.md,\nApproval policy).\n",required:["profile"],properties:{id:{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"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},profile:{type:"string",description:"Subject of the owning profile.",minLength:1,maxLength:255},rowNumber:{type:"integer",description:`Row number of the content item, unique across the live content
|
|
51
51
|
items of the organization. Optional: omitted on insert, the
|
|
52
52
|
server assigns the next row number of the organization; omitted
|
|
53
53
|
on update, the stored row number is kept.
|
|
@@ -97,7 +97,7 @@ changed; present, the item's rules read as adjusted.
|
|
|
97
97
|
`,type:"object",additionalProperties:false,properties:{pace:{type:"string",description:"Typing and interaction pace.",enum:["slow","normal","fast"],"x-enum-varnames":["ContentItemPaceSlow","ContentItemPaceNormal","ContentItemPaceFast"]},minDelaySeconds:{type:"integer",description:"Least time, in seconds, between two public actions on one platform for one profile.",minimum:0,maximum:86400},quietHours:{description:"Local hours with no public actions.",type:"object",additionalProperties:false,required:["start","end"],properties:{start:{type:"integer",description:"Local hour the window opens.",minimum:0,maximum:23},end:{type:"integer",description:"Local hour the window closes.",minimum:0,maximum:23}}},capFraction:{type:"number",format:"double",description:"Share of each built-in daily cap the item may use, above 0 and at most 1.",minimum:0,exclusiveMinimum:true,maximum:1},noMouseMove:{type:"boolean",description:"Whether the item runs without pointer movement."}}}}},threadId:{type:"string",format:"uuid","x-go-type":"core.Uuid","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},description:`ID of the root item of the thread this item belongs to: the first post of a split thread, or the first transmission of a conversation between profiles. Omitted on a standalone item and on a root itself; a root is the item other items name here. Set on insert only.
|
|
98
98
|
`,"x-go-name":"ThreadID","x-oapi-codegen-extra-tags":{db:"thread_id",json:"threadId,omitempty"},"x-order":12},replyToId:{type:"string",format:"uuid","x-go-type":"core.Uuid","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},description:"ID of the item this item answers directly: the thread root or another item of the same thread. A split thread's part names the part before it; a reply in a conversation between profiles names the transmission above it. Omitted when the item answers nothing. Never set without `threadId`. Set on insert only.\n","x-go-name":"ReplyToID","x-oapi-codegen-extra-tags":{db:"reply_to_id",json:"replyToId,omitempty"},"x-order":13},threadIndex:{type:"integer",description:"Position of the item in its thread, counting the root as 0. Present exactly when `threadId` is, unique among the live items of the thread, and greater than the position of the item named by `replyToId`. Set on insert only.\n",minimum:1,"x-oapi-codegen-extra-tags":{db:"thread_index",json:"threadIndex,omitempty"},"x-order":14},mediaAssetIds:{type:"array",uniqueItems:true,maxItems:20,"x-go-type":"pq.StringArray","x-go-type-import":{path:"github.com/lib/pq"},"x-go-type-skip-optional-pointer":true,items:{type:"string",format:"uuid",description:"ID of a media_asset in the same organization."},description:`The media assets the item posts, in posting order. Ids only, never URLs. Omitted when the item posts no file.
|
|
99
99
|
`,"x-oapi-codegen-extra-tags":{db:"media_asset_ids",json:"mediaAssetIds,omitempty"},"x-order":15},approved:{type:"boolean",description:"Whether the item is approved to run. Server-set and read-only: it is not in ContentItemPayload. At insert the server sets it from the effective approval, which is resolved at insert, again at each content edit, and again when `approvalPolicy` changes: `false` with a pending `content_item_approval` request when `approvalRequired` is true, and `true` with no request when it is false. Afterwards `approveRequest` in the request construct sets it to true, and so does the one-time backfill of a row written before this field shipped (see below); that operation needs the Decide Content Item Approvals key and is never an AI app tool. A content edit that resolves to required sets it back to false. Any content edit that leaves it unapproved supersedes an open request with a fresh pending one, so after the edit an unapproved item has an open request (see updateContentItem). A change to `approvalPolicy` whose resolved result is required does the same to an approved item. The client that runs the queue reads this field. For one release after this field ships, servers mirror it into the free-form `Approved?` column in `data` for older readers, and backfill `approved` once from that column for rows written before the field shipped, so every row carries a value. A client-sent `Approved?` never approves an item. New readers read this field only. See docs/content-item-contract.md.\n",default:false,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"approved",json:"approved"},"x-order":16},createdByClient:{type:"string",description:`OAuth client ID of the AI app that created the item. Server-set from the access token, never client-settable, and never changed by an update. Empty or omitted on an item a person created.
|
|
100
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":17},approvalPolicy:{description:"The item's own approval policy. Absent means inherit. An explicit `required` or `not_required` wins over every higher-level setting; `inherit` or absent inherits from higher-level settings (platform, workspace, profile), hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365. Interim: until the upstream policies exist, `inherit` or absent resolves to `required`. Only a person with Decide Content Item Approvals may write a value that changes the stored one; an AI app never can. Changing it alone re-resolves the approval. A change whose result is required (`required`, or `inherit` or absent in the interim, which resolves to required) resets an approved item and opens its request. A change whose result is not required never changes `approved`, and any change leaves an unapproved item with an open request, whatever the result (see updateContentItem). Stored in the nullable `approval_policy` column; null means inherit, and a written `inherit` is stored as null, so reads return it absent.\n","x-oapi-codegen-extra-tags":{db:"approval_policy",json:"approvalPolicy,omitempty"},"x-order":18,type:"string",enum:["required","not_required","inherit"],"x-enum-varnames":["ApprovalPolicyRequired","ApprovalPolicyNotRequired","ApprovalPolicyInherit"]},approvalRequired:{type:"boolean",readOnly:true,description:"Server-computed and read-only: whether the item needs a person's approval, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem) from its `approvalPolicy` and the higher-level settings (hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365). Stored in the `approval_required` column. Never in a payload. A change to `approvalPolicy` alone re-resolves it; a higher-level setting alone does not, and the next content edit resolves it again. Interim: until the upstream policies exist, an absent or `inherit` policy resolves to `true` (approval source `fallback`). Absent on items inserted before this field shipped.\n","x-oapi-codegen-extra-tags":{db:"approval_required",json:"approvalRequired,omitempty"},"x-order":19},approvalPolicySource:{type:"string",readOnly:true,description:"Server-computed and read-only: the level that decided `approvalRequired`, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem), stored in the `approval_policy_source` column. `item` when the item's own `approvalPolicy` was explicit; `fallback` when no level set a value and approval is required. The other levels name the higher level that set the value: `workspace`, `profile`, `organization` and `platform`, listed in their planned order (the hierarchy is defined in https://github.com/layer5io/meshery-cloud/issues/6365). Interim: until the upstream policies exist, only `item` and `fallback` are active (an absent or `inherit` policy resolves to `fallback`). The other four levels become active as that hierarchy lands. Never in a payload. Absent on items inserted before this field shipped.\n",enum:["item","workspace","profile","organization","platform","fallback"],"x-enum-varnames":["ApprovalPolicySourceItem","ApprovalPolicySourceWorkspace","ApprovalPolicySourceProfile","ApprovalPolicySourceOrganization","ApprovalPolicySourcePlatform","ApprovalPolicySourceFallback"],"x-oapi-codegen-extra-tags":{db:"approval_policy_source",json:"approvalPolicySource,omitempty"},"x-order":20}}}}}},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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict on insert. The body's `code` says which: `row_number_taken` or `thread_index_taken` is permanent for this payload, and `idempotency_key_in_flight` is a retry whose first request with the same Idempotency-Key is still being processed. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Nothing is inserted in any case.\n",content:{"application/json":{schema:{oneOf:[{type:"object",description:"Body of an insert refused for a permanent conflict with the content. `code` is the machine-readable reason and `message` the sentence the caller is shown. The in-flight retry body is `IdempotencyKeyInFlightError` in v1beta2 core.",additionalProperties:false,required:["code","message"],properties:{code:{type:"string",description:"`row_number_taken`: a live item of the organization holds the `rowNumber`. `thread_index_taken`: a live item of the same thread holds the `threadIndex`.\n",enum:["row_number_taken","thread_index_taken"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}},{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}]}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/content-items/{contentItemId}":{get:{"x-internal":["cloud"],tags:["contentItems"],summary:"Get a content item by ID",operationId:"getContentItem","x-mcp":{expose:true,title:"Get a content item",scope:"content:read",description:"Read-only. Returns the content item with the given ID in the organization of the authenticated session. An `X-Current-Orgid` that is not a UUID answers 400."},parameters:[{name:"contentItemId",in:"path",description:"Content item ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}}],responses:{200:{description:"Content item response",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Content Item Schema",description:`Server-returned content item as persisted by the owning service.
|
|
100
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":17},approvalPolicy:{description:"The item's own approval policy. Absent means inherit. An explicit `required` or `not_required` wins over every higher-level setting; `inherit` or absent inherits from higher-level settings (platform, workspace, profile), hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365. Interim: until the upstream policies exist, `inherit` or absent resolves to `required`. Only a person with Decide Content Item Approvals may write a value that changes the stored one; an AI app never can. Changing it alone re-resolves the approval. A change whose result is required (`required`, or `inherit` or absent in the interim, which resolves to required) resets an approved item and opens its request. A change whose result is not required never changes `approved`, and any change leaves an unapproved item with an open request, whatever the result (see updateContentItem). Stored in the nullable `approval_policy` column; null means inherit, and a written `inherit` is stored as null, so reads return it absent.\n","x-oapi-codegen-extra-tags":{db:"approval_policy",json:"approvalPolicy,omitempty"},"x-order":18,type:"string",enum:["required","not_required","inherit"],"x-enum-varnames":["ApprovalPolicyRequired","ApprovalPolicyNotRequired","ApprovalPolicyInherit"]},approvalRequired:{type:"boolean",readOnly:true,description:"Server-computed and read-only: whether the item needs a person's approval, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem) from its `approvalPolicy` and the higher-level settings (hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365). Stored in the `approval_required` column. Never in a payload. A change to `approvalPolicy` alone re-resolves it; a higher-level setting alone does not, and the next content edit resolves it again. Interim: until the upstream policies exist, an absent or `inherit` policy resolves to `true` (approval source `fallback`). Absent on items inserted before this field shipped.\n","x-oapi-codegen-extra-tags":{db:"approval_required",json:"approvalRequired,omitempty"},"x-order":19},approvalPolicySource:{type:"string",readOnly:true,description:"Server-computed and read-only: the level that decided `approvalRequired`, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem), stored in the `approval_policy_source` column. `item` when the item's own `approvalPolicy` was explicit; `fallback` when no level set a value and approval is required. The other levels name the higher level that set the value: `workspace`, `profile`, `organization` and `platform`, listed in their planned order (the hierarchy is defined in https://github.com/layer5io/meshery-cloud/issues/6365). Interim: until the upstream policies exist, only `item` and `fallback` are active (an absent or `inherit` policy resolves to `fallback`). The other four levels become active as that hierarchy lands. Never in a payload. Absent on items inserted before this field shipped.\n",enum:["item","workspace","profile","organization","platform","fallback"],"x-enum-varnames":["ApprovalPolicySourceItem","ApprovalPolicySourceWorkspace","ApprovalPolicySourceProfile","ApprovalPolicySourceOrganization","ApprovalPolicySourcePlatform","ApprovalPolicySourceFallback"],"x-oapi-codegen-extra-tags":{db:"approval_policy_source",json:"approvalPolicySource,omitempty"},"x-order":20}}}}}},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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict on insert. The body's `code` says which: `row_number_taken` or `thread_index_taken` is permanent for this payload, and `idempotency_key_in_flight` is a retry whose first request with the same Idempotency-Key is still being processed. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Nothing is inserted in any case.\n",content:{"application/json":{schema:{oneOf:[{type:"object",description:"Body of an insert refused for a permanent conflict with the content. `code` is the machine-readable reason and `message` the sentence the caller is shown. The in-flight retry body is `IdempotencyKeyInFlightError` in v1beta2 core.",additionalProperties:false,required:["code","message"],properties:{code:{type:"string",description:"`row_number_taken`: a live item of the organization holds the `rowNumber`. `thread_index_taken`: a live item of the same thread holds the `threadIndex`.\n",enum:["row_number_taken","thread_index_taken"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}},{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}]}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/content-items/{contentItemId}":{get:{"x-internal":["cloud"],tags:["contentItems"],summary:"Get a content item by ID",operationId:"getContentItem","x-mcp":{expose:true,title:"Get a content item",scope:"content:read",description:"Read-only. Returns the content item with the given ID in the organization of the authenticated session. An `X-Current-Orgid` that is not a UUID answers 400."},parameters:[{name:"contentItemId",in:"path",description:"Content item ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}}],responses:{200:{description:"Content item response",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Content Item Schema",description:`Server-returned content item as persisted by the owning service.
|
|
101
101
|
Content items carry a row number and a server-computed fingerprint over
|
|
102
102
|
their canonical values; updates are conditional on the fingerprint the
|
|
103
103
|
writer read, so stale writes are refused rather than silently applied.
|
|
@@ -113,7 +113,7 @@ changed; present, the item's rules read as adjusted.
|
|
|
113
113
|
`,type:"object",additionalProperties:false,properties:{pace:{type:"string",description:"Typing and interaction pace.",enum:["slow","normal","fast"],"x-enum-varnames":["ContentItemPaceSlow","ContentItemPaceNormal","ContentItemPaceFast"]},minDelaySeconds:{type:"integer",description:"Least time, in seconds, between two public actions on one platform for one profile.",minimum:0,maximum:86400},quietHours:{description:"Local hours with no public actions.",type:"object",additionalProperties:false,required:["start","end"],properties:{start:{type:"integer",description:"Local hour the window opens.",minimum:0,maximum:23},end:{type:"integer",description:"Local hour the window closes.",minimum:0,maximum:23}}},capFraction:{type:"number",format:"double",description:"Share of each built-in daily cap the item may use, above 0 and at most 1.",minimum:0,exclusiveMinimum:true,maximum:1},noMouseMove:{type:"boolean",description:"Whether the item runs without pointer movement."}}}}},threadId:{type:"string",format:"uuid","x-go-type":"core.Uuid","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},description:`ID of the root item of the thread this item belongs to: the first post of a split thread, or the first transmission of a conversation between profiles. Omitted on a standalone item and on a root itself; a root is the item other items name here. Set on insert only.
|
|
114
114
|
`,"x-go-name":"ThreadID","x-oapi-codegen-extra-tags":{db:"thread_id",json:"threadId,omitempty"},"x-order":12},replyToId:{type:"string",format:"uuid","x-go-type":"core.Uuid","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},description:"ID of the item this item answers directly: the thread root or another item of the same thread. A split thread's part names the part before it; a reply in a conversation between profiles names the transmission above it. Omitted when the item answers nothing. Never set without `threadId`. Set on insert only.\n","x-go-name":"ReplyToID","x-oapi-codegen-extra-tags":{db:"reply_to_id",json:"replyToId,omitempty"},"x-order":13},threadIndex:{type:"integer",description:"Position of the item in its thread, counting the root as 0. Present exactly when `threadId` is, unique among the live items of the thread, and greater than the position of the item named by `replyToId`. Set on insert only.\n",minimum:1,"x-oapi-codegen-extra-tags":{db:"thread_index",json:"threadIndex,omitempty"},"x-order":14},mediaAssetIds:{type:"array",uniqueItems:true,maxItems:20,"x-go-type":"pq.StringArray","x-go-type-import":{path:"github.com/lib/pq"},"x-go-type-skip-optional-pointer":true,items:{type:"string",format:"uuid",description:"ID of a media_asset in the same organization."},description:`The media assets the item posts, in posting order. Ids only, never URLs. Omitted when the item posts no file.
|
|
115
115
|
`,"x-oapi-codegen-extra-tags":{db:"media_asset_ids",json:"mediaAssetIds,omitempty"},"x-order":15},approved:{type:"boolean",description:"Whether the item is approved to run. Server-set and read-only: it is not in ContentItemPayload. At insert the server sets it from the effective approval, which is resolved at insert, again at each content edit, and again when `approvalPolicy` changes: `false` with a pending `content_item_approval` request when `approvalRequired` is true, and `true` with no request when it is false. Afterwards `approveRequest` in the request construct sets it to true, and so does the one-time backfill of a row written before this field shipped (see below); that operation needs the Decide Content Item Approvals key and is never an AI app tool. A content edit that resolves to required sets it back to false. Any content edit that leaves it unapproved supersedes an open request with a fresh pending one, so after the edit an unapproved item has an open request (see updateContentItem). A change to `approvalPolicy` whose resolved result is required does the same to an approved item. The client that runs the queue reads this field. For one release after this field ships, servers mirror it into the free-form `Approved?` column in `data` for older readers, and backfill `approved` once from that column for rows written before the field shipped, so every row carries a value. A client-sent `Approved?` never approves an item. New readers read this field only. See docs/content-item-contract.md.\n",default:false,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"approved",json:"approved"},"x-order":16},createdByClient:{type:"string",description:`OAuth client ID of the AI app that created the item. Server-set from the access token, never client-settable, and never changed by an update. Empty or omitted on an item a person created.
|
|
116
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":17},approvalPolicy:{description:"The item's own approval policy. Absent means inherit. An explicit `required` or `not_required` wins over every higher-level setting; `inherit` or absent inherits from higher-level settings (platform, workspace, profile), hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365. Interim: until the upstream policies exist, `inherit` or absent resolves to `required`. Only a person with Decide Content Item Approvals may write a value that changes the stored one; an AI app never can. Changing it alone re-resolves the approval. A change whose result is required (`required`, or `inherit` or absent in the interim, which resolves to required) resets an approved item and opens its request. A change whose result is not required never changes `approved`, and any change leaves an unapproved item with an open request, whatever the result (see updateContentItem). Stored in the nullable `approval_policy` column; null means inherit, and a written `inherit` is stored as null, so reads return it absent.\n","x-oapi-codegen-extra-tags":{db:"approval_policy",json:"approvalPolicy,omitempty"},"x-order":18,type:"string",enum:["required","not_required","inherit"],"x-enum-varnames":["ApprovalPolicyRequired","ApprovalPolicyNotRequired","ApprovalPolicyInherit"]},approvalRequired:{type:"boolean",readOnly:true,description:"Server-computed and read-only: whether the item needs a person's approval, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem) from its `approvalPolicy` and the higher-level settings (hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365). Stored in the `approval_required` column. Never in a payload. A change to `approvalPolicy` alone re-resolves it; a higher-level setting alone does not, and the next content edit resolves it again. Interim: until the upstream policies exist, an absent or `inherit` policy resolves to `true` (approval source `fallback`). Absent on items inserted before this field shipped.\n","x-oapi-codegen-extra-tags":{db:"approval_required",json:"approvalRequired,omitempty"},"x-order":19},approvalPolicySource:{type:"string",readOnly:true,description:"Server-computed and read-only: the level that decided `approvalRequired`, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem), stored in the `approval_policy_source` column. `item` when the item's own `approvalPolicy` was explicit; `fallback` when no level set a value and approval is required. The other levels name the higher level that set the value: `workspace`, `profile`, `organization` and `platform`, listed in their planned order (the hierarchy is defined in https://github.com/layer5io/meshery-cloud/issues/6365). Interim: until the upstream policies exist, only `item` and `fallback` are active (an absent or `inherit` policy resolves to `fallback`). The other four levels become active as that hierarchy lands. Never in a payload. Absent on items inserted before this field shipped.\n",enum:["item","workspace","profile","organization","platform","fallback"],"x-enum-varnames":["ApprovalPolicySourceItem","ApprovalPolicySourceWorkspace","ApprovalPolicySourceProfile","ApprovalPolicySourceOrganization","ApprovalPolicySourcePlatform","ApprovalPolicySourceFallback"],"x-oapi-codegen-extra-tags":{db:"approval_policy_source",json:"approvalPolicySource,omitempty"},"x-order":20}}}}}},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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["contentItems"],summary:"Update a content item",operationId:"updateContentItem",description:"Conditionally updates the content item. When\n`expectedFingerprint` is supplied and stale, the update is\nrefused with a 409, as is an update that would move the item\nonto a `rowNumber` another live content item of the organization\nholds. An omitted `rowNumber` keeps the stored one.\nAn omitted `rulesOfEngagement` keeps the stored rules and `null`\nclears them, so a writer that does not know the field never erases\nit. An omitted `mediaAssetIds` keeps the stored list and `[]`\nclears it. The thread fields are fixed at insert: omitted, or equal to the\nstored values, they are kept; any other value is refused with a 400.\n`approved` is not in the payload, and no update sets it to true;\nonly `approveRequest` does. A content edit, or an `approvalPolicy`\nchange whose resolved result is required, can reset it, as described\nbelow. A caller without Decide Content Item\nApprovals gets a 403 if it sends an `approvalPolicy` different from\nthe stored one (absent and `inherit` count as one value, since\nthe server stores `inherit` as null);\nsending back the unchanged stored value is accepted and changes\nnothing. An omitted `approvalPolicy` keeps the stored value and is not\na change, so it is never refused.\nApproval on a content edit. An update that changes the item's\ncontent re-resolves its effective approval in the same transaction,\nwith the same rule as insert: the `approvalPolicy` the update stores,\nthen the higher-level settings (interim: `inherit` or absent resolves\nto `required`). It records `approvalRequired` and\n`approvalPolicySource` again. Content is `profile`, `rowNumber`,\n`data` (without the server-owned `Approved?` mirror),\n`rulesOfEngagement` and `mediaAssetIds`, the fields the fingerprint\ncovers, compared with the stored values, so a write-back that sends\nthem unchanged is not an edit. These never trigger it: the\n`approvalPolicy` (a change to it alone is handled below),\n`expectedFingerprint`, `id` and the thread fields (`threadId`,\n`replyToId`, `threadIndex`, fixed at insert).\nWhatever the resolved approval, the item's open\n`content_item_approval` request, if it has one, is superseded: it is\nclosed with `status` `superseded`, `decidedAt` set to the edit time,\nand no `decidedBy` and no `note`. When approval resolves to required,\nan item that was `approved` is set to `approved` false. When approval\nresolves to not required, `approved` is unchanged: an approved item\nstays approved and opens no request. An item the edit leaves\nunapproved gets a fresh pending request for the content as it now is,\nin the same transaction, so after the edit an unapproved item has an\nopen request\n(the open-request invariant in docs/content-item-contract.md). An\nupdate never approves: the item stays unapproved until a decider\napproves that request. A failed write keeps none of these changes, the item and\nits requests alike.\nApproval on an `approvalPolicy` change. A write that changes the stored\npolicy and no content re-resolves the approval the same way, in the\nsame transaction. When the result is required and the item was\n`approved`, `approved` is set to false and a pending request opens,\nunless one is already pending. Any other result changes no `approved`\nand closes no request: a result that is not required leaves an unapproved\nitem unapproved, and its open request stays pending for a decider. An\nunapproved item with no open request, after a denial for example, gets\na fresh pending request in the same write, whatever the result. The\nstored `approvalRequired` and `approvalPolicySource` are rewritten to\nthe new result. Sending back the unchanged stored policy re-resolves\nnothing. A write that changes nothing (a whole-item write-back of the\nstored content and policy) opens no request and closes none, so a\ndenied item stays denied until a content edit or an `approvalPolicy`\nchange. This applies to every writer, a person included.\n",parameters:[{name:"contentItemId",in:"path",description:"Content item ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for inserting or updating a content item.\nContains only client-settable fields; the owning\n`organizationId` (derived from the authenticated session), the\nserver-computed `fingerprint`, the server-set `createdByClient`,\n`approved` (set only by `approveRequest` in the request construct),\nthe server-computed `approvalRequired` and `approvalPolicySource`\nand the server-generated `createdAt` / `updatedAt` timestamps are\nintentionally excluded. `approvalPolicy` is the one approval field a\nwrite carries; a caller without Decide Content Item Approvals may send\nonly the stored value, or omit it (docs/content-item-contract.md,\nApproval policy).\n",required:["profile"],properties:{id:{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"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},profile:{type:"string",description:"Subject of the owning profile.",minLength:1,maxLength:255},rowNumber:{type:"integer",description:`Row number of the content item, unique across the live content
|
|
116
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":17},approvalPolicy:{description:"The item's own approval policy. Absent means inherit. An explicit `required` or `not_required` wins over every higher-level setting; `inherit` or absent inherits from higher-level settings (platform, workspace, profile), hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365. Interim: until the upstream policies exist, `inherit` or absent resolves to `required`. Only a person with Decide Content Item Approvals may write a value that changes the stored one; an AI app never can. Changing it alone re-resolves the approval. A change whose result is required (`required`, or `inherit` or absent in the interim, which resolves to required) resets an approved item and opens its request. A change whose result is not required never changes `approved`, and any change leaves an unapproved item with an open request, whatever the result (see updateContentItem). Stored in the nullable `approval_policy` column; null means inherit, and a written `inherit` is stored as null, so reads return it absent.\n","x-oapi-codegen-extra-tags":{db:"approval_policy",json:"approvalPolicy,omitempty"},"x-order":18,type:"string",enum:["required","not_required","inherit"],"x-enum-varnames":["ApprovalPolicyRequired","ApprovalPolicyNotRequired","ApprovalPolicyInherit"]},approvalRequired:{type:"boolean",readOnly:true,description:"Server-computed and read-only: whether the item needs a person's approval, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem) from its `approvalPolicy` and the higher-level settings (hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365). Stored in the `approval_required` column. Never in a payload. A change to `approvalPolicy` alone re-resolves it; a higher-level setting alone does not, and the next content edit resolves it again. Interim: until the upstream policies exist, an absent or `inherit` policy resolves to `true` (approval source `fallback`). Absent on items inserted before this field shipped.\n","x-oapi-codegen-extra-tags":{db:"approval_required",json:"approvalRequired,omitempty"},"x-order":19},approvalPolicySource:{type:"string",readOnly:true,description:"Server-computed and read-only: the level that decided `approvalRequired`, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem), stored in the `approval_policy_source` column. `item` when the item's own `approvalPolicy` was explicit; `fallback` when no level set a value and approval is required. The other levels name the higher level that set the value: `workspace`, `profile`, `organization` and `platform`, listed in their planned order (the hierarchy is defined in https://github.com/layer5io/meshery-cloud/issues/6365). Interim: until the upstream policies exist, only `item` and `fallback` are active (an absent or `inherit` policy resolves to `fallback`). The other four levels become active as that hierarchy lands. Never in a payload. Absent on items inserted before this field shipped.\n",enum:["item","workspace","profile","organization","platform","fallback"],"x-enum-varnames":["ApprovalPolicySourceItem","ApprovalPolicySourceWorkspace","ApprovalPolicySourceProfile","ApprovalPolicySourceOrganization","ApprovalPolicySourcePlatform","ApprovalPolicySourceFallback"],"x-oapi-codegen-extra-tags":{db:"approval_policy_source",json:"approvalPolicySource,omitempty"},"x-order":20}}}}}},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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`.",content:{"application/json":{schema:{type:"object",description:"The call needs an acting organization, the caller named none, and more than one of the caller's live organizations qualifies. Nothing was done by this request. Repeat it naming one of `choices` as `X-Current-Orgid` (the `organizationId` tool argument).",required:["code","message","choices"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `organization_selection_required` for this body.",enum:["organization_selection_required"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."},choices:{type:"array",minItems:2,description:"The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`.",items:{type:"object",description:"An organization the call could act in. Same fields as AvailableOrganization.",required:["id","name","description"],additionalProperties:false,properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},description:"Organization ID.","x-go-name":"ID"},name:{type:"string",description:"Name of the organization."},description:{type:"string",description:"Description of the organization."}}}}}}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["contentItems"],summary:"Update a content item",operationId:"updateContentItem",description:"Conditionally updates the content item. When\n`expectedFingerprint` is supplied and stale, the update is\nrefused with a 409, as is an update that would move the item\nonto a `rowNumber` another live content item of the organization\nholds. An omitted `rowNumber` keeps the stored one.\nAn omitted `rulesOfEngagement` keeps the stored rules and `null`\nclears them, so a writer that does not know the field never erases\nit. An omitted `mediaAssetIds` keeps the stored list and `[]`\nclears it. The thread fields are fixed at insert: omitted, or equal to the\nstored values, they are kept; any other value is refused with a 400.\n`approved` is not in the payload, and no update sets it to true;\nonly `approveRequest` does. A content edit, or an `approvalPolicy`\nchange whose resolved result is required, can reset it, as described\nbelow. A caller without Decide Content Item\nApprovals gets a 403 if it sends an `approvalPolicy` different from\nthe stored one (absent and `inherit` count as one value, since\nthe server stores `inherit` as null);\nsending back the unchanged stored value is accepted and changes\nnothing. An omitted `approvalPolicy` keeps the stored value and is not\na change, so it is never refused.\nApproval on a content edit. An update that changes the item's\ncontent re-resolves its effective approval in the same transaction,\nwith the same rule as insert: the `approvalPolicy` the update stores,\nthen the higher-level settings (interim: `inherit` or absent resolves\nto `required`). It records `approvalRequired` and\n`approvalPolicySource` again. Content is `profile`, `rowNumber`,\n`data` (without the server-owned `Approved?` mirror),\n`rulesOfEngagement` and `mediaAssetIds`, the fields the fingerprint\ncovers, compared with the stored values, so a write-back that sends\nthem unchanged is not an edit. These never trigger it: the\n`approvalPolicy` (a change to it alone is handled below),\n`expectedFingerprint`, `id` and the thread fields (`threadId`,\n`replyToId`, `threadIndex`, fixed at insert).\nWhatever the resolved approval, the item's open\n`content_item_approval` request, if it has one, is superseded: it is\nclosed with `status` `superseded`, `decidedAt` set to the edit time,\nand no `decidedBy` and no `note`. When approval resolves to required,\nan item that was `approved` is set to `approved` false. When approval\nresolves to not required, `approved` is unchanged: an approved item\nstays approved and opens no request. An item the edit leaves\nunapproved gets a fresh pending request for the content as it now is,\nin the same transaction, so after the edit an unapproved item has an\nopen request\n(the open-request invariant in docs/content-item-contract.md). An\nupdate never approves: the item stays unapproved until a decider\napproves that request. A failed write keeps none of these changes, the item and\nits requests alike.\nApproval on an `approvalPolicy` change. A write that changes the stored\npolicy and no content re-resolves the approval the same way, in the\nsame transaction. When the result is required and the item was\n`approved`, `approved` is set to false and a pending request opens,\nunless one is already pending. Any other result changes no `approved`\nand closes no request: a result that is not required leaves an unapproved\nitem unapproved, and its open request stays pending for a decider. An\nunapproved item with no open request, after a denial for example, gets\na fresh pending request in the same write, whatever the result. The\nstored `approvalRequired` and `approvalPolicySource` are rewritten to\nthe new result. Sending back the unchanged stored policy re-resolves\nnothing. A write that changes nothing (a whole-item write-back of the\nstored content and policy) opens no request and closes none, so a\ndenied item stays denied until a content edit or an `approvalPolicy`\nchange. This applies to every writer, a person included.\n",parameters:[{name:"contentItemId",in:"path",description:"Content item ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for inserting or updating a content item.\nContains only client-settable fields; the owning\n`organizationId` (derived from the authenticated session), the\nserver-computed `fingerprint`, the server-set `createdByClient`,\n`approved` (set only by `approveRequest` in the request construct),\nthe server-computed `approvalRequired` and `approvalPolicySource`\nand the server-generated `createdAt` / `updatedAt` timestamps are\nintentionally excluded. `approvalPolicy` is the one approval field a\nwrite carries; a caller without Decide Content Item Approvals may send\nonly the stored value, or omit it (docs/content-item-contract.md,\nApproval policy).\n",required:["profile"],properties:{id:{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"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},profile:{type:"string",description:"Subject of the owning profile.",minLength:1,maxLength:255},rowNumber:{type:"integer",description:`Row number of the content item, unique across the live content
|
|
117
117
|
items of the organization. Optional: omitted on insert, the
|
|
118
118
|
server assigns the next row number of the organization; omitted
|
|
119
119
|
on update, the stored row number is kept.
|
|
@@ -165,9 +165,9 @@ changed; present, the item's rules read as adjusted.
|
|
|
165
165
|
`,"x-oapi-codegen-extra-tags":{db:"media_asset_ids",json:"mediaAssetIds,omitempty"},"x-order":15},approved:{type:"boolean",description:"Whether the item is approved to run. Server-set and read-only: it is not in ContentItemPayload. At insert the server sets it from the effective approval, which is resolved at insert, again at each content edit, and again when `approvalPolicy` changes: `false` with a pending `content_item_approval` request when `approvalRequired` is true, and `true` with no request when it is false. Afterwards `approveRequest` in the request construct sets it to true, and so does the one-time backfill of a row written before this field shipped (see below); that operation needs the Decide Content Item Approvals key and is never an AI app tool. A content edit that resolves to required sets it back to false. Any content edit that leaves it unapproved supersedes an open request with a fresh pending one, so after the edit an unapproved item has an open request (see updateContentItem). A change to `approvalPolicy` whose resolved result is required does the same to an approved item. The client that runs the queue reads this field. For one release after this field ships, servers mirror it into the free-form `Approved?` column in `data` for older readers, and backfill `approved` once from that column for rows written before the field shipped, so every row carries a value. A client-sent `Approved?` never approves an item. New readers read this field only. See docs/content-item-contract.md.\n",default:false,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"approved",json:"approved"},"x-order":16},createdByClient:{type:"string",description:`OAuth client ID of the AI app that created the item. Server-set from the access token, never client-settable, and never changed by an update. Empty or omitted on an item a person created.
|
|
166
166
|
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":17},approvalPolicy:{description:"The item's own approval policy. Absent means inherit. An explicit `required` or `not_required` wins over every higher-level setting; `inherit` or absent inherits from higher-level settings (platform, workspace, profile), hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365. Interim: until the upstream policies exist, `inherit` or absent resolves to `required`. Only a person with Decide Content Item Approvals may write a value that changes the stored one; an AI app never can. Changing it alone re-resolves the approval. A change whose result is required (`required`, or `inherit` or absent in the interim, which resolves to required) resets an approved item and opens its request. A change whose result is not required never changes `approved`, and any change leaves an unapproved item with an open request, whatever the result (see updateContentItem). Stored in the nullable `approval_policy` column; null means inherit, and a written `inherit` is stored as null, so reads return it absent.\n","x-oapi-codegen-extra-tags":{db:"approval_policy",json:"approvalPolicy,omitempty"},"x-order":18,type:"string",enum:["required","not_required","inherit"],"x-enum-varnames":["ApprovalPolicyRequired","ApprovalPolicyNotRequired","ApprovalPolicyInherit"]},approvalRequired:{type:"boolean",readOnly:true,description:"Server-computed and read-only: whether the item needs a person's approval, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem) from its `approvalPolicy` and the higher-level settings (hierarchy defined in https://github.com/layer5io/meshery-cloud/issues/6365). Stored in the `approval_required` column. Never in a payload. A change to `approvalPolicy` alone re-resolves it; a higher-level setting alone does not, and the next content edit resolves it again. Interim: until the upstream policies exist, an absent or `inherit` policy resolves to `true` (approval source `fallback`). Absent on items inserted before this field shipped.\n","x-oapi-codegen-extra-tags":{db:"approval_required",json:"approvalRequired,omitempty"},"x-order":19},approvalPolicySource:{type:"string",readOnly:true,description:"Server-computed and read-only: the level that decided `approvalRequired`, resolved at insert, again at each content edit, and again when `approvalPolicy` changes (see updateContentItem), stored in the `approval_policy_source` column. `item` when the item's own `approvalPolicy` was explicit; `fallback` when no level set a value and approval is required. The other levels name the higher level that set the value: `workspace`, `profile`, `organization` and `platform`, listed in their planned order (the hierarchy is defined in https://github.com/layer5io/meshery-cloud/issues/6365). Interim: until the upstream policies exist, only `item` and `fallback` are active (an absent or `inherit` policy resolves to `fallback`). The other four levels become active as that hierarchy lands. Never in a payload. Absent on items inserted before this field shipped.\n",enum:["item","workspace","profile","organization","platform","fallback"],"x-enum-varnames":["ApprovalPolicySourceItem","ApprovalPolicySourceWorkspace","ApprovalPolicySourceProfile","ApprovalPolicySourceOrganization","ApprovalPolicySourcePlatform","ApprovalPolicySourceFallback"],"x-oapi-codegen-extra-tags":{db:"approval_policy_source",json:"approvalPolicySource,omitempty"},"x-order":20}}}}}},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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the stale expectedFingerprint precondition no longer matches the stored content fingerprint, or another live content item of the organization already holds the same rowNumber. Nothing changes.",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["contentItems"],summary:"Delete a content item",operationId:"deleteContentItem",description:"Soft-deletes the content item. When `expectedFingerprint` is\nsupplied, the delete applies only when the stored fingerprint\nstill matches and is refused with a 409 otherwise; without it the\ndelete is unconditional. Deleting an item that other items name in\n`threadId` or `replyToId` leaves their references as they are.\nDeleting an item that has an open `content_item_approval` request\ncloses that request as `superseded` in the same transaction:\n`decidedAt` is set to the delete time, and no `decidedBy` and no\n`note` are set. `approveRequest` and `denyRequest` on it then answer\n`409`, as for any request that is not pending, and change nothing.\n",parameters:[{name:"contentItemId",in:"path",description:"Content item ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"expectedFingerprint",in:"query",description:`Optional optimistic-concurrency precondition for delete: the
|
|
167
167
|
delete applies only when the stored fingerprint still matches.
|
|
168
|
-
`,required:false,schema:{type:"string",maxLength:255}}],responses:{204:{description:"Content item deleted"},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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the stale expectedFingerprint precondition no longer matches the stored content fingerprint, or another live content item of the organization already holds the same rowNumber. Nothing changes.",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the stale expectedFingerprint precondition no longer matches the stored content fingerprint, or another live content item of the organization already holds the same rowNumber. Nothing changes.",content:{"text/plain":{schema:{type:"string"}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},InsertConflict:{description:"Conflict on insert. The body's `code` says which: `row_number_taken` or `thread_index_taken` is permanent for this payload, and `idempotency_key_in_flight` is a retry whose first request with the same Idempotency-Key is still being processed. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Nothing is inserted in any case.\n",content:{"application/json":{schema:{oneOf:[{type:"object",description:"Body of an insert refused for a permanent conflict with the content. `code` is the machine-readable reason and `message` the sentence the caller is shown. The in-flight retry body is `IdempotencyKeyInFlightError` in v1beta2 core.",additionalProperties:false,required:["code","message"],properties:{code:{type:"string",description:"`row_number_taken`: a live item of the organization holds the `rowNumber`. `thread_index_taken`: a live item of the same thread holds the `threadIndex`.\n",enum:["row_number_taken","thread_index_taken"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}},{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}]}}}},MeshkitError429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}}},parameters:{expectedFingerprint:{name:"expectedFingerprint",in:"query",description:`Optional optimistic-concurrency precondition for delete: the
|
|
168
|
+
`,required:false,schema:{type:"string",maxLength:255}}],responses:{204:{description:"Content item deleted"},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"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the stale expectedFingerprint precondition no longer matches the stored content fingerprint, or another live content item of the organization already holds the same rowNumber. Nothing changes.",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the stale expectedFingerprint precondition no longer matches the stored content fingerprint, or another live content item of the organization already holds the same rowNumber. Nothing changes.",content:{"text/plain":{schema:{type:"string"}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},OrganizationSelectionRequired:{description:"Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`.",content:{"application/json":{schema:{type:"object",description:"The call needs an acting organization, the caller named none, and more than one of the caller's live organizations qualifies. Nothing was done by this request. Repeat it naming one of `choices` as `X-Current-Orgid` (the `organizationId` tool argument).",required:["code","message","choices"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `organization_selection_required` for this body.",enum:["organization_selection_required"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."},choices:{type:"array",minItems:2,description:"The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`.",items:{type:"object",description:"An organization the call could act in. Same fields as AvailableOrganization.",required:["id","name","description"],additionalProperties:false,properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},description:"Organization ID.","x-go-name":"ID"},name:{type:"string",description:"Name of the organization."},description:{type:"string",description:"Description of the organization."}}}}}}}}},InsertConflict:{description:"Conflict on insert. The body's `code` says which: `row_number_taken` or `thread_index_taken` is permanent for this payload, and `idempotency_key_in_flight` is a retry whose first request with the same Idempotency-Key is still being processed. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Nothing is inserted in any case.\n",content:{"application/json":{schema:{oneOf:[{type:"object",description:"Body of an insert refused for a permanent conflict with the content. `code` is the machine-readable reason and `message` the sentence the caller is shown. The in-flight retry body is `IdempotencyKeyInFlightError` in v1beta2 core.",additionalProperties:false,required:["code","message"],properties:{code:{type:"string",description:"`row_number_taken`: a live item of the organization holds the `rowNumber`. `thread_index_taken`: a live item of the same thread holds the `threadIndex`.\n",enum:["row_number_taken","thread_index_taken"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}},{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}]}}}},MeshkitError429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}}},parameters:{expectedFingerprint:{name:"expectedFingerprint",in:"query",description:`Optional optimistic-concurrency precondition for delete: the
|
|
169
169
|
delete applies only when the stored fingerprint still matches.
|
|
170
|
-
`,required:false,schema:{type:"string",maxLength:255}},threadId:{name:"threadId",in:"query",required:false,description:"Return one thread: the root item this ID names and every live item\nwhose `threadId` names it.\n",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"}}},currentOrgId:{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},idempotencyKey:{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}},contentItemId:{name:"contentItemId",in:"path",description:"Content item ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of items per page (canonical camelCase form).",schema:{type:"integer",minimum:1}},pagesize:{name:"pagesize",in:"query",description:"Number of items per page. Deprecated alias of pageSize;\ncanonical `pageSize` wins when both are present.\n",deprecated:true,schema:{type:"integer",minimum:1}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{ContentItem:{$schema:"http://json-schema.org/draft-07/schema#",title:"Content Item Schema",description:`Server-returned content item as persisted by the owning service.
|
|
170
|
+
`,required:false,schema:{type:"string",maxLength:255}},threadId:{name:"threadId",in:"query",required:false,description:"Return one thread: the root item this ID names and every live item\nwhose `threadId` names it.\n",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"}}},currentOrgId:{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},idempotencyKey:{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}},contentItemId:{name:"contentItemId",in:"path",description:"Content item ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of items per page (canonical camelCase form).",schema:{type:"integer",minimum:1}},pagesize:{name:"pagesize",in:"query",description:"Number of items per page. Deprecated alias of pageSize;\ncanonical `pageSize` wins when both are present.\n",deprecated:true,schema:{type:"integer",minimum:1}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{ContentItem:{$schema:"http://json-schema.org/draft-07/schema#",title:"Content Item Schema",description:`Server-returned content item as persisted by the owning service.
|
|
171
171
|
Content items carry a row number and a server-computed fingerprint over
|
|
172
172
|
their canonical values; updates are conditional on the fingerprint the
|
|
173
173
|
writer read, so stale writes are refused rather than silently applied.
|
|
@@ -1125,6 +1125,35 @@ export interface components {
|
|
|
1125
1125
|
"text/plain": string;
|
|
1126
1126
|
};
|
|
1127
1127
|
};
|
|
1128
|
+
/** @description Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`. */
|
|
1129
|
+
OrganizationSelectionRequired: {
|
|
1130
|
+
headers: {
|
|
1131
|
+
[name: string]: unknown;
|
|
1132
|
+
};
|
|
1133
|
+
content: {
|
|
1134
|
+
"application/json": {
|
|
1135
|
+
/**
|
|
1136
|
+
* @description Machine-readable reason. Always `organization_selection_required` for this body.
|
|
1137
|
+
* @enum {string}
|
|
1138
|
+
*/
|
|
1139
|
+
code: "organization_selection_required";
|
|
1140
|
+
/** @description The sentence the caller is shown. */
|
|
1141
|
+
message: string;
|
|
1142
|
+
/** @description The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`. */
|
|
1143
|
+
choices: {
|
|
1144
|
+
/**
|
|
1145
|
+
* Format: uuid
|
|
1146
|
+
* @description Organization ID.
|
|
1147
|
+
*/
|
|
1148
|
+
id: string;
|
|
1149
|
+
/** @description Name of the organization. */
|
|
1150
|
+
name: string;
|
|
1151
|
+
/** @description Description of the organization. */
|
|
1152
|
+
description: string;
|
|
1153
|
+
}[];
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1128
1157
|
/** @description Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying. */
|
|
1129
1158
|
MeshkitError429: {
|
|
1130
1159
|
headers: {
|
|
@@ -1175,7 +1204,7 @@ export interface components {
|
|
|
1175
1204
|
};
|
|
1176
1205
|
};
|
|
1177
1206
|
parameters: {
|
|
1178
|
-
/** @description Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies. */
|
|
1207
|
+
/** @description Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector. */
|
|
1179
1208
|
currentOrgId: string;
|
|
1180
1209
|
/** @description ID of the event. */
|
|
1181
1210
|
eventId: string;
|
|
@@ -2334,7 +2363,7 @@ export interface operations {
|
|
|
2334
2363
|
scope?: "user" | "organization";
|
|
2335
2364
|
};
|
|
2336
2365
|
header?: {
|
|
2337
|
-
/** @description Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies. */
|
|
2366
|
+
/** @description Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector. */
|
|
2338
2367
|
"X-Current-Orgid"?: string;
|
|
2339
2368
|
};
|
|
2340
2369
|
path?: never;
|
|
@@ -2520,6 +2549,35 @@ export interface operations {
|
|
|
2520
2549
|
};
|
|
2521
2550
|
content?: never;
|
|
2522
2551
|
};
|
|
2552
|
+
/** @description Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`. */
|
|
2553
|
+
409: {
|
|
2554
|
+
headers: {
|
|
2555
|
+
[name: string]: unknown;
|
|
2556
|
+
};
|
|
2557
|
+
content: {
|
|
2558
|
+
"application/json": {
|
|
2559
|
+
/**
|
|
2560
|
+
* @description Machine-readable reason. Always `organization_selection_required` for this body.
|
|
2561
|
+
* @enum {string}
|
|
2562
|
+
*/
|
|
2563
|
+
code: "organization_selection_required";
|
|
2564
|
+
/** @description The sentence the caller is shown. */
|
|
2565
|
+
message: string;
|
|
2566
|
+
/** @description The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`. */
|
|
2567
|
+
choices: {
|
|
2568
|
+
/**
|
|
2569
|
+
* Format: uuid
|
|
2570
|
+
* @description Organization ID.
|
|
2571
|
+
*/
|
|
2572
|
+
id: string;
|
|
2573
|
+
/** @description Name of the organization. */
|
|
2574
|
+
name: string;
|
|
2575
|
+
/** @description Description of the organization. */
|
|
2576
|
+
description: string;
|
|
2577
|
+
}[];
|
|
2578
|
+
};
|
|
2579
|
+
};
|
|
2580
|
+
};
|
|
2523
2581
|
/** @description Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying. */
|
|
2524
2582
|
429: {
|
|
2525
2583
|
headers: {
|