@meshery/schemas 1.2.0 → 1.2.2

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 (38) hide show
  1. package/README.md +4 -0
  2. package/dist/api.d.mts +39 -4
  3. package/dist/api.d.ts +39 -4
  4. package/dist/api.js +2 -2
  5. package/dist/api.mjs +2 -2
  6. package/dist/cloudApi.d.mts +12600 -14467
  7. package/dist/cloudApi.d.ts +12600 -14467
  8. package/dist/cloudApi.js +1 -1
  9. package/dist/cloudApi.mjs +1 -1
  10. package/dist/constructs/v1beta2/team/Team.d.mts +28 -8
  11. package/dist/constructs/v1beta2/team/Team.d.ts +28 -8
  12. package/dist/constructs/v1beta2/team/TeamSchema.js +1 -1
  13. package/dist/constructs/v1beta2/team/TeamSchema.mjs +1 -1
  14. package/dist/constructs/v1beta3/design/Design.d.mts +2324 -14651
  15. package/dist/constructs/v1beta3/design/Design.d.ts +2324 -14651
  16. package/dist/constructs/v1beta3/design/DesignSchema.js +17 -471
  17. package/dist/constructs/v1beta3/design/DesignSchema.mjs +17 -471
  18. package/dist/constructs/v1beta3/filter/Filter.d.mts +1366 -0
  19. package/dist/constructs/v1beta3/filter/Filter.d.ts +1366 -0
  20. package/dist/constructs/v1beta3/filter/Filter.js +1 -0
  21. package/dist/constructs/v1beta3/filter/Filter.mjs +0 -0
  22. package/dist/constructs/v1beta3/filter/FilterSchema.d.mts +7 -0
  23. package/dist/constructs/v1beta3/filter/FilterSchema.d.ts +7 -0
  24. package/dist/constructs/v1beta3/filter/FilterSchema.js +80 -0
  25. package/dist/constructs/v1beta3/filter/FilterSchema.mjs +80 -0
  26. package/dist/constructs/v1beta3/performance_profile/PerformanceProfile.d.mts +832 -0
  27. package/dist/constructs/v1beta3/performance_profile/PerformanceProfile.d.ts +832 -0
  28. package/dist/constructs/v1beta3/performance_profile/PerformanceProfile.js +1 -0
  29. package/dist/constructs/v1beta3/performance_profile/PerformanceProfile.mjs +0 -0
  30. package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.d.mts +7 -0
  31. package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.d.ts +7 -0
  32. package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.js +2 -0
  33. package/dist/constructs/v1beta3/performance_profile/PerformanceProfileSchema.mjs +2 -0
  34. package/dist/mesheryApi.d.mts +1067 -1059
  35. package/dist/mesheryApi.d.ts +1067 -1059
  36. package/dist/mesheryApi.js +1 -1
  37. package/dist/mesheryApi.mjs +1 -1
  38. package/package.json +1 -1
package/README.md CHANGED
@@ -48,6 +48,8 @@ Meshery schemas offer a powerful system designed for:
48
48
 
49
49
  For an explanation of Meshery's terminology regarding schemas, definitions, declarations, and instances, please see [Contributor's Guide to Models](https://docs.meshery.io/project/contributing/contributing-models).
50
50
 
51
+ For identifier-naming rules (wire casing, DB tag separation, URL/path/query-param conventions, operationId form), see [`docs/identifier-naming-contributor-guide.md`](docs/identifier-naming-contributor-guide.md) — the canonical, reader-friendly directory for the camelCase-on-the-wire contract that this repository and every downstream consumer share.
52
+
51
53
  ## Contributing
52
54
  --> **For an explanation of the directory structure of this repository and how to contribute changes to Meshery's schemas, see [Contributor's Guide to Schema-Driven Development](https://docs.meshery.io/project/contributing/contributing-schemas).**
53
55
 
@@ -292,6 +294,8 @@ post:
292
294
 
293
295
  ## Naming Conventions
294
296
 
297
+ > This section is the inline authority; for the reader-friendly directory (26-row naming table with before/after and do/don't examples), see [`docs/identifier-naming-contributor-guide.md`](docs/identifier-naming-contributor-guide.md).
298
+
295
299
  - Property names
296
300
  - Use camelCase for property fields (e.g., `schemaVersion`, `displayName`, `componentsCount`).
297
301
  - Identifier fields use lowerCamelCase with "Id" suffix (e.g., `modelId`, `registrantId`, `categoryId`).
package/dist/api.d.mts CHANGED
@@ -1,12 +1,47 @@
1
1
  import * as _reduxjs_toolkit_query_react from '@reduxjs/toolkit/query/react';
2
- import { BaseQueryFn, FetchArgs, FetchBaseQueryError } from '@reduxjs/toolkit/query/react';
2
+ import { FetchBaseQueryError, BaseQueryFn } from '@reduxjs/toolkit/query/react';
3
3
  import * as _reduxjs_toolkit_query from '@reduxjs/toolkit/query';
4
4
 
5
5
  declare const SUPPORTED_SOCIAL_ACCOUNTS: string[];
6
6
  declare const CURRENT_ORG_KEY = "Layer5-Current-Orgid";
7
7
  declare const DEFAULT_DESIGN_VERSION = "0.0.1";
8
8
  declare const MESHERY_PROD_URL = "https://playground.meshery.io/";
9
- declare const cloudBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, {}, "cloudRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
10
- declare const mesheryBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, {}, "mesheryRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
9
+ /**
10
+ * Structured MeshKit error metadata extracted from a non-2xx JSON response body.
11
+ *
12
+ * Field names are JS-side camelCase, mapped from the server's snake_case wire
13
+ * fields. Pairs with the meshery server migration that promotes every non-2xx
14
+ * response from `text/plain` to `application/json` with a MeshKit error envelope.
15
+ */
16
+ interface MeshkitError {
17
+ /** Human-readable short description (`error` on the wire). */
18
+ message: string;
19
+ /** Structured error code, e.g. `meshery-server-1033`. */
20
+ code?: string;
21
+ /** Severity level, e.g. `ERROR`, `WARNING`, `FATAL`. */
22
+ severity?: string;
23
+ /** Probable causes that produced the error (`probable_cause` on the wire). */
24
+ probableCause?: string[];
25
+ /** Suggested remediations to recover (`suggested_remediation` on the wire). */
26
+ suggestedRemediation?: string[];
27
+ /** Long-form description lines (`long_description` on the wire). */
28
+ longDescription?: string[];
29
+ }
30
+ /**
31
+ * Extension of {@link FetchBaseQueryError} that carries optional MeshKit
32
+ * metadata on `meshkit`. The raw response body is still available on `data`
33
+ * for backward compatibility — `meshkit` is undefined when the response was
34
+ * not a MeshKit JSON envelope.
35
+ *
36
+ * Defined as an intersection rather than an `interface ... extends` because
37
+ * `FetchBaseQueryError` is a discriminated union (HTTP status / FETCH_ERROR /
38
+ * PARSING_ERROR / TIMEOUT_ERROR / CUSTOM_ERROR), and TypeScript only allows
39
+ * extending object types with statically known members.
40
+ */
41
+ type MeshkitFetchBaseQueryError = FetchBaseQueryError & {
42
+ meshkit?: MeshkitError;
43
+ };
44
+ declare const cloudBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, {}, "cloudRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
45
+ declare const mesheryBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, {}, "mesheryRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
11
46
 
12
- export { CURRENT_ORG_KEY, DEFAULT_DESIGN_VERSION, MESHERY_PROD_URL, SUPPORTED_SOCIAL_ACCOUNTS, cloudBaseApi, mesheryBaseApi };
47
+ export { CURRENT_ORG_KEY, DEFAULT_DESIGN_VERSION, MESHERY_PROD_URL, type MeshkitError, type MeshkitFetchBaseQueryError, SUPPORTED_SOCIAL_ACCOUNTS, cloudBaseApi, mesheryBaseApi };
package/dist/api.d.ts CHANGED
@@ -1,12 +1,47 @@
1
1
  import * as _reduxjs_toolkit_query_react from '@reduxjs/toolkit/query/react';
2
- import { BaseQueryFn, FetchArgs, FetchBaseQueryError } from '@reduxjs/toolkit/query/react';
2
+ import { FetchBaseQueryError, BaseQueryFn } from '@reduxjs/toolkit/query/react';
3
3
  import * as _reduxjs_toolkit_query from '@reduxjs/toolkit/query';
4
4
 
5
5
  declare const SUPPORTED_SOCIAL_ACCOUNTS: string[];
6
6
  declare const CURRENT_ORG_KEY = "Layer5-Current-Orgid";
7
7
  declare const DEFAULT_DESIGN_VERSION = "0.0.1";
8
8
  declare const MESHERY_PROD_URL = "https://playground.meshery.io/";
9
- declare const cloudBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, {}, "cloudRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
10
- declare const mesheryBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, {}, "mesheryRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
9
+ /**
10
+ * Structured MeshKit error metadata extracted from a non-2xx JSON response body.
11
+ *
12
+ * Field names are JS-side camelCase, mapped from the server's snake_case wire
13
+ * fields. Pairs with the meshery server migration that promotes every non-2xx
14
+ * response from `text/plain` to `application/json` with a MeshKit error envelope.
15
+ */
16
+ interface MeshkitError {
17
+ /** Human-readable short description (`error` on the wire). */
18
+ message: string;
19
+ /** Structured error code, e.g. `meshery-server-1033`. */
20
+ code?: string;
21
+ /** Severity level, e.g. `ERROR`, `WARNING`, `FATAL`. */
22
+ severity?: string;
23
+ /** Probable causes that produced the error (`probable_cause` on the wire). */
24
+ probableCause?: string[];
25
+ /** Suggested remediations to recover (`suggested_remediation` on the wire). */
26
+ suggestedRemediation?: string[];
27
+ /** Long-form description lines (`long_description` on the wire). */
28
+ longDescription?: string[];
29
+ }
30
+ /**
31
+ * Extension of {@link FetchBaseQueryError} that carries optional MeshKit
32
+ * metadata on `meshkit`. The raw response body is still available on `data`
33
+ * for backward compatibility — `meshkit` is undefined when the response was
34
+ * not a MeshKit JSON envelope.
35
+ *
36
+ * Defined as an intersection rather than an `interface ... extends` because
37
+ * `FetchBaseQueryError` is a discriminated union (HTTP status / FETCH_ERROR /
38
+ * PARSING_ERROR / TIMEOUT_ERROR / CUSTOM_ERROR), and TypeScript only allows
39
+ * extending object types with statically known members.
40
+ */
41
+ type MeshkitFetchBaseQueryError = FetchBaseQueryError & {
42
+ meshkit?: MeshkitError;
43
+ };
44
+ declare const cloudBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, {}, "cloudRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
45
+ declare const mesheryBaseApi: _reduxjs_toolkit_query.Api<BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, {}, "mesheryRtkSchemasApi", never, typeof _reduxjs_toolkit_query.coreModuleName | typeof _reduxjs_toolkit_query_react.reactHooksModuleName>;
11
46
 
12
- export { CURRENT_ORG_KEY, DEFAULT_DESIGN_VERSION, MESHERY_PROD_URL, SUPPORTED_SOCIAL_ACCOUNTS, cloudBaseApi, mesheryBaseApi };
47
+ export { CURRENT_ORG_KEY, DEFAULT_DESIGN_VERSION, MESHERY_PROD_URL, type MeshkitError, type MeshkitFetchBaseQueryError, SUPPORTED_SOCIAL_ACCOUNTS, cloudBaseApi, mesheryBaseApi };
package/dist/api.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var react=require('@reduxjs/toolkit/query/react');var g=["github","google"],u="Layer5-Current-Orgid",h="0.0.1",A="https://playground.meshery.io/",o,p=(o=process.env.RTK_CLOUD_ENDPOINT_PREFIX)!=null?o:"",n,E=(n=process.env.RTK_MESHERY_ENDPOINT_PREFIX)!=null?n:"",R=react.fetchBaseQuery({baseUrl:p,credentials:"include",prepareHeaders:(t,{getState:i})=>{var s;let e=(s=i().organization)==null?void 0:s.value,r=e==null?void 0:e.id;return r&&t.set(u,r),t}}),U=react.createApi({reducerPath:"cloudRtkSchemasApi",baseQuery:R,tagTypes:[],endpoints:()=>({})}),O=react.createApi({reducerPath:"mesheryRtkSchemasApi",baseQuery:react.fetchBaseQuery({baseUrl:E,credentials:"include"}),tagTypes:[],endpoints:()=>({})});
2
- exports.CURRENT_ORG_KEY=u;exports.DEFAULT_DESIGN_VERSION=h;exports.MESHERY_PROD_URL=A;exports.SUPPORTED_SOCIAL_ACCOUNTS=g;exports.cloudBaseApi=U;exports.mesheryBaseApi=O;
1
+ 'use strict';var react=require('@reduxjs/toolkit/query/react');var k=["github","google"],p="Layer5-Current-Orgid",B="0.0.1",f="https://playground.meshery.io/",n,h=(n=process.env.RTK_CLOUD_ENDPOINT_PREFIX)!=null?n:"",c,y=(c=process.env.RTK_MESHERY_ENDPOINT_PREFIX)!=null?c:"";function d(o){return async(i,a,s)=>{let e=await o(i,a,s);if(e.error){let t=e.error.data;if(typeof t=="object"&&t!==null){let r=t;if(typeof r.error=="string")return {error:{...e.error,meshkit:{message:r.error,code:r.code,severity:r.severity,probableCause:r.probable_cause,suggestedRemediation:r.suggested_remediation,longDescription:r.long_description}},meta:e.meta}}return {error:e.error,meta:e.meta}}return {data:e.data,meta:e.meta}}}var E=react.fetchBaseQuery({baseUrl:h,credentials:"include",prepareHeaders:(o,{getState:i})=>{var t;let s=(t=i().organization)==null?void 0:t.value,e=s==null?void 0:s.id;return e&&o.set(p,e),o}}),l=d(E),R=d(react.fetchBaseQuery({baseUrl:y,credentials:"include"})),Q=react.createApi({reducerPath:"cloudRtkSchemasApi",baseQuery:l,tagTypes:[],endpoints:()=>({})}),S=react.createApi({reducerPath:"mesheryRtkSchemasApi",baseQuery:R,tagTypes:[],endpoints:()=>({})});
2
+ exports.CURRENT_ORG_KEY=p;exports.DEFAULT_DESIGN_VERSION=B;exports.MESHERY_PROD_URL=f;exports.SUPPORTED_SOCIAL_ACCOUNTS=k;exports.cloudBaseApi=Q;exports.mesheryBaseApi=S;
package/dist/api.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import {fetchBaseQuery,createApi}from'@reduxjs/toolkit/query/react';var g=["github","google"],u="Layer5-Current-Orgid",h="0.0.1",A="https://playground.meshery.io/",o,p=(o=process.env.RTK_CLOUD_ENDPOINT_PREFIX)!=null?o:"",n,E=(n=process.env.RTK_MESHERY_ENDPOINT_PREFIX)!=null?n:"",R=fetchBaseQuery({baseUrl:p,credentials:"include",prepareHeaders:(t,{getState:i})=>{var s;let e=(s=i().organization)==null?void 0:s.value,r=e==null?void 0:e.id;return r&&t.set(u,r),t}}),U=createApi({reducerPath:"cloudRtkSchemasApi",baseQuery:R,tagTypes:[],endpoints:()=>({})}),O=createApi({reducerPath:"mesheryRtkSchemasApi",baseQuery:fetchBaseQuery({baseUrl:E,credentials:"include"}),tagTypes:[],endpoints:()=>({})});
2
- export{u as CURRENT_ORG_KEY,h as DEFAULT_DESIGN_VERSION,A as MESHERY_PROD_URL,g as SUPPORTED_SOCIAL_ACCOUNTS,U as cloudBaseApi,O as mesheryBaseApi};
1
+ import {fetchBaseQuery,createApi}from'@reduxjs/toolkit/query/react';var k=["github","google"],p="Layer5-Current-Orgid",B="0.0.1",f="https://playground.meshery.io/",n,h=(n=process.env.RTK_CLOUD_ENDPOINT_PREFIX)!=null?n:"",c,y=(c=process.env.RTK_MESHERY_ENDPOINT_PREFIX)!=null?c:"";function d(o){return async(i,a,s)=>{let e=await o(i,a,s);if(e.error){let t=e.error.data;if(typeof t=="object"&&t!==null){let r=t;if(typeof r.error=="string")return {error:{...e.error,meshkit:{message:r.error,code:r.code,severity:r.severity,probableCause:r.probable_cause,suggestedRemediation:r.suggested_remediation,longDescription:r.long_description}},meta:e.meta}}return {error:e.error,meta:e.meta}}return {data:e.data,meta:e.meta}}}var E=fetchBaseQuery({baseUrl:h,credentials:"include",prepareHeaders:(o,{getState:i})=>{var t;let s=(t=i().organization)==null?void 0:t.value,e=s==null?void 0:s.id;return e&&o.set(p,e),o}}),l=d(E),R=d(fetchBaseQuery({baseUrl:y,credentials:"include"})),Q=createApi({reducerPath:"cloudRtkSchemasApi",baseQuery:l,tagTypes:[],endpoints:()=>({})}),S=createApi({reducerPath:"mesheryRtkSchemasApi",baseQuery:R,tagTypes:[],endpoints:()=>({})});
2
+ export{p as CURRENT_ORG_KEY,B as DEFAULT_DESIGN_VERSION,f as MESHERY_PROD_URL,k as SUPPORTED_SOCIAL_ACCOUNTS,Q as cloudBaseApi,S as mesheryBaseApi};