@meshery/schemas 0.8.127 → 0.8.129

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 (159) hide show
  1. package/dist/{Core-vaTzd8cz.d.mts → Core-BiYtFM4v.d.mts} +1 -1
  2. package/dist/{Core-vaTzd8cz.d.ts → Core-BiYtFM4v.d.ts} +1 -1
  3. package/dist/cloudApi.d.mts +13676 -3825
  4. package/dist/cloudApi.d.ts +13676 -3825
  5. package/dist/cloudApi.js +1 -1
  6. package/dist/cloudApi.mjs +1 -1
  7. package/dist/constructs/v1alpha1/capability/CapabilitySchema.d.mts +1 -149
  8. package/dist/constructs/v1alpha1/capability/CapabilitySchema.d.ts +1 -149
  9. package/dist/constructs/v1alpha1/capability/CapabilitySchema.js +1 -1
  10. package/dist/constructs/v1alpha1/capability/CapabilitySchema.mjs +1 -1
  11. package/dist/constructs/v1alpha1/core/Core.d.mts +1 -1
  12. package/dist/constructs/v1alpha1/core/Core.d.ts +1 -1
  13. package/dist/constructs/v1alpha1/core/CoreSchema.d.mts +1 -1643
  14. package/dist/constructs/v1alpha1/core/CoreSchema.d.ts +1 -1643
  15. package/dist/constructs/v1alpha1/core/CoreSchema.js +1 -1
  16. package/dist/constructs/v1alpha1/core/CoreSchema.mjs +1 -1
  17. package/dist/constructs/v1alpha2/catalog/CatalogSchema.d.mts +1 -74
  18. package/dist/constructs/v1alpha2/catalog/CatalogSchema.d.ts +1 -74
  19. package/dist/constructs/v1alpha2/catalog/CatalogSchema.js +1 -1
  20. package/dist/constructs/v1alpha2/catalog/CatalogSchema.mjs +1 -1
  21. package/dist/constructs/v1alpha3/relationship/Relationship.d.mts +32 -128
  22. package/dist/constructs/v1alpha3/relationship/Relationship.d.ts +32 -128
  23. package/dist/constructs/v1alpha3/relationship/RelationshipSchema.d.mts +1 -6973
  24. package/dist/constructs/v1alpha3/relationship/RelationshipSchema.d.ts +1 -6973
  25. package/dist/constructs/v1alpha3/relationship/RelationshipSchema.js +15 -15
  26. package/dist/constructs/v1alpha3/relationship/RelationshipSchema.mjs +15 -15
  27. package/dist/constructs/v1beta1/academy/Academy.d.mts +749 -319
  28. package/dist/constructs/v1beta1/academy/Academy.d.ts +749 -319
  29. package/dist/constructs/v1beta1/academy/AcademySchema.d.mts +1 -11832
  30. package/dist/constructs/v1beta1/academy/AcademySchema.d.ts +1 -11832
  31. package/dist/constructs/v1beta1/academy/AcademySchema.js +1 -1
  32. package/dist/constructs/v1beta1/academy/AcademySchema.mjs +1 -1
  33. package/dist/constructs/v1beta1/badge/BadgeSchema.d.mts +1 -513
  34. package/dist/constructs/v1beta1/badge/BadgeSchema.d.ts +1 -513
  35. package/dist/constructs/v1beta1/badge/BadgeSchema.js +1 -1
  36. package/dist/constructs/v1beta1/badge/BadgeSchema.mjs +1 -1
  37. package/dist/constructs/v1beta1/category/CategorySchema.d.mts +1 -54
  38. package/dist/constructs/v1beta1/category/CategorySchema.d.ts +1 -54
  39. package/dist/constructs/v1beta1/category/CategorySchema.js +1 -1
  40. package/dist/constructs/v1beta1/category/CategorySchema.mjs +1 -1
  41. package/dist/constructs/v1beta1/component/Component.d.mts +6 -12
  42. package/dist/constructs/v1beta1/component/Component.d.ts +6 -12
  43. package/dist/constructs/v1beta1/component/ComponentSchema.d.mts +1 -1771
  44. package/dist/constructs/v1beta1/component/ComponentSchema.d.ts +1 -1771
  45. package/dist/constructs/v1beta1/component/ComponentSchema.js +3 -3
  46. package/dist/constructs/v1beta1/component/ComponentSchema.mjs +3 -3
  47. package/dist/constructs/v1beta1/connection/Connection.d.mts +12 -12
  48. package/dist/constructs/v1beta1/connection/Connection.d.ts +12 -12
  49. package/dist/constructs/v1beta1/connection/ConnectionSchema.d.mts +1 -2978
  50. package/dist/constructs/v1beta1/connection/ConnectionSchema.d.ts +1 -2978
  51. package/dist/constructs/v1beta1/connection/ConnectionSchema.js +1 -1
  52. package/dist/constructs/v1beta1/connection/ConnectionSchema.mjs +1 -1
  53. package/dist/constructs/v1beta1/credential/Credential.d.mts +517 -0
  54. package/dist/constructs/v1beta1/credential/Credential.d.ts +517 -0
  55. package/dist/constructs/v1beta1/credential/Credential.js +1 -0
  56. package/dist/constructs/v1beta1/credential/Credential.mjs +0 -0
  57. package/dist/constructs/v1beta1/credential/CredentialSchema.d.mts +7 -0
  58. package/dist/constructs/v1beta1/credential/CredentialSchema.d.ts +7 -0
  59. package/dist/constructs/v1beta1/credential/CredentialSchema.js +9 -0
  60. package/dist/constructs/v1beta1/credential/CredentialSchema.mjs +9 -0
  61. package/dist/constructs/v1beta1/environment/Environment.d.mts +4 -4
  62. package/dist/constructs/v1beta1/environment/Environment.d.ts +4 -4
  63. package/dist/constructs/v1beta1/environment/EnvironmentSchema.d.mts +1 -958
  64. package/dist/constructs/v1beta1/environment/EnvironmentSchema.d.ts +1 -958
  65. package/dist/constructs/v1beta1/environment/EnvironmentSchema.js +1 -1
  66. package/dist/constructs/v1beta1/environment/EnvironmentSchema.mjs +1 -1
  67. package/dist/constructs/v1beta1/evaluation/Evaluation.d.mts +68 -212
  68. package/dist/constructs/v1beta1/evaluation/Evaluation.d.ts +68 -212
  69. package/dist/constructs/v1beta1/evaluation/EvaluationSchema.d.mts +1 -16507
  70. package/dist/constructs/v1beta1/evaluation/EvaluationSchema.d.ts +1 -16507
  71. package/dist/constructs/v1beta1/evaluation/EvaluationSchema.js +25 -25
  72. package/dist/constructs/v1beta1/evaluation/EvaluationSchema.mjs +25 -25
  73. package/dist/constructs/v1beta1/event/EventSchema.d.mts +1 -354
  74. package/dist/constructs/v1beta1/event/EventSchema.d.ts +1 -354
  75. package/dist/constructs/v1beta1/event/EventSchema.js +2 -1
  76. package/dist/constructs/v1beta1/event/EventSchema.mjs +2 -1
  77. package/dist/constructs/v1beta1/feature/FeatureSchema.d.mts +1 -767
  78. package/dist/constructs/v1beta1/feature/FeatureSchema.d.ts +1 -767
  79. package/dist/constructs/v1beta1/feature/FeatureSchema.js +2 -1
  80. package/dist/constructs/v1beta1/feature/FeatureSchema.mjs +2 -1
  81. package/dist/constructs/v1beta1/invitation/InvitationSchema.d.mts +1 -1646
  82. package/dist/constructs/v1beta1/invitation/InvitationSchema.d.ts +1 -1646
  83. package/dist/constructs/v1beta1/invitation/InvitationSchema.js +2 -1
  84. package/dist/constructs/v1beta1/invitation/InvitationSchema.mjs +2 -1
  85. package/dist/constructs/v1beta1/key/KeySchema.d.mts +1 -1219
  86. package/dist/constructs/v1beta1/key/KeySchema.d.ts +1 -1219
  87. package/dist/constructs/v1beta1/key/KeySchema.js +2 -1
  88. package/dist/constructs/v1beta1/key/KeySchema.mjs +2 -1
  89. package/dist/constructs/v1beta1/keychain/KeychainSchema.d.mts +1 -1543
  90. package/dist/constructs/v1beta1/keychain/KeychainSchema.d.ts +1 -1543
  91. package/dist/constructs/v1beta1/keychain/KeychainSchema.js +2 -1
  92. package/dist/constructs/v1beta1/keychain/KeychainSchema.mjs +2 -1
  93. package/dist/constructs/v1beta1/model/Model.d.mts +7 -13
  94. package/dist/constructs/v1beta1/model/Model.d.ts +7 -13
  95. package/dist/constructs/v1beta1/model/ModelSchema.d.mts +1 -1301
  96. package/dist/constructs/v1beta1/model/ModelSchema.d.ts +1 -1301
  97. package/dist/constructs/v1beta1/model/ModelSchema.js +2 -2
  98. package/dist/constructs/v1beta1/model/ModelSchema.mjs +2 -2
  99. package/dist/constructs/v1beta1/organization/OrganizationSchema.d.mts +1 -1488
  100. package/dist/constructs/v1beta1/organization/OrganizationSchema.d.ts +1 -1488
  101. package/dist/constructs/v1beta1/organization/OrganizationSchema.js +2 -1
  102. package/dist/constructs/v1beta1/organization/OrganizationSchema.mjs +2 -1
  103. package/dist/constructs/v1beta1/pattern/Pattern.d.mts +7481 -212
  104. package/dist/constructs/v1beta1/pattern/Pattern.d.ts +7481 -212
  105. package/dist/constructs/v1beta1/pattern/PatternSchema.d.mts +1 -16703
  106. package/dist/constructs/v1beta1/pattern/PatternSchema.d.ts +1 -16703
  107. package/dist/constructs/v1beta1/pattern/PatternSchema.js +265 -25
  108. package/dist/constructs/v1beta1/pattern/PatternSchema.mjs +265 -25
  109. package/dist/constructs/v1beta1/plan/PlanSchema.d.mts +1 -316
  110. package/dist/constructs/v1beta1/plan/PlanSchema.d.ts +1 -316
  111. package/dist/constructs/v1beta1/plan/PlanSchema.js +2 -1
  112. package/dist/constructs/v1beta1/plan/PlanSchema.mjs +2 -1
  113. package/dist/constructs/v1beta1/role/Role.d.mts +614 -0
  114. package/dist/constructs/v1beta1/role/Role.d.ts +614 -0
  115. package/dist/constructs/v1beta1/role/Role.js +1 -0
  116. package/dist/constructs/v1beta1/role/Role.mjs +0 -0
  117. package/dist/constructs/v1beta1/role/RoleSchema.d.mts +7 -0
  118. package/dist/constructs/v1beta1/role/RoleSchema.d.ts +7 -0
  119. package/dist/constructs/v1beta1/role/RoleSchema.js +2 -0
  120. package/dist/constructs/v1beta1/role/RoleSchema.mjs +2 -0
  121. package/dist/constructs/v1beta1/schedule/Schedule.d.mts +371 -0
  122. package/dist/constructs/v1beta1/schedule/Schedule.d.ts +371 -0
  123. package/dist/constructs/v1beta1/schedule/Schedule.js +1 -0
  124. package/dist/constructs/v1beta1/schedule/Schedule.mjs +0 -0
  125. package/dist/constructs/v1beta1/schedule/ScheduleSchema.d.mts +7 -0
  126. package/dist/constructs/v1beta1/schedule/ScheduleSchema.d.ts +7 -0
  127. package/dist/constructs/v1beta1/schedule/ScheduleSchema.js +13 -0
  128. package/dist/constructs/v1beta1/schedule/ScheduleSchema.mjs +13 -0
  129. package/dist/constructs/v1beta1/subcategory/SubcategorySchema.d.mts +1 -27
  130. package/dist/constructs/v1beta1/subcategory/SubcategorySchema.d.ts +1 -27
  131. package/dist/constructs/v1beta1/subcategory/SubcategorySchema.js +1 -1
  132. package/dist/constructs/v1beta1/subcategory/SubcategorySchema.mjs +1 -1
  133. package/dist/constructs/v1beta1/subscription/SubscriptionSchema.d.mts +1 -1636
  134. package/dist/constructs/v1beta1/subscription/SubscriptionSchema.d.ts +1 -1636
  135. package/dist/constructs/v1beta1/subscription/SubscriptionSchema.js +1 -1
  136. package/dist/constructs/v1beta1/subscription/SubscriptionSchema.mjs +1 -1
  137. package/dist/constructs/v1beta1/team/Team.d.mts +46 -16
  138. package/dist/constructs/v1beta1/team/Team.d.ts +46 -16
  139. package/dist/constructs/v1beta1/team/TeamSchema.d.mts +1 -2016
  140. package/dist/constructs/v1beta1/team/TeamSchema.d.ts +1 -2016
  141. package/dist/constructs/v1beta1/team/TeamSchema.js +1 -1
  142. package/dist/constructs/v1beta1/team/TeamSchema.mjs +1 -1
  143. package/dist/constructs/v1beta1/user/UserSchema.d.mts +1 -1106
  144. package/dist/constructs/v1beta1/user/UserSchema.d.ts +1 -1106
  145. package/dist/constructs/v1beta1/user/UserSchema.js +2 -1
  146. package/dist/constructs/v1beta1/user/UserSchema.mjs +2 -1
  147. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.d.mts +1 -958
  148. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.d.ts +1 -958
  149. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.js +1 -1
  150. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.mjs +1 -1
  151. package/dist/index.d.mts +1 -1
  152. package/dist/index.d.ts +1 -1
  153. package/dist/index.js +283 -43
  154. package/dist/index.mjs +283 -43
  155. package/dist/mesheryApi.d.mts +2025 -183
  156. package/dist/mesheryApi.d.ts +2025 -183
  157. package/dist/mesheryApi.js +1 -1
  158. package/dist/mesheryApi.mjs +1 -1
  159. 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:"1.0.0"},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:["subscription"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}},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"],summary:"Cancel an existing subscription . The subscription will remain active until the end of the billing period and then it will be canceled.",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],summary:"Create a new subscription for an organization",requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{200:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscription_id:{type:"string"},clientSecret:{type:"string"}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgradePreview":{post:{"x-internal":["cloud"],summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],summary:"Handle webhook events from payment processors",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed successfully"},400:{description:"Invalid webhook event"}}}}},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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},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:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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:{subscription_id:{type:"string"},clientSecret:{type:"string"}}},UpdateUsersRequest:{type:"object",properties:{payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscription_id:{type:"string",description:"Subscription ID from the payment processor"},payment_processor:{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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},Subscription:{type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]},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",description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta1",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:["subscription"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}},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"],summary:"Cancel an existing subscription . The subscription will remain active until the end of the billing period and then it will be canceled.",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],summary:"Create a new subscription for an organization",requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{200:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscription_id:{type:"string"},clientSecret:{type:"string"}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgradePreview":{post:{"x-internal":["cloud"],summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],summary:"Handle webhook events from payment processors",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed successfully"},400:{description:"Invalid webhook event"}}}}},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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},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:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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:{subscription_id:{type:"string"},clientSecret:{type:"string"}}},UpdateUsersRequest:{type:"object",properties:{payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscription_id:{type:"string",description:"Subscription ID from the payment processor"},payment_processor:{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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},Subscription:{type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]},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:"1.0.0"},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:["subscription"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}},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"],summary:"Cancel an existing subscription . The subscription will remain active until the end of the billing period and then it will be canceled.",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],summary:"Create a new subscription for an organization",requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{200:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscription_id:{type:"string"},clientSecret:{type:"string"}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgradePreview":{post:{"x-internal":["cloud"],summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],summary:"Handle webhook events from payment processors",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed successfully"},400:{description:"Invalid webhook event"}}}}},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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},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:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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:{subscription_id:{type:"string"},clientSecret:{type:"string"}}},UpdateUsersRequest:{type:"object",properties:{payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscription_id:{type:"string",description:"Subscription ID from the payment processor"},payment_processor:{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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},Subscription:{type:"object",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":"plan.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]},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",description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta1",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:["subscription"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}},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"],summary:"Cancel an existing subscription . The subscription will remain active until the end of the billing period and then it will be canceled.",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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],summary:"Create a new subscription for an organization",requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{200:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscription_id:{type:"string"},clientSecret:{type:"string"}}}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},400:{description:"Invalid request"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgradePreview":{post:{"x-internal":["cloud"],summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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"},500:{description:"Internal server error"}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],summary:"Handle webhook events from payment processors",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed successfully"},400:{description:"Invalid webhook event"}}}}},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"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},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:{org_id:{type:"string",description:"Organization ID"},plan_id:{type:"string",description:"Price ID from the payment processor"},coupon_id:{type:"string",description:"Coupon ID to apply"},user_count:{type:"integer",description:"Number of users in the organization"},email:{type:"string",format:"email",description:"Email of the customer"},payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{old_plan_id:{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"}},new_plan_id:{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:{subscription_id:{type:"string"},clientSecret:{type:"string"}}},UpdateUsersRequest:{type:"object",properties:{payment_processor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscription_id:{type:"string",description:"Subscription ID from the payment processor"},payment_processor:{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"},page_size:{type:"integer"},total_count:{type:"integer"},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]}}}},Subscription:{type:"object",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":"planv1beta1.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta1/plan",name:"planv1beta1"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",yaml:"plan,omitempty",json:"plan,omitempty"},type:"object",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:{type:"string","x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},description:"Name of the plan",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:["monthly","yearly"]},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"}},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"}},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}},required:["id","name","cadence","unit","price_per_unit","minimum_units","price_id","currency"]},quantity:{decscription:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"}},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-oapi-codegen-extra-tags":{db:"billing_id"}}},required:["ID","org_id","plan_id","billing_id","status","quantity"]},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};
@@ -54,7 +54,7 @@ interface components {
54
54
  created_at?: string;
55
55
  /** Format: date-time */
56
56
  updated_at?: string;
57
- /** Format: date-time */
57
+ /** @description SQL null Timestamp to handle null values of time. */
58
58
  deleted_at?: string;
59
59
  };
60
60
  /** @description Payload for creating a new team */
@@ -99,7 +99,7 @@ interface components {
99
99
  created_at?: string;
100
100
  /** Format: date-time */
101
101
  updated_at?: string;
102
- /** Format: date-time */
102
+ /** @description SQL null Timestamp to handle null values of time. */
103
103
  deleted_at?: string;
104
104
  }[];
105
105
  };
@@ -111,9 +111,15 @@ interface components {
111
111
  team_id?: string;
112
112
  /** @description user's email or username */
113
113
  user_id?: string;
114
- /** Format: date-time */
114
+ /**
115
+ * Format: date-time
116
+ * @description Timestamp when the resource was created.
117
+ */
115
118
  created_at?: string;
116
- /** Format: date-time */
119
+ /**
120
+ * Format: date-time
121
+ * @description Timestamp when the resource was updated.
122
+ */
117
123
  updated_at?: string;
118
124
  /** @description SQL null Timestamp to handle null values of time. */
119
125
  deleted_at?: string;
@@ -130,9 +136,15 @@ interface components {
130
136
  team_id?: string;
131
137
  /** @description user's email or username */
132
138
  user_id?: string;
133
- /** Format: date-time */
139
+ /**
140
+ * Format: date-time
141
+ * @description Timestamp when the resource was created.
142
+ */
134
143
  created_at?: string;
135
- /** Format: date-time */
144
+ /**
145
+ * Format: date-time
146
+ * @description Timestamp when the resource was updated.
147
+ */
136
148
  updated_at?: string;
137
149
  /** @description SQL null Timestamp to handle null values of time. */
138
150
  deleted_at?: string;
@@ -260,7 +272,7 @@ interface operations {
260
272
  created_at?: string;
261
273
  /** Format: date-time */
262
274
  updated_at?: string;
263
- /** Format: date-time */
275
+ /** @description SQL null Timestamp to handle null values of time. */
264
276
  deleted_at?: string;
265
277
  }[];
266
278
  };
@@ -315,7 +327,7 @@ interface operations {
315
327
  created_at?: string;
316
328
  /** Format: date-time */
317
329
  updated_at?: string;
318
- /** Format: date-time */
330
+ /** @description SQL null Timestamp to handle null values of time. */
319
331
  deleted_at?: string;
320
332
  };
321
333
  };
@@ -382,7 +394,7 @@ interface operations {
382
394
  created_at?: string;
383
395
  /** Format: date-time */
384
396
  updated_at?: string;
385
- /** Format: date-time */
397
+ /** @description SQL null Timestamp to handle null values of time. */
386
398
  deleted_at?: string;
387
399
  };
388
400
  };
@@ -450,7 +462,7 @@ interface operations {
450
462
  created_at?: string;
451
463
  /** Format: date-time */
452
464
  updated_at?: string;
453
- /** Format: date-time */
465
+ /** @description SQL null Timestamp to handle null values of time. */
454
466
  deleted_at?: string;
455
467
  };
456
468
  };
@@ -566,9 +578,15 @@ interface operations {
566
578
  team_id?: string;
567
579
  /** @description user's email or username */
568
580
  user_id?: string;
569
- /** Format: date-time */
581
+ /**
582
+ * Format: date-time
583
+ * @description Timestamp when the resource was created.
584
+ */
570
585
  created_at?: string;
571
- /** Format: date-time */
586
+ /**
587
+ * Format: date-time
588
+ * @description Timestamp when the resource was updated.
589
+ */
572
590
  updated_at?: string;
573
591
  /** @description SQL null Timestamp to handle null values of time. */
574
592
  deleted_at?: string;
@@ -625,9 +643,15 @@ interface operations {
625
643
  team_id?: string;
626
644
  /** @description user's email or username */
627
645
  user_id?: string;
628
- /** Format: date-time */
646
+ /**
647
+ * Format: date-time
648
+ * @description Timestamp when the resource was created.
649
+ */
629
650
  created_at?: string;
630
- /** Format: date-time */
651
+ /**
652
+ * Format: date-time
653
+ * @description Timestamp when the resource was updated.
654
+ */
631
655
  updated_at?: string;
632
656
  /** @description SQL null Timestamp to handle null values of time. */
633
657
  deleted_at?: string;
@@ -677,9 +701,15 @@ interface operations {
677
701
  team_id?: string;
678
702
  /** @description user's email or username */
679
703
  user_id?: string;
680
- /** Format: date-time */
704
+ /**
705
+ * Format: date-time
706
+ * @description Timestamp when the resource was created.
707
+ */
681
708
  created_at?: string;
682
- /** Format: date-time */
709
+ /**
710
+ * Format: date-time
711
+ * @description Timestamp when the resource was updated.
712
+ */
683
713
  updated_at?: string;
684
714
  /** @description SQL null Timestamp to handle null values of time. */
685
715
  deleted_at?: string;