@meshery/schemas 1.3.17 → 1.3.19

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.
@@ -1,2 +1,2 @@
1
- 'use strict';var e={openapi:"3.0.0",info:{title:"token","x-deprecated":true,description:"Documentation for Meshery Cloud REST APIs for user tokens and sessions",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"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"tokens",description:"Operations related to user tokens and sessions"}],paths:{"/api/identity/tokens":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get tokens",operationId:"getUserTokens",description:"Retrieves tokens associated with the authenticated user.",parameters:[{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Tokens response",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["tokens"],summary:"Generate token",operationId:"generateToken",description:"Generates a token for the authenticated user.",parameters:[{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["tokens"],summary:"Delete token",operationId:"deleteUserToken",description:"Deletes a specific token for the authenticated user.",parameters:[{name:"tokenId",in:"query",description:"ID of the token.",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:"Token deleted",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/{id}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"id",in:"path",description:"Token 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:"Token response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/infinite":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Issue indefinite lifetime token",operationId:"issueIndefiniteLifetimeToken",description:"Creates a non-expiring user token for provider admin use cases.",parameters:[{name:"userId",in:"query",description:"UUID of the user.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{id:{name:"id",in:"path",description:"Token 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:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOAuth:{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}},tokenId:{name:"tokenId",in:"query",description:"ID of the token.",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"}}},userId:{name:"userId",in:"query",description:"UUID of the user.",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"}}},provider:{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},t=e;
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"token","x-deprecated":true,"x-superseded-by":"v1beta3",description:"Documentation for Meshery Cloud REST APIs for user tokens and sessions",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"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"tokens",description:"Operations related to user tokens and sessions"}],paths:{"/api/identity/tokens":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get tokens",operationId:"getUserTokens",description:"Retrieves tokens associated with the authenticated user.",parameters:[{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Tokens response",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["tokens"],summary:"Generate token",operationId:"generateToken",description:"Generates a token for the authenticated user.",parameters:[{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["tokens"],summary:"Delete token",operationId:"deleteUserToken",description:"Deletes a specific token for the authenticated user.",parameters:[{name:"tokenId",in:"query",description:"ID of the token.",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:"Token deleted",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/{id}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"id",in:"path",description:"Token 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:"Token response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/infinite":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Issue indefinite lifetime token",operationId:"issueIndefiniteLifetimeToken",description:"Creates a non-expiring user token for provider admin use cases.",parameters:[{name:"userId",in:"query",description:"UUID of the user.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{id:{name:"id",in:"path",description:"Token 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:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOAuth:{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}},tokenId:{name:"tokenId",in:"query",description:"ID of the token.",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"}}},userId:{name:"userId",in:"query",description:"UUID of the user.",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"}}},provider:{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},t=e;
2
2
  module.exports=t;
@@ -1,2 +1,2 @@
1
- var e={openapi:"3.0.0",info:{title:"token","x-deprecated":true,description:"Documentation for Meshery Cloud REST APIs for user tokens and sessions",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"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"tokens",description:"Operations related to user tokens and sessions"}],paths:{"/api/identity/tokens":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get tokens",operationId:"getUserTokens",description:"Retrieves tokens associated with the authenticated user.",parameters:[{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Tokens response",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["tokens"],summary:"Generate token",operationId:"generateToken",description:"Generates a token for the authenticated user.",parameters:[{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["tokens"],summary:"Delete token",operationId:"deleteUserToken",description:"Deletes a specific token for the authenticated user.",parameters:[{name:"tokenId",in:"query",description:"ID of the token.",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:"Token deleted",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/{id}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"id",in:"path",description:"Token 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:"Token response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/infinite":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Issue indefinite lifetime token",operationId:"issueIndefiniteLifetimeToken",description:"Creates a non-expiring user token for provider admin use cases.",parameters:[{name:"userId",in:"query",description:"UUID of the user.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{id:{name:"id",in:"path",description:"Token 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:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOAuth:{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}},tokenId:{name:"tokenId",in:"query",description:"ID of the token.",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"}}},userId:{name:"userId",in:"query",description:"UUID of the user.",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"}}},provider:{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},t=e;
1
+ var e={openapi:"3.0.0",info:{title:"token","x-deprecated":true,"x-superseded-by":"v1beta3",description:"Documentation for Meshery Cloud REST APIs for user tokens and sessions",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"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"tokens",description:"Operations related to user tokens and sessions"}],paths:{"/api/identity/tokens":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get tokens",operationId:"getUserTokens",description:"Retrieves tokens associated with the authenticated user.",parameters:[{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Tokens response",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["tokens"],summary:"Generate token",operationId:"generateToken",description:"Generates a token for the authenticated user.",parameters:[{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["tokens"],summary:"Delete token",operationId:"deleteUserToken",description:"Deletes a specific token for the authenticated user.",parameters:[{name:"tokenId",in:"query",description:"ID of the token.",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:"Token deleted",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/{id}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"id",in:"path",description:"Token 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:"Token response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/infinite":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Issue indefinite lifetime token",operationId:"issueIndefiniteLifetimeToken",description:"Creates a non-expiring user token for provider admin use cases.",parameters:[{name:"userId",in:"query",description:"UUID of the user.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{id:{name:"id",in:"path",description:"Token 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:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOAuth:{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}},tokenId:{name:"tokenId",in:"query",description:"ID of the token.",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"}}},userId:{name:"userId",in:"query",description:"UUID of the user.",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"}}},provider:{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"},maxLength:500},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"},maxLength:4096},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"},maxLength:4096},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"},maxLength:500},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}},required:["id","user_id","provider"]},"x-order":1,description:"The tokens of the tokenpage."},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2,minimum:0},page:{type:"integer",description:"Current page number (zero-based).","x-order":3,minimum:0},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4,minimum:1}}}}}},t=e;
2
2
  export{t as default};
@@ -78,6 +78,46 @@ export interface paths {
78
78
  patch?: never;
79
79
  trace?: never;
80
80
  };
81
+ "/api/identity/users/self/account-deletion-eligibility": {
82
+ parameters: {
83
+ query?: never;
84
+ header?: never;
85
+ path?: never;
86
+ cookie?: never;
87
+ };
88
+ /**
89
+ * Get account deletion eligibility
90
+ * @description Pre-check evaluated before an account self-deletion is confirmed. Reports whether deleting the caller's account would also require or permit hard-deleting their organization, whether that organization is the shared Layer5 provider organization or carries an active paid subscription, how many of its resources are also shared into other surviving organizations, and the per-resource blast radius of the deletion.
91
+ */
92
+ get: operations["getAccountDeletionEligibility"];
93
+ put?: never;
94
+ post?: never;
95
+ delete?: never;
96
+ options?: never;
97
+ head?: never;
98
+ patch?: never;
99
+ trace?: never;
100
+ };
101
+ "/api/identity/users/self": {
102
+ parameters: {
103
+ query?: never;
104
+ header?: never;
105
+ path?: never;
106
+ cookie?: never;
107
+ };
108
+ get?: never;
109
+ put?: never;
110
+ post?: never;
111
+ /**
112
+ * Delete the caller's own account
113
+ * @description Soft-deletes the caller's Layer5 Cloud user record and hard-deletes the backing identity. When deleteOrganization is true, the caller's organization is hard-deleted in the same operation, subject to server-side re-validation: the organization must not be the shared Layer5 provider organization, must not have an active paid subscription, and organizationNameConfirmation must match the stored organization name. When the organization shares resources into other surviving organizations, confirmSharedResourceDestruction must also be true. Inputs are passed as query parameters because DELETE request bodies are unreliable across the extension proxy and intermediate HTTP clients.
114
+ */
115
+ delete: operations["deleteUserAccount"];
116
+ options?: never;
117
+ head?: never;
118
+ patch?: never;
119
+ trace?: never;
120
+ };
81
121
  }
82
122
  export type webhooks = Record<string, never>;
83
123
  export interface components {
@@ -1087,6 +1127,66 @@ export interface components {
1087
1127
  */
1088
1128
  link: string;
1089
1129
  };
1130
+ /** @description Pre-check result returned before an account self-deletion is confirmed. Describes whether deleting the caller's account would also require or permit hard-deleting their organization and quantifies the blast radius. All fields are always present so the client can render the confirmation state deterministically. */
1131
+ AccountDeletionEligibility: {
1132
+ /** @description True when the caller is the only active member of the organization, so deleting their account would leave the organization without any active members. */
1133
+ isSoleActiveMember: boolean;
1134
+ /**
1135
+ * Format: uuid
1136
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1137
+ */
1138
+ organizationId: string;
1139
+ /** @description Human-readable name of the organization evaluated for deletion. The client echoes this value back as organizationNameConfirmation when requesting deletion. */
1140
+ organizationName: string;
1141
+ /** @description True when this is the shared Layer5 provider organization, which is never deletable regardless of membership. */
1142
+ isProviderOrg: boolean;
1143
+ /** @description True when the organization has an active paid (non-"Personal"/free) plan subscription that must be cancelled before the organization can be hard-deleted. */
1144
+ hasActivePaidSubscription: boolean;
1145
+ /** @description Count of resources reachable from this organization that are also shared into a different, surviving organization; destroying them affects other tenants. When greater than zero the client must set confirmSharedResourceDestruction to proceed. */
1146
+ crossTenantSharedResourceCount: number;
1147
+ /** @description Per-resource counts of the objects that would be destroyed when an organization is hard-deleted alongside the account. */
1148
+ impact: {
1149
+ /** @description Number of workspaces that would be destroyed. */
1150
+ workspaces: number;
1151
+ /** @description Number of environments that would be destroyed. */
1152
+ environments: number;
1153
+ /** @description Number of designs that would be destroyed. */
1154
+ designs: number;
1155
+ /** @description Number of views that would be destroyed. */
1156
+ views: number;
1157
+ /** @description Number of connections that would be destroyed. */
1158
+ connections: number;
1159
+ /** @description Number of credentials that would be destroyed. */
1160
+ credentials: number;
1161
+ /** @description Number of organization members that would lose access. */
1162
+ members: number;
1163
+ /** @description Number of pending invitations that would be revoked. */
1164
+ invitations: number;
1165
+ /** @description Number of academy records (challenges, certifications) that would be destroyed. */
1166
+ academyRecords: number;
1167
+ };
1168
+ };
1169
+ /** @description Per-resource counts of the objects that would be destroyed when an organization is hard-deleted alongside the account. */
1170
+ AccountDeletionImpact: {
1171
+ /** @description Number of workspaces that would be destroyed. */
1172
+ workspaces: number;
1173
+ /** @description Number of environments that would be destroyed. */
1174
+ environments: number;
1175
+ /** @description Number of designs that would be destroyed. */
1176
+ designs: number;
1177
+ /** @description Number of views that would be destroyed. */
1178
+ views: number;
1179
+ /** @description Number of connections that would be destroyed. */
1180
+ connections: number;
1181
+ /** @description Number of credentials that would be destroyed. */
1182
+ credentials: number;
1183
+ /** @description Number of organization members that would lose access. */
1184
+ members: number;
1185
+ /** @description Number of pending invitations that would be revoked. */
1186
+ invitations: number;
1187
+ /** @description Number of academy records (challenges, certifications) that would be destroyed. */
1188
+ academyRecords: number;
1189
+ };
1090
1190
  };
1091
1191
  responses: {
1092
1192
  /** @description Invalid request body or request param */
@@ -1116,6 +1216,15 @@ export interface components {
1116
1216
  "text/plain": string;
1117
1217
  };
1118
1218
  };
1219
+ /** @description Publish request already exists */
1220
+ 409: {
1221
+ headers: {
1222
+ [name: string]: unknown;
1223
+ };
1224
+ content: {
1225
+ "text/plain": string;
1226
+ };
1227
+ };
1119
1228
  /** @description Internal server error */
1120
1229
  500: {
1121
1230
  headers: {
@@ -1125,6 +1234,15 @@ export interface components {
1125
1234
  "text/plain": string;
1126
1235
  };
1127
1236
  };
1237
+ /** @description Deletion preconditions were not met. Returned when the target organization is the shared Layer5 provider organization, has an active paid subscription, the caller is not its sole active member, the typed organizationNameConfirmation did not match, or destruction of shared resources was required but not confirmed. */
1238
+ AccountDeletionConflict: {
1239
+ headers: {
1240
+ [name: string]: unknown;
1241
+ };
1242
+ content: {
1243
+ "text/plain": string;
1244
+ };
1245
+ };
1128
1246
  };
1129
1247
  parameters: {
1130
1248
  /** @description User ID */
@@ -2423,4 +2541,172 @@ export interface operations {
2423
2541
  };
2424
2542
  };
2425
2543
  };
2544
+ getAccountDeletionEligibility: {
2545
+ parameters: {
2546
+ query?: {
2547
+ /** @description Organization to evaluate for deletion alongside the account. When omitted, the caller's currently selected organization is evaluated. */
2548
+ organizationId?: string;
2549
+ };
2550
+ header?: never;
2551
+ path?: never;
2552
+ cookie?: never;
2553
+ };
2554
+ requestBody?: never;
2555
+ responses: {
2556
+ /** @description Account deletion eligibility for the caller */
2557
+ 200: {
2558
+ headers: {
2559
+ [name: string]: unknown;
2560
+ };
2561
+ content: {
2562
+ "application/json": {
2563
+ /** @description True when the caller is the only active member of the organization, so deleting their account would leave the organization without any active members. */
2564
+ isSoleActiveMember: boolean;
2565
+ /**
2566
+ * Format: uuid
2567
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2568
+ */
2569
+ organizationId: string;
2570
+ /** @description Human-readable name of the organization evaluated for deletion. The client echoes this value back as organizationNameConfirmation when requesting deletion. */
2571
+ organizationName: string;
2572
+ /** @description True when this is the shared Layer5 provider organization, which is never deletable regardless of membership. */
2573
+ isProviderOrg: boolean;
2574
+ /** @description True when the organization has an active paid (non-"Personal"/free) plan subscription that must be cancelled before the organization can be hard-deleted. */
2575
+ hasActivePaidSubscription: boolean;
2576
+ /** @description Count of resources reachable from this organization that are also shared into a different, surviving organization; destroying them affects other tenants. When greater than zero the client must set confirmSharedResourceDestruction to proceed. */
2577
+ crossTenantSharedResourceCount: number;
2578
+ /** @description Per-resource counts of the objects that would be destroyed when an organization is hard-deleted alongside the account. */
2579
+ impact: {
2580
+ /** @description Number of workspaces that would be destroyed. */
2581
+ workspaces: number;
2582
+ /** @description Number of environments that would be destroyed. */
2583
+ environments: number;
2584
+ /** @description Number of designs that would be destroyed. */
2585
+ designs: number;
2586
+ /** @description Number of views that would be destroyed. */
2587
+ views: number;
2588
+ /** @description Number of connections that would be destroyed. */
2589
+ connections: number;
2590
+ /** @description Number of credentials that would be destroyed. */
2591
+ credentials: number;
2592
+ /** @description Number of organization members that would lose access. */
2593
+ members: number;
2594
+ /** @description Number of pending invitations that would be revoked. */
2595
+ invitations: number;
2596
+ /** @description Number of academy records (challenges, certifications) that would be destroyed. */
2597
+ academyRecords: number;
2598
+ };
2599
+ };
2600
+ };
2601
+ };
2602
+ /** @description Invalid request body or request param */
2603
+ 400: {
2604
+ headers: {
2605
+ [name: string]: unknown;
2606
+ };
2607
+ content: {
2608
+ "text/plain": string;
2609
+ };
2610
+ };
2611
+ /** @description Expired JWT token used or insufficient privilege */
2612
+ 401: {
2613
+ headers: {
2614
+ [name: string]: unknown;
2615
+ };
2616
+ content: {
2617
+ "text/plain": string;
2618
+ };
2619
+ };
2620
+ /** @description Result not found */
2621
+ 404: {
2622
+ headers: {
2623
+ [name: string]: unknown;
2624
+ };
2625
+ content: {
2626
+ "text/plain": string;
2627
+ };
2628
+ };
2629
+ /** @description Internal server error */
2630
+ 500: {
2631
+ headers: {
2632
+ [name: string]: unknown;
2633
+ };
2634
+ content: {
2635
+ "text/plain": string;
2636
+ };
2637
+ };
2638
+ };
2639
+ };
2640
+ deleteUserAccount: {
2641
+ parameters: {
2642
+ query?: {
2643
+ /** @description When true, hard-delete the caller's organization along with the account. Defaults to false (delete only the account). */
2644
+ deleteOrganization?: boolean;
2645
+ /** @description Identifier of the organization to hard-delete. Required by the server when deleteOrganization is true. */
2646
+ organizationId?: string;
2647
+ /** @description User-typed organization name. The server re-validates this against the stored organization name when deleteOrganization is true and rejects the request on mismatch. */
2648
+ organizationNameConfirmation?: string;
2649
+ /** @description Explicit acknowledgement that resources shared into other surviving organizations will be destroyed. Required by the server when the organization's crossTenantSharedResourceCount is greater than zero. */
2650
+ confirmSharedResourceDestruction?: boolean;
2651
+ };
2652
+ header?: never;
2653
+ path?: never;
2654
+ cookie?: never;
2655
+ };
2656
+ requestBody?: never;
2657
+ responses: {
2658
+ /** @description Account (and organization, when requested) deleted */
2659
+ 204: {
2660
+ headers: {
2661
+ [name: string]: unknown;
2662
+ };
2663
+ content?: never;
2664
+ };
2665
+ /** @description Invalid request body or request param */
2666
+ 400: {
2667
+ headers: {
2668
+ [name: string]: unknown;
2669
+ };
2670
+ content: {
2671
+ "text/plain": string;
2672
+ };
2673
+ };
2674
+ /** @description Expired JWT token used or insufficient privilege */
2675
+ 401: {
2676
+ headers: {
2677
+ [name: string]: unknown;
2678
+ };
2679
+ content: {
2680
+ "text/plain": string;
2681
+ };
2682
+ };
2683
+ /** @description Result not found */
2684
+ 404: {
2685
+ headers: {
2686
+ [name: string]: unknown;
2687
+ };
2688
+ content: {
2689
+ "text/plain": string;
2690
+ };
2691
+ };
2692
+ /** @description Deletion preconditions were not met. Returned when the target organization is the shared Layer5 provider organization, has an active paid subscription, the caller is not its sole active member, the typed organizationNameConfirmation did not match, or destruction of shared resources was required but not confirmed. */
2693
+ 409: {
2694
+ headers: {
2695
+ [name: string]: unknown;
2696
+ };
2697
+ content: {
2698
+ "text/plain": string;
2699
+ };
2700
+ };
2701
+ /** @description Internal server error */
2702
+ 500: {
2703
+ headers: {
2704
+ [name: string]: unknown;
2705
+ };
2706
+ content: {
2707
+ "text/plain": string;
2708
+ };
2709
+ };
2710
+ };
2711
+ };
2426
2712
  }