@clipboard-health/json-api-nestjs 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,9 +21,9 @@ npm install @clipboard-health/json-api-nestjs
21
21
 
22
22
  Create Zod schemas for your API's queries:
23
23
 
24
- <!-- prettier-ignore -->
24
+ <embedex source="packages/example-nestjs/examples/query.ts">
25
+
25
26
  ```ts
26
- // packages/example-nestjs/examples/query.ts
27
27
  import { booleanString } from "@clipboard-health/contract-core";
28
28
  import {
29
29
  cursorPaginationQuery,
@@ -79,9 +79,10 @@ export const query = z
79
79
  ...includeQuery(userIncludeFields),
80
80
  })
81
81
  .strict();
82
-
83
82
  ```
84
83
 
84
+ </embedex>
85
+
85
86
  ## Local development commands
86
87
 
87
88
  See [`package.json`](./package.json) `scripts` for a list of commands.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clipboard-health/json-api-nestjs",
3
3
  "description": "TypeScript-friendly utilities for adhering to the JSON:API specification with NestJS.",
4
- "version": "0.14.0",
4
+ "version": "0.15.1",
5
5
  "bugs": "https://github.com/ClipboardHealth/core-utils/issues",
6
6
  "dependencies": {
7
7
  "@clipboard-health/contract-core": "0.3.0",
@@ -10,7 +10,7 @@
10
10
  "zod": "3.23.8"
11
11
  },
12
12
  "devDependencies": {
13
- "@clipboard-health/testing-core": "0.10.0"
13
+ "@clipboard-health/testing-core": "0.11.1"
14
14
  },
15
15
  "keywords": [
16
16
  "api",
@@ -9,8 +9,9 @@ export declare const PAGINATION: {
9
9
  * Creates a Zod schema for JSON:API cursor pagination.
10
10
  *
11
11
  * @example
12
+ * <embedex source="packages/example-nestjs/examples/query.ts">
13
+ *
12
14
  * ```ts
13
- * // packages/example-nestjs/examples/query.ts
14
15
  * import { booleanString } from "@clipboard-health/contract-core";
15
16
  * import {
16
17
  * cursorPaginationQuery,
@@ -66,9 +67,10 @@ export declare const PAGINATION: {
66
67
  * ...includeQuery(userIncludeFields),
67
68
  * })
68
69
  * .strict();
69
- *
70
70
  * ```
71
71
  *
72
+ * </embedex>
73
+ *
72
74
  * @see {@link https://jsonapi.org/format/#fetching-pagination JSON:API pagination}
73
75
  * @see {@link https://jsonapi.org/examples/#pagination JSON:API pagination examples}
74
76
  */
@@ -14,8 +14,9 @@ exports.PAGINATION = {
14
14
  * Creates a Zod schema for JSON:API cursor pagination.
15
15
  *
16
16
  * @example
17
+ * <embedex source="packages/example-nestjs/examples/query.ts">
18
+ *
17
19
  * ```ts
18
- * // packages/example-nestjs/examples/query.ts
19
20
  * import { booleanString } from "@clipboard-health/contract-core";
20
21
  * import {
21
22
  * cursorPaginationQuery,
@@ -71,9 +72,10 @@ exports.PAGINATION = {
71
72
  * ...includeQuery(userIncludeFields),
72
73
  * })
73
74
  * .strict();
74
- *
75
75
  * ```
76
76
  *
77
+ * </embedex>
78
+ *
77
79
  * @see {@link https://jsonapi.org/format/#fetching-pagination JSON:API pagination}
78
80
  * @see {@link https://jsonapi.org/examples/#pagination JSON:API pagination examples}
79
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cursorPaginationQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/cursorPaginationQuery.ts"],"names":[],"mappings":";;;AA6EA,sDAeC;AA5FD,mEAAiE;AACjE,6BAAwB;AAEX,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,GAAG;KACb;CACO,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,SAAgB,qBAAqB,CACnC,UAAuE;IAEvE,MAAM,EAAE,IAAI,EAAE,GAAG,kBAAU,CAAC;IAC5B,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC;IAE/F,OAAO;QACL,IAAI,EAAE,OAAC;aACJ,MAAM,CAAC;YACN,MAAM,EAAE,8BAAc,CAAC,QAAQ,EAAE;YACjC,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;SAC3E,CAAC;aACD,MAAM,EAAE;aACR,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;KAClC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"cursorPaginationQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/cursorPaginationQuery.ts"],"names":[],"mappings":";;;AA+EA,sDAeC;AA9FD,mEAAiE;AACjE,6BAAwB;AAEX,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,GAAG;KACb;CACO,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,SAAgB,qBAAqB,CACnC,UAAuE;IAEvE,MAAM,EAAE,IAAI,EAAE,GAAG,kBAAU,CAAC;IAC5B,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC;IAE/F,OAAO;QACL,IAAI,EAAE,OAAC;aACJ,MAAM,CAAC;YACN,MAAM,EAAE,8BAAc,CAAC,QAAQ,EAAE;YACjC,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;SAC3E,CAAC;aACD,MAAM,EAAE;aACR,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;KAClC,CAAC;AACJ,CAAC"}
@@ -14,8 +14,9 @@ export type AttributeFields<DocumentT extends JsonApiDocument> = DocumentT["data
14
14
  * Creates a Zod schema for JSON:API sparse fieldsets.
15
15
  *
16
16
  * @example
17
+ * <embedex source="packages/example-nestjs/examples/query.ts">
18
+ *
17
19
  * ```ts
18
- * // packages/example-nestjs/examples/query.ts
19
20
  * import { booleanString } from "@clipboard-health/contract-core";
20
21
  * import {
21
22
  * cursorPaginationQuery,
@@ -71,9 +72,10 @@ export type AttributeFields<DocumentT extends JsonApiDocument> = DocumentT["data
71
72
  * ...includeQuery(userIncludeFields),
72
73
  * })
73
74
  * .strict();
74
- *
75
75
  * ```
76
76
  *
77
+ * </embedex>
78
+ *
77
79
  * @see {@link https://jsonapi.org/format/#fetching-sparse-fieldsets JSON:API sparse fieldsets}
78
80
  */
79
81
  export declare function fieldsQuery<const MapT extends FieldsMap>(parameters: Readonly<MapT>): {
@@ -7,8 +7,9 @@ const splitString_1 = require("../internal/splitString");
7
7
  * Creates a Zod schema for JSON:API sparse fieldsets.
8
8
  *
9
9
  * @example
10
+ * <embedex source="packages/example-nestjs/examples/query.ts">
11
+ *
10
12
  * ```ts
11
- * // packages/example-nestjs/examples/query.ts
12
13
  * import { booleanString } from "@clipboard-health/contract-core";
13
14
  * import {
14
15
  * cursorPaginationQuery,
@@ -64,9 +65,10 @@ const splitString_1 = require("../internal/splitString");
64
65
  * ...includeQuery(userIncludeFields),
65
66
  * })
66
67
  * .strict();
67
- *
68
68
  * ```
69
69
  *
70
+ * </embedex>
71
+ *
70
72
  * @see {@link https://jsonapi.org/format/#fetching-sparse-fieldsets JSON:API sparse fieldsets}
71
73
  */
72
74
  function fieldsQuery(parameters) {
@@ -1 +1 @@
1
- {"version":3,"file":"fieldsQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/fieldsQuery.ts"],"names":[],"mappings":";;AA6FA,kCAYC;AAzGD,6BAAwB;AAExB,yDAAsD;AAyBtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,SAAgB,WAAW,CAA+B,UAA0B;IAClF,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CACrC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAiC,EAAE,EAAE,CAAC;QACpF,OAAO;QACP,OAAC,CAAC,UAAU,CAAC,yBAAW,EAAE,OAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;KAC7E,CAAC,CAEmB,CAAC;IAExB,OAAO;QACL,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"fieldsQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/fieldsQuery.ts"],"names":[],"mappings":";;AA+FA,kCAYC;AA3GD,6BAAwB;AAExB,yDAAsD;AAyBtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,SAAgB,WAAW,CAA+B,UAA0B;IAClF,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CACrC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAiC,EAAE,EAAE,CAAC;QACpF,OAAO;QACP,OAAC,CAAC,UAAU,CAAC,yBAAW,EAAE,OAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;KAC7E,CAAC,CAEmB,CAAC;IAExB,OAAO;QACL,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnD,CAAC;AACJ,CAAC"}
@@ -17,8 +17,9 @@ export type FilterSchema<MapT extends InternalFilterMap> = {
17
17
  * Creates a Zod schema for JSON:API filters.
18
18
  *
19
19
  * @example
20
+ * <embedex source="packages/example-nestjs/examples/query.ts">
21
+ *
20
22
  * ```ts
21
- * // packages/example-nestjs/examples/query.ts
22
23
  * import { booleanString } from "@clipboard-health/contract-core";
23
24
  * import {
24
25
  * cursorPaginationQuery,
@@ -74,9 +75,10 @@ export type FilterSchema<MapT extends InternalFilterMap> = {
74
75
  * ...includeQuery(userIncludeFields),
75
76
  * })
76
77
  * .strict();
77
- *
78
78
  * ```
79
79
  *
80
+ * </embedex>
81
+ *
80
82
  * @see {@link https://jsonapi.org/recommendations/#filtering JSON:API filtering}
81
83
  * @see {@link https://discuss.jsonapi.org/t/share-propose-a-filtering-strategy/257 JSON:API filtering strategy}
82
84
  */
@@ -8,8 +8,9 @@ const splitString_1 = require("../internal/splitString");
8
8
  * Creates a Zod schema for JSON:API filters.
9
9
  *
10
10
  * @example
11
+ * <embedex source="packages/example-nestjs/examples/query.ts">
12
+ *
11
13
  * ```ts
12
- * // packages/example-nestjs/examples/query.ts
13
14
  * import { booleanString } from "@clipboard-health/contract-core";
14
15
  * import {
15
16
  * cursorPaginationQuery,
@@ -65,9 +66,10 @@ const splitString_1 = require("../internal/splitString");
65
66
  * ...includeQuery(userIncludeFields),
66
67
  * })
67
68
  * .strict();
68
- *
69
69
  * ```
70
70
  *
71
+ * </embedex>
72
+ *
71
73
  * @see {@link https://jsonapi.org/recommendations/#filtering JSON:API filtering}
72
74
  * @see {@link https://discuss.jsonapi.org/t/share-propose-a-filtering-strategy/257 JSON:API filtering strategy}
73
75
  */
@@ -1 +1 @@
1
- {"version":3,"file":"filterQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/filterQuery.ts"],"names":[],"mappings":";;AAoGA,kCAcC;AAlHD,6BAAwB;AAExB,iFAA8E;AAC9E,yDAAsD;AA8BtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,SAAgB,WAAW,CAAuC,UAA0B;IAC1F,OAAO;QACL,MAAM,EAAE,OAAC;aACN,MAAM,CACL,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAiC,EAAE,EAAE,CAAC;YACnF,OAAO;YACP,OAAC,CAAC,UAAU,CAAC,iDAAuB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;SACtE,CAAC,CACmB,CACxB;aACA,MAAM,EAAE;aACR,QAAQ,EAAE;KACd,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,UAAuB;IAC3C,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IAEvC,OAAO,OAAC;SACL,MAAM,CACL,MAAM,CAAC,WAAW,CAChB,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACtB,MAAM;QACN,OAAC,CAAC,UAAU,CAAC,yBAAW,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE;KACnF,CAAC,CACH,CACF;SACA,MAAM,EAAE;SACR,QAAQ,EAAE,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"filterQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/filterQuery.ts"],"names":[],"mappings":";;AAsGA,kCAcC;AApHD,6BAAwB;AAExB,iFAA8E;AAC9E,yDAAsD;AA8BtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,SAAgB,WAAW,CAAuC,UAA0B;IAC1F,OAAO;QACL,MAAM,EAAE,OAAC;aACN,MAAM,CACL,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAiC,EAAE,EAAE,CAAC;YACnF,OAAO;YACP,OAAC,CAAC,UAAU,CAAC,iDAAuB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;SACtE,CAAC,CACmB,CACxB;aACA,MAAM,EAAE;aACR,QAAQ,EAAE;KACd,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,UAAuB;IAC3C,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IAEvC,OAAO,OAAC;SACL,MAAM,CACL,MAAM,CAAC,WAAW,CAChB,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACtB,MAAM;QACN,OAAC,CAAC,UAAU,CAAC,yBAAW,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE;KACnF,CAAC,CACH,CACF;SACA,MAAM,EAAE;SACR,QAAQ,EAAE,CAAC;AAChB,CAAC"}
@@ -24,8 +24,9 @@ export type RelationshipPaths<MapT extends Record<string, z.ZodTypeAny>, Documen
24
24
  * Creates a Zod schema for JSON:API include parameters.
25
25
  *
26
26
  * @example
27
+ * <embedex source="packages/example-nestjs/examples/query.ts">
28
+ *
27
29
  * ```ts
28
- * // packages/example-nestjs/examples/query.ts
29
30
  * import { booleanString } from "@clipboard-health/contract-core";
30
31
  * import {
31
32
  * cursorPaginationQuery,
@@ -81,9 +82,10 @@ export type RelationshipPaths<MapT extends Record<string, z.ZodTypeAny>, Documen
81
82
  * ...includeQuery(userIncludeFields),
82
83
  * })
83
84
  * .strict();
84
- *
85
85
  * ```
86
86
  *
87
+ * </embedex>
88
+ *
87
89
  * @see {@link https://jsonapi.org/format/#fetching-includes JSON:API includes}
88
90
  */
89
91
  export declare function includeQuery<const FieldT extends readonly string[]>(fields: FieldT): {
@@ -7,8 +7,9 @@ const splitString_1 = require("../internal/splitString");
7
7
  * Creates a Zod schema for JSON:API include parameters.
8
8
  *
9
9
  * @example
10
+ * <embedex source="packages/example-nestjs/examples/query.ts">
11
+ *
10
12
  * ```ts
11
- * // packages/example-nestjs/examples/query.ts
12
13
  * import { booleanString } from "@clipboard-health/contract-core";
13
14
  * import {
14
15
  * cursorPaginationQuery,
@@ -64,9 +65,10 @@ const splitString_1 = require("../internal/splitString");
64
65
  * ...includeQuery(userIncludeFields),
65
66
  * })
66
67
  * .strict();
67
- *
68
68
  * ```
69
69
  *
70
+ * </embedex>
71
+ *
70
72
  * @see {@link https://jsonapi.org/format/#fetching-includes JSON:API includes}
71
73
  */
72
74
  function includeQuery(fields) {
@@ -1 +1 @@
1
- {"version":3,"file":"includeQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/includeQuery.ts"],"names":[],"mappings":";;AAmHA,oCAuBC;AAzID,6BAAwB;AAExB,yDAAsD;AA8CtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,SAAgB,YAAY,CAAyC,MAAc;IACjF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAEjC,OAAO;QACL,OAAO,EAAE,OAAC;aACP,UAAU,C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CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO;YACT,CAAC;YAED,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;gBAC1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;oBACzB,OAAO,CAAC,QAAQ,CAAC;wBACf,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;wBAC3B,OAAO,EAAE,2BAA2B,KAAK,GAAG;wBAC5C,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;qBACzB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC,CAAC;aACD,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAA0C,CAAC;KACpE,CAAC;AACJ,CAAC"}
@@ -3,9 +3,9 @@ import { type Field } from "../types";
3
3
  /**
4
4
  * Creates a Zod schema for JSON:API sort parameters.
5
5
  *
6
- * @example
6
+ * <embedex source="packages/example-nestjs/examples/query.ts">
7
+ *
7
8
  * ```ts
8
- * // packages/example-nestjs/examples/query.ts
9
9
  * import { booleanString } from "@clipboard-health/contract-core";
10
10
  * import {
11
11
  * cursorPaginationQuery,
@@ -61,9 +61,10 @@ import { type Field } from "../types";
61
61
  * ...includeQuery(userIncludeFields),
62
62
  * })
63
63
  * .strict();
64
- *
65
64
  * ```
66
65
  *
66
+ * </embedex>
67
+ *
67
68
  * @see {@link https://jsonapi.org/format/#fetching-sorting JSON:API sorting}
68
69
  */
69
70
  export declare function sortQuery<const FieldT extends readonly [Field, ...Field[]]>(fields: FieldT): {
@@ -6,9 +6,9 @@ const splitString_1 = require("../internal/splitString");
6
6
  /**
7
7
  * Creates a Zod schema for JSON:API sort parameters.
8
8
  *
9
- * @example
9
+ * <embedex source="packages/example-nestjs/examples/query.ts">
10
+ *
10
11
  * ```ts
11
- * // packages/example-nestjs/examples/query.ts
12
12
  * import { booleanString } from "@clipboard-health/contract-core";
13
13
  * import {
14
14
  * cursorPaginationQuery,
@@ -64,9 +64,10 @@ const splitString_1 = require("../internal/splitString");
64
64
  * ...includeQuery(userIncludeFields),
65
65
  * })
66
66
  * .strict();
67
- *
68
67
  * ```
69
68
  *
69
+ * </embedex>
70
+ *
70
71
  * @see {@link https://jsonapi.org/format/#fetching-sorting JSON:API sorting}
71
72
  */
72
73
  function sortQuery(fields) {
@@ -1 +1 @@
1
- {"version":3,"file":"sortQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api-nestjs/src/lib/query/sortQuery.ts"],"names":[],"mappings":";;AAuEA,8BAsBC;AA7FD,6BAAwB;AAExB,yDAAsD;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,SAAgB,SAAS,CAAoD,MAAc;IACzF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO;QACL,IAAI,EAAE,OAAC;aACJ,UAAU,CAAC,yBAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;aACtE,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO;YACT,CAAC;YAED,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;gBAC1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;oBAClE,OAAO,CAAC,QAAQ,CAAC;wBACf,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;wBAC3B,OA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