@meshery/schemas 1.0.9 → 1.1.1

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 (236) hide show
  1. package/README.md +4 -3
  2. package/dist/cloudApi.d.mts +17180 -16914
  3. package/dist/cloudApi.d.ts +17180 -16914
  4. package/dist/cloudApi.js +1 -1
  5. package/dist/cloudApi.mjs +1 -1
  6. package/dist/constructs/v1beta1/badge/BadgeSchema.js +1 -1
  7. package/dist/constructs/v1beta1/badge/BadgeSchema.mjs +1 -1
  8. package/dist/constructs/v1beta1/connection/ConnectionSchema.js +1 -1
  9. package/dist/constructs/v1beta1/connection/ConnectionSchema.mjs +1 -1
  10. package/dist/constructs/v1beta1/credential/CredentialSchema.js +4 -4
  11. package/dist/constructs/v1beta1/credential/CredentialSchema.mjs +4 -4
  12. package/dist/constructs/v1beta1/environment/EnvironmentSchema.js +1 -1
  13. package/dist/constructs/v1beta1/environment/EnvironmentSchema.mjs +1 -1
  14. package/dist/constructs/v1beta1/event/EventSchema.js +1 -1
  15. package/dist/constructs/v1beta1/event/EventSchema.mjs +1 -1
  16. package/dist/constructs/v1beta1/key/KeySchema.js +1 -1
  17. package/dist/constructs/v1beta1/key/KeySchema.mjs +1 -1
  18. package/dist/constructs/v1beta1/keychain/KeychainSchema.js +1 -1
  19. package/dist/constructs/v1beta1/keychain/KeychainSchema.mjs +1 -1
  20. package/dist/constructs/v1beta1/model/ModelSchema.js +1 -1
  21. package/dist/constructs/v1beta1/model/ModelSchema.mjs +1 -1
  22. package/dist/constructs/v1beta1/organization/OrganizationSchema.js +1 -1
  23. package/dist/constructs/v1beta1/organization/OrganizationSchema.mjs +1 -1
  24. package/dist/constructs/v1beta1/pattern/PatternSchema.js +1 -1
  25. package/dist/constructs/v1beta1/pattern/PatternSchema.mjs +1 -1
  26. package/dist/constructs/v1beta1/role/RoleSchema.js +1 -1
  27. package/dist/constructs/v1beta1/role/RoleSchema.mjs +1 -1
  28. package/dist/constructs/v1beta1/schedule/ScheduleSchema.js +1 -1
  29. package/dist/constructs/v1beta1/schedule/ScheduleSchema.mjs +1 -1
  30. package/dist/constructs/v1beta1/team/TeamSchema.js +1 -1
  31. package/dist/constructs/v1beta1/team/TeamSchema.mjs +1 -1
  32. package/dist/constructs/v1beta1/user/UserSchema.js +1 -1
  33. package/dist/constructs/v1beta1/user/UserSchema.mjs +1 -1
  34. package/dist/constructs/v1beta1/view/ViewSchema.js +1 -1
  35. package/dist/constructs/v1beta1/view/ViewSchema.mjs +1 -1
  36. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.js +2 -2
  37. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.mjs +2 -2
  38. package/dist/constructs/v1beta2/badge/Badge.d.mts +564 -0
  39. package/dist/constructs/v1beta2/badge/Badge.d.ts +564 -0
  40. package/dist/constructs/v1beta2/badge/Badge.js +1 -0
  41. package/dist/constructs/v1beta2/badge/Badge.mjs +0 -0
  42. package/dist/constructs/v1beta2/badge/BadgeSchema.d.mts +7 -0
  43. package/dist/constructs/v1beta2/badge/BadgeSchema.d.ts +7 -0
  44. package/dist/constructs/v1beta2/badge/BadgeSchema.js +2 -0
  45. package/dist/constructs/v1beta2/badge/BadgeSchema.mjs +2 -0
  46. package/dist/constructs/v1beta2/connection/ConnectionSchema.js +1 -1
  47. package/dist/constructs/v1beta2/connection/ConnectionSchema.mjs +1 -1
  48. package/dist/constructs/v1beta2/credential/Credential.d.mts +536 -0
  49. package/dist/constructs/v1beta2/credential/Credential.d.ts +536 -0
  50. package/dist/constructs/v1beta2/credential/Credential.js +1 -0
  51. package/dist/constructs/v1beta2/credential/Credential.mjs +0 -0
  52. package/dist/constructs/v1beta2/credential/CredentialSchema.d.mts +7 -0
  53. package/dist/constructs/v1beta2/credential/CredentialSchema.d.ts +7 -0
  54. package/dist/constructs/v1beta2/credential/CredentialSchema.js +7 -0
  55. package/dist/constructs/v1beta2/credential/CredentialSchema.mjs +7 -0
  56. package/dist/constructs/v1beta2/design/DesignSchema.js +10 -2
  57. package/dist/constructs/v1beta2/design/DesignSchema.mjs +10 -2
  58. package/dist/constructs/v1beta2/event/EventSchema.js +1 -1
  59. package/dist/constructs/v1beta2/event/EventSchema.mjs +1 -1
  60. package/dist/constructs/v1beta2/invitation/InvitationSchema.js +1 -1
  61. package/dist/constructs/v1beta2/invitation/InvitationSchema.mjs +1 -1
  62. package/dist/constructs/v1beta2/key/Key.d.mts +523 -0
  63. package/dist/constructs/v1beta2/key/Key.d.ts +523 -0
  64. package/dist/constructs/v1beta2/key/Key.js +1 -0
  65. package/dist/constructs/v1beta2/key/Key.mjs +0 -0
  66. package/dist/constructs/v1beta2/key/KeySchema.d.mts +7 -0
  67. package/dist/constructs/v1beta2/key/KeySchema.d.ts +7 -0
  68. package/dist/constructs/v1beta2/key/KeySchema.js +2 -0
  69. package/dist/constructs/v1beta2/key/KeySchema.mjs +2 -0
  70. package/dist/constructs/v1beta2/keychain/Keychain.d.mts +651 -0
  71. package/dist/constructs/v1beta2/keychain/Keychain.d.ts +651 -0
  72. package/dist/constructs/v1beta2/keychain/Keychain.js +1 -0
  73. package/dist/constructs/v1beta2/keychain/Keychain.mjs +0 -0
  74. package/dist/constructs/v1beta2/keychain/KeychainSchema.d.mts +7 -0
  75. package/dist/constructs/v1beta2/keychain/KeychainSchema.d.ts +7 -0
  76. package/dist/constructs/v1beta2/keychain/KeychainSchema.js +2 -0
  77. package/dist/constructs/v1beta2/keychain/KeychainSchema.mjs +2 -0
  78. package/dist/constructs/v1beta2/model/Model.d.mts +571 -0
  79. package/dist/constructs/v1beta2/model/Model.d.ts +571 -0
  80. package/dist/constructs/v1beta2/model/Model.js +1 -0
  81. package/dist/constructs/v1beta2/model/Model.mjs +0 -0
  82. package/dist/constructs/v1beta2/model/ModelSchema.d.mts +7 -0
  83. package/dist/constructs/v1beta2/model/ModelSchema.d.ts +7 -0
  84. package/dist/constructs/v1beta2/model/ModelSchema.js +6 -0
  85. package/dist/constructs/v1beta2/model/ModelSchema.mjs +6 -0
  86. package/dist/constructs/v1beta2/organization/Organization.d.mts +1986 -0
  87. package/dist/constructs/v1beta2/organization/Organization.d.ts +1986 -0
  88. package/dist/constructs/v1beta2/organization/Organization.js +1 -0
  89. package/dist/constructs/v1beta2/organization/Organization.mjs +0 -0
  90. package/dist/constructs/v1beta2/organization/OrganizationSchema.d.mts +7 -0
  91. package/dist/constructs/v1beta2/organization/OrganizationSchema.d.ts +7 -0
  92. package/dist/constructs/v1beta2/organization/OrganizationSchema.js +2 -0
  93. package/dist/constructs/v1beta2/organization/OrganizationSchema.mjs +2 -0
  94. package/dist/constructs/v1beta2/plan/PlanSchema.js +1 -1
  95. package/dist/constructs/v1beta2/plan/PlanSchema.mjs +1 -1
  96. package/dist/constructs/v1beta2/role/Role.d.mts +751 -0
  97. package/dist/constructs/v1beta2/role/Role.d.ts +751 -0
  98. package/dist/constructs/v1beta2/role/Role.js +1 -0
  99. package/dist/constructs/v1beta2/role/Role.mjs +0 -0
  100. package/dist/constructs/v1beta2/role/RoleSchema.d.mts +7 -0
  101. package/dist/constructs/v1beta2/role/RoleSchema.d.ts +7 -0
  102. package/dist/constructs/v1beta2/role/RoleSchema.js +2 -0
  103. package/dist/constructs/v1beta2/role/RoleSchema.mjs +2 -0
  104. package/dist/constructs/v1beta2/schedule/Schedule.d.mts +380 -0
  105. package/dist/constructs/v1beta2/schedule/Schedule.d.ts +380 -0
  106. package/dist/constructs/v1beta2/schedule/Schedule.js +1 -0
  107. package/dist/constructs/v1beta2/schedule/Schedule.mjs +0 -0
  108. package/dist/constructs/v1beta2/schedule/ScheduleSchema.d.mts +7 -0
  109. package/dist/constructs/v1beta2/schedule/ScheduleSchema.d.ts +7 -0
  110. package/dist/constructs/v1beta2/schedule/ScheduleSchema.js +13 -0
  111. package/dist/constructs/v1beta2/schedule/ScheduleSchema.mjs +13 -0
  112. package/dist/constructs/v1beta2/subscription/SubscriptionSchema.js +1 -1
  113. package/dist/constructs/v1beta2/subscription/SubscriptionSchema.mjs +1 -1
  114. package/dist/constructs/v1beta2/team/Team.d.mts +939 -0
  115. package/dist/constructs/v1beta2/team/Team.d.ts +939 -0
  116. package/dist/constructs/v1beta2/team/Team.js +1 -0
  117. package/dist/constructs/v1beta2/team/Team.mjs +0 -0
  118. package/dist/constructs/v1beta2/team/TeamSchema.d.mts +7 -0
  119. package/dist/constructs/v1beta2/team/TeamSchema.d.ts +7 -0
  120. package/dist/constructs/v1beta2/team/TeamSchema.js +2 -0
  121. package/dist/constructs/v1beta2/team/TeamSchema.mjs +2 -0
  122. package/dist/constructs/v1beta2/token/TokenSchema.js +1 -1
  123. package/dist/constructs/v1beta2/token/TokenSchema.mjs +1 -1
  124. package/dist/constructs/v1beta2/user/User.d.mts +1831 -0
  125. package/dist/constructs/v1beta2/user/User.d.ts +1831 -0
  126. package/dist/constructs/v1beta2/user/User.js +1 -0
  127. package/dist/constructs/v1beta2/user/User.mjs +0 -0
  128. package/dist/constructs/v1beta2/user/UserSchema.d.mts +7 -0
  129. package/dist/constructs/v1beta2/user/UserSchema.d.ts +7 -0
  130. package/dist/constructs/v1beta2/user/UserSchema.js +2 -0
  131. package/dist/constructs/v1beta2/user/UserSchema.mjs +2 -0
  132. package/dist/constructs/v1beta2/view/View.d.mts +810 -0
  133. package/dist/constructs/v1beta2/view/View.d.ts +810 -0
  134. package/dist/constructs/v1beta2/view/View.js +1 -0
  135. package/dist/constructs/v1beta2/view/View.mjs +0 -0
  136. package/dist/constructs/v1beta2/view/ViewSchema.d.mts +7 -0
  137. package/dist/constructs/v1beta2/view/ViewSchema.d.ts +7 -0
  138. package/dist/constructs/v1beta2/view/ViewSchema.js +13 -0
  139. package/dist/constructs/v1beta2/view/ViewSchema.mjs +13 -0
  140. package/dist/constructs/v1beta3/component/Component.d.mts +796 -0
  141. package/dist/constructs/v1beta3/component/Component.d.ts +796 -0
  142. package/dist/constructs/v1beta3/component/Component.js +1 -0
  143. package/dist/constructs/v1beta3/component/Component.mjs +0 -0
  144. package/dist/constructs/v1beta3/component/ComponentSchema.d.mts +7 -0
  145. package/dist/constructs/v1beta3/component/ComponentSchema.d.ts +7 -0
  146. package/dist/constructs/v1beta3/component/ComponentSchema.js +10 -0
  147. package/dist/constructs/v1beta3/component/ComponentSchema.mjs +10 -0
  148. package/dist/constructs/v1beta3/connection/Connection.d.mts +1348 -0
  149. package/dist/constructs/v1beta3/connection/Connection.d.ts +1348 -0
  150. package/dist/constructs/v1beta3/connection/Connection.js +1 -0
  151. package/dist/constructs/v1beta3/connection/Connection.mjs +0 -0
  152. package/dist/constructs/v1beta3/connection/ConnectionSchema.d.mts +7 -0
  153. package/dist/constructs/v1beta3/connection/ConnectionSchema.d.ts +7 -0
  154. package/dist/constructs/v1beta3/connection/ConnectionSchema.js +2 -0
  155. package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +2 -0
  156. package/dist/constructs/v1beta3/design/Design.d.mts +17552 -0
  157. package/dist/constructs/v1beta3/design/Design.d.ts +17552 -0
  158. package/dist/constructs/v1beta3/design/Design.js +1 -0
  159. package/dist/constructs/v1beta3/design/Design.mjs +0 -0
  160. package/dist/constructs/v1beta3/design/DesignSchema.d.mts +7 -0
  161. package/dist/constructs/v1beta3/design/DesignSchema.d.ts +7 -0
  162. package/dist/constructs/v1beta3/design/DesignSchema.js +506 -0
  163. package/dist/constructs/v1beta3/design/DesignSchema.mjs +506 -0
  164. package/dist/constructs/v1beta3/environment/Environment.d.mts +800 -0
  165. package/dist/constructs/v1beta3/environment/Environment.d.ts +800 -0
  166. package/dist/constructs/v1beta3/environment/Environment.js +1 -0
  167. package/dist/constructs/v1beta3/environment/Environment.mjs +0 -0
  168. package/dist/constructs/v1beta3/environment/EnvironmentSchema.d.mts +7 -0
  169. package/dist/constructs/v1beta3/environment/EnvironmentSchema.d.ts +7 -0
  170. package/dist/constructs/v1beta3/environment/EnvironmentSchema.js +2 -0
  171. package/dist/constructs/v1beta3/environment/EnvironmentSchema.mjs +2 -0
  172. package/dist/constructs/v1beta3/event/Event.d.mts +733 -0
  173. package/dist/constructs/v1beta3/event/Event.d.ts +733 -0
  174. package/dist/constructs/v1beta3/event/Event.js +1 -0
  175. package/dist/constructs/v1beta3/event/Event.mjs +0 -0
  176. package/dist/constructs/v1beta3/event/EventSchema.d.mts +7 -0
  177. package/dist/constructs/v1beta3/event/EventSchema.d.ts +7 -0
  178. package/dist/constructs/v1beta3/event/EventSchema.js +2 -0
  179. package/dist/constructs/v1beta3/event/EventSchema.mjs +2 -0
  180. package/dist/constructs/v1beta3/invitation/Invitation.d.mts +1079 -0
  181. package/dist/constructs/v1beta3/invitation/Invitation.d.ts +1079 -0
  182. package/dist/constructs/v1beta3/invitation/Invitation.js +1 -0
  183. package/dist/constructs/v1beta3/invitation/Invitation.mjs +0 -0
  184. package/dist/constructs/v1beta3/invitation/InvitationSchema.d.mts +7 -0
  185. package/dist/constructs/v1beta3/invitation/InvitationSchema.d.ts +7 -0
  186. package/dist/constructs/v1beta3/invitation/InvitationSchema.js +2 -0
  187. package/dist/constructs/v1beta3/invitation/InvitationSchema.mjs +2 -0
  188. package/dist/constructs/v1beta3/plan/Plan.d.mts +198 -0
  189. package/dist/constructs/v1beta3/plan/Plan.d.ts +198 -0
  190. package/dist/constructs/v1beta3/plan/Plan.js +1 -0
  191. package/dist/constructs/v1beta3/plan/Plan.mjs +0 -0
  192. package/dist/constructs/v1beta3/plan/PlanSchema.d.mts +7 -0
  193. package/dist/constructs/v1beta3/plan/PlanSchema.d.ts +7 -0
  194. package/dist/constructs/v1beta3/plan/PlanSchema.js +2 -0
  195. package/dist/constructs/v1beta3/plan/PlanSchema.mjs +2 -0
  196. package/dist/constructs/v1beta3/relationship/Relationship.d.mts +1884 -0
  197. package/dist/constructs/v1beta3/relationship/Relationship.d.ts +1884 -0
  198. package/dist/constructs/v1beta3/relationship/Relationship.js +1 -0
  199. package/dist/constructs/v1beta3/relationship/Relationship.mjs +0 -0
  200. package/dist/constructs/v1beta3/relationship/RelationshipSchema.d.mts +7 -0
  201. package/dist/constructs/v1beta3/relationship/RelationshipSchema.d.ts +7 -0
  202. package/dist/constructs/v1beta3/relationship/RelationshipSchema.js +155 -0
  203. package/dist/constructs/v1beta3/relationship/RelationshipSchema.mjs +155 -0
  204. package/dist/constructs/v1beta3/subscription/Subscription.d.mts +876 -0
  205. package/dist/constructs/v1beta3/subscription/Subscription.d.ts +876 -0
  206. package/dist/constructs/v1beta3/subscription/Subscription.js +1 -0
  207. package/dist/constructs/v1beta3/subscription/Subscription.mjs +0 -0
  208. package/dist/constructs/v1beta3/subscription/SubscriptionSchema.d.mts +7 -0
  209. package/dist/constructs/v1beta3/subscription/SubscriptionSchema.d.ts +7 -0
  210. package/dist/constructs/v1beta3/subscription/SubscriptionSchema.js +2 -0
  211. package/dist/constructs/v1beta3/subscription/SubscriptionSchema.mjs +2 -0
  212. package/dist/constructs/v1beta3/token/Token.d.mts +543 -0
  213. package/dist/constructs/v1beta3/token/Token.d.ts +543 -0
  214. package/dist/constructs/v1beta3/token/Token.js +1 -0
  215. package/dist/constructs/v1beta3/token/Token.mjs +0 -0
  216. package/dist/constructs/v1beta3/token/TokenSchema.d.mts +7 -0
  217. package/dist/constructs/v1beta3/token/TokenSchema.d.ts +7 -0
  218. package/dist/constructs/v1beta3/token/TokenSchema.js +2 -0
  219. package/dist/constructs/v1beta3/token/TokenSchema.mjs +2 -0
  220. package/dist/constructs/v1beta3/workspace/Workspace.d.mts +4811 -0
  221. package/dist/constructs/v1beta3/workspace/Workspace.d.ts +4811 -0
  222. package/dist/constructs/v1beta3/workspace/Workspace.js +1 -0
  223. package/dist/constructs/v1beta3/workspace/Workspace.mjs +0 -0
  224. package/dist/constructs/v1beta3/workspace/WorkspaceSchema.d.mts +7 -0
  225. package/dist/constructs/v1beta3/workspace/WorkspaceSchema.d.ts +7 -0
  226. package/dist/constructs/v1beta3/workspace/WorkspaceSchema.js +98 -0
  227. package/dist/constructs/v1beta3/workspace/WorkspaceSchema.mjs +98 -0
  228. package/dist/index.d.mts +10 -8
  229. package/dist/index.d.ts +10 -8
  230. package/dist/index.js +16 -8
  231. package/dist/index.mjs +16 -8
  232. package/dist/mesheryApi.d.mts +4954 -4793
  233. package/dist/mesheryApi.d.ts +4954 -4793
  234. package/dist/mesheryApi.js +1 -1
  235. package/dist/mesheryApi.mjs +1 -1
  236. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- 'use strict';var e={openapi:"3.0.0",info:{title:"Subscription",description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",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"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{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:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",description:"Filter subscriptions by status",required:false,schema:{type:"array",items:{type:"string"}},style:"form",explode:true}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}},description:"Get subscription response"},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/entitlement/subscriptions/{subscriptionId}/cancel":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"cancelSubscription",summary:"Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled.",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"createSubscription",summary:"Create a new subscription for an organization",security:[{jwt:[]}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{201:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}}}}},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/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"upgradeSubscription",summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}}}}},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"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"previewSubscriptionUpgrade",summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{description:"Preview of the upgraded subscription invoice",content:{"application/json":{schema:{type:"object"}}}},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"}}}}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],tags:["Payment Processors"],operationId:"handleSubscriptionWebhook",summary:"Handle webhook events from payment processors",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed"},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:{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"}}}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},parameters:{subscriptionId:{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}},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"}},pagesizeWithAll:{name:"pagesize",in:"query",description:"Get responses by pagesize (pass all to get all responses)",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{PaymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"},CreateSubscriptionRequest:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}},CreateSubscriptionResponse:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}},UpdateUsersRequest:{type:"object",properties:{paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscriptionId:{type:"string",description:"Subscription ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},WebhookEvent:{type:"object",description:"Payload for webhook events from payment processors"},SubscriptionPage:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}},Subscription:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},SubscriptionStatus:{type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}}}}},t=e;
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"Subscription","x-deprecated":true,description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",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"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{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:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",description:"Filter subscriptions by status",required:false,schema:{type:"array",items:{type:"string"}},style:"form",explode:true}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}},description:"Get subscription response"},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/entitlement/subscriptions/{subscriptionId}/cancel":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"cancelSubscription",summary:"Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled.",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"createSubscription",summary:"Create a new subscription for an organization",security:[{jwt:[]}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{201:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}}}}},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/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"upgradeSubscription",summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}}}}},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"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"previewSubscriptionUpgrade",summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{description:"Preview of the upgraded subscription invoice",content:{"application/json":{schema:{type:"object"}}}},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"}}}}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],tags:["Payment Processors"],operationId:"handleSubscriptionWebhook",summary:"Handle webhook events from payment processors",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed"},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:{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"}}}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},parameters:{subscriptionId:{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}},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"}},pagesizeWithAll:{name:"pagesize",in:"query",description:"Get responses by pagesize (pass all to get all responses)",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{PaymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"},CreateSubscriptionRequest:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}},CreateSubscriptionResponse:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}},UpdateUsersRequest:{type:"object",properties:{paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscriptionId:{type:"string",description:"Subscription ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},WebhookEvent:{type:"object",description:"Payload for webhook events from payment processors"},SubscriptionPage:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}},Subscription:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},SubscriptionStatus:{type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}}}}},t=e;
2
2
  module.exports=t;
@@ -1,2 +1,2 @@
1
- var e={openapi:"3.0.0",info:{title:"Subscription",description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",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"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{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:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",description:"Filter subscriptions by status",required:false,schema:{type:"array",items:{type:"string"}},style:"form",explode:true}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}},description:"Get subscription response"},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/entitlement/subscriptions/{subscriptionId}/cancel":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"cancelSubscription",summary:"Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled.",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"createSubscription",summary:"Create a new subscription for an organization",security:[{jwt:[]}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{201:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}}}}},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/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"upgradeSubscription",summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}}}}},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"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"previewSubscriptionUpgrade",summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{description:"Preview of the upgraded subscription invoice",content:{"application/json":{schema:{type:"object"}}}},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"}}}}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],tags:["Payment Processors"],operationId:"handleSubscriptionWebhook",summary:"Handle webhook events from payment processors",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed"},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:{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"}}}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},parameters:{subscriptionId:{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}},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"}},pagesizeWithAll:{name:"pagesize",in:"query",description:"Get responses by pagesize (pass all to get all responses)",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{PaymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"},CreateSubscriptionRequest:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}},CreateSubscriptionResponse:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}},UpdateUsersRequest:{type:"object",properties:{paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscriptionId:{type:"string",description:"Subscription ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},WebhookEvent:{type:"object",description:"Payload for webhook events from payment processors"},SubscriptionPage:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}},Subscription:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},SubscriptionStatus:{type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}}}}},t=e;
1
+ var e={openapi:"3.0.0",info:{title:"Subscription","x-deprecated":true,description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",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"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{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:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",description:"Filter subscriptions by status",required:false,schema:{type:"array",items:{type:"string"}},style:"form",explode:true}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}},description:"Get subscription response"},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/entitlement/subscriptions/{subscriptionId}/cancel":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"cancelSubscription",summary:"Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled.",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"createSubscription",summary:"Create a new subscription for an organization",security:[{jwt:[]}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{201:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}}}}},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/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"upgradeSubscription",summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}}}}},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"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"previewSubscriptionUpgrade",summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{description:"Preview of the upgraded subscription invoice",content:{"application/json":{schema:{type:"object"}}}},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"}}}}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],tags:["Payment Processors"],operationId:"handleSubscriptionWebhook",summary:"Handle webhook events from payment processors",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed"},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:{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"}}}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},parameters:{subscriptionId:{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}},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"}},pagesizeWithAll:{name:"pagesize",in:"query",description:"Get responses by pagesize (pass all to get all responses)",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{PaymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"},CreateSubscriptionRequest:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}},CreateSubscriptionResponse:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}},UpdateUsersRequest:{type:"object",properties:{paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscriptionId:{type:"string",description:"Subscription ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},WebhookEvent:{type:"object",description:"Payload for webhook events from payment processors"},SubscriptionPage:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}},Subscription:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},SubscriptionStatus:{type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}}}}},t=e;
2
2
  export{t as default};