@meshery/schemas 1.3.28 → 1.3.29
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 +3398 -3164
- package/dist/cloudApi.d.ts +3398 -3164
- 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 +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +12 -37
- 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 +2 -2
- 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 +3 -3
- 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/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 +6 -6
- 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 +1395 -1387
- package/dist/mesheryApi.d.ts +1395 -1387
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var e={openapi:"3.0.0",info:{title:"schedule",description:"Documentation for Meshery Cloud REST APIs for Schedules",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"scheduler",description:"Operations related to scheduled tasks"}],paths:{"/user/schedules":{get:{"x-internal":["cloud"],tags:["scheduler"],summary:"Get schedules",operationId:"getSchedules",description:"Returns all schedules for the authenticated user.",parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"
|
|
1
|
+
'use strict';var e={openapi:"3.0.0",info:{title:"schedule",description:"Documentation for Meshery Cloud REST APIs for Schedules",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"scheduler",description:"Operations related to scheduled tasks"}],paths:{"/user/schedules":{get:{"x-internal":["cloud"],tags:["scheduler"],summary:"Get schedules",operationId:"getSchedules",description:"Returns all schedules for the authenticated user.",parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"integer"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Schedules response",content:{"application/json":{schema:{type:"object",description:"A paginated list of schedules.",required:["page","pageSize","totalCount","schedules"],properties:{page:{type:"integer",description:"Current page number (zero-based).","x-order":1,minimum:0},pageSize:{type:"integer",description:"Number of schedules per page.","x-order":2,minimum:1},totalCount:{type:"integer",description:"Total number of schedules across all pages.","x-order":3,minimum:0},schedules:{type:"array",items:{type:"object",description:`A schedule defines a recurring cron-based trigger for performance tests or other automated tasks.
|
|
2
2
|
`,required:["name","userId","cronExpression"],properties:{id:{description:"Unique identifier for the schedule.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Human-readable name for the schedule.","x-order":2,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},userId:{description:"UUID of the user who owns this schedule.","x-order":3,"x-oapi-codegen-extra-tags":{db:"owner",json:"userId"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},cronExpression:{type:"string",description:`Cron expression defining the schedule's recurrence (e.g. "0 0 * * *" for daily at midnight).
|
|
3
3
|
`,"x-order":4,"x-oapi-codegen-extra-tags":{db:"cron_expression",json:"cronExpression"},maxLength:500},lastRun:{description:`Server-computed timestamp of the schedule's most recent execution. Null until the first run completes. Server-managed; clients must not set this on create/update.
|
|
4
4
|
`,"x-order":5,"x-oapi-codegen-extra-tags":{db:"last_run",json:"lastRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},nextRun:{description:`Server-computed timestamp of the schedule's next planned execution, derived from the cron expression. Server-managed; clients must not set this on create/update.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
`,required:["name","userId","cronExpression"],properties:{id:{description:"Unique identifier for the schedule.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Human-readable name for the schedule.","x-order":2,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},userId:{description:"UUID of the user who owns this schedule.","x-order":3,"x-oapi-codegen-extra-tags":{db:"owner",json:"userId"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},cronExpression:{type:"string",description:`Cron expression defining the schedule's recurrence (e.g. "0 0 * * *" for daily at midnight).
|
|
12
12
|
`,"x-order":4,"x-oapi-codegen-extra-tags":{db:"cron_expression",json:"cronExpression"},maxLength:500},lastRun:{description:`Server-computed timestamp of the schedule's most recent execution. Null until the first run completes. Server-managed; clients must not set this on create/update.
|
|
13
13
|
`,"x-order":5,"x-oapi-codegen-extra-tags":{db:"last_run",json:"lastRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},nextRun:{description:`Server-computed timestamp of the schedule's next planned execution, derived from the cron expression. Server-managed; clients must not set this on create/update.
|
|
14
|
-
`,"x-order":6,"x-oapi-codegen-extra-tags":{db:"next_run",json:"nextRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},createdAt:{description:"Timestamp when the schedule was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp when the schedule was last updated.","x-order":8,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},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"}}}}}},delete:{"x-internal":["cloud"],tags:["scheduler"],summary:"Delete schedule",operationId:"deleteSchedule",description:"Deletes a schedule by its ID.",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{204:{description:"Schedule deleted"},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"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{scheduleId:{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pageSize:{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"
|
|
14
|
+
`,"x-order":6,"x-oapi-codegen-extra-tags":{db:"next_run",json:"nextRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},createdAt:{description:"Timestamp when the schedule was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp when the schedule was last updated.","x-order":8,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},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"}}}}}},delete:{"x-internal":["cloud"],tags:["scheduler"],summary:"Delete schedule",operationId:"deleteSchedule",description:"Deletes a schedule by its ID.",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{204:{description:"Schedule deleted"},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"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{scheduleId:{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pageSize:{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"integer"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{Schedule:{type:"object",description:`A schedule defines a recurring cron-based trigger for performance tests or other automated tasks.
|
|
15
15
|
`,required:["name","userId","cronExpression"],properties:{id:{description:"Unique identifier for the schedule.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Human-readable name for the schedule.","x-order":2,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},userId:{description:"UUID of the user who owns this schedule.","x-order":3,"x-oapi-codegen-extra-tags":{db:"owner",json:"userId"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},cronExpression:{type:"string",description:`Cron expression defining the schedule's recurrence (e.g. "0 0 * * *" for daily at midnight).
|
|
16
16
|
`,"x-order":4,"x-oapi-codegen-extra-tags":{db:"cron_expression",json:"cronExpression"},maxLength:500},lastRun:{description:`Server-computed timestamp of the schedule's most recent execution. Null until the first run completes. Server-managed; clients must not set this on create/update.
|
|
17
17
|
`,"x-order":5,"x-oapi-codegen-extra-tags":{db:"last_run",json:"lastRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},nextRun:{description:`Server-computed timestamp of the schedule's next planned execution, derived from the cron expression. Server-managed; clients must not set this on create/update.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e={openapi:"3.0.0",info:{title:"schedule",description:"Documentation for Meshery Cloud REST APIs for Schedules",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"scheduler",description:"Operations related to scheduled tasks"}],paths:{"/user/schedules":{get:{"x-internal":["cloud"],tags:["scheduler"],summary:"Get schedules",operationId:"getSchedules",description:"Returns all schedules for the authenticated user.",parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"
|
|
1
|
+
var e={openapi:"3.0.0",info:{title:"schedule",description:"Documentation for Meshery Cloud REST APIs for Schedules",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"},version:"v1beta2"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"scheduler",description:"Operations related to scheduled tasks"}],paths:{"/user/schedules":{get:{"x-internal":["cloud"],tags:["scheduler"],summary:"Get schedules",operationId:"getSchedules",description:"Returns all schedules for the authenticated user.",parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"integer"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Schedules response",content:{"application/json":{schema:{type:"object",description:"A paginated list of schedules.",required:["page","pageSize","totalCount","schedules"],properties:{page:{type:"integer",description:"Current page number (zero-based).","x-order":1,minimum:0},pageSize:{type:"integer",description:"Number of schedules per page.","x-order":2,minimum:1},totalCount:{type:"integer",description:"Total number of schedules across all pages.","x-order":3,minimum:0},schedules:{type:"array",items:{type:"object",description:`A schedule defines a recurring cron-based trigger for performance tests or other automated tasks.
|
|
2
2
|
`,required:["name","userId","cronExpression"],properties:{id:{description:"Unique identifier for the schedule.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Human-readable name for the schedule.","x-order":2,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},userId:{description:"UUID of the user who owns this schedule.","x-order":3,"x-oapi-codegen-extra-tags":{db:"owner",json:"userId"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},cronExpression:{type:"string",description:`Cron expression defining the schedule's recurrence (e.g. "0 0 * * *" for daily at midnight).
|
|
3
3
|
`,"x-order":4,"x-oapi-codegen-extra-tags":{db:"cron_expression",json:"cronExpression"},maxLength:500},lastRun:{description:`Server-computed timestamp of the schedule's most recent execution. Null until the first run completes. Server-managed; clients must not set this on create/update.
|
|
4
4
|
`,"x-order":5,"x-oapi-codegen-extra-tags":{db:"last_run",json:"lastRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},nextRun:{description:`Server-computed timestamp of the schedule's next planned execution, derived from the cron expression. Server-managed; clients must not set this on create/update.
|
|
@@ -11,7 +11,7 @@ var e={openapi:"3.0.0",info:{title:"schedule",description:"Documentation for Mes
|
|
|
11
11
|
`,required:["name","userId","cronExpression"],properties:{id:{description:"Unique identifier for the schedule.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Human-readable name for the schedule.","x-order":2,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},userId:{description:"UUID of the user who owns this schedule.","x-order":3,"x-oapi-codegen-extra-tags":{db:"owner",json:"userId"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},cronExpression:{type:"string",description:`Cron expression defining the schedule's recurrence (e.g. "0 0 * * *" for daily at midnight).
|
|
12
12
|
`,"x-order":4,"x-oapi-codegen-extra-tags":{db:"cron_expression",json:"cronExpression"},maxLength:500},lastRun:{description:`Server-computed timestamp of the schedule's most recent execution. Null until the first run completes. Server-managed; clients must not set this on create/update.
|
|
13
13
|
`,"x-order":5,"x-oapi-codegen-extra-tags":{db:"last_run",json:"lastRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},nextRun:{description:`Server-computed timestamp of the schedule's next planned execution, derived from the cron expression. Server-managed; clients must not set this on create/update.
|
|
14
|
-
`,"x-order":6,"x-oapi-codegen-extra-tags":{db:"next_run",json:"nextRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},createdAt:{description:"Timestamp when the schedule was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp when the schedule was last updated.","x-order":8,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},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"}}}}}},delete:{"x-internal":["cloud"],tags:["scheduler"],summary:"Delete schedule",operationId:"deleteSchedule",description:"Deletes a schedule by its ID.",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{204:{description:"Schedule deleted"},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"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{scheduleId:{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pageSize:{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"
|
|
14
|
+
`,"x-order":6,"x-oapi-codegen-extra-tags":{db:"next_run",json:"nextRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},createdAt:{description:"Timestamp when the schedule was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp when the schedule was last updated.","x-order":8,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}}}}},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"}}}}}},delete:{"x-internal":["cloud"],tags:["scheduler"],summary:"Delete schedule",operationId:"deleteSchedule",description:"Deletes a schedule by its ID.",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{204:{description:"Schedule deleted"},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"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{scheduleId:{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pageSize:{name:"pageSize",in:"query",description:"Get responses by page size",schema:{type:"integer"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{Schedule:{type:"object",description:`A schedule defines a recurring cron-based trigger for performance tests or other automated tasks.
|
|
15
15
|
`,required:["name","userId","cronExpression"],properties:{id:{description:"Unique identifier for the schedule.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Human-readable name for the schedule.","x-order":2,"x-oapi-codegen-extra-tags":{db:"name"},minLength:1,maxLength:255},userId:{description:"UUID of the user who owns this schedule.","x-order":3,"x-oapi-codegen-extra-tags":{db:"owner",json:"userId"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},cronExpression:{type:"string",description:`Cron expression defining the schedule's recurrence (e.g. "0 0 * * *" for daily at midnight).
|
|
16
16
|
`,"x-order":4,"x-oapi-codegen-extra-tags":{db:"cron_expression",json:"cronExpression"},maxLength:500},lastRun:{description:`Server-computed timestamp of the schedule's most recent execution. Null until the first run completes. Server-managed; clients must not set this on create/update.
|
|
17
17
|
`,"x-order":5,"x-oapi-codegen-extra-tags":{db:"last_run",json:"lastRun"},"x-go-type":"NullTime",type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},nextRun:{description:`Server-computed timestamp of the schedule's next planned execution, derived from the cron expression. Server-managed; clients must not set this on create/update.
|
|
@@ -353,9 +353,9 @@ export interface components {
|
|
|
353
353
|
/** @description Subscription ID */
|
|
354
354
|
subscriptionId: string;
|
|
355
355
|
/** @description Get responses by page */
|
|
356
|
-
page:
|
|
356
|
+
page: number;
|
|
357
357
|
/** @description Get responses by pagesize */
|
|
358
|
-
pagesize:
|
|
358
|
+
pagesize: number;
|
|
359
359
|
/** @description Get responses by pagesize (pass all to get all responses) */
|
|
360
360
|
pagesizeWithAll: string;
|
|
361
361
|
/** @description Get ordered responses */
|
|
@@ -371,9 +371,9 @@ export interface operations {
|
|
|
371
371
|
parameters: {
|
|
372
372
|
query?: {
|
|
373
373
|
/** @description Get responses by page */
|
|
374
|
-
page?:
|
|
374
|
+
page?: number;
|
|
375
375
|
/** @description Get responses by pagesize */
|
|
376
|
-
pagesize?:
|
|
376
|
+
pagesize?: number;
|
|
377
377
|
/** @description Get ordered responses */
|
|
378
378
|
order?: string;
|
|
379
379
|
/** @description Filter subscriptions by status */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var e={openapi:"3.0.0",info:{title:"Subscription","x-deprecated":true,description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"status",in:"query",description:"Filter subscriptions by status",required:false,schema:{type:"array",items:{type:"string"}},style:"form",explode:true}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}},description:"Get subscription response"},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/cancel":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"cancelSubscription",summary:"Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled.",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],responses:{200:{content:{"application/json":{schema:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/create":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"createSubscription",summary:"Create a new subscription for an organization",security:[{jwt:[]}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}}}}},responses:{201:{description:"A new subscription has been created",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"upgradeSubscription",summary:"Upgrade or downgrade an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview":{post:{"x-internal":["cloud"],tags:["Subscriptions"],operationId:"previewSubscriptionUpgrade",summary:"Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription",security:[{jwt:[]}],parameters:[{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}}}}},responses:{200:{description:"Preview of the upgraded subscription invoice",content:{"application/json":{schema:{type:"object"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/entitlement/subscriptions/webhooks":{post:{"x-internal":["cloud"],tags:["Payment Processors"],operationId:"handleSubscriptionWebhook",summary:"Handle webhook events from payment processors",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for webhook events from payment processors"}}}},responses:{200:{description:"Webhook processed"},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},parameters:{subscriptionId:{name:"subscriptionId",in:"path",required:true,description:"Subscription ID",schema:{type:"string"}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},pagesizeWithAll:{name:"pagesize",in:"query",description:"Get responses by pagesize (pass all to get all responses)",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{PaymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"},CreateSubscriptionRequest:{type:"object",properties:{orgId:{description:"Organization ID",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},planId:{type:"string",description:"Price ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},couponId:{type:"string",description:"Coupon ID to apply","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},userCount:{type:"integer",description:"Number of users in the organization",minimum:0},email:{type:"string",format:"email",description:"Email of the customer"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},UpgradeSubscriptionRequest:{type:"object",properties:{oldPlanId:{description:"Old Plan id that is being changed",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},newPlanId:{description:"New Plan id that is being changed to",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}},CreateSubscriptionResponse:{type:"object",properties:{subscriptionId:{type:"string",description:"ID of the associated subscription.","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},clientSecret:{type:"string",description:"Client secret returned by the payment processor for the subscription checkout flow.",maxLength:500}}},UpdateUsersRequest:{type:"object",properties:{paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},CancelSubscriptionRequest:{type:"object",properties:{subscriptionId:{type:"string",description:"Subscription ID from the payment processor","x-id-format":"external",maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"},paymentProcessor:{type:"string",enum:["stripe","paypal","braintree"],description:"Supported payment processors"}}},WebhookEvent:{type:"object",description:"Payload for webhook events from payment processors"},SubscriptionPage:{type:"object",required:["page","page_size","total_count","subscriptions"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},page_size:{type:"integer",description:"Number of items per page.",minimum:1},total_count:{type:"integer",description:"Total number of items available.",minimum:0},subscriptions:{type:"array",items:{"x-go-type":"Subscription",type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},description:"Subscriptions returned in the current page of results."}}},Subscription:{type:"object",additionalProperties:false,description:"Subscription entity schema.",required:["id","org_id","plan_id","billing_id","status","quantity"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},org_id:{"x-oapi-codegen-extra-tags":{db:"org_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan_id:{"x-oapi-codegen-extra-tags":{db:"plan_id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},plan:{"x-go-type":"planv1beta2.Plan","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta2/plan",name:"planv1beta2"},"x-oapi-codegen-extra-tags":{belongs_to:"plans",fk_id:"PlanId",json:"plan,omitempty"},type:"object",additionalProperties:false,description:"Plan entity schema.",required:["id","name","cadence","unit","price_per_unit","minimum_units","currency"],properties:{id:{"x-oapi-codegen-extra-tags":{db:"id",json:"id",csv:"id"},type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{"x-go-type":"PlanName","x-oapi-codegen-extra-tags":{db:"name",json:"name",csv:"name"},type:"string",description:"Name of the plan","x-enum-casing-exempt":true,enum:["Free","Team Designer","Team Operator","Enterprise"]},cadence:{"x-go-type":"PlanCadence","x-oapi-codegen-extra-tags":{db:"cadence",json:"cadence",csv:"cadence"},type:"string",enum:["none","monthly","annually"]},unit:{"x-go-type":"PlanUnit","x-oapi-codegen-extra-tags":{db:"unit",json:"unit",csv:"unit"},type:"string",enum:["user","free"]},minimum_units:{type:"integer",description:"Minimum number of units required for the plan","x-oapi-codegen-extra-tags":{db:"minimum_units",json:"minimum_units",csv:"minimum_units"},minimum:0},price_per_unit:{type:"number",description:"Price per unit of the plan","x-oapi-codegen-extra-tags":{db:"price_per_unit",json:"price_per_unit",csv:"price_per_unit"},minimum:0},currency:{"x-go-type":"Currency","x-oapi-codegen-extra-tags":{db:"currency",json:"currency",csv:"currency"},type:"string",enum:["usd"]}}},quantity:{description:"number of units subscribed (eg number of users)",type:"integer","x-oapi-codegen-extra-tags":{db:"quantity"},minimum:0},start_date:{"x-oapi-codegen-extra-tags":{db:"start_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},end_date:{"x-oapi-codegen-extra-tags":{db:"end_date"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},status:{"x-go-type":"SubscriptionStatus","x-oapi-codegen-extra-tags":{db:"status"},type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}},created_at:{"x-oapi-codegen-extra-tags":{db:"created_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{"x-oapi-codegen-extra-tags":{db:"updated_at"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{"x-oapi-codegen-extra-tags":{db:"deleted_at"},type:"string",format:"date-time","x-go-type":"sql.NullTime","x-go-type-import":{path:"database/sql"},"x-go-type-skip-optional-pointer":true},billing_id:{type:"string",description:"Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe","x-id-format":"external","x-oapi-codegen-extra-tags":{db:"billing_id"},maxLength:500,pattern:"^[A-Za-z0-9_\\-]+$"}}},SubscriptionStatus:{type:"string",description:"Possible statuses of a Stripe subscription.",enum:["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"x-enumDescriptions":{incomplete:"The subscription has been created, but the initial payment is pending. It may transition to 'active' or 'incomplete_expired'.",incomplete_expired:"The subscription was created but never activated due to failed initial payment. It is now expired.",trialing:"The subscription is currently in a trial period before the first payment is due.",active:"The subscription is active, and billing is functioning normally.",past_due:"The latest payment attempt failed, but the subscription remains active. Stripe may retry the charge.",canceled:"The subscription has been canceled and will no longer generate invoices.",unpaid:"The subscription is still technically active but has unpaid invoices and is no longer generating new invoices."}}}}},t=e;
|
|
1
|
+
'use strict';var e={openapi:"3.0.0",info:{title:"Subscription","x-deprecated":true,description:"API for managing subscriptions using various payment processors in a SaaS application.",version:"v1beta2",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],tags:[{name:"Subscriptions",description:"Operations related to subscriptions"},{name:"Plans",description:"Operations related to plans"},{name:"Payment Processors",description:"Operations related to payment processors"}],paths:{"/api/entitlement/subscriptions":{get:{"x-internal":["cloud"],tags:["Subscriptions"],description:"Returns all subscriptions for the organization",operationId:"getSubscriptions",summary:"Read subscriptions",security:[{jwt:[]}],parameters:[{name:"page",in:"query",description:"Get responses by page",schema:{type:"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
|
module.exports=t;
|