@meshery/schemas 1.3.9 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/cloudApi.d.mts +28 -28
  2. package/dist/cloudApi.d.ts +28 -28
  3. package/dist/constructs/v1alpha1/capability/Capability.d.ts +106 -111
  4. package/dist/constructs/v1alpha1/core/Core.d.ts +822 -734
  5. package/dist/constructs/v1alpha2/catalog/Catalog.d.ts +45 -40
  6. package/dist/constructs/v1alpha3/relationship/Relationship.d.ts +1829 -1716
  7. package/dist/constructs/v1beta1/academy/Academy.d.ts +6023 -6642
  8. package/dist/constructs/v1beta1/badge/Badge.d.ts +439 -600
  9. package/dist/constructs/v1beta1/capability/Capability.d.ts +106 -111
  10. package/dist/constructs/v1beta1/catalog/Catalog.d.ts +45 -40
  11. package/dist/constructs/v1beta1/category/Category.d.ts +38 -26
  12. package/dist/constructs/v1beta1/component/Component.d.ts +833 -729
  13. package/dist/constructs/v1beta1/connection/Connection.d.ts +1170 -1357
  14. package/dist/constructs/v1beta1/core/Core.d.ts +822 -734
  15. package/dist/constructs/v1beta1/credential/Credential.d.ts +458 -593
  16. package/dist/constructs/v1beta1/environment/Environment.d.ts +666 -835
  17. package/dist/constructs/v1beta1/evaluation/Evaluation.d.ts +6142 -5619
  18. package/dist/constructs/v1beta1/event/Event.d.ts +527 -898
  19. package/dist/constructs/v1beta1/feature/Feature.d.ts +343 -389
  20. package/dist/constructs/v1beta1/invitation/Invitation.d.ts +877 -1244
  21. package/dist/constructs/v1beta1/key/Key.d.ts +444 -589
  22. package/dist/constructs/v1beta1/keychain/Keychain.d.ts +575 -796
  23. package/dist/constructs/v1beta1/model/Model.d.ts +598 -572
  24. package/dist/constructs/v1beta1/organization/Organization.d.ts +1410 -1829
  25. package/dist/constructs/v1beta1/pattern/Pattern.d.ts +17988 -17171
  26. package/dist/constructs/v1beta1/plan/Plan.d.ts +115 -159
  27. package/dist/constructs/v1beta1/role/Role.d.ts +688 -933
  28. package/dist/constructs/v1beta1/schedule/Schedule.d.ts +315 -425
  29. package/dist/constructs/v1beta1/subcategory/Subcategory.d.ts +61 -18
  30. package/dist/constructs/v1beta1/subscription/Subscription.d.ts +674 -839
  31. package/dist/constructs/v1beta1/support/Support.d.ts +74 -115
  32. package/dist/constructs/v1beta1/system/System.d.ts +250 -385
  33. package/dist/constructs/v1beta1/team/Team.d.ts +762 -1028
  34. package/dist/constructs/v1beta1/token/Token.d.ts +475 -612
  35. package/dist/constructs/v1beta1/user/User.d.ts +1553 -1722
  36. package/dist/constructs/v1beta1/view/View.d.ts +664 -833
  37. package/dist/constructs/v1beta1/workspace/Workspace.d.ts +4705 -4910
  38. package/dist/constructs/v1beta2/academy/Academy.d.ts +7246 -7864
  39. package/dist/constructs/v1beta2/badge/Badge.d.ts +453 -610
  40. package/dist/constructs/v1beta2/catalog/Catalog.d.ts +45 -40
  41. package/dist/constructs/v1beta2/component/Component.d.ts +851 -747
  42. package/dist/constructs/v1beta2/connection/Connection.d.ts +1189 -1376
  43. package/dist/constructs/v1beta2/core/Core.d.ts +856 -768
  44. package/dist/constructs/v1beta2/credential/Credential.d.ts +437 -572
  45. package/dist/constructs/v1beta2/design/Design.d.ts +18631 -17846
  46. package/dist/constructs/v1beta2/event/Event.d.ts +575 -946
  47. package/dist/constructs/v1beta2/invitation/Invitation.d.ts +901 -1268
  48. package/dist/constructs/v1beta2/key/Key.d.ts +454 -599
  49. package/dist/constructs/v1beta2/keychain/Keychain.d.ts +585 -806
  50. package/dist/constructs/v1beta2/model/Model.d.ts +636 -610
  51. package/dist/constructs/v1beta2/organization/Organization.d.ts +2017 -2458
  52. package/dist/constructs/v1beta2/plan/Plan.d.ts +128 -169
  53. package/dist/constructs/v1beta2/relationship/Relationship.d.ts +2013 -1844
  54. package/dist/constructs/v1beta2/role/Role.d.ts +695 -940
  55. package/dist/constructs/v1beta2/schedule/Schedule.d.ts +356 -466
  56. package/dist/constructs/v1beta2/subscription/Subscription.d.ts +701 -866
  57. package/dist/constructs/v1beta2/team/Team.d.ts +852 -1118
  58. package/dist/constructs/v1beta2/token/Token.d.ts +479 -616
  59. package/dist/constructs/v1beta2/user/User.d.ts +1553 -1722
  60. package/dist/constructs/v1beta2/view/View.d.ts +669 -838
  61. package/dist/constructs/v1beta3/academy/Academy.d.ts +7246 -7864
  62. package/dist/constructs/v1beta3/academy/AcademySchema.js +1 -1
  63. package/dist/constructs/v1beta3/academy/AcademySchema.mjs +1 -1
  64. package/dist/constructs/v1beta3/component/Component.d.ts +857 -753
  65. package/dist/constructs/v1beta3/connection/Connection.d.ts +5559 -5053
  66. package/dist/constructs/v1beta3/connection/ConnectionSchema.js +6 -6
  67. package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +6 -6
  68. package/dist/constructs/v1beta3/design/Design.d.ts +5297 -5719
  69. package/dist/constructs/v1beta3/design/DesignSchema.js +2 -2
  70. package/dist/constructs/v1beta3/design/DesignSchema.mjs +2 -2
  71. package/dist/constructs/v1beta3/environment/Environment.d.ts +689 -858
  72. package/dist/constructs/v1beta3/event/Event.d.ts +666 -1041
  73. package/dist/constructs/v1beta3/event/EventSchema.js +1 -1
  74. package/dist/constructs/v1beta3/event/EventSchema.mjs +1 -1
  75. package/dist/constructs/v1beta3/filter/Filter.d.ts +1300 -1438
  76. package/dist/constructs/v1beta3/filter/FilterSchema.js +7 -7
  77. package/dist/constructs/v1beta3/filter/FilterSchema.mjs +7 -7
  78. package/dist/constructs/v1beta3/invitation/Invitation.d.ts +911 -1278
  79. package/dist/constructs/v1beta3/invitation/InvitationSchema.js +1 -1
  80. package/dist/constructs/v1beta3/invitation/InvitationSchema.mjs +1 -1
  81. package/dist/constructs/v1beta3/performance_profile/PerformanceProfile.d.ts +1114 -1412
  82. package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.js +1 -1
  83. package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.mjs +1 -1
  84. package/dist/constructs/v1beta3/plan/Plan.d.ts +156 -197
  85. package/dist/constructs/v1beta3/relationship/Relationship.d.ts +2013 -1844
  86. package/dist/constructs/v1beta3/subscription/Subscription.d.ts +804 -969
  87. package/dist/constructs/v1beta3/token/Token.d.ts +480 -617
  88. package/dist/constructs/v1beta3/token/TokenSchema.js +1 -1
  89. package/dist/constructs/v1beta3/token/TokenSchema.mjs +1 -1
  90. package/dist/constructs/v1beta3/workspace/Workspace.d.ts +4825 -5033
  91. package/dist/index.d.mts +5032 -5501
  92. package/dist/index.d.ts +5032 -5501
  93. package/dist/mesheryApi.d.mts +8 -8
  94. package/dist/mesheryApi.d.ts +8 -8
  95. package/dist/mesheryApi.js +1 -1
  96. package/dist/mesheryApi.mjs +1 -1
  97. package/dist/permissions.d.mts +25 -1
  98. package/dist/permissions.d.ts +25 -1
  99. package/dist/permissions.js +1 -1
  100. package/dist/permissions.mjs +1 -1
  101. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- 'use strict';var e={openapi:"3.0.0",info:{title:"token",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:"v1beta3"},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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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",minLength:1,maxLength:255}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}],responses:{201:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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 to delete.",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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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/{tokenId}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"tokenId",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.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},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 to issue the indefinite token for.",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:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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:{tokenId:{name:"tokenId",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"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",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"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",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"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},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",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"token",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:"v1beta3"},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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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",minLength:1,maxLength:255}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}],responses:{201:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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 to delete.",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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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/{tokenId}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"tokenId",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.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},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 to issue the indefinite token for.",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:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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:{tokenId:{name:"tokenId",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"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",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"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",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"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},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",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
2
2
  module.exports=t;
@@ -1,2 +1,2 @@
1
- var e={openapi:"3.0.0",info:{title:"token",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:"v1beta3"},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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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",minLength:1,maxLength:255}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}],responses:{201:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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 to delete.",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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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/{tokenId}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"tokenId",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.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},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 to issue the indefinite token for.",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:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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:{tokenId:{name:"tokenId",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"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",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"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",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"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},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",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","userId","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},userId:{description:"UUID of the user who owns the token.","x-go-name":"UserID","x-oapi-codegen-extra-tags":{db:"user_id",json:"userId"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
1
+ var e={openapi:"3.0.0",info:{title:"token",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:"v1beta3"},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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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",minLength:1,maxLength:255}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}],responses:{201:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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 to delete.",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","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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/{tokenId}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"tokenId",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.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},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 to issue the indefinite token for.",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:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},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:{tokenId:{name:"tokenId",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"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",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"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",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"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},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",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string",maxLength:500}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,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-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
2
2
  export{t as default};