@clipboard-health/json-api 0.2.7 → 0.3.0

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
@@ -6,6 +6,7 @@ Utilities for adhering to the [JSON:API](https://jsonapi.org/) specification.
6
6
 
7
7
  - [Install](#install)
8
8
  - [Usage](#usage)
9
+ - [Query helpers](#query-helpers)
9
10
  - [Local development commands](#local-development-commands)
10
11
 
11
12
  ## Install
@@ -18,57 +19,67 @@ npm install @clipboard-health/json-api
18
19
 
19
20
  ### Query helpers
20
21
 
21
- From the client, call `toSearchParams` to convert from `ClientJsonApiQuery` to `URLSearchParams`:
22
+ From the client, call `toClientSearchParams` to convert from `ClientJsonApiQuery` to `URLSearchParams`:
22
23
 
23
24
  <!-- prettier-ignore -->
24
25
  ```ts
25
- // ./examples/toSearchParams.ts
26
+ // ./examples/toClientSearchParams.ts
26
27
 
27
28
  import { deepEqual } from "node:assert/strict";
28
29
 
29
- import { toSearchParams } from "@clipboard-health/json-api";
30
+ import { toClientSearchParams } from "@clipboard-health/json-api";
30
31
 
31
32
  import { type ClientJsonApiQuery } from "../src/lib/types";
32
33
 
33
- const isoDate = "2024-01-01T15:00:00.000Z";
34
+ const [date1, date2] = ["2024-01-01", "2024-01-02"];
34
35
  const query: ClientJsonApiQuery = {
35
- fields: { dog: ["age"] },
36
- filter: { age: [2], createdAt: { gte: new Date(isoDate) }, isGoodDog: true },
36
+ fields: { dog: ["name", "age"] },
37
+ filter: {
38
+ age: { eq: ["2"] },
39
+ createdAt: { gt: [date1], lt: [date2] },
40
+ isGoodDog: { eq: ["true"] },
41
+ },
37
42
  include: ["owner"],
38
- page: { size: 10 },
43
+ page: {
44
+ size: "10",
45
+ },
39
46
  sort: ["-age"],
40
47
  };
41
48
 
42
49
  deepEqual(
43
- toSearchParams(query).toString(),
50
+ toClientSearchParams(query).toString(),
44
51
  new URLSearchParams(
45
- "fields[dog]=age&filter[age]=2&filter[createdAt][gte]=2024-01-01T15:00:00.000Z&filter[isGoodDog]=true&include=owner&page[size]=10&sort=-age",
52
+ `fields[dog]=name,age&filter[age]=2&filter[createdAt][gt]=${date1}&filter[createdAt][lt]=${date2}&filter[isGoodDog]=true&include=owner&page[size]=10&sort=-age`,
46
53
  ).toString(),
47
54
  );
48
55
 
49
56
  ```
50
57
 
51
- From the server, call `toJsonApiQuery` to convert from `URLSearchParams` to `ServerJsonApiQuery`:
58
+ From the server, call `toServerJsonApiQuery` to convert from `URLSearchParams` to `ServerJsonApiQuery`:
52
59
 
53
60
  <!-- prettier-ignore -->
54
61
  ```ts
55
- // ./examples/toJsonApiQuery.ts
62
+ // ./examples/toServerJsonApiQuery.ts
56
63
 
57
64
  import { deepEqual } from "node:assert/strict";
58
65
 
59
- import { type ServerJsonApiQuery, toJsonApiQuery } from "@clipboard-health/json-api";
66
+ import { type ServerJsonApiQuery, toServerJsonApiQuery } from "@clipboard-health/json-api";
60
67
 
61
- const isoDate = "2024-01-01T15:00:00.000Z";
68
+ const [date1, date2] = ["2024-01-01", "2024-01-02"];
62
69
  // The URLSearchParams constructor also supports URL-encoded strings
63
70
  const searchParams = new URLSearchParams(
64
- `fields[dog]=age&filter[age]=2&filter[createdAt][gte]=${isoDate}&filter[isGoodDog]=true&include=owner&page[size]=10&sort=-age`,
71
+ `fields[dog]=name,age&filter[age]=2&filter[createdAt][gt]=${date1}&filter[createdAt][lt]=${date2}&filter[isGoodDog]=true&include=owner&page[size]=10&sort=-age`,
65
72
  );
66
73
 
67
- const query: ServerJsonApiQuery = toJsonApiQuery(searchParams);
74
+ const query: ServerJsonApiQuery = toServerJsonApiQuery(searchParams);
68
75
 
69
76
  deepEqual(query, {
70
- fields: { dog: ["age"] },
71
- filter: { age: ["2"], createdAt: { gte: isoDate }, isGoodDog: ["true"] },
77
+ fields: { dog: ["name", "age"] },
78
+ filter: {
79
+ age: { eq: ["2"] },
80
+ createdAt: { gt: [date1], lt: [date2] },
81
+ isGoodDog: { eq: ["true"] },
82
+ },
72
83
  include: ["owner"],
73
84
  page: {
74
85
  size: "10",
package/package.json CHANGED
@@ -1,17 +1,14 @@
1
1
  {
2
2
  "name": "@clipboard-health/json-api",
3
3
  "description": "Utilities for adhering to the JSON:API specification.",
4
- "version": "0.2.7",
4
+ "version": "0.3.0",
5
5
  "bugs": "https://github.com/clipboardhealth/core-utils/issues",
6
6
  "dependencies": {
7
7
  "tslib": "2.7.0"
8
8
  },
9
- "files": [
10
- "dist/src"
11
- ],
12
9
  "keywords": [],
13
10
  "license": "MIT",
14
- "main": "./dist/src/index.js",
11
+ "main": "./src/index.js",
15
12
  "publishConfig": {
16
13
  "access": "public"
17
14
  },
@@ -24,5 +21,6 @@
24
21
  "embed": "embedme README.md"
25
22
  },
26
23
  "type": "commonjs",
27
- "typings": "./src/index.d.ts"
28
- }
24
+ "typings": "./src/index.d.ts",
25
+ "types": "./src/index.d.ts"
26
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./lib/query/toClientSearchParams";
2
+ export * from "./lib/query/toServerJsonApiQuery";
3
+ export * from "./lib/types";
package/src/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/query/toClientSearchParams"), exports);
5
+ tslib_1.__exportStar(require("./lib/query/toServerJsonApiQuery"), exports);
6
+ tslib_1.__exportStar(require("./lib/types"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/json-api/src/index.ts"],"names":[],"mappings":";;;AAAA,2EAAiD;AACjD,2EAAiD;AACjD,sDAA4B"}
@@ -1,7 +1,7 @@
1
- import { type ClientJsonApiQuery } from "./types";
1
+ import { type ClientJsonApiQuery } from "../types";
2
2
  /**
3
3
  * Call this function from clients to convert from {@link ClientJsonApiQuery} to {@link URLSearchParams}.
4
4
  *
5
5
  * @see [Example](https://github.com/ClipboardHealth/core-utils/blob/main/packages/json-api/examples/toSearchParams.ts)
6
6
  */
7
- export declare function toSearchParams(query: ClientJsonApiQuery): URLSearchParams;
7
+ export declare function toClientSearchParams(query: ClientJsonApiQuery): URLSearchParams;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toSearchParams = toSearchParams;
3
+ exports.toClientSearchParams = toClientSearchParams;
4
4
  function filterValueString(value) {
5
5
  return value instanceof Date ? value.toISOString() : String(value);
6
6
  }
@@ -12,7 +12,7 @@ function join(values) {
12
12
  *
13
13
  * @see [Example](https://github.com/ClipboardHealth/core-utils/blob/main/packages/json-api/examples/toSearchParams.ts)
14
14
  */
15
- function toSearchParams(query) {
15
+ function toClientSearchParams(query) {
16
16
  const searchParams = new URLSearchParams();
17
17
  if (query.fields) {
18
18
  Object.entries(query.fields).forEach(([type, fields]) => {
@@ -22,17 +22,9 @@ function toSearchParams(query) {
22
22
  if (query.filter) {
23
23
  Object.entries(query.filter).forEach(([field, values]) => {
24
24
  const filterField = `filter[${field}]`;
25
- if (Array.isArray(values)) {
26
- searchParams.append(filterField, join(values.map((value) => filterValueString(value))));
27
- }
28
- else if (typeof values === "boolean") {
29
- searchParams.append(filterField, String(values));
30
- }
31
- else if (typeof values === "object") {
32
- Object.entries(values).forEach(([fieldType, value]) => {
33
- searchParams.append(`${filterField}[${fieldType}]`, filterValueString(value));
34
- });
35
- }
25
+ Object.entries(values).forEach(([fieldType, value]) => {
26
+ searchParams.append(fieldType === "eq" ? filterField : `${filterField}[${fieldType}]`, join(value.map((value) => filterValueString(value))));
27
+ });
36
28
  });
37
29
  }
38
30
  if (query.include) {
@@ -48,4 +40,4 @@ function toSearchParams(query) {
48
40
  }
49
41
  return searchParams;
50
42
  }
51
- //# sourceMappingURL=toSearchParams.js.map
43
+ //# sourceMappingURL=toClientSearchParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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AAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CACrD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,YAAY,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAClD,YAAY,CAAC,MAAM,CAAC,QAAQ,GAAG,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACf,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
@@ -1,7 +1,7 @@
1
- import { type ServerJsonApiQuery } from "./types";
1
+ import { type ServerJsonApiQuery } from "../types";
2
2
  /**
3
3
  * Call this function from servers to convert from {@link URLSearchParams} to {@link ServerJsonApiQuery}.
4
4
  *
5
5
  * @see [Example](https://github.com/ClipboardHealth/core-utils/blob/main/packages/json-api/examples/toJsonApiQuery.ts)
6
6
  */
7
- export declare function toJsonApiQuery(searchParams: URLSearchParams): ServerJsonApiQuery;
7
+ export declare function toServerJsonApiQuery(searchParams: URLSearchParams): ServerJsonApiQuery;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toJsonApiQuery = toJsonApiQuery;
3
+ exports.toServerJsonApiQuery = toServerJsonApiQuery;
4
4
  const REGEX = {
5
5
  fields: /^fields\[(.*?)]$/i,
6
6
  filter: /^filter\[([^\]]*?)]$/i,
@@ -14,7 +14,7 @@ const REGEX = {
14
14
  *
15
15
  * @see [Example](https://github.com/ClipboardHealth/core-utils/blob/main/packages/json-api/examples/toJsonApiQuery.ts)
16
16
  */
17
- function toJsonApiQuery(searchParams) {
17
+ function toServerJsonApiQuery(searchParams) {
18
18
  return [...searchParams].reduce((accumulator, [key, value]) => {
19
19
  const match = Object.entries(REGEX).find(([, regex]) => regex.test(key));
20
20
  if (!match) {
@@ -38,9 +38,10 @@ function toJsonApiQuery(searchParams) {
38
38
  ...accumulator,
39
39
  filter: {
40
40
  ...accumulator.filter,
41
- [field]: fieldType
42
- ? { ...accumulator.filter?.[field], [fieldType]: value }
43
- : value.split(","),
41
+ [field]: {
42
+ ...accumulator.filter?.[field],
43
+ [fieldType ?? "eq"]: value.split(","),
44
+ },
44
45
  },
45
46
  };
46
47
  }
@@ -58,4 +59,4 @@ function toJsonApiQuery(searchParams) {
58
59
  return accumulator;
59
60
  }, {});
60
61
  }
61
- //# sourceMappingURL=toJsonApiQuery.js.map
62
+ //# sourceMappingURL=toServerJsonApiQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toServerJsonApiQuery.js","sourceRoot":"","sources":["../../../../../../packages/json-api/src/lib/query/toServerJsonApiQuery.ts"],"names":[],"mappings":";;AAgBA,oDAiDC;AA/DD,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,mBAAmB;IAC3B,MAAM,EAAE,uBAAuB;IAC/B,UAAU,EAAE,2BAA2B;IACvC,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,SAAS;CACP,CAAC;AAEX;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,YAA6B;IAChE,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,MAAM,CAAqB,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE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1C,OAAO,EAAE,GAAG,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACtD,CAAC;QAED,IAAI,IAAI,KAAK,MAAM,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,OAAO;gBACL,GAAG,WAAW;gBACd,IAAI,EAAE,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE;aAClD,CAAC;QACJ,CAAC;QAED,0BAA0B;QAC1B,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
@@ -1,26 +1,25 @@
1
1
  /**
2
2
  * Filter types to build complex filter queries.
3
- * - gt: Greater than
4
- * - gte: Greater than or equal to
5
- * - lt: Less than
6
- * - lte: Less than or equal to
7
- * - not: Not equal to
3
+ * - eq: Equal to; the default when no filter type is provided, do not explicitly include it.
4
+ * - ne: Not equal to.
5
+ * - gt: Greater than.
6
+ * - gte: Greater than or equal to.
7
+ * - lt: Less than.
8
+ * - lte: Less than or equal to.
9
+ * - not: Not.
8
10
  */
9
- type FilterType = "gt" | "gte" | "lt" | "lte" | "not";
11
+ type FilterType = "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not";
10
12
  type PageKey = "cursor" | "limit" | "number" | "offset" | "size";
11
13
  interface JsonApiQueryTypes {
12
14
  filterValue: unknown;
13
- filterTypeValue: unknown;
14
15
  pageValue: unknown;
15
16
  }
16
17
  export interface ClientTypes {
17
- filterValue: Array<Date | number | string> | boolean;
18
- filterTypeValue: Date | number | string;
18
+ filterValue: Array<Date | number | string | boolean>;
19
19
  pageValue: number | string;
20
20
  }
21
21
  interface ServerTypes {
22
22
  filterValue: string[];
23
- filterTypeValue: string;
24
23
  pageValue: string;
25
24
  }
26
25
  /**
@@ -39,8 +38,8 @@ interface JsonApiQuery<T extends JsonApiQueryTypes> {
39
38
  * @see {@link https://jsonapi.org/recommendations/#filtering Filtering}
40
39
  * @see {@link https://discuss.jsonapi.org/t/share-propose-a-filtering-strategy/257 Filtering strategy}
41
40
  */
42
- filter?: Record<string, T["filterValue"] | {
43
- [K in FilterType]?: T["filterTypeValue"];
41
+ filter?: Record<string, {
42
+ [K in FilterType]?: T["filterValue"];
44
43
  }>;
45
44
  /**
46
45
  * Relationships to include in the response.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../packages/json-api/src/lib/types.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export * from "./lib/toJsonApiQuery";
2
- export * from "./lib/toSearchParams";
3
- export * from "./lib/types";
package/dist/src/index.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./lib/toJsonApiQuery"), exports);
5
- tslib_1.__exportStar(require("./lib/toSearchParams"), exports);
6
- tslib_1.__exportStar(require("./lib/types"), exports);
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,+DAAqC;AACrC,sDAA4B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toJsonApiQuery.js","sourceRoot":"","sources":["../../../src/lib/toJsonApiQuery.ts"],"names":[],"mappings":";;AAgBA,wCAgDC;AA9DD,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,mBAAmB;IAC3B,MAAM,EAAE,uBAAuB;IAC/B,UAAU,EAAE,2BAA2B;IACvC,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,SAAS;CACP,CAAC;AAEX;;;;GAIG;AACH,SAAgB,cAAc,CAAC,YAA6B;IAC1D,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,MAAM,CAAqB,C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