@warp-drive/utilities 5.6.0-alpha.15 → 5.6.0-alpha.17

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 (73) hide show
  1. package/declarations/-private/active-record/find-record.d.ts +59 -60
  2. package/declarations/-private/active-record/query.d.ts +50 -51
  3. package/declarations/-private/active-record/save-record.d.ts +136 -134
  4. package/declarations/-private/builder-utils.d.ts +2 -3
  5. package/declarations/-private/handlers/auto-compress.d.ts +142 -143
  6. package/declarations/-private/handlers/gated.d.ts +12 -13
  7. package/declarations/-private/handlers/utils.d.ts +22 -23
  8. package/declarations/-private/json-api/-utils.d.ts +96 -97
  9. package/declarations/-private/json-api/find-record.d.ts +59 -60
  10. package/declarations/-private/json-api/query.d.ts +97 -98
  11. package/declarations/-private/json-api/save-record.d.ts +180 -178
  12. package/declarations/-private/json-api/serialize.d.ts +43 -44
  13. package/declarations/-private/rest/find-record.d.ts +59 -60
  14. package/declarations/-private/rest/query.d.ts +50 -51
  15. package/declarations/-private/rest/save-record.d.ts +136 -134
  16. package/declarations/-private/string/inflect.d.ts +60 -83
  17. package/declarations/-private/string/inflections.d.ts +4 -5
  18. package/declarations/-private/string/transform.d.ts +68 -80
  19. package/declarations/-private.d.ts +1 -2
  20. package/declarations/active-record.d.ts +3 -4
  21. package/declarations/handlers.d.ts +8 -9
  22. package/declarations/index.d.ts +180 -182
  23. package/declarations/json-api.d.ts +5 -6
  24. package/declarations/rest.d.ts +3 -4
  25. package/declarations/string.d.ts +13 -14
  26. package/dist/active-record.js +1 -1
  27. package/dist/{inflect-Dr20y6b1.js → inflect-BSG696t-.js} +0 -32
  28. package/dist/json-api.js +1 -1
  29. package/dist/rest.js +1 -1
  30. package/dist/string.cjs +0 -33
  31. package/dist/string.js +1 -1
  32. package/package.json +5 -5
  33. package/declarations/-private/active-record/find-record.d.ts.map +0 -1
  34. package/declarations/-private/active-record/query.d.ts.map +0 -1
  35. package/declarations/-private/active-record/save-record.d.ts.map +0 -1
  36. package/declarations/-private/builder-utils.d.ts.map +0 -1
  37. package/declarations/-private/derivations.d.ts +0 -23
  38. package/declarations/-private/derivations.d.ts.map +0 -1
  39. package/declarations/-private/handlers/auto-compress.d.ts.map +0 -1
  40. package/declarations/-private/handlers/gated.d.ts.map +0 -1
  41. package/declarations/-private/handlers/utils.d.ts.map +0 -1
  42. package/declarations/-private/json-api/-utils.d.ts.map +0 -1
  43. package/declarations/-private/json-api/find-record.d.ts.map +0 -1
  44. package/declarations/-private/json-api/find-record.type-test.d.ts +0 -2
  45. package/declarations/-private/json-api/find-record.type-test.d.ts.map +0 -1
  46. package/declarations/-private/json-api/query.d.ts.map +0 -1
  47. package/declarations/-private/json-api/query.type-test.d.ts +0 -2
  48. package/declarations/-private/json-api/query.type-test.d.ts.map +0 -1
  49. package/declarations/-private/json-api/save-record.d.ts.map +0 -1
  50. package/declarations/-private/json-api/serialize.d.ts.map +0 -1
  51. package/declarations/-private/rest/find-record.d.ts.map +0 -1
  52. package/declarations/-private/rest/query.d.ts.map +0 -1
  53. package/declarations/-private/rest/save-record.d.ts.map +0 -1
  54. package/declarations/-private/string/inflect.d.ts.map +0 -1
  55. package/declarations/-private/string/inflections.d.ts.map +0 -1
  56. package/declarations/-private/string/transform.d.ts.map +0 -1
  57. package/declarations/-private.d.ts.map +0 -1
  58. package/declarations/active-record.d.ts.map +0 -1
  59. package/declarations/handlers.d.ts.map +0 -1
  60. package/declarations/index.d.ts.map +0 -1
  61. package/declarations/json-api.d.ts.map +0 -1
  62. package/declarations/rest.d.ts.map +0 -1
  63. package/declarations/string.d.ts.map +0 -1
  64. package/dist/-private.js.map +0 -1
  65. package/dist/active-record.js.map +0 -1
  66. package/dist/builder-utils-Donkk-BZ.js.map +0 -1
  67. package/dist/handlers.js.map +0 -1
  68. package/dist/index.js.map +0 -1
  69. package/dist/inflect-Dr20y6b1.js.map +0 -1
  70. package/dist/json-api.js.map +0 -1
  71. package/dist/rest.js.map +0 -1
  72. package/dist/string.cjs.map +0 -1
  73. package/dist/string.js.map +0 -1
@@ -1,89 +1,77 @@
1
- import { dasherize as internalDasherize } from '@warp-drive/core/utils/string';
2
1
  /**
3
- * Replaces underscores, spaces, or camelCase with dashes.
4
- *
5
- * ```js
6
- * import { dasherize } from '@warp-drive/utilities/string';
7
- *
8
- * dasherize('innerHTML'); // 'inner-html'
9
- * dasherize('action_name'); // 'action-name'
10
- * dasherize('css-class-name'); // 'css-class-name'
11
- * dasherize('my favorite items'); // 'my-favorite-items'
12
- * dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'
13
- * ```
14
- *
15
- * @public
16
- * @param {String} str
17
- * @return {String}
18
- * @since 4.13.0
19
- */
20
- export declare const dasherize: typeof internalDasherize;
2
+ * Replaces underscores, spaces, or camelCase with dashes.
3
+ *
4
+ * ```js
5
+ * import { dasherize } from '@warp-drive/utilities/string';
6
+ *
7
+ * dasherize('innerHTML'); // 'inner-html'
8
+ * dasherize('action_name'); // 'action-name'
9
+ * dasherize('css-class-name'); // 'css-class-name'
10
+ * dasherize('my favorite items'); // 'my-favorite-items'
11
+ * dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'
12
+ * ```
13
+ *
14
+ * @public
15
+ * @since 4.13.0
16
+ */
17
+ export declare const dasherize: (str: string) => string;
21
18
  /**
22
- * Returns the lowerCamelCase form of a string.
23
- *
24
- * ```js
25
- * import { camelize } from '@warp-drive/utilities/string';
26
- *
27
- * camelize('innerHTML'); // 'innerHTML'
28
- * camelize('action_name'); // 'actionName'
29
- * camelize('css-class-name'); // 'cssClassName'
30
- * camelize('my favorite items'); // 'myFavoriteItems'
31
- * camelize('My Favorite Items'); // 'myFavoriteItems'
32
- * camelize('private-docs/owner-invoice'); // 'privateDocs/ownerInvoice'
33
- * ```
34
- *
35
- * @public
36
- * @param {String} str
37
- * @return {String}
38
- * @since 4.13.0
39
- */
19
+ * Returns the lowerCamelCase form of a string.
20
+ *
21
+ * ```js
22
+ * import { camelize } from '@warp-drive/utilities/string';
23
+ *
24
+ * camelize('innerHTML'); // 'innerHTML'
25
+ * camelize('action_name'); // 'actionName'
26
+ * camelize('css-class-name'); // 'cssClassName'
27
+ * camelize('my favorite items'); // 'myFavoriteItems'
28
+ * camelize('My Favorite Items'); // 'myFavoriteItems'
29
+ * camelize('private-docs/owner-invoice'); // 'privateDocs/ownerInvoice'
30
+ * ```
31
+ *
32
+ * @public
33
+ * @since 4.13.0
34
+ */
40
35
  export declare function camelize(str: string): string;
41
36
  /**
42
- * Returns the lower\_case\_and\_underscored form of a string.
43
- *
44
- * ```js
45
- * import { underscore } from '@warp-drive/utilities/string';
46
- *
47
- * underscore('innerHTML'); // 'inner_html'
48
- * underscore('action_name'); // 'action_name'
49
- * underscore('css-class-name'); // 'css_class_name'
50
- * underscore('my favorite items'); // 'my_favorite_items'
51
- * underscore('privateDocs/ownerInvoice'); // 'private_docs/owner_invoice'
52
- * ```
53
- *
54
- * @public
55
- * @param {String} str
56
- * @return {String}
57
- * @since 4.13.0
58
- */
37
+ * Returns the lower\_case\_and\_underscored form of a string.
38
+ *
39
+ * ```js
40
+ * import { underscore } from '@warp-drive/utilities/string';
41
+ *
42
+ * underscore('innerHTML'); // 'inner_html'
43
+ * underscore('action_name'); // 'action_name'
44
+ * underscore('css-class-name'); // 'css_class_name'
45
+ * underscore('my favorite items'); // 'my_favorite_items'
46
+ * underscore('privateDocs/ownerInvoice'); // 'private_docs/owner_invoice'
47
+ * ```
48
+ *
49
+ * @public
50
+ * @since 4.13.0
51
+ */
59
52
  export declare function underscore(str: string): string;
60
53
  /**
61
- * Returns the Capitalized form of a string
62
- *
63
- * ```js
64
- * import { capitalize } from '@warp-drive/utilities/string';
65
- *
66
- * capitalize('innerHTML') // 'InnerHTML'
67
- * capitalize('action_name') // 'Action_name'
68
- * capitalize('css-class-name') // 'Css-class-name'
69
- * capitalize('my favorite items') // 'My favorite items'
70
- * capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'
71
- * ```
72
- *
73
- * @public
74
- * @param {String} str
75
- * @return {String}
76
- * @since 4.13.0
77
- */
54
+ * Returns the Capitalized form of a string
55
+ *
56
+ * ```js
57
+ * import { capitalize } from '@warp-drive/utilities/string';
58
+ *
59
+ * capitalize('innerHTML') // 'InnerHTML'
60
+ * capitalize('action_name') // 'Action_name'
61
+ * capitalize('css-class-name') // 'Css-class-name'
62
+ * capitalize('my favorite items') // 'My favorite items'
63
+ * capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'
64
+ * ```
65
+ *
66
+ * @public
67
+ * @since 4.13.0
68
+ */
78
69
  export declare function capitalize(str: string): string;
79
70
  /**
80
- * Sets the maximum size of the LRUCache for all string transformation functions.
81
- * The default size is 10,000.
82
- *
83
- * @public
84
- * @param {Number} size
85
- * @return {void}
86
- * @since 4.13.0
87
- */
71
+ * Sets the maximum size of the LRUCache for all string transformation functions.
72
+ * The default size is 10,000.
73
+ *
74
+ * @public
75
+ * @since 4.13.0
76
+ */
88
77
  export declare function setMaxLRUCacheSize(size: number): void;
89
- //# sourceMappingURL=transform.d.ts.map
@@ -1,2 +1 @@
1
- export { defaultRules as InflectionRuleDefaults } from './-private/string/inflections.ts';
2
- //# sourceMappingURL=-private.d.ts.map
1
+ export { defaultRules as InflectionRuleDefaults } from "./-private/string/inflections.js";
@@ -1,4 +1,3 @@
1
- export { findRecord } from './-private/active-record/find-record';
2
- export { query } from './-private/active-record/query';
3
- export { deleteRecord, createRecord, updateRecord } from './-private/active-record/save-record';
4
- //# sourceMappingURL=active-record.d.ts.map
1
+ export { findRecord } from "./-private/active-record/find-record.js";
2
+ export { query } from "./-private/active-record/query.js";
3
+ export { deleteRecord, createRecord, updateRecord } from "./-private/active-record/save-record.js";
@@ -1,10 +1,9 @@
1
1
  /**
2
- * A selection of pre-built request handlers for handling common
3
- * request scenarios.
4
- *
5
- * @module
6
- */
7
- export { AutoCompress, SupportsRequestStreams } from './-private/handlers/auto-compress.ts';
8
- export { Gate } from './-private/handlers/gated.ts';
9
- export { addTraceHeader, TAB_ASSIGNED, TAB_ID, assertInvalidUrlLength, MAX_URL_LENGTH, } from './-private/handlers/utils.ts';
10
- //# sourceMappingURL=handlers.d.ts.map
2
+ * A selection of pre-built request handlers for handling common
3
+ * request scenarios.
4
+ *
5
+ * @module
6
+ */
7
+ export { AutoCompress, SupportsRequestStreams } from "./-private/handlers/auto-compress.js";
8
+ export { Gate } from "./-private/handlers/gated.js";
9
+ export { addTraceHeader, TAB_ASSIGNED, TAB_ID, assertInvalidUrlLength, MAX_URL_LENGTH } from "./-private/handlers/utils.js";
@@ -1,213 +1,211 @@
1
- /**
2
- * @module
3
- * @mergeModuleWith <project>
4
- */
5
- import type { QueryParamsSerializationOptions, QueryParamsSource, Serializable } from '@warp-drive/core/types/params';
1
+ import type { QueryParamsSerializationOptions, QueryParamsSource, Serializable } from "@warp-drive/core/types/params";
2
+ // prevents the final constructed object from needing to add
3
+ // host and namespace which are provided by the final consuming
4
+ // class to the prototype which can result in overwrite errors
6
5
  export interface BuildURLConfig {
7
- host: string | null;
8
- namespace: string | null;
6
+ host: string | null;
7
+ namespace: string | null;
9
8
  }
10
9
  /**
11
- * Sets the global configuration for `buildBaseURL`
12
- * for host and namespace values for the application.
13
- *
14
- * These values may still be overridden by passing
15
- * them to buildBaseURL directly.
16
- *
17
- * This method may be called as many times as needed.
18
- * host values of `''` or `'/'` are equivalent.
19
- *
20
- * Except for the value of `/` as host, host should not
21
- * end with `/`.
22
- *
23
- * namespace should not start or end with a `/`.
24
- *
25
- * ```ts
26
- * type BuildURLConfig = {
27
- * host: string;
28
- * namespace: string'
29
- * }
30
- * ```
31
- *
32
- * Example:
33
- *
34
- * ```ts
35
- * import { setBuildURLConfig } from '@ember-data/request-utils';
36
- *
37
- * setBuildURLConfig({
38
- * host: 'https://api.example.com',
39
- * namespace: 'api/v1'
40
- * });
41
- * ```
42
- *
43
- * @public
44
- */
10
+ * Sets the global configuration for `buildBaseURL`
11
+ * for host and namespace values for the application.
12
+ *
13
+ * These values may still be overridden by passing
14
+ * them to buildBaseURL directly.
15
+ *
16
+ * This method may be called as many times as needed.
17
+ * host values of `''` or `'/'` are equivalent.
18
+ *
19
+ * Except for the value of `/` as host, host should not
20
+ * end with `/`.
21
+ *
22
+ * namespace should not start or end with a `/`.
23
+ *
24
+ * ```ts
25
+ * type BuildURLConfig = {
26
+ * host: string;
27
+ * namespace: string'
28
+ * }
29
+ * ```
30
+ *
31
+ * Example:
32
+ *
33
+ * ```ts
34
+ * import { setBuildURLConfig } from '@ember-data/request-utils';
35
+ *
36
+ * setBuildURLConfig({
37
+ * host: 'https://api.example.com',
38
+ * namespace: 'api/v1'
39
+ * });
40
+ * ```
41
+ *
42
+ * @public
43
+ */
45
44
  export declare function setBuildURLConfig(config: BuildURLConfig): void;
46
45
  export interface FindRecordUrlOptions {
47
- op: 'findRecord';
48
- identifier: {
49
- type: string;
50
- id: string;
51
- };
52
- resourcePath?: string;
53
- host?: string;
54
- namespace?: string;
46
+ op: "findRecord";
47
+ identifier: {
48
+ type: string;
49
+ id: string;
50
+ };
51
+ resourcePath?: string;
52
+ host?: string;
53
+ namespace?: string;
55
54
  }
56
55
  export interface QueryUrlOptions {
57
- op: 'query';
58
- identifier: {
59
- type: string;
60
- };
61
- resourcePath?: string;
62
- host?: string;
63
- namespace?: string;
56
+ op: "query";
57
+ identifier: {
58
+ type: string;
59
+ };
60
+ resourcePath?: string;
61
+ host?: string;
62
+ namespace?: string;
64
63
  }
65
64
  export interface FindManyUrlOptions {
66
- op: 'findMany';
67
- identifiers: {
68
- type: string;
69
- id: string;
70
- }[];
71
- resourcePath?: string;
72
- host?: string;
73
- namespace?: string;
65
+ op: "findMany";
66
+ identifiers: {
67
+ type: string;
68
+ id: string;
69
+ }[];
70
+ resourcePath?: string;
71
+ host?: string;
72
+ namespace?: string;
74
73
  }
75
74
  export interface FindRelatedCollectionUrlOptions {
76
- op: 'findRelatedCollection';
77
- identifier: {
78
- type: string;
79
- id: string;
80
- };
81
- fieldPath: string;
82
- resourcePath?: string;
83
- host?: string;
84
- namespace?: string;
75
+ op: "findRelatedCollection";
76
+ identifier: {
77
+ type: string;
78
+ id: string;
79
+ };
80
+ fieldPath: string;
81
+ resourcePath?: string;
82
+ host?: string;
83
+ namespace?: string;
85
84
  }
86
85
  export interface FindRelatedResourceUrlOptions {
87
- op: 'findRelatedRecord';
88
- identifier: {
89
- type: string;
90
- id: string;
91
- };
92
- fieldPath: string;
93
- resourcePath?: string;
94
- host?: string;
95
- namespace?: string;
86
+ op: "findRelatedRecord";
87
+ identifier: {
88
+ type: string;
89
+ id: string;
90
+ };
91
+ fieldPath: string;
92
+ resourcePath?: string;
93
+ host?: string;
94
+ namespace?: string;
96
95
  }
97
96
  export interface CreateRecordUrlOptions {
98
- op: 'createRecord';
99
- identifier: {
100
- type: string;
101
- };
102
- resourcePath?: string;
103
- host?: string;
104
- namespace?: string;
97
+ op: "createRecord";
98
+ identifier: {
99
+ type: string;
100
+ };
101
+ resourcePath?: string;
102
+ host?: string;
103
+ namespace?: string;
105
104
  }
106
105
  export interface UpdateRecordUrlOptions {
107
- op: 'updateRecord';
108
- identifier: {
109
- type: string;
110
- id: string;
111
- };
112
- resourcePath?: string;
113
- host?: string;
114
- namespace?: string;
106
+ op: "updateRecord";
107
+ identifier: {
108
+ type: string;
109
+ id: string;
110
+ };
111
+ resourcePath?: string;
112
+ host?: string;
113
+ namespace?: string;
115
114
  }
116
115
  export interface DeleteRecordUrlOptions {
117
- op: 'deleteRecord';
118
- identifier: {
119
- type: string;
120
- id: string;
121
- };
122
- resourcePath?: string;
123
- host?: string;
124
- namespace?: string;
116
+ op: "deleteRecord";
117
+ identifier: {
118
+ type: string;
119
+ id: string;
120
+ };
121
+ resourcePath?: string;
122
+ host?: string;
123
+ namespace?: string;
125
124
  }
126
125
  export interface GenericUrlOptions {
127
- resourcePath: string;
128
- host?: string;
129
- namespace?: string;
126
+ resourcePath: string;
127
+ host?: string;
128
+ namespace?: string;
130
129
  }
131
130
  export type UrlOptions = FindRecordUrlOptions | QueryUrlOptions | FindManyUrlOptions | FindRelatedCollectionUrlOptions | FindRelatedResourceUrlOptions | CreateRecordUrlOptions | UpdateRecordUrlOptions | DeleteRecordUrlOptions | GenericUrlOptions;
132
131
  /**
133
- * Builds a URL for a request based on the provided options.
134
- * Does not include support for building query params (see `buildQueryParams`)
135
- * so that it may be composed cleanly with other query-params strategies.
136
- *
137
- * Usage:
138
- *
139
- * ```ts
140
- * import { buildBaseURL } from '@ember-data/request-utils';
141
- *
142
- * const url = buildBaseURL({
143
- * host: 'https://api.example.com',
144
- * namespace: 'api/v1',
145
- * resourcePath: 'emberDevelopers',
146
- * op: 'query',
147
- * identifier: { type: 'ember-developer' }
148
- * });
149
- *
150
- * // => 'https://api.example.com/api/v1/emberDevelopers'
151
- * ```
152
- *
153
- * On the surface this may seem like a lot of work to do something simple, but
154
- * it is designed to be composable with other utilities and interfaces that the
155
- * average product engineer will never need to see or use.
156
- *
157
- * A few notes:
158
- *
159
- * - `resourcePath` is optional, but if it is not provided, `identifier.type` will be used.
160
- * - `host` and `namespace` are optional, but if they are not provided, the values globally
161
- * configured via `setBuildURLConfig` will be used.
162
- * - `op` is required and must be one of the following:
163
- * - 'findRecord' 'query' 'findMany' 'findRelatedCollection' 'findRelatedRecord'` 'createRecord' 'updateRecord' 'deleteRecord'
164
- * - Depending on the value of `op`, `identifier` or `identifiers` will be required.
165
- *
166
- * @public
167
- */
132
+ * Builds a URL for a request based on the provided options.
133
+ * Does not include support for building query params (see `buildQueryParams`)
134
+ * so that it may be composed cleanly with other query-params strategies.
135
+ *
136
+ * Usage:
137
+ *
138
+ * ```ts
139
+ * import { buildBaseURL } from '@ember-data/request-utils';
140
+ *
141
+ * const url = buildBaseURL({
142
+ * host: 'https://api.example.com',
143
+ * namespace: 'api/v1',
144
+ * resourcePath: 'emberDevelopers',
145
+ * op: 'query',
146
+ * identifier: { type: 'ember-developer' }
147
+ * });
148
+ *
149
+ * // => 'https://api.example.com/api/v1/emberDevelopers'
150
+ * ```
151
+ *
152
+ * On the surface this may seem like a lot of work to do something simple, but
153
+ * it is designed to be composable with other utilities and interfaces that the
154
+ * average product engineer will never need to see or use.
155
+ *
156
+ * A few notes:
157
+ *
158
+ * - `resourcePath` is optional, but if it is not provided, `identifier.type` will be used.
159
+ * - `host` and `namespace` are optional, but if they are not provided, the values globally
160
+ * configured via `setBuildURLConfig` will be used.
161
+ * - `op` is required and must be one of the following:
162
+ * - 'findRecord' 'query' 'findMany' 'findRelatedCollection' 'findRelatedRecord'` 'createRecord' 'updateRecord' 'deleteRecord'
163
+ * - Depending on the value of `op`, `identifier` or `identifiers` will be required.
164
+ *
165
+ * @public
166
+ */
168
167
  export declare function buildBaseURL(urlOptions: UrlOptions): string;
169
168
  /**
170
- * filter out keys of an object that have falsy values or point to empty arrays
171
- * returning a new object with only those keys that have truthy values / non-empty arrays
172
- *
173
- * @public
174
- * @param source object to filter keys with empty values from
175
- * @return A new object with the keys that contained empty values removed
176
- */
169
+ * filter out keys of an object that have falsy values or point to empty arrays
170
+ * returning a new object with only those keys that have truthy values / non-empty arrays
171
+ *
172
+ * @public
173
+ * @param source object to filter keys with empty values from
174
+ * @return A new object with the keys that contained empty values removed
175
+ */
177
176
  export declare function filterEmpty(source: Record<string, Serializable>): Record<string, Serializable>;
178
177
  /**
179
- * Sorts query params by both key and value returning a new URLSearchParams
180
- * object with the keys inserted in sorted order.
181
- *
182
- * Treats `included` specially, splicing it into an array if it is a string and sorting the array.
183
- *
184
- * Options:
185
- * - arrayFormat: 'bracket' | 'indices' | 'repeat' | 'comma'
186
- *
187
- * 'bracket': appends [] to the key for every value e.g. `&ids[]=1&ids[]=2`
188
- * 'indices': appends [i] to the key for every value e.g. `&ids[0]=1&ids[1]=2`
189
- * 'repeat': appends the key for every value e.g. `&ids=1&ids=2`
190
- * 'comma' (default): appends the key once with a comma separated list of values e.g. `&ids=1,2`
191
- *
192
- * @public
193
- * @return A {@link URLSearchParams} with keys inserted in sorted order
194
- */
178
+ * Sorts query params by both key and value returning a new URLSearchParams
179
+ * object with the keys inserted in sorted order.
180
+ *
181
+ * Treats `included` specially, splicing it into an array if it is a string and sorting the array.
182
+ *
183
+ * Options:
184
+ * - arrayFormat: 'bracket' | 'indices' | 'repeat' | 'comma'
185
+ *
186
+ * 'bracket': appends [] to the key for every value e.g. `&ids[]=1&ids[]=2`
187
+ * 'indices': appends [i] to the key for every value e.g. `&ids[0]=1&ids[1]=2`
188
+ * 'repeat': appends the key for every value e.g. `&ids=1&ids=2`
189
+ * 'comma' (default): appends the key once with a comma separated list of values e.g. `&ids=1,2`
190
+ *
191
+ * @public
192
+ * @return A {@link URLSearchParams} with keys inserted in sorted order
193
+ */
195
194
  export declare function sortQueryParams(params: QueryParamsSource, options?: QueryParamsSerializationOptions): URLSearchParams;
196
195
  /**
197
- * Sorts query params by both key and value, returning a query params string
198
- *
199
- * Treats `included` specially, splicing it into an array if it is a string and sorting the array.
200
- *
201
- * Options:
202
- * - arrayFormat: 'bracket' | 'indices' | 'repeat' | 'comma'
203
- *
204
- * 'bracket': appends [] to the key for every value e.g. `ids[]=1&ids[]=2`
205
- * 'indices': appends [i] to the key for every value e.g. `ids[0]=1&ids[1]=2`
206
- * 'repeat': appends the key for every value e.g. `ids=1&ids=2`
207
- * 'comma' (default): appends the key once with a comma separated list of values e.g. `ids=1,2`
208
- *
209
- * @public
210
- * @return A sorted query params string without the leading `?`
211
- */
196
+ * Sorts query params by both key and value, returning a query params string
197
+ *
198
+ * Treats `included` specially, splicing it into an array if it is a string and sorting the array.
199
+ *
200
+ * Options:
201
+ * - arrayFormat: 'bracket' | 'indices' | 'repeat' | 'comma'
202
+ *
203
+ * 'bracket': appends [] to the key for every value e.g. `ids[]=1&ids[]=2`
204
+ * 'indices': appends [i] to the key for every value e.g. `ids[0]=1&ids[1]=2`
205
+ * 'repeat': appends the key for every value e.g. `ids=1&ids=2`
206
+ * 'comma' (default): appends the key once with a comma separated list of values e.g. `ids=1,2`
207
+ *
208
+ * @public
209
+ * @return A sorted query params string without the leading `?`
210
+ */
212
211
  export declare function buildQueryParams(params: QueryParamsSource, options?: QueryParamsSerializationOptions): string;
213
- //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,5 @@
1
- export { findRecord } from './-private/json-api/find-record';
2
- export { query, postQuery } from './-private/json-api/query';
3
- export { deleteRecord, createRecord, updateRecord } from './-private/json-api/save-record';
4
- export { serializeResources, serializePatch } from './-private/json-api/serialize';
5
- export { setBuildURLConfig } from './-private/json-api/-utils';
6
- //# sourceMappingURL=json-api.d.ts.map
1
+ export { findRecord } from "./-private/json-api/find-record.js";
2
+ export { query, postQuery } from "./-private/json-api/query.js";
3
+ export { deleteRecord, createRecord, updateRecord } from "./-private/json-api/save-record.js";
4
+ export { serializeResources, serializePatch } from "./-private/json-api/serialize.js";
5
+ export { setBuildURLConfig } from "./-private/json-api/-utils.js";
@@ -1,4 +1,3 @@
1
- export { findRecord } from './-private/rest/find-record';
2
- export { query } from './-private/rest/query';
3
- export { deleteRecord, createRecord, updateRecord } from './-private/rest/save-record';
4
- //# sourceMappingURL=rest.d.ts.map
1
+ export { findRecord } from "./-private/rest/find-record.js";
2
+ export { query } from "./-private/rest/query.js";
3
+ export { deleteRecord, createRecord, updateRecord } from "./-private/rest/save-record.js";
@@ -1,15 +1,14 @@
1
1
  /**
2
- * String utilities for transforming and inflecting strings useful for
3
- * when the format provided by the server is not the format you want to use
4
- * in your application.
5
- *
6
- * Each transformation function stores its results in an LRUCache to avoid
7
- * recomputing the same value multiple times. The cache size can be set
8
- * using the `setMaxLRUCacheSize` function. The default size is 10,000.
9
- *
10
- * @module
11
- * @public
12
- */
13
- export { pluralize, singularize, singular, plural, loadIrregular, loadUncountable, irregular, uncountable, resetToDefaults, clear, clearRules, } from './-private/string/inflect.ts';
14
- export { dasherize, camelize, capitalize, underscore, setMaxLRUCacheSize } from './-private/string/transform.ts';
15
- //# sourceMappingURL=string.d.ts.map
2
+ * String utilities for transforming and inflecting strings useful for
3
+ * when the format provided by the server is not the format you want to use
4
+ * in your application.
5
+ *
6
+ * Each transformation function stores its results in an LRUCache to avoid
7
+ * recomputing the same value multiple times. The cache size can be set
8
+ * using the `setMaxLRUCacheSize` function. The default size is 10,000.
9
+ *
10
+ * @module
11
+ * @public
12
+ */
13
+ export { pluralize, singularize, singular, plural, loadIrregular, loadUncountable, irregular, uncountable, resetToDefaults, clear, clearRules } from "./-private/string/inflect.js";
14
+ export { dasherize, camelize, capitalize, underscore, setMaxLRUCacheSize } from "./-private/string/transform.js";
@@ -1,5 +1,5 @@
1
1
  import { buildBaseURL, buildQueryParams } from './index.js';
2
- import { p as pluralize, j as underscore } from "./inflect-Dr20y6b1.js";
2
+ import { p as pluralize, j as underscore } from "./inflect-BSG696t-.js";
3
3
  import { e as extractCacheOptions, c as copyForwardUrlOptions } from "./builder-utils-Donkk-BZ.js";
4
4
  import { recordIdentifierFor } from '@warp-drive/core';
5
5
  import { macroCondition, getGlobalConfig } from '@embroider/macros';