@meshery/schemas 1.3.28 → 1.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cloudApi.d.mts +3420 -3186
- package/dist/cloudApi.d.ts +3420 -3186
- package/dist/constructs/v1beta2/academy/Academy.d.ts +2 -2
- package/dist/constructs/v1beta2/academy/AcademySchema.js +1 -1
- package/dist/constructs/v1beta2/academy/AcademySchema.mjs +1 -1
- package/dist/constructs/v1beta2/core/Core.d.ts +2 -2
- package/dist/constructs/v1beta2/core/CoreSchema.js +1 -1
- package/dist/constructs/v1beta2/core/CoreSchema.mjs +1 -1
- package/dist/constructs/v1beta2/credential/Credential.d.ts +4 -4
- package/dist/constructs/v1beta2/credential/CredentialSchema.js +2 -2
- package/dist/constructs/v1beta2/credential/CredentialSchema.mjs +2 -2
- package/dist/constructs/v1beta2/design/Design.d.ts +12 -12
- package/dist/constructs/v1beta2/design/DesignSchema.js +5 -5
- package/dist/constructs/v1beta2/design/DesignSchema.mjs +5 -5
- package/dist/constructs/v1beta2/event/Event.d.ts +10 -10
- package/dist/constructs/v1beta2/event/EventSchema.js +1 -1
- package/dist/constructs/v1beta2/event/EventSchema.mjs +1 -1
- package/dist/constructs/v1beta2/invitation/Invitation.d.ts +2 -2
- package/dist/constructs/v1beta2/invitation/InvitationSchema.js +1 -1
- package/dist/constructs/v1beta2/invitation/InvitationSchema.mjs +1 -1
- package/dist/constructs/v1beta2/key/Key.d.ts +6 -6
- package/dist/constructs/v1beta2/key/KeySchema.js +1 -1
- package/dist/constructs/v1beta2/key/KeySchema.mjs +1 -1
- package/dist/constructs/v1beta2/keychain/Keychain.d.ts +6 -6
- package/dist/constructs/v1beta2/keychain/KeychainSchema.js +1 -1
- package/dist/constructs/v1beta2/keychain/KeychainSchema.mjs +1 -1
- package/dist/constructs/v1beta2/organization/Organization.d.ts +14 -0
- package/dist/constructs/v1beta2/organization/OrganizationSchema.js +1 -1
- package/dist/constructs/v1beta2/organization/OrganizationSchema.mjs +1 -1
- package/dist/constructs/v1beta2/plan/Plan.d.ts +2 -2
- package/dist/constructs/v1beta2/plan/PlanSchema.js +1 -1
- package/dist/constructs/v1beta2/plan/PlanSchema.mjs +1 -1
- package/dist/constructs/v1beta2/role/Role.d.ts +6 -6
- package/dist/constructs/v1beta2/role/RoleSchema.js +1 -1
- package/dist/constructs/v1beta2/role/RoleSchema.mjs +1 -1
- package/dist/constructs/v1beta2/schedule/Schedule.d.ts +4 -4
- package/dist/constructs/v1beta2/schedule/ScheduleSchema.js +2 -2
- package/dist/constructs/v1beta2/schedule/ScheduleSchema.mjs +2 -2
- package/dist/constructs/v1beta2/subscription/Subscription.d.ts +4 -4
- package/dist/constructs/v1beta2/subscription/SubscriptionSchema.js +1 -1
- package/dist/constructs/v1beta2/subscription/SubscriptionSchema.mjs +1 -1
- package/dist/constructs/v1beta2/team/Team.d.ts +16 -41
- package/dist/constructs/v1beta2/team/TeamSchema.js +1 -1
- package/dist/constructs/v1beta2/team/TeamSchema.mjs +1 -1
- package/dist/constructs/v1beta2/token/Token.d.ts +4 -4
- package/dist/constructs/v1beta2/token/TokenSchema.js +1 -1
- package/dist/constructs/v1beta2/token/TokenSchema.mjs +1 -1
- package/dist/constructs/v1beta2/user/User.d.ts +6 -6
- package/dist/constructs/v1beta2/user/UserSchema.js +1 -1
- package/dist/constructs/v1beta2/user/UserSchema.mjs +1 -1
- package/dist/constructs/v1beta2/view/View.d.ts +4 -4
- package/dist/constructs/v1beta2/view/ViewSchema.js +2 -2
- package/dist/constructs/v1beta2/view/ViewSchema.mjs +2 -2
- package/dist/constructs/v1beta3/academy/Academy.d.ts +767 -3
- package/dist/constructs/v1beta3/academy/AcademySchema.js +3 -1
- package/dist/constructs/v1beta3/academy/AcademySchema.mjs +3 -1
- package/dist/constructs/v1beta3/design/Design.d.ts +5 -5
- package/dist/constructs/v1beta3/design/DesignSchema.js +5 -5
- package/dist/constructs/v1beta3/design/DesignSchema.mjs +5 -5
- package/dist/constructs/v1beta3/environment/Environment.d.ts +6 -6
- package/dist/constructs/v1beta3/environment/EnvironmentSchema.js +1 -1
- package/dist/constructs/v1beta3/environment/EnvironmentSchema.mjs +1 -1
- package/dist/constructs/v1beta3/event/Event.d.ts +11 -11
- package/dist/constructs/v1beta3/event/EventSchema.js +1 -1
- package/dist/constructs/v1beta3/event/EventSchema.mjs +1 -1
- package/dist/constructs/v1beta3/filter/Filter.d.ts +2 -2
- package/dist/constructs/v1beta3/filter/FilterSchema.js +2 -2
- package/dist/constructs/v1beta3/filter/FilterSchema.mjs +2 -2
- package/dist/constructs/v1beta3/invitation/Invitation.d.ts +4 -4
- package/dist/constructs/v1beta3/invitation/InvitationSchema.js +1 -1
- package/dist/constructs/v1beta3/invitation/InvitationSchema.mjs +1 -1
- package/dist/constructs/v1beta3/pattern_resource/PatternResource.d.ts +2 -2
- package/dist/constructs/v1beta3/pattern_resource/PatternResourceSchema.js +2 -2
- package/dist/constructs/v1beta3/pattern_resource/PatternResourceSchema.mjs +2 -2
- package/dist/constructs/v1beta3/performance_profile/PerformanceProfile.d.ts +4 -4
- package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.js +1 -1
- package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.mjs +1 -1
- package/dist/constructs/v1beta3/plan/Plan.d.ts +2 -2
- package/dist/constructs/v1beta3/plan/PlanSchema.js +1 -1
- package/dist/constructs/v1beta3/plan/PlanSchema.mjs +1 -1
- package/dist/constructs/v1beta3/subscription/Subscription.d.ts +4 -4
- package/dist/constructs/v1beta3/subscription/SubscriptionSchema.js +1 -1
- package/dist/constructs/v1beta3/subscription/SubscriptionSchema.mjs +1 -1
- package/dist/constructs/v1beta3/token/Token.d.ts +4 -4
- package/dist/constructs/v1beta3/token/TokenSchema.js +1 -1
- package/dist/constructs/v1beta3/token/TokenSchema.mjs +1 -1
- package/dist/constructs/v1beta3/workspace/Workspace.d.ts +12 -12
- package/dist/constructs/v1beta3/workspace/WorkspaceSchema.js +2 -2
- package/dist/constructs/v1beta3/workspace/WorkspaceSchema.mjs +2 -2
- package/dist/index.d.mts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/dist/mesheryApi.d.mts +1407 -1399
- package/dist/mesheryApi.d.ts +1407 -1399
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={openapi:"3.0.0",info:{title:"Subscription","x-deprecated":true,description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",description:"Filter subscriptions by status",required:false,schema:{type:"array",items:{type:"string"}},style:"form",explode:true}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}},description:"Get subscription response"},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/cancel":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"cancelSubscription",summary:"Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled.",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"createSubscription",summary:"Create a new subscription for an organization",security:[{jwt:[]}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{201:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"upgradeSubscription",summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"previewSubscriptionUpgrade",summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{description:"Preview of the upgraded subscription invoice",content:{"application/json":{schema:{type:"object"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],tags:["Payment Processors"],operationId:"handleSubscriptionWebhook",summary:"Handle webhook events from payment processors",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed"},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},parameters:{subscriptionId:{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},pagesizeWithAll:{name:"pagesize",in:"query",description:"Get responses by pagesize (pass all to get all responses)",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{PaymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"},CreateSubscriptionRequest:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}},CreateSubscriptionResponse:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}},UpdateUsersRequest:{type:"object",properties:{paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscriptionId:{type:"string",description:"Subscription ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},WebhookEvent:{type:"object",description:"Payload for webhook events from payment processors"},SubscriptionPage:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}},Subscription:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},SubscriptionStatus:{type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}}}}},t=e;
|
|
1
|
+
var e={openapi:"3.0.0",info:{title:"Subscription","x-deprecated":true,description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"integer"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",description:"Filter subscriptions by status",required:false,schema:{type:"array",items:{type:"string"}},style:"form",explode:true}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}},description:"Get subscription response"},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/cancel":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"cancelSubscription",summary:"Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled.",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"createSubscription",summary:"Create a new subscription for an organization",security:[{jwt:[]}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{201:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"upgradeSubscription",summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"previewSubscriptionUpgrade",summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{description:"Preview of the upgraded subscription invoice",content:{"application/json":{schema:{type:"object"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],tags:["Payment Processors"],operationId:"handleSubscriptionWebhook",summary:"Handle webhook events from payment processors",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed"},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},parameters:{subscriptionId:{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"integer"}},pagesizeWithAll:{name:"pagesize",in:"query",description:"Get responses by pagesize (pass all to get all responses)",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{PaymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"},CreateSubscriptionRequest:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}},CreateSubscriptionResponse:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}},UpdateUsersRequest:{type:"object",properties:{paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscriptionId:{type:"string",description:"Subscription ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},WebhookEvent:{type:"object",description:"Payload for webhook events from payment processors"},SubscriptionPage:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}},Subscription:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},SubscriptionStatus:{type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}}}}},t=e;
|
|
2
2
|
export{t as default};
|
|
@@ -386,14 +386,14 @@ export interface components {
|
|
|
386
386
|
/** @description Get ordered responses */
|
|
387
387
|
order: string;
|
|
388
388
|
/** @description Get responses by page */
|
|
389
|
-
page:
|
|
389
|
+
page: number;
|
|
390
390
|
/** @description Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`. */
|
|
391
391
|
pageSize: number;
|
|
392
392
|
/**
|
|
393
393
|
* @deprecated
|
|
394
394
|
* @description Get responses by pagesize. Deprecated alias of pageSize.
|
|
395
395
|
*/
|
|
396
|
-
pagesize:
|
|
396
|
+
pagesize: number;
|
|
397
397
|
};
|
|
398
398
|
requestBodies: {
|
|
399
399
|
/** @description Body for creating a team */
|
|
@@ -438,14 +438,14 @@ export interface operations {
|
|
|
438
438
|
/** @description Get ordered responses */
|
|
439
439
|
order?: string;
|
|
440
440
|
/** @description Get responses by page */
|
|
441
|
-
page?:
|
|
441
|
+
page?: number;
|
|
442
442
|
/** @description Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`. */
|
|
443
443
|
pageSize?: number;
|
|
444
444
|
/**
|
|
445
445
|
* @deprecated
|
|
446
446
|
* @description Get responses by pagesize. Deprecated alias of pageSize.
|
|
447
447
|
*/
|
|
448
|
-
pagesize?:
|
|
448
|
+
pagesize?: number;
|
|
449
449
|
};
|
|
450
450
|
header?: never;
|
|
451
451
|
path: {
|
|
@@ -905,14 +905,14 @@ export interface operations {
|
|
|
905
905
|
/** @description Get ordered responses */
|
|
906
906
|
order?: string;
|
|
907
907
|
/** @description Get responses by page */
|
|
908
|
-
page?:
|
|
908
|
+
page?: number;
|
|
909
909
|
/** @description Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`. */
|
|
910
910
|
pageSize?: number;
|
|
911
911
|
/**
|
|
912
912
|
* @deprecated
|
|
913
913
|
* @description Get responses by pagesize. Deprecated alias of pageSize.
|
|
914
914
|
*/
|
|
915
|
-
pagesize?:
|
|
915
|
+
pagesize?: number;
|
|
916
916
|
};
|
|
917
917
|
header?: never;
|
|
918
918
|
path: {
|
|
@@ -923,7 +923,7 @@ export interface operations {
|
|
|
923
923
|
};
|
|
924
924
|
requestBody?: never;
|
|
925
925
|
responses: {
|
|
926
|
-
/** @description Team
|
|
926
|
+
/** @description Team members with their roles */
|
|
927
927
|
200: {
|
|
928
928
|
headers: {
|
|
929
929
|
[name: string]: unknown;
|
|
@@ -936,41 +936,16 @@ export interface operations {
|
|
|
936
936
|
pageSize?: number;
|
|
937
937
|
/** @description Total number of items available. */
|
|
938
938
|
totalCount?: number;
|
|
939
|
-
/** @description The
|
|
940
|
-
|
|
941
|
-
/** Format: uuid */
|
|
942
|
-
id?: string;
|
|
943
|
-
/**
|
|
944
|
-
* Format: uuid
|
|
945
|
-
* @description Team ID
|
|
946
|
-
*/
|
|
947
|
-
teamId?: string;
|
|
948
|
-
/**
|
|
949
|
-
* Format: uuid
|
|
950
|
-
* @description User ID
|
|
951
|
-
*/
|
|
952
|
-
userId?: string;
|
|
953
|
-
/**
|
|
954
|
-
* Format: uuid
|
|
955
|
-
* @description Optional role assigned to this team membership. Nullable because a membership may exist without an explicit role (e.g., team-admin assignments are stamped on insert; non-owner adds may leave `role_id` null until a role is assigned). References `roles.id`.
|
|
956
|
-
*/
|
|
957
|
-
roleId?: string;
|
|
958
|
-
/**
|
|
959
|
-
* Format: date-time
|
|
960
|
-
* @description Timestamp when the mapping was created.
|
|
961
|
-
*/
|
|
962
|
-
createdAt?: string;
|
|
963
|
-
/**
|
|
964
|
-
* Format: date-time
|
|
965
|
-
* @description Timestamp when the mapping was last updated.
|
|
966
|
-
*/
|
|
967
|
-
updatedAt?: string;
|
|
939
|
+
/** @description The data of the teammemberspage. */
|
|
940
|
+
data?: ({
|
|
968
941
|
/**
|
|
969
942
|
* Format: date-time
|
|
970
|
-
* @description Timestamp when the
|
|
943
|
+
* @description Timestamp when the user joined the team. Server-computed from the earliest matching row in `users_teams_mapping` for this (team, user) pair. Server-managed; clients cannot set this.
|
|
971
944
|
*/
|
|
972
|
-
|
|
973
|
-
}
|
|
945
|
+
joinedAt?: string;
|
|
946
|
+
} & {
|
|
947
|
+
[key: string]: unknown;
|
|
948
|
+
})[];
|
|
974
949
|
};
|
|
975
950
|
};
|
|
976
951
|
};
|
|
@@ -1177,14 +1152,14 @@ export interface operations {
|
|
|
1177
1152
|
/** @description Get ordered responses */
|
|
1178
1153
|
order?: string;
|
|
1179
1154
|
/** @description Get responses by page */
|
|
1180
|
-
page?:
|
|
1155
|
+
page?: number;
|
|
1181
1156
|
/** @description Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`. */
|
|
1182
1157
|
pageSize?: number;
|
|
1183
1158
|
/**
|
|
1184
1159
|
* @deprecated
|
|
1185
1160
|
* @description Get responses by pagesize. Deprecated alias of pageSize.
|
|
1186
1161
|
*/
|
|
1187
|
-
pagesize?:
|
|
1162
|
+
pagesize?: number;
|
|
1188
1163
|
};
|
|
1189
1164
|
header?: never;
|
|
1190
1165
|
path: {
|