@meshery/schemas 1.2.19 → 1.2.20

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.
@@ -1,2 +1,2 @@
1
- 'use strict';var e={openapi:"3.0.0",info:{title:"Badge",description:"OpenAPI schema for managing badges.",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"}},security:[{jwt:[]}],tags:[{name:"Badge",description:"Operations related to user and organization badges."}],paths:{"/api/organizations/badges/{badgeId}":{delete:{"x-internal":["cloud"],operationId:"deleteBadgeById",tags:["Badge"],summary:"Delete a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge 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:"Badge 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"}}}}}},get:{"x-internal":["cloud"],operationId:"getBadgeById",tags:["Badge"],summary:"Get a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Badge response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},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/organizations/badges":{post:{"x-internal":["cloud"],operationId:"createOrUpdateBadge",tags:["Badge"],summary:"Create a new badge or update an existing badge",requestBody:{content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}}}},required:true},responses:{200:{description:"Badge upserted",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/badges":{get:{"x-internal":["cloud"],operationId:"getAvailableBadges",tags:["Badge"],summary:"Get available badges",parameters:[{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}],responses:{200:{description:"Available badges",content:{"application/json":{schema:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/users/badges":{put:{"x-internal":["cloud"],operationId:"assignBadges",tags:["Badge"],summary:"Assign badges to a user",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},responses:{200:{description:"Badge assignment result",content:{"application/json":{schema:{type:"object",additionalProperties:true}}}},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"}}}}},parameters:{badgeId:{name:"badgeId",in:"path",description:"Badge 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"}}},orgIdQuery:{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},schemas:{BadgePayload:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}},Badge:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},BadgesPage:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}},BadgeAssignmentPayload:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},t=e;
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"Badge",description:"OpenAPI schema for managing badges.",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"}},security:[{jwt:[]}],tags:[{name:"Badge",description:"Operations related to user and organization badges."}],paths:{"/api/organizations/badges/{badgeId}":{delete:{"x-internal":["cloud"],operationId:"deleteBadgeById",tags:["Badge"],summary:"Delete a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge 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:"Badge 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"}}}}}},get:{"x-internal":["cloud"],operationId:"getBadgeById",tags:["Badge"],summary:"Get a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Badge response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},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/organizations/badges":{post:{"x-internal":["cloud"],operationId:"createOrUpdateBadge",tags:["Badge"],summary:"Create a new badge or update an existing badge",requestBody:{content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}}}},required:true},responses:{200:{description:"Badge upserted",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/badges":{get:{"x-internal":["cloud"],operationId:"getAvailableBadges",tags:["Badge"],summary:"Get available badges",parameters:[{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}],responses:{200:{description:"Available badges",content:{"application/json":{schema:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/users/badges":{put:{"x-internal":["cloud"],operationId:"assignBadges",tags:["Badge"],summary:"Assign badges to a user",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},responses:{200:{description:"Badge assignment result",content:{"application/json":{schema:{type:"object",additionalProperties:true}}}},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"}}}}},parameters:{badgeId:{name:"badgeId",in:"path",description:"Badge 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"}}},orgIdQuery:{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},schemas:{BadgePayload:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}},Badge:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},BadgesPage:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}},BadgeAssignmentPayload:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},t=e;
2
2
  module.exports=t;
@@ -1,2 +1,2 @@
1
- var e={openapi:"3.0.0",info:{title:"Badge",description:"OpenAPI schema for managing badges.",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"}},security:[{jwt:[]}],tags:[{name:"Badge",description:"Operations related to user and organization badges."}],paths:{"/api/organizations/badges/{badgeId}":{delete:{"x-internal":["cloud"],operationId:"deleteBadgeById",tags:["Badge"],summary:"Delete a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge 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:"Badge 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"}}}}}},get:{"x-internal":["cloud"],operationId:"getBadgeById",tags:["Badge"],summary:"Get a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Badge response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},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/organizations/badges":{post:{"x-internal":["cloud"],operationId:"createOrUpdateBadge",tags:["Badge"],summary:"Create a new badge or update an existing badge",requestBody:{content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}}}},required:true},responses:{200:{description:"Badge upserted",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/badges":{get:{"x-internal":["cloud"],operationId:"getAvailableBadges",tags:["Badge"],summary:"Get available badges",parameters:[{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}],responses:{200:{description:"Available badges",content:{"application/json":{schema:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/users/badges":{put:{"x-internal":["cloud"],operationId:"assignBadges",tags:["Badge"],summary:"Assign badges to a user",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},responses:{200:{description:"Badge assignment result",content:{"application/json":{schema:{type:"object",additionalProperties:true}}}},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"}}}}},parameters:{badgeId:{name:"badgeId",in:"path",description:"Badge 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"}}},orgIdQuery:{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},schemas:{BadgePayload:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}},Badge:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},BadgesPage:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}},BadgeAssignmentPayload:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},t=e;
1
+ var e={openapi:"3.0.0",info:{title:"Badge",description:"OpenAPI schema for managing badges.",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"}},security:[{jwt:[]}],tags:[{name:"Badge",description:"Operations related to user and organization badges."}],paths:{"/api/organizations/badges/{badgeId}":{delete:{"x-internal":["cloud"],operationId:"deleteBadgeById",tags:["Badge"],summary:"Delete a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge 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:"Badge 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"}}}}}},get:{"x-internal":["cloud"],operationId:"getBadgeById",tags:["Badge"],summary:"Get a badge by its ID",parameters:[{name:"badgeId",in:"path",description:"Badge ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Badge response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},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/organizations/badges":{post:{"x-internal":["cloud"],operationId:"createOrUpdateBadge",tags:["Badge"],summary:"Create a new badge or update an existing badge",requestBody:{content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}}}},required:true},responses:{200:{description:"Badge upserted",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/badges":{get:{"x-internal":["cloud"],operationId:"getAvailableBadges",tags:["Badge"],summary:"Get available badges",parameters:[{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}],responses:{200:{description:"Available badges",content:{"application/json":{schema:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/users/badges":{put:{"x-internal":["cloud"],operationId:"assignBadges",tags:["Badge"],summary:"Assign badges to a user",requestBody:{required:true,content:{"application/json":{schema:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},responses:{200:{description:"Badge assignment result",content:{"application/json":{schema:{type:"object",additionalProperties:true}}}},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"}}}}},parameters:{badgeId:{name:"badgeId",in:"path",description:"Badge 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"}}},orgIdQuery:{name:"orgId",in:"query",description:"Organization ID to scope the badge listing to.",required:false,schema:{type:"string",format:"uuid"}}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},schemas:{BadgePayload:{type:"object",description:"Payload for creating or updating a badge.",required:["label","name","orgId","description","imageUrl"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id,omitempty"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}}}},Badge:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},BadgesPage:{type:"object",description:"Map of badges available in an organization, keyed by badge label.",properties:{badges:{type:"object",additionalProperties:{type:"object",additionalProperties:false,description:"Badge entity \u2014 a named recognition issued within an organization.",required:["id","label","name","orgId","description","imageUrl","createdAt","updatedAt","deletedAt"],properties:{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"},"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",json:"id"}},orgId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrgID","x-oapi-codegen-extra-tags":{db:"org_id",json:"orgId"}},label:{type:"string",description:"Unique identifier for the badge, typically slug-style (auto generated).",example:"Kubernetes-Expert","x-oapi-codegen-extra-tags":{db:"label",json:"label"},maxLength:500},name:{type:"string",description:"Concise descriptor for the badge or certificate.",example:"Kubernetes Expert","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255},description:{type:"string",description:"A description of the milestone achieved, often including criteria for receiving this recognition.",example:"Awarded for mastering Kubernetes concepts and practices.","x-oapi-codegen-extra-tags":{db:"description",json:"description"},maxLength:5e3},imageUrl:{type:"string",format:"uri",description:"URL to the badge image.",example:"https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png",maxLength:2048,"x-oapi-codegen-extra-tags":{db:"image_url",json:"imageUrl"}},createdAt:{type:"string",format:"date-time",description:"Timestamp when the badge was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"}},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"}},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the badge was soft-deleted, if applicable.","x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at",json:"deletedAt"}}}},description:"Available badges, keyed by badge label."}}},BadgeAssignmentPayload:{type:"object",description:"Payload for assigning a set of badges to a user.",required:["badges","userId"],properties:{badges:{type:"array",items:{type:"string",description:"Badge label (see Badge.label) to assign."},description:"Labels of the badges being assigned to the user."},userId:{type:"string",description:"ID of the user to receive the badges.",maxLength:500,format:"uuid","x-go-name":"UserID","x-oapi-codegen-extra-tags":{json:"userId"}},notify:{type:"boolean",description:"When true, send a notification to the user about the new badge assignment."}}}}}},t=e;
2
2
  export{t as default};
package/dist/index.d.mts CHANGED
@@ -17041,7 +17041,7 @@ interface components$d {
17041
17041
  /**
17042
17042
  * Format: uri
17043
17043
  * @description URL to the badge image
17044
- * @example https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp
17044
+ * @example https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png
17045
17045
  */
17046
17046
  image_url: string;
17047
17047
  };
@@ -17074,7 +17074,7 @@ interface components$d {
17074
17074
  /**
17075
17075
  * Format: uri
17076
17076
  * @description URL to the badge image
17077
- * @example https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp
17077
+ * @example https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png
17078
17078
  */
17079
17079
  image_url: string;
17080
17080
  /**
@@ -17125,7 +17125,7 @@ interface components$d {
17125
17125
  /**
17126
17126
  * Format: uri
17127
17127
  * @description URL to the badge image
17128
- * @example https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp
17128
+ * @example https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png
17129
17129
  */
17130
17130
  image_url: string;
17131
17131
  /**
package/dist/index.d.ts CHANGED
@@ -17041,7 +17041,7 @@ interface components$d {
17041
17041
  /**
17042
17042
  * Format: uri
17043
17043
  * @description URL to the badge image
17044
- * @example https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp
17044
+ * @example https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png
17045
17045
  */
17046
17046
  image_url: string;
17047
17047
  };
@@ -17074,7 +17074,7 @@ interface components$d {
17074
17074
  /**
17075
17075
  * Format: uri
17076
17076
  * @description URL to the badge image
17077
- * @example https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp
17077
+ * @example https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png
17078
17078
  */
17079
17079
  image_url: string;
17080
17080
  /**
@@ -17125,7 +17125,7 @@ interface components$d {
17125
17125
  /**
17126
17126
  * Format: uri
17127
17127
  * @description URL to the badge image
17128
- * @example https://raw.githubusercontent.com/layer5io/layer5-academy/refs/heads/master/static/11111111-1111-1111-1111-111111111111/images/meshery-logo-light.webp
17128
+ * @example https://raw.githubusercontent.com/meshery-extensions/meshery-academy/refs/heads/master/.github/assets/images/mershery-icon.png
17129
17129
  */
17130
17130
  image_url: string;
17131
17131
  /**