@meshery/schemas 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{Core-B0SJO-By.d.mts → Core-CwYNKnjf.d.mts} +10 -1
  2. package/dist/{Core-B0SJO-By.d.ts → Core-CwYNKnjf.d.ts} +10 -1
  3. package/dist/cloudApi.d.mts +362 -1
  4. package/dist/cloudApi.d.ts +362 -1
  5. package/dist/cloudApi.js +1 -1
  6. package/dist/cloudApi.mjs +1 -1
  7. package/dist/constructs/v1alpha1/core/Core.d.mts +1 -1
  8. package/dist/constructs/v1alpha1/core/Core.d.ts +1 -1
  9. package/dist/constructs/v1alpha1/core/CoreSchema.js +1 -1
  10. package/dist/constructs/v1alpha1/core/CoreSchema.mjs +1 -1
  11. package/dist/constructs/v1beta1/core/Core.d.mts +10 -1
  12. package/dist/constructs/v1beta1/core/Core.d.ts +10 -1
  13. package/dist/constructs/v1beta1/core/CoreSchema.js +1 -1
  14. package/dist/constructs/v1beta1/core/CoreSchema.mjs +1 -1
  15. package/dist/constructs/v1beta1/view/View.d.mts +128 -0
  16. package/dist/constructs/v1beta1/view/View.d.ts +128 -0
  17. package/dist/constructs/v1beta1/view/ViewSchema.js +12 -1
  18. package/dist/constructs/v1beta1/view/ViewSchema.mjs +12 -1
  19. package/dist/constructs/v1beta2/core/Core.d.mts +10 -1
  20. package/dist/constructs/v1beta2/core/Core.d.ts +10 -1
  21. package/dist/constructs/v1beta2/core/CoreSchema.js +1 -1
  22. package/dist/constructs/v1beta2/core/CoreSchema.mjs +1 -1
  23. package/dist/constructs/v1beta2/design/Design.d.mts +131 -0
  24. package/dist/constructs/v1beta2/design/Design.d.ts +131 -0
  25. package/dist/constructs/v1beta2/design/DesignSchema.js +13 -3
  26. package/dist/constructs/v1beta2/design/DesignSchema.mjs +13 -3
  27. package/dist/index.d.mts +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +15 -4
  30. package/dist/index.mjs +15 -4
  31. package/package.json +1 -1
@@ -9,6 +9,16 @@ interface paths {
9
9
  /** Creates a new view with the given filters and metadata. */
10
10
  post: operations["createView"];
11
11
  };
12
+ "/api/content/view/share": {
13
+ /**
14
+ * Shares a view with a list of email addresses. When `share` is true, the
15
+ * view's visibility is flipped to public and an invitation email is sent
16
+ * to each recipient. When `share` is false, visibility is reverted to
17
+ * private. Only the owner of the view (or a provider admin) may change
18
+ * its sharing mode.
19
+ */
20
+ post: operations["shareView"];
21
+ };
12
22
  "/api/content/views/{viewId}": {
13
23
  /** Returns a single view by its unique identifier. */
14
24
  get: operations["getViewById"];
@@ -140,6 +150,33 @@ interface components {
140
150
  [key: string]: unknown;
141
151
  };
142
152
  };
153
+ /**
154
+ * @description Payload for sharing a view with one or more recipients by email. The
155
+ * wire format matches the canonical design share payload
156
+ * (`design.ContentSharePayload` in `v1beta2/design`), restricted to the
157
+ * `view` content type since that is all this endpoint accepts.
158
+ */
159
+ ContentSharePayload: {
160
+ /**
161
+ * Format: uuid
162
+ * @description Identifier of the view being shared.
163
+ */
164
+ content_id: string;
165
+ /**
166
+ * @description The kind of content being shared. Only `view` is accepted on this
167
+ * endpoint.
168
+ *
169
+ * @enum {string}
170
+ */
171
+ content_type: "view";
172
+ /** @description Email addresses of the recipients to share this view with. */
173
+ emails: string[];
174
+ /**
175
+ * @description When true, flip the view's visibility to public and send invitation
176
+ * emails to the recipients. When false, revert visibility to private.
177
+ */
178
+ share: boolean;
179
+ };
143
180
  /** @description Paginated list of views with location enrichment. */
144
181
  MesheryViewPage: {
145
182
  page?: number;
@@ -264,6 +301,32 @@ interface components {
264
301
  };
265
302
  };
266
303
  };
304
+ /** Body for sharing a view with recipients by email. */
305
+ contentSharePayload: {
306
+ content: {
307
+ "application/json": {
308
+ /**
309
+ * Format: uuid
310
+ * @description Identifier of the view being shared.
311
+ */
312
+ content_id: string;
313
+ /**
314
+ * @description The kind of content being shared. Only `view` is accepted on this
315
+ * endpoint.
316
+ *
317
+ * @enum {string}
318
+ */
319
+ content_type: "view";
320
+ /** @description Email addresses of the recipients to share this view with. */
321
+ emails: string[];
322
+ /**
323
+ * @description When true, flip the view's visibility to public and send invitation
324
+ * emails to the recipients. When false, revert visibility to private.
325
+ */
326
+ share: boolean;
327
+ };
328
+ };
329
+ };
267
330
  };
268
331
  }
269
332
  interface operations {
@@ -453,6 +516,71 @@ interface operations {
453
516
  };
454
517
  };
455
518
  };
519
+ /**
520
+ * Shares a view with a list of email addresses. When `share` is true, the
521
+ * view's visibility is flipped to public and an invitation email is sent
522
+ * to each recipient. When `share` is false, visibility is reverted to
523
+ * private. Only the owner of the view (or a provider admin) may change
524
+ * its sharing mode.
525
+ */
526
+ shareView: {
527
+ responses: {
528
+ /** View shared. */
529
+ 200: unknown;
530
+ /** Invalid request body or request param */
531
+ 400: {
532
+ content: {
533
+ "text/plain": string;
534
+ };
535
+ };
536
+ /** Expired JWT token used or insufficient privilege */
537
+ 401: {
538
+ content: {
539
+ "text/plain": string;
540
+ };
541
+ };
542
+ /** Caller is not the owner of the view. */
543
+ 403: unknown;
544
+ /** Result not found */
545
+ 404: {
546
+ content: {
547
+ "text/plain": string;
548
+ };
549
+ };
550
+ /** Internal server error */
551
+ 500: {
552
+ content: {
553
+ "text/plain": string;
554
+ };
555
+ };
556
+ };
557
+ /** Body for sharing a view with recipients by email. */
558
+ requestBody: {
559
+ content: {
560
+ "application/json": {
561
+ /**
562
+ * Format: uuid
563
+ * @description Identifier of the view being shared.
564
+ */
565
+ content_id: string;
566
+ /**
567
+ * @description The kind of content being shared. Only `view` is accepted on this
568
+ * endpoint.
569
+ *
570
+ * @enum {string}
571
+ */
572
+ content_type: "view";
573
+ /** @description Email addresses of the recipients to share this view with. */
574
+ emails: string[];
575
+ /**
576
+ * @description When true, flip the view's visibility to public and send invitation
577
+ * emails to the recipients. When false, revert visibility to private.
578
+ */
579
+ share: boolean;
580
+ };
581
+ };
582
+ };
583
+ };
456
584
  /** Returns a single view by its unique identifier. */
457
585
  getViewById: {
458
586
  parameters: {
@@ -9,6 +9,16 @@ interface paths {
9
9
  /** Creates a new view with the given filters and metadata. */
10
10
  post: operations["createView"];
11
11
  };
12
+ "/api/content/view/share": {
13
+ /**
14
+ * Shares a view with a list of email addresses. When `share` is true, the
15
+ * view's visibility is flipped to public and an invitation email is sent
16
+ * to each recipient. When `share` is false, visibility is reverted to
17
+ * private. Only the owner of the view (or a provider admin) may change
18
+ * its sharing mode.
19
+ */
20
+ post: operations["shareView"];
21
+ };
12
22
  "/api/content/views/{viewId}": {
13
23
  /** Returns a single view by its unique identifier. */
14
24
  get: operations["getViewById"];
@@ -140,6 +150,33 @@ interface components {
140
150
  [key: string]: unknown;
141
151
  };
142
152
  };
153
+ /**
154
+ * @description Payload for sharing a view with one or more recipients by email. The
155
+ * wire format matches the canonical design share payload
156
+ * (`design.ContentSharePayload` in `v1beta2/design`), restricted to the
157
+ * `view` content type since that is all this endpoint accepts.
158
+ */
159
+ ContentSharePayload: {
160
+ /**
161
+ * Format: uuid
162
+ * @description Identifier of the view being shared.
163
+ */
164
+ content_id: string;
165
+ /**
166
+ * @description The kind of content being shared. Only `view` is accepted on this
167
+ * endpoint.
168
+ *
169
+ * @enum {string}
170
+ */
171
+ content_type: "view";
172
+ /** @description Email addresses of the recipients to share this view with. */
173
+ emails: string[];
174
+ /**
175
+ * @description When true, flip the view's visibility to public and send invitation
176
+ * emails to the recipients. When false, revert visibility to private.
177
+ */
178
+ share: boolean;
179
+ };
143
180
  /** @description Paginated list of views with location enrichment. */
144
181
  MesheryViewPage: {
145
182
  page?: number;
@@ -264,6 +301,32 @@ interface components {
264
301
  };
265
302
  };
266
303
  };
304
+ /** Body for sharing a view with recipients by email. */
305
+ contentSharePayload: {
306
+ content: {
307
+ "application/json": {
308
+ /**
309
+ * Format: uuid
310
+ * @description Identifier of the view being shared.
311
+ */
312
+ content_id: string;
313
+ /**
314
+ * @description The kind of content being shared. Only `view` is accepted on this
315
+ * endpoint.
316
+ *
317
+ * @enum {string}
318
+ */
319
+ content_type: "view";
320
+ /** @description Email addresses of the recipients to share this view with. */
321
+ emails: string[];
322
+ /**
323
+ * @description When true, flip the view's visibility to public and send invitation
324
+ * emails to the recipients. When false, revert visibility to private.
325
+ */
326
+ share: boolean;
327
+ };
328
+ };
329
+ };
267
330
  };
268
331
  }
269
332
  interface operations {
@@ -453,6 +516,71 @@ interface operations {
453
516
  };
454
517
  };
455
518
  };
519
+ /**
520
+ * Shares a view with a list of email addresses. When `share` is true, the
521
+ * view's visibility is flipped to public and an invitation email is sent
522
+ * to each recipient. When `share` is false, visibility is reverted to
523
+ * private. Only the owner of the view (or a provider admin) may change
524
+ * its sharing mode.
525
+ */
526
+ shareView: {
527
+ responses: {
528
+ /** View shared. */
529
+ 200: unknown;
530
+ /** Invalid request body or request param */
531
+ 400: {
532
+ content: {
533
+ "text/plain": string;
534
+ };
535
+ };
536
+ /** Expired JWT token used or insufficient privilege */
537
+ 401: {
538
+ content: {
539
+ "text/plain": string;
540
+ };
541
+ };
542
+ /** Caller is not the owner of the view. */
543
+ 403: unknown;
544
+ /** Result not found */
545
+ 404: {
546
+ content: {
547
+ "text/plain": string;
548
+ };
549
+ };
550
+ /** Internal server error */
551
+ 500: {
552
+ content: {
553
+ "text/plain": string;
554
+ };
555
+ };
556
+ };
557
+ /** Body for sharing a view with recipients by email. */
558
+ requestBody: {
559
+ content: {
560
+ "application/json": {
561
+ /**
562
+ * Format: uuid
563
+ * @description Identifier of the view being shared.
564
+ */
565
+ content_id: string;
566
+ /**
567
+ * @description The kind of content being shared. Only `view` is accepted on this
568
+ * endpoint.
569
+ *
570
+ * @enum {string}
571
+ */
572
+ content_type: "view";
573
+ /** @description Email addresses of the recipients to share this view with. */
574
+ emails: string[];
575
+ /**
576
+ * @description When true, flip the view's visibility to public and send invitation
577
+ * emails to the recipients. When false, revert visibility to private.
578
+ */
579
+ share: boolean;
580
+ };
581
+ };
582
+ };
583
+ };
456
584
  /** Returns a single view by its unique identifier. */
457
585
  getViewById: {
458
586
  parameters: {
@@ -1,2 +1,13 @@
1
- 'use strict';var e={openapi:"3.0.0",info:{title:"View",description:"OpenAPI schema for managing Meshery views \u2014 saved perspectives with filters and metadata.",version:"v1beta1",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL (controlled via PORT environment variable)"}],security:[{jwt:[]}],tags:[{name:"views",description:"APIs for managing Meshery views."}],components:{responses:{200:{description:"ok",content:{"text/plain":{schema:{type:"string"}}}},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:{viewId:{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},orgIdQuery:{name:"orgId",in:"query",description:"Organization ID to scope the request.",schema:{type:"string"},required:false}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},schemas:{MesheryView:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},MesheryViewWithLocation:{type:"object",description:"A view enriched with the workspace and organization it belongs to.",required:["workspace_id","organization_id"],properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-go-type-name":"GeneralId","x-go-type-skip-optional-pointer":true},name:{type:"string",description:"Display name of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"name",json:"name,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",json:"visibility,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"filters",json:"filters,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"metadata",json:"metadata,omitempty"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"user_id",json:"user_id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},workspace_name:{type:"string",description:"Name of the workspace this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_name",json:"workspace_name,omitempty"}},workspace_id:{description:"ID of the workspace this view belongs to.","x-go-name":"WorkspaceID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspace_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_id:{description:"ID of the organization this view belongs to.","x-go-name":"OrganizationID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_id",json:"organization_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_name:{type:"string",description:"Name of the organization this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_name",json:"organization_name,omitempty"}},created_at:{description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.","x-go-type":"meshcore.NullTime","x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},ViewPayload:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}},MesheryViewPage:{type:"object",description:"Paginated list of views with location enrichment.",properties:{page:{type:"integer","x-go-type-skip-optional-pointer":true},page_size:{type:"integer","x-go-type-skip-optional-pointer":true},total_count:{type:"integer","x-go-type-skip-optional-pointer":true},views:{type:"array","x-go-type-skip-optional-pointer":true,items:{"x-go-type":"MesheryViewWithLocation",type:"object",description:"A view enriched with the workspace and organization it belongs to.",required:["workspace_id","organization_id"],properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-go-type-name":"GeneralId","x-go-type-skip-optional-pointer":true},name:{type:"string",description:"Display name of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"name",json:"name,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",json:"visibility,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"filters",json:"filters,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"metadata",json:"metadata,omitempty"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"user_id",json:"user_id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},workspace_name:{type:"string",description:"Name of the workspace this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_name",json:"workspace_name,omitempty"}},workspace_id:{description:"ID of the workspace this view belongs to.","x-go-name":"WorkspaceID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspace_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_id:{description:"ID of the organization this view belongs to.","x-go-name":"OrganizationID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_id",json:"organization_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_name:{type:"string",description:"Name of the organization this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_name",json:"organization_name,omitempty"}},created_at:{description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.","x-go-type":"meshcore.NullTime","x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Views in this page, enriched with workspace and organization context."}}}},requestBodies:{viewPayload:{description:"Body for creating or updating a view",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}}}}}}},paths:{"/api/content/views":{post:{"x-internal":["cloud"],tags:["views"],operationId:"createView",summary:"Create a view",description:"Creates a new view with the given filters and metadata.",requestBody:{description:"Body for creating or updating a view",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}}}}},responses:{201:{description:"Created view",content:{"application/json":{schema:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":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"}}}}}},get:{"x-internal":["cloud"],tags:["views"],operationId:"getViews",summary:"Get views",description:"Returns a paginated list of views accessible to the user.",parameters:[{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"filter",in:"query",description:"JSON-encoded filter string for assignment and soft-delete filters.",required:false,schema:{type:"string"}},{name:"shared",in:"query",description:"When true, include views shared with the user.",required:false,schema:{type:"boolean"}},{name:"visibility",in:"query",description:"Filter by visibility level (public, private).",required:false,schema:{type:"string"}},{name:"orgId",in:"query",description:"Organization ID to scope the request.",schema:{type:"string"},required:false},{name:"userId",in:"query",description:"UUID of the user whose views to retrieve.",required:false,schema:{type:"string"}}],responses:{200:{description:"Views page",content:{"application/json":{schema:{type:"object",description:"Paginated list of views with location enrichment.",properties:{page:{type:"integer","x-go-type-skip-optional-pointer":true},page_size:{type:"integer","x-go-type-skip-optional-pointer":true},total_count:{type:"integer","x-go-type-skip-optional-pointer":true},views:{type:"array","x-go-type-skip-optional-pointer":true,items:{"x-go-type":"MesheryViewWithLocation",type:"object",description:"A view enriched with the workspace and organization it belongs to.",required:["workspace_id","organization_id"],properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-go-type-name":"GeneralId","x-go-type-skip-optional-pointer":true},name:{type:"string",description:"Display name of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"name",json:"name,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",json:"visibility,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"filters",json:"filters,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"metadata",json:"metadata,omitempty"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"user_id",json:"user_id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},workspace_name:{type:"string",description:"Name of the workspace this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_name",json:"workspace_name,omitempty"}},workspace_id:{description:"ID of the workspace this view belongs to.","x-go-name":"WorkspaceID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspace_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_id:{description:"ID of the organization this view belongs to.","x-go-name":"OrganizationID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_id",json:"organization_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_name:{type:"string",description:"Name of the organization this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_name",json:"organization_name,omitempty"}},created_at:{description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.","x-go-type":"meshcore.NullTime","x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Views in this page, enriched with workspace and organization context."}}}}}},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/content/views/{viewId}":{get:{"x-internal":["cloud"],tags:["views"],operationId:"getViewById",summary:"Get a view by ID",description:"Returns a single view by its unique identifier.",parameters:[{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true}],responses:{200:{description:"View",content:{"application/json":{schema:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":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"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["views"],operationId:"updateView",summary:"Update a view",description:"Updates an existing view with new filters, metadata, or visibility.",parameters:[{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true}],requestBody:{description:"Body for creating or updating a view",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}}}}},responses:{200:{description:"Updated view",content:{"application/json":{schema:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":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"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["views"],operationId:"deleteView",summary:"Delete a view",description:"Soft-deletes a view by its unique identifier.",parameters:[{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true}],responses:{204:{description:"View deleted"},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"}}}}}}}}},t=e;
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"View",description:"OpenAPI schema for managing Meshery views \u2014 saved perspectives with filters and metadata.",version:"v1beta1",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL (controlled via PORT environment variable)"}],security:[{jwt:[]}],tags:[{name:"views",description:"APIs for managing Meshery views."}],components:{responses:{200:{description:"ok",content:{"text/plain":{schema:{type:"string"}}}},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:{viewId:{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},orgIdQuery:{name:"orgId",in:"query",description:"Organization ID to scope the request.",schema:{type:"string"},required:false}},securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},schemas:{MesheryView:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},MesheryViewWithLocation:{type:"object",description:"A view enriched with the workspace and organization it belongs to.",required:["workspace_id","organization_id"],properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-go-type-name":"GeneralId","x-go-type-skip-optional-pointer":true},name:{type:"string",description:"Display name of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"name",json:"name,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",json:"visibility,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"filters",json:"filters,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"metadata",json:"metadata,omitempty"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"user_id",json:"user_id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},workspace_name:{type:"string",description:"Name of the workspace this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_name",json:"workspace_name,omitempty"}},workspace_id:{description:"ID of the workspace this view belongs to.","x-go-name":"WorkspaceID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspace_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_id:{description:"ID of the organization this view belongs to.","x-go-name":"OrganizationID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_id",json:"organization_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_name:{type:"string",description:"Name of the organization this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_name",json:"organization_name,omitempty"}},created_at:{description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.","x-go-type":"meshcore.NullTime","x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},ViewPayload:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}},ContentSharePayload:{type:"object",description:"Payload for sharing a view with one or more recipients by email. The\nwire format matches the canonical design share payload\n(`design.ContentSharePayload` in `v1beta2/design`), restricted to the\n`view` content type since that is all this endpoint accepts.\n",required:["content_id","content_type","emails","share"],properties:{content_id:{description:"Identifier of the view being shared.",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},content_type:{type:"string",description:"The kind of content being shared. Only `view` is accepted on this\nendpoint.\n",enum:["view"]},emails:{type:"array",description:"Email addresses of the recipients to share this view with.",items:{type:"string",format:"email"}},share:{type:"boolean",description:`When true, flip the view's visibility to public and send invitation
2
+ emails to the recipients. When false, revert visibility to private.
3
+ `}}},MesheryViewPage:{type:"object",description:"Paginated list of views with location enrichment.",properties:{page:{type:"integer","x-go-type-skip-optional-pointer":true},page_size:{type:"integer","x-go-type-skip-optional-pointer":true},total_count:{type:"integer","x-go-type-skip-optional-pointer":true},views:{type:"array","x-go-type-skip-optional-pointer":true,items:{"x-go-type":"MesheryViewWithLocation",type:"object",description:"A view enriched with the workspace and organization it belongs to.",required:["workspace_id","organization_id"],properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-go-type-name":"GeneralId","x-go-type-skip-optional-pointer":true},name:{type:"string",description:"Display name of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"name",json:"name,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",json:"visibility,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"filters",json:"filters,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"metadata",json:"metadata,omitempty"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"user_id",json:"user_id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},workspace_name:{type:"string",description:"Name of the workspace this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_name",json:"workspace_name,omitempty"}},workspace_id:{description:"ID of the workspace this view belongs to.","x-go-name":"WorkspaceID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspace_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_id:{description:"ID of the organization this view belongs to.","x-go-name":"OrganizationID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_id",json:"organization_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_name:{type:"string",description:"Name of the organization this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_name",json:"organization_name,omitempty"}},created_at:{description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.","x-go-type":"meshcore.NullTime","x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Views in this page, enriched with workspace and organization context."}}}},requestBodies:{viewPayload:{description:"Body for creating or updating a view",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}}}}},contentSharePayload:{description:"Body for sharing a view with recipients by email.",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for sharing a view with one or more recipients by email. The\nwire format matches the canonical design share payload\n(`design.ContentSharePayload` in `v1beta2/design`), restricted to the\n`view` content type since that is all this endpoint accepts.\n",required:["content_id","content_type","emails","share"],properties:{content_id:{description:"Identifier of the view being shared.",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},content_type:{type:"string",description:"The kind of content being shared. Only `view` is accepted on this\nendpoint.\n",enum:["view"]},emails:{type:"array",description:"Email addresses of the recipients to share this view with.",items:{type:"string",format:"email"}},share:{type:"boolean",description:`When true, flip the view's visibility to public and send invitation
4
+ emails to the recipients. When false, revert visibility to private.
5
+ `}}}}}}}},paths:{"/api/content/views":{post:{"x-internal":["cloud"],tags:["views"],operationId:"createView",summary:"Create a view",description:"Creates a new view with the given filters and metadata.",requestBody:{description:"Body for creating or updating a view",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}}}}},responses:{201:{description:"Created view",content:{"application/json":{schema:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":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"}}}}}},get:{"x-internal":["cloud"],tags:["views"],operationId:"getViews",summary:"Get views",description:"Returns a paginated list of views accessible to the user.",parameters:[{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"filter",in:"query",description:"JSON-encoded filter string for assignment and soft-delete filters.",required:false,schema:{type:"string"}},{name:"shared",in:"query",description:"When true, include views shared with the user.",required:false,schema:{type:"boolean"}},{name:"visibility",in:"query",description:"Filter by visibility level (public, private).",required:false,schema:{type:"string"}},{name:"orgId",in:"query",description:"Organization ID to scope the request.",schema:{type:"string"},required:false},{name:"userId",in:"query",description:"UUID of the user whose views to retrieve.",required:false,schema:{type:"string"}}],responses:{200:{description:"Views page",content:{"application/json":{schema:{type:"object",description:"Paginated list of views with location enrichment.",properties:{page:{type:"integer","x-go-type-skip-optional-pointer":true},page_size:{type:"integer","x-go-type-skip-optional-pointer":true},total_count:{type:"integer","x-go-type-skip-optional-pointer":true},views:{type:"array","x-go-type-skip-optional-pointer":true,items:{"x-go-type":"MesheryViewWithLocation",type:"object",description:"A view enriched with the workspace and organization it belongs to.",required:["workspace_id","organization_id"],properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-go-type-name":"GeneralId","x-go-type-skip-optional-pointer":true},name:{type:"string",description:"Display name of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"name",json:"name,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",json:"visibility,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"filters",json:"filters,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"metadata",json:"metadata,omitempty"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"user_id",json:"user_id,omitempty"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},workspace_name:{type:"string",description:"Name of the workspace this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_name",json:"workspace_name,omitempty"}},workspace_id:{description:"ID of the workspace this view belongs to.","x-go-name":"WorkspaceID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspace_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_id:{description:"ID of the organization this view belongs to.","x-go-name":"OrganizationID","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_id",json:"organization_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},organization_name:{type:"string",description:"Name of the organization this view belongs to.",maxLength:255,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"organization_name",json:"organization_name,omitempty"}},created_at:{description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.","x-go-type":"meshcore.NullTime","x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},description:"Views in this page, enriched with workspace and organization context."}}}}}},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/content/view/share":{post:{"x-internal":["cloud"],tags:["views"],operationId:"shareView",summary:"Share a view by email",description:`Shares a view with a list of email addresses. When \`share\` is true, the
6
+ view's visibility is flipped to public and an invitation email is sent
7
+ to each recipient. When \`share\` is false, visibility is reverted to
8
+ private. Only the owner of the view (or a provider admin) may change
9
+ its sharing mode.
10
+ `,requestBody:{description:"Body for sharing a view with recipients by email.",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for sharing a view with one or more recipients by email. The\nwire format matches the canonical design share payload\n(`design.ContentSharePayload` in `v1beta2/design`), restricted to the\n`view` content type since that is all this endpoint accepts.\n",required:["content_id","content_type","emails","share"],properties:{content_id:{description:"Identifier of the view being shared.",type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},content_type:{type:"string",description:"The kind of content being shared. Only `view` is accepted on this\nendpoint.\n",enum:["view"]},emails:{type:"array",description:"Email addresses of the recipients to share this view with.",items:{type:"string",format:"email"}},share:{type:"boolean",description:`When true, flip the view's visibility to public and send invitation
11
+ emails to the recipients. When false, revert visibility to private.
12
+ `}}}}}},responses:{200:{description:"View shared."},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"}}}},403:{description:"Caller is not the owner of the view."},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/content/views/{viewId}":{get:{"x-internal":["cloud"],tags:["views"],operationId:"getViewById",summary:"Get a view by ID",description:"Returns a single view by its unique identifier.",parameters:[{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true}],responses:{200:{description:"View",content:{"application/json":{schema:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":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"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["views"],operationId:"updateView",summary:"Update a view",description:"Updates an existing view with new filters, metadata, or visibility.",parameters:[{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true}],requestBody:{description:"Body for creating or updating a view",required:true,content:{"application/json":{schema:{type:"object",description:"Payload for creating or updating a view.",required:["name"],properties:{name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-oapi-codegen-extra-tags":{json:"name,omitempty"}},filters:{type:"object",description:"Filter configuration for this view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"filters,omitempty"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"visibility,omitempty"}},metadata:{type:"object",description:"Metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{json:"metadata,omitempty"}}}}}}},responses:{200:{description:"Updated view",content:{"application/json":{schema:{$id:"https://schemas.meshery.io/view.yaml",$schema:"http://json-schema.org/draft-07/schema#",title:"MesheryView",description:"A saved view with filters and metadata that defines a customized perspective of Meshery resources. Learn more at https://docs.meshery.io/concepts/logical/views",additionalProperties:false,type:"object",example:{id:"00000000-0000-0000-0000-000000000000",name:"My Kubernetes View",visibility:"private",filters:{},metadata:{},user_id:"00000000-0000-0000-0000-000000000000",created_at:"0001-01-01T00:00:00Z",updated_at:"0001-01-01T00:00:00Z",deleted_at:null},required:["id","name","visibility","user_id","created_at","updated_at"],properties:{id:{description:"Unique identifier for the view.","x-order":1,"x-go-name":"ID","x-oapi-codegen-extra-tags":{db:"id",yaml:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},name:{type:"string",description:"Display name of the view.",maxLength:255,minLength:1,"x-order":2,"x-oapi-codegen-extra-tags":{db:"name",yaml:"name"}},visibility:{type:"string",description:"Visibility level of the view.",maxLength:255,"x-order":3,"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"visibility",yaml:"visibility"}},filters:{type:"object",description:"Filter configuration that defines which resources this view displays.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{db:"filters",yaml:"filters"}},metadata:{type:"object",description:"Additional metadata associated with the view.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-order":5,"x-oapi-codegen-extra-tags":{db:"metadata",yaml:"metadata"}},user_id:{description:"ID of the user who created the view.","x-go-name":"UserID","x-go-type-skip-optional-pointer":true,"x-order":6,"x-oapi-codegen-extra-tags":{db:"user_id",yaml:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},created_at:{description:"Timestamp when the view was created.","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-order":7,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updated_at:{description:"Timestamp when the view was last updated.","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deleted_at:{description:"Timestamp when the view was soft deleted. Null while the view remains active.",nullable:true,"x-go-type":"core.NullTime","x-go-import":"database/sql","x-oapi-codegen-extra-tags":{db:"deleted_at",yaml:"deleted_at"},"x-order":9,"x-go-type-import":{name:"meshcore",path:"github.com/meshery/schemas/models/core"},type:"string",format:"date-time","x-go-type-skip-optional-pointer":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"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["views"],operationId:"deleteView",summary:"Delete a view",description:"Soft-deletes a view by its unique identifier.",parameters:[{name:"viewId",in:"path",description:"View ID",schema:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"view_id",json:"view_id"},"x-go-type-name":"ViewId","x-go-type-skip-optional-pointer":true},required:true}],responses:{204:{description:"View deleted"},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"}}}}}}}}},t=e;
2
13
  module.exports=t;