@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
|
@@ -29,7 +29,7 @@ Authorization: reading requests takes the View Requests key; deciding a
|
|
|
29
29
|
request takes the deciding key of its kind (for \`content_item_approval\`,
|
|
30
30
|
Decide Content Item Approvals). Every key is checked in the session
|
|
31
31
|
organization.
|
|
32
|
-
`,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:"requests",description:"Operations related to requests for a decision."}],paths:{"/api/requests":{get:{"x-internal":["cloud"],tags:["requests"],summary:"List requests",operationId:"listRequests",description:"Returns a paginated list of the requests in the organization of the authenticated session, pending and decided, optionally filtered by kind and status. Ordered by `createdAt`, newest first, unless `order` is `createdAt asc`. Every member holding View Requests sees every request in the organization.\n",parameters:[{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}$"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}],responses:{200:{description:"Requests page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of requests.",required:["page","pageSize","totalCount","requests"],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},requests:{type:"array",items:{"x-go-type":"Request",$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
32
|
+
`,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:"requests",description:"Operations related to requests for a decision."}],paths:{"/api/requests":{get:{"x-internal":["cloud"],tags:["requests"],summary:"List requests",operationId:"listRequests",description:"Returns a paginated list of the requests in the organization of the authenticated session, pending and decided, optionally filtered by kind and status. Ordered by `createdAt`, newest first, unless `order` is `createdAt asc`. Every member holding View Requests sees every request in the organization.\n",parameters:[{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}$"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}],responses:{200:{description:"Requests page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of requests.",required:["page","pageSize","totalCount","requests"],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},requests:{type:"array",items:{"x-go-type":"Request",$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
33
33
|
it has been asked to make about a subject, for example whether a content
|
|
34
34
|
item may run. A request is generic. Its \`kind\` says
|
|
35
35
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -43,7 +43,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
43
43
|
docs/request-contract.md.
|
|
44
44
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
45
45
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
46
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Requests 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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}":{get:{"x-internal":["cloud"],tags:["requests"],summary:"Get a request by ID",operationId:"getRequest",description:"Returns the request with the given id. A `requestId` or `X-Current-Orgid` that is not a UUID answers 400.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Request response",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
46
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Requests 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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}":{get:{"x-internal":["cloud"],tags:["requests"],summary:"Get a request by ID",operationId:"getRequest",description:"Returns the request with the given id. A `requestId` or `X-Current-Orgid` that is not a UUID answers 400.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Request response",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
47
47
|
it has been asked to make about a subject, for example whether a content
|
|
48
48
|
item may run. A request is generic. Its \`kind\` says
|
|
49
49
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -57,7 +57,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
57
57
|
docs/request-contract.md.
|
|
58
58
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
59
59
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
60
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/approve":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Approve a request",operationId:"approveRequest",description:"Approves a pending request: sets `status` to `approved`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the server also sets the subject content item's `approved` to true in the same transaction; this is the only operation that does, since no content item request body carries `approved`. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request approved",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
60
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/approve":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Approve a request",operationId:"approveRequest",description:"Approves a pending request: sets `status` to `approved`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the server also sets the subject content item's `approved` to true in the same transaction; this is the only operation that does, since no content item request body carries `approved`. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request approved",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
61
61
|
it has been asked to make about a subject, for example whether a content
|
|
62
62
|
item may run. A request is generic. Its \`kind\` says
|
|
63
63
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -71,7 +71,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
71
71
|
docs/request-contract.md.
|
|
72
72
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
73
73
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
74
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/deny":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Deny a request",operationId:"denyRequest",description:"Denies a pending request: sets `status` to `denied`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the subject content item stays unapproved. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request denied",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
74
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/deny":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Deny a request",operationId:"denyRequest",description:"Denies a pending request: sets `status` to `denied`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the subject content item stays unapproved. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request denied",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
75
75
|
it has been asked to make about a subject, for example whether a content
|
|
76
76
|
item may run. A request is generic. Its \`kind\` says
|
|
77
77
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -85,7 +85,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
85
85
|
docs/request-contract.md.
|
|
86
86
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
87
87
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
88
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},DecisionNotFound:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{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}$"}},requestId:{name:"requestId",in:"path",description:"Request 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.",schema:{type:"integer",minimum:1}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},kind:{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},status:{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}},schemas:{Request:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
88
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},DecisionNotFound:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{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}$"}},requestId:{name:"requestId",in:"path",description:"Request 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.",schema:{type:"integer",minimum:1}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},kind:{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},status:{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}},schemas:{Request:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
89
89
|
it has been asked to make about a subject, for example whether a content
|
|
90
90
|
item may run. A request is generic. Its \`kind\` says
|
|
91
91
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -29,7 +29,7 @@ Authorization: reading requests takes the View Requests key; deciding a
|
|
|
29
29
|
request takes the deciding key of its kind (for \`content_item_approval\`,
|
|
30
30
|
Decide Content Item Approvals). Every key is checked in the session
|
|
31
31
|
organization.
|
|
32
|
-
`,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:"requests",description:"Operations related to requests for a decision."}],paths:{"/api/requests":{get:{"x-internal":["cloud"],tags:["requests"],summary:"List requests",operationId:"listRequests",description:"Returns a paginated list of the requests in the organization of the authenticated session, pending and decided, optionally filtered by kind and status. Ordered by `createdAt`, newest first, unless `order` is `createdAt asc`. Every member holding View Requests sees every request in the organization.\n",parameters:[{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}$"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}],responses:{200:{description:"Requests page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of requests.",required:["page","pageSize","totalCount","requests"],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},requests:{type:"array",items:{"x-go-type":"Request",$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
32
|
+
`,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:"requests",description:"Operations related to requests for a decision."}],paths:{"/api/requests":{get:{"x-internal":["cloud"],tags:["requests"],summary:"List requests",operationId:"listRequests",description:"Returns a paginated list of the requests in the organization of the authenticated session, pending and decided, optionally filtered by kind and status. Ordered by `createdAt`, newest first, unless `order` is `createdAt asc`. Every member holding View Requests sees every request in the organization.\n",parameters:[{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}$"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}],responses:{200:{description:"Requests page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of requests.",required:["page","pageSize","totalCount","requests"],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},requests:{type:"array",items:{"x-go-type":"Request",$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
33
33
|
it has been asked to make about a subject, for example whether a content
|
|
34
34
|
item may run. A request is generic. Its \`kind\` says
|
|
35
35
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -43,7 +43,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
43
43
|
docs/request-contract.md.
|
|
44
44
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
45
45
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
46
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Requests 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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}":{get:{"x-internal":["cloud"],tags:["requests"],summary:"Get a request by ID",operationId:"getRequest",description:"Returns the request with the given id. A `requestId` or `X-Current-Orgid` that is not a UUID answers 400.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Request response",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
46
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Requests 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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}":{get:{"x-internal":["cloud"],tags:["requests"],summary:"Get a request by ID",operationId:"getRequest",description:"Returns the request with the given id. A `requestId` or `X-Current-Orgid` that is not a UUID answers 400.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Request response",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
47
47
|
it has been asked to make about a subject, for example whether a content
|
|
48
48
|
item may run. A request is generic. Its \`kind\` says
|
|
49
49
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -57,7 +57,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
57
57
|
docs/request-contract.md.
|
|
58
58
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
59
59
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
60
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/approve":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Approve a request",operationId:"approveRequest",description:"Approves a pending request: sets `status` to `approved`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the server also sets the subject content item's `approved` to true in the same transaction; this is the only operation that does, since no content item request body carries `approved`. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request approved",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
60
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/approve":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Approve a request",operationId:"approveRequest",description:"Approves a pending request: sets `status` to `approved`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the server also sets the subject content item's `approved` to true in the same transaction; this is the only operation that does, since no content item request body carries `approved`. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request approved",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
61
61
|
it has been asked to make about a subject, for example whether a content
|
|
62
62
|
item may run. A request is generic. Its \`kind\` says
|
|
63
63
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -71,7 +71,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
71
71
|
docs/request-contract.md.
|
|
72
72
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
73
73
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
74
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/deny":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Deny a request",operationId:"denyRequest",description:"Denies a pending request: sets `status` to `denied`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the subject content item stays unapproved. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request denied",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
74
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/requests/{requestId}/deny":{post:{"x-internal":["cloud"],tags:["requests"],summary:"Deny a request",operationId:"denyRequest",description:"Denies a pending request: sets `status` to `denied`, `decidedBy` to the session user, `decidedAt` to now and `note` to the optional note. The caller must hold the deciding permission key of the request's `kind`, else 403 and nothing changes. For `content_item_approval` the subject content item stays unapproved. The refusals are checked in this order, and each changes nothing and leaves the request as it was: a request that is not `pending` answers 409 whatever its subject (decided, or `superseded`, including by a soft delete of its subject); a pending request whose subject is hard-deleted answers 404, as does an unknown request. The body may be omitted.\n",parameters:[{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}$"}},{name:"requestId",in:"path",description:"Request ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],requestBody:{required:false,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for approving or denying a request. Contains only the decider's note; `status`, `decidedBy` and `decidedAt` are set by the server from the operation and the session.\n",properties:{note:{type:"string",description:"Optional note left with the decision, shown to the requester.",minLength:1,maxLength:2e3}}}}}},responses:{200:{description:"Request denied",content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
75
75
|
it has been asked to make about a subject, for example whether a content
|
|
76
76
|
item may run. A request is generic. Its \`kind\` says
|
|
77
77
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -85,7 +85,7 @@ as of the open request. Closed requests are kept as history. See
|
|
|
85
85
|
docs/request-contract.md.
|
|
86
86
|
`,type:"object",additionalProperties:false,required:["id","organizationId","kind","subjectType","subjectId","requesterId","status","createdAt","updatedAt"],properties:{id:{description:"Server-generated request ID.","x-oapi-codegen-extra-tags":{db:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organizationId:{description:"Owning organization ID. Derived from the subject, never client-settable.","x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},kind:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"},"x-oapi-codegen-extra-tags":{db:"kind"},"x-order":3},subjectType:{type:"string",description:"Type of the subject, the construct name in snake_case, for example `content_item`. Fixed by the kind.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"subject_type"},"x-order":4},subjectId:{description:"ID of the subject the request is about.","x-go-name":"SubjectID","x-oapi-codegen-extra-tags":{db:"subject_id"},"x-order":5,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},requesterId:{description:`ID of the user on whose behalf the request was made: the user whose session or AI app made the write that needs a decision. Server-set.
|
|
87
87
|
`,"x-go-name":"RequesterID","x-oapi-codegen-extra-tags":{db:"requester_id"},"x-order":6,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},createdByClient:{type:"string",description:`OAuth client ID of the AI app that made the write behind the request. Server-set from the access token. Empty or omitted when a person made it.
|
|
88
|
-
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},DecisionNotFound:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{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}$"}},requestId:{name:"requestId",in:"path",description:"Request 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.",schema:{type:"integer",minimum:1}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},kind:{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},status:{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}},schemas:{Request:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
88
|
+
`,maxLength:255,"x-oapi-codegen-extra-tags":{db:"created_by_client",json:"createdByClient,omitempty"},"x-order":7},status:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":8},decidedBy:{description:"ID of the user who approved or denied the request. Derived from the session; omitted while the request is pending and when it is superseded, since no user decided it.","x-go-name":"DecidedBy","x-oapi-codegen-extra-tags":{db:"decided_by",json:"decidedBy,omitempty"},"x-order":9,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},decidedAt:{type:"string",format:"date-time",description:"Time the request was decided, or superseded by a content edit or a delete (decidedBy and note are then omitted). Null while the request is pending.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"decided_at"},"x-order":10},note:{type:"string",description:"The note the decider left with the decision. Omitted while the request is pending, when it is superseded, and when the decider left none.",maxLength:2e3,"x-oapi-codegen-extra-tags":{db:"note",json:"note,omitempty"},"x-order":11},createdAt:{description:"Timestamp of request creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":12,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last request modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":13,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the request is not pending, so it was already decided or superseded by a content edit or a delete and is never changed, or its subject content item is soft-deleted (deletedAt set), which superseded the request. Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},DecisionNotFound:{description:"Not found - the request does not exist in the organization, or its subject content item no longer exists (hard-deleted). Nothing changes; the request stays as it was.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{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}$"}},requestId:{name:"requestId",in:"path",description:"Request 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.",schema:{type:"integer",minimum:1}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},kind:{name:"kind",in:"query",required:false,description:"Filter by request kind.",schema:{type:"string",description:"What a request asks a person to decide. Each kind fixes the subject type and names the permission key that may decide it, in `x-decision-key` (the generated constant name in models/permissions). A kind is added together with its deciding key and its handling in docs/request-contract.md.\n",enum:["content_item_approval"],"x-enum-varnames":["RequestKindContentItemApproval"],"x-enumDescriptions":{content_item_approval:"A content item, written by a person or an AI app, waits for a person to approve it before it may run. The subject is a `content_item`.\n"},"x-decision-key":{content_item_approval:"CatalogManagementDecideContentItemApprovals"},"x-subject-type":{content_item_approval:"content_item"}}},status:{name:"status",in:"query",required:false,description:"Filter by request status, for example `superseded` for the requests a content edit or a delete closed before a decision.",schema:{type:"string",description:"Lifecycle of a request. `pending` until it is decided. `approved` or `denied` once, by a person with the kind's deciding key. `superseded` when a content edit or a delete changes the subject before a decision: the request is closed with `decidedAt` set, no `decidedBy` and no note, and a fresh pending request opens if the edit leaves the item unapproved, whatever the result. Each of `approved`, `denied` and `superseded` is final.\n",enum:["pending","approved","denied","superseded"],"x-enum-varnames":["RequestStatusPending","RequestStatusApproved","RequestStatusDenied","RequestStatusSuperseded"]}}},schemas:{Request:{$schema:"http://json-schema.org/draft-07/schema#",title:"Request Schema",description:`Server-returned request: one decision that a person with the right to make
|
|
89
89
|
it has been asked to make about a subject, for example whether a content
|
|
90
90
|
item may run. A request is generic. Its \`kind\` says
|
|
91
91
|
what is being decided and which permission key may decide it, and it names
|
|
@@ -1045,6 +1045,35 @@ export interface components {
|
|
|
1045
1045
|
"text/plain": string;
|
|
1046
1046
|
};
|
|
1047
1047
|
};
|
|
1048
|
+
/** @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`. */
|
|
1049
|
+
OrganizationSelectionRequired: {
|
|
1050
|
+
headers: {
|
|
1051
|
+
[name: string]: unknown;
|
|
1052
|
+
};
|
|
1053
|
+
content: {
|
|
1054
|
+
"application/json": {
|
|
1055
|
+
/**
|
|
1056
|
+
* @description Machine-readable reason. Always `organization_selection_required` for this body.
|
|
1057
|
+
* @enum {string}
|
|
1058
|
+
*/
|
|
1059
|
+
code: "organization_selection_required";
|
|
1060
|
+
/** @description The sentence the caller is shown. */
|
|
1061
|
+
message: string;
|
|
1062
|
+
/** @description The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`. */
|
|
1063
|
+
choices: {
|
|
1064
|
+
/**
|
|
1065
|
+
* Format: uuid
|
|
1066
|
+
* @description Organization ID.
|
|
1067
|
+
*/
|
|
1068
|
+
id: string;
|
|
1069
|
+
/** @description Name of the organization. */
|
|
1070
|
+
name: string;
|
|
1071
|
+
/** @description Description of the organization. */
|
|
1072
|
+
description: string;
|
|
1073
|
+
}[];
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
};
|
|
1048
1077
|
/** @description Conflict - an earlier request with the same Idempotency-Key is still being processed. Nothing is 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. The body's `code` is `idempotency_key_in_flight`. */
|
|
1049
1078
|
IdempotencyKeyInFlight: {
|
|
1050
1079
|
headers: {
|
|
@@ -1089,7 +1118,7 @@ export interface components {
|
|
|
1089
1118
|
};
|
|
1090
1119
|
};
|
|
1091
1120
|
parameters: {
|
|
1092
|
-
/** @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. */
|
|
1121
|
+
/** @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. */
|
|
1093
1122
|
currentOrgId: string;
|
|
1094
1123
|
/** @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. */
|
|
1095
1124
|
idempotencyKey: string;
|
|
@@ -1138,7 +1167,7 @@ export interface operations {
|
|
|
1138
1167
|
status?: "pending" | "scheduled" | "assigned" | "claimed" | "running" | "retrying" | "completed" | "failed" | "cancelled";
|
|
1139
1168
|
};
|
|
1140
1169
|
header?: {
|
|
1141
|
-
/** @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. */
|
|
1170
|
+
/** @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. */
|
|
1142
1171
|
"X-Current-Orgid"?: string;
|
|
1143
1172
|
};
|
|
1144
1173
|
path?: never;
|
|
@@ -1433,6 +1462,35 @@ export interface operations {
|
|
|
1433
1462
|
"text/plain": string;
|
|
1434
1463
|
};
|
|
1435
1464
|
};
|
|
1465
|
+
/** @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`. */
|
|
1466
|
+
409: {
|
|
1467
|
+
headers: {
|
|
1468
|
+
[name: string]: unknown;
|
|
1469
|
+
};
|
|
1470
|
+
content: {
|
|
1471
|
+
"application/json": {
|
|
1472
|
+
/**
|
|
1473
|
+
* @description Machine-readable reason. Always `organization_selection_required` for this body.
|
|
1474
|
+
* @enum {string}
|
|
1475
|
+
*/
|
|
1476
|
+
code: "organization_selection_required";
|
|
1477
|
+
/** @description The sentence the caller is shown. */
|
|
1478
|
+
message: string;
|
|
1479
|
+
/** @description The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`. */
|
|
1480
|
+
choices: {
|
|
1481
|
+
/**
|
|
1482
|
+
* Format: uuid
|
|
1483
|
+
* @description Organization ID.
|
|
1484
|
+
*/
|
|
1485
|
+
id: string;
|
|
1486
|
+
/** @description Name of the organization. */
|
|
1487
|
+
name: string;
|
|
1488
|
+
/** @description Description of the organization. */
|
|
1489
|
+
description: string;
|
|
1490
|
+
}[];
|
|
1491
|
+
};
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1436
1494
|
/** @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. */
|
|
1437
1495
|
429: {
|
|
1438
1496
|
headers: {
|
|
@@ -1946,7 +2004,7 @@ export interface operations {
|
|
|
1946
2004
|
parameters: {
|
|
1947
2005
|
query?: never;
|
|
1948
2006
|
header?: {
|
|
1949
|
-
/** @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. */
|
|
2007
|
+
/** @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. */
|
|
1950
2008
|
"X-Current-Orgid"?: string;
|
|
1951
2009
|
};
|
|
1952
2010
|
path: {
|
|
@@ -2237,6 +2295,35 @@ export interface operations {
|
|
|
2237
2295
|
"text/plain": string;
|
|
2238
2296
|
};
|
|
2239
2297
|
};
|
|
2298
|
+
/** @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`. */
|
|
2299
|
+
409: {
|
|
2300
|
+
headers: {
|
|
2301
|
+
[name: string]: unknown;
|
|
2302
|
+
};
|
|
2303
|
+
content: {
|
|
2304
|
+
"application/json": {
|
|
2305
|
+
/**
|
|
2306
|
+
* @description Machine-readable reason. Always `organization_selection_required` for this body.
|
|
2307
|
+
* @enum {string}
|
|
2308
|
+
*/
|
|
2309
|
+
code: "organization_selection_required";
|
|
2310
|
+
/** @description The sentence the caller is shown. */
|
|
2311
|
+
message: string;
|
|
2312
|
+
/** @description The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`. */
|
|
2313
|
+
choices: {
|
|
2314
|
+
/**
|
|
2315
|
+
* Format: uuid
|
|
2316
|
+
* @description Organization ID.
|
|
2317
|
+
*/
|
|
2318
|
+
id: string;
|
|
2319
|
+
/** @description Name of the organization. */
|
|
2320
|
+
name: string;
|
|
2321
|
+
/** @description Description of the organization. */
|
|
2322
|
+
description: string;
|
|
2323
|
+
}[];
|
|
2324
|
+
};
|
|
2325
|
+
};
|
|
2326
|
+
};
|
|
2240
2327
|
/** @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. */
|
|
2241
2328
|
429: {
|
|
2242
2329
|
headers: {
|