@ember-data/request-utils 5.5.0-alpha.2 → 5.5.0-alpha.21

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 (41) hide show
  1. package/LICENSE.md +19 -7
  2. package/README.md +12 -2
  3. package/addon-main.cjs +5 -0
  4. package/dist/deprecation-support.js +187 -0
  5. package/dist/deprecation-support.js.map +1 -0
  6. package/dist/index.js +776 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/inflect-8aYUyMN7.js +311 -0
  9. package/dist/inflect-8aYUyMN7.js.map +1 -0
  10. package/dist/string.js +1 -0
  11. package/dist/string.js.map +1 -0
  12. package/logos/NCC-1701-a-blue.svg +4 -0
  13. package/logos/NCC-1701-a-gold.svg +4 -0
  14. package/logos/NCC-1701-a-gold_100.svg +1 -0
  15. package/logos/NCC-1701-a-gold_base-64.txt +1 -0
  16. package/logos/NCC-1701-a.svg +4 -0
  17. package/logos/README.md +4 -0
  18. package/logos/docs-badge.svg +2 -0
  19. package/logos/github-header.svg +444 -0
  20. package/logos/social1.png +0 -0
  21. package/logos/social2.png +0 -0
  22. package/logos/warp-drive-logo-dark.svg +4 -0
  23. package/logos/warp-drive-logo-gold.svg +4 -0
  24. package/package.json +59 -29
  25. package/unstable-preview-types/-private/string/inflect.d.ts +14 -0
  26. package/unstable-preview-types/-private/string/inflect.d.ts.map +1 -0
  27. package/unstable-preview-types/-private/string/inflections.d.ts +12 -0
  28. package/unstable-preview-types/-private/string/inflections.d.ts.map +1 -0
  29. package/unstable-preview-types/-private/string/transform.d.ts +81 -0
  30. package/unstable-preview-types/-private/string/transform.d.ts.map +1 -0
  31. package/unstable-preview-types/deprecation-support.d.ts +4 -0
  32. package/unstable-preview-types/deprecation-support.d.ts.map +1 -0
  33. package/unstable-preview-types/index.d.ts +514 -0
  34. package/unstable-preview-types/index.d.ts.map +1 -0
  35. package/unstable-preview-types/string.d.ts +5 -0
  36. package/unstable-preview-types/string.d.ts.map +1 -0
  37. package/addon/index.js +0 -424
  38. package/addon/index.js.map +0 -1
  39. package/addon-main.js +0 -19
  40. /package/{ember-data-logo-dark.svg → logos/ember-data-logo-dark.svg} +0 -0
  41. /package/{ember-data-logo-light.svg → logos/ember-data-logo-light.svg} +0 -0
@@ -0,0 +1,514 @@
1
+ /// <reference path="./deprecation-support.d.ts" />
2
+ /// <reference path="./string.d.ts" />
3
+ /// <reference path="./-private/string/transform.d.ts" />
4
+ /// <reference path="./-private/string/inflect.d.ts" />
5
+ /// <reference path="./-private/string/inflections.d.ts" />
6
+ declare module '@ember-data/request-utils' {
7
+ import type { StableRecordIdentifier } from '@warp-drive/core-types';
8
+ import type { Cache } from '@warp-drive/core-types/cache';
9
+ import type { StableDocumentIdentifier } from '@warp-drive/core-types/identifier';
10
+ import type { QueryParamsSerializationOptions, QueryParamsSource, Serializable } from '@warp-drive/core-types/params';
11
+ import type { ImmutableRequestInfo, ResponseInfo } from '@warp-drive/core-types/request';
12
+ type UnsubscribeToken = object;
13
+ type CacheOperation = 'added' | 'removed' | 'updated' | 'state';
14
+ type DocumentCacheOperation = 'invalidated' | 'added' | 'removed' | 'updated' | 'state';
15
+ export interface NotificationCallback {
16
+ (identifier: StableRecordIdentifier, notificationType: 'attributes' | 'relationships', key?: string): void;
17
+ (identifier: StableRecordIdentifier, notificationType: 'errors' | 'meta' | 'identity' | 'state'): void;
18
+ }
19
+ interface ResourceOperationCallback {
20
+ (identifier: StableRecordIdentifier, notificationType: CacheOperation): void;
21
+ }
22
+ interface DocumentOperationCallback {
23
+ (identifier: StableDocumentIdentifier, notificationType: DocumentCacheOperation): void;
24
+ }
25
+ type NotificationManager = {
26
+ subscribe(identifier: StableRecordIdentifier, callback: NotificationCallback): UnsubscribeToken;
27
+ subscribe(identifier: 'resource', callback: ResourceOperationCallback): UnsubscribeToken;
28
+ subscribe(identifier: 'document' | StableDocumentIdentifier, callback: DocumentOperationCallback): UnsubscribeToken;
29
+ notify(identifier: StableRecordIdentifier, value: 'attributes' | 'relationships', key?: string): boolean;
30
+ notify(identifier: StableRecordIdentifier, value: 'errors' | 'meta' | 'identity' | 'state'): boolean;
31
+ notify(identifier: StableRecordIdentifier, value: CacheOperation): boolean;
32
+ notify(identifier: StableDocumentIdentifier, value: DocumentCacheOperation): boolean;
33
+ };
34
+ type Store = {
35
+ cache: Cache;
36
+ notifications: NotificationManager;
37
+ };
38
+ /**
39
+ * Simple utility function to assist in url building,
40
+ * query params, and other common request operations.
41
+ *
42
+ * These primitives may be used directly or composed
43
+ * by request builders to provide a consistent interface
44
+ * for building requests.
45
+ *
46
+ * For instance:
47
+ *
48
+ * ```ts
49
+ * import { buildBaseURL, buildQueryParams } from '@ember-data/request-utils';
50
+ *
51
+ * const baseURL = buildBaseURL({
52
+ * host: 'https://api.example.com',
53
+ * namespace: 'api/v1',
54
+ * resourcePath: 'emberDevelopers',
55
+ * op: 'query',
56
+ * identifier: { type: 'ember-developer' }
57
+ * });
58
+ * const url = `${baseURL}?${buildQueryParams({ name: 'Chris', include:['pets'] })}`;
59
+ * // => 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris'
60
+ * ```
61
+ *
62
+ * This is useful, but not as useful as the REST request builder for query which is sugar
63
+ * over this (and more!):
64
+ *
65
+ * ```ts
66
+ * import { query } from '@ember-data/rest/request';
67
+ *
68
+ * const options = query('ember-developer', { name: 'Chris', include:['pets'] });
69
+ * // => { url: 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris' }
70
+ * // Note: options will also include other request options like headers, method, etc.
71
+ * ```
72
+ *
73
+ * @module @ember-data/request-utils
74
+ * @main @ember-data/request-utils
75
+ * @public
76
+ */
77
+ export interface BuildURLConfig {
78
+ host: string | null;
79
+ namespace: string | null;
80
+ }
81
+ /**
82
+ * Sets the global configuration for `buildBaseURL`
83
+ * for host and namespace values for the application.
84
+ *
85
+ * These values may still be overridden by passing
86
+ * them to buildBaseURL directly.
87
+ *
88
+ * This method may be called as many times as needed.
89
+ * host values of `''` or `'/'` are equivalent.
90
+ *
91
+ * Except for the value of `/` as host, host should not
92
+ * end with `/`.
93
+ *
94
+ * namespace should not start or end with a `/`.
95
+ *
96
+ * ```ts
97
+ * type BuildURLConfig = {
98
+ * host: string;
99
+ * namespace: string'
100
+ * }
101
+ * ```
102
+ *
103
+ * Example:
104
+ *
105
+ * ```ts
106
+ * import { setBuildURLConfig } from '@ember-data/request-utils';
107
+ *
108
+ * setBuildURLConfig({
109
+ * host: 'https://api.example.com',
110
+ * namespace: 'api/v1'
111
+ * });
112
+ * ```
113
+ *
114
+ * @method setBuildURLConfig
115
+ * @static
116
+ * @public
117
+ * @for @ember-data/request-utils
118
+ * @param {BuildURLConfig} config
119
+ * @return void
120
+ */
121
+ export function setBuildURLConfig(config: BuildURLConfig): void;
122
+ export interface FindRecordUrlOptions {
123
+ op: 'findRecord';
124
+ identifier: {
125
+ type: string;
126
+ id: string;
127
+ };
128
+ resourcePath?: string;
129
+ host?: string;
130
+ namespace?: string;
131
+ }
132
+ export interface QueryUrlOptions {
133
+ op: 'query';
134
+ identifier: {
135
+ type: string;
136
+ };
137
+ resourcePath?: string;
138
+ host?: string;
139
+ namespace?: string;
140
+ }
141
+ export interface FindManyUrlOptions {
142
+ op: 'findMany';
143
+ identifiers: {
144
+ type: string;
145
+ id: string;
146
+ }[];
147
+ resourcePath?: string;
148
+ host?: string;
149
+ namespace?: string;
150
+ }
151
+ export interface FindRelatedCollectionUrlOptions {
152
+ op: 'findRelatedCollection';
153
+ identifier: {
154
+ type: string;
155
+ id: string;
156
+ };
157
+ fieldPath: string;
158
+ resourcePath?: string;
159
+ host?: string;
160
+ namespace?: string;
161
+ }
162
+ export interface FindRelatedResourceUrlOptions {
163
+ op: 'findRelatedRecord';
164
+ identifier: {
165
+ type: string;
166
+ id: string;
167
+ };
168
+ fieldPath: string;
169
+ resourcePath?: string;
170
+ host?: string;
171
+ namespace?: string;
172
+ }
173
+ export interface CreateRecordUrlOptions {
174
+ op: 'createRecord';
175
+ identifier: {
176
+ type: string;
177
+ };
178
+ resourcePath?: string;
179
+ host?: string;
180
+ namespace?: string;
181
+ }
182
+ export interface UpdateRecordUrlOptions {
183
+ op: 'updateRecord';
184
+ identifier: {
185
+ type: string;
186
+ id: string;
187
+ };
188
+ resourcePath?: string;
189
+ host?: string;
190
+ namespace?: string;
191
+ }
192
+ export interface DeleteRecordUrlOptions {
193
+ op: 'deleteRecord';
194
+ identifier: {
195
+ type: string;
196
+ id: string;
197
+ };
198
+ resourcePath?: string;
199
+ host?: string;
200
+ namespace?: string;
201
+ }
202
+ export interface GenericUrlOptions {
203
+ resourcePath: string;
204
+ host?: string;
205
+ namespace?: string;
206
+ }
207
+ export type UrlOptions = FindRecordUrlOptions | QueryUrlOptions | FindManyUrlOptions | FindRelatedCollectionUrlOptions | FindRelatedResourceUrlOptions | CreateRecordUrlOptions | UpdateRecordUrlOptions | DeleteRecordUrlOptions | GenericUrlOptions;
208
+ /**
209
+ * Builds a URL for a request based on the provided options.
210
+ * Does not include support for building query params (see `buildQueryParams`)
211
+ * so that it may be composed cleanly with other query-params strategies.
212
+ *
213
+ * Usage:
214
+ *
215
+ * ```ts
216
+ * import { buildBaseURL } from '@ember-data/request-utils';
217
+ *
218
+ * const url = buildBaseURL({
219
+ * host: 'https://api.example.com',
220
+ * namespace: 'api/v1',
221
+ * resourcePath: 'emberDevelopers',
222
+ * op: 'query',
223
+ * identifier: { type: 'ember-developer' }
224
+ * });
225
+ *
226
+ * // => 'https://api.example.com/api/v1/emberDevelopers'
227
+ * ```
228
+ *
229
+ * On the surface this may seem like a lot of work to do something simple, but
230
+ * it is designed to be composable with other utilities and interfaces that the
231
+ * average product engineer will never need to see or use.
232
+ *
233
+ * A few notes:
234
+ *
235
+ * - `resourcePath` is optional, but if it is not provided, `identifier.type` will be used.
236
+ * - `host` and `namespace` are optional, but if they are not provided, the values globally
237
+ * configured via `setBuildURLConfig` will be used.
238
+ * - `op` is required and must be one of the following:
239
+ * - 'findRecord' 'query' 'findMany' 'findRelatedCollection' 'findRelatedRecord'` 'createRecord' 'updateRecord' 'deleteRecord'
240
+ * - Depending on the value of `op`, `identifier` or `identifiers` will be required.
241
+ *
242
+ * @method buildBaseURL
243
+ * @static
244
+ * @public
245
+ * @for @ember-data/request-utils
246
+ * @param urlOptions
247
+ * @return string
248
+ */
249
+ export function buildBaseURL(urlOptions: UrlOptions): string;
250
+ /**
251
+ * filter out keys of an object that have falsy values or point to empty arrays
252
+ * returning a new object with only those keys that have truthy values / non-empty arrays
253
+ *
254
+ * @method filterEmpty
255
+ * @static
256
+ * @public
257
+ * @for @ember-data/request-utils
258
+ * @param {Record<string, Serializable>} source object to filter keys with empty values from
259
+ * @return {Record<string, Serializable>} A new object with the keys that contained empty values removed
260
+ */
261
+ export function filterEmpty(source: Record<string, Serializable>): Record<string, Serializable>;
262
+ /**
263
+ * Sorts query params by both key and value returning a new URLSearchParams
264
+ * object with the keys inserted in sorted order.
265
+ *
266
+ * Treats `included` specially, splicing it into an array if it is a string and sorting the array.
267
+ *
268
+ * Options:
269
+ * - arrayFormat: 'bracket' | 'indices' | 'repeat' | 'comma'
270
+ *
271
+ * 'bracket': appends [] to the key for every value e.g. `&ids[]=1&ids[]=2`
272
+ * 'indices': appends [i] to the key for every value e.g. `&ids[0]=1&ids[1]=2`
273
+ * 'repeat': appends the key for every value e.g. `&ids=1&ids=2`
274
+ * 'comma' (default): appends the key once with a comma separated list of values e.g. `&ids=1,2`
275
+ *
276
+ * @method sortQueryParams
277
+ * @static
278
+ * @public
279
+ * @for @ember-data/request-utils
280
+ * @param {URLSearchParams | object} params
281
+ * @param {object} options
282
+ * @return {URLSearchParams} A URLSearchParams with keys inserted in sorted order
283
+ */
284
+ export function sortQueryParams(params: QueryParamsSource, options?: QueryParamsSerializationOptions): URLSearchParams;
285
+ /**
286
+ * Sorts query params by both key and value, returning a query params string
287
+ *
288
+ * Treats `included` specially, splicing it into an array if it is a string and sorting the array.
289
+ *
290
+ * Options:
291
+ * - arrayFormat: 'bracket' | 'indices' | 'repeat' | 'comma'
292
+ *
293
+ * 'bracket': appends [] to the key for every value e.g. `ids[]=1&ids[]=2`
294
+ * 'indices': appends [i] to the key for every value e.g. `ids[0]=1&ids[1]=2`
295
+ * 'repeat': appends the key for every value e.g. `ids=1&ids=2`
296
+ * 'comma' (default): appends the key once with a comma separated list of values e.g. `ids=1,2`
297
+ *
298
+ * @method buildQueryParams
299
+ * @static
300
+ * @public
301
+ * @for @ember-data/request-utils
302
+ * @param {URLSearchParams | object} params
303
+ * @param {object} [options]
304
+ * @return {string} A sorted query params string without the leading `?`
305
+ */
306
+ export function buildQueryParams(params: QueryParamsSource, options?: QueryParamsSerializationOptions): string;
307
+ export interface CacheControlValue {
308
+ immutable?: boolean;
309
+ 'max-age'?: number;
310
+ 'must-revalidate'?: boolean;
311
+ 'must-understand'?: boolean;
312
+ 'no-cache'?: boolean;
313
+ 'no-store'?: boolean;
314
+ 'no-transform'?: boolean;
315
+ 'only-if-cached'?: boolean;
316
+ private?: boolean;
317
+ 'proxy-revalidate'?: boolean;
318
+ public?: boolean;
319
+ 's-maxage'?: number;
320
+ 'stale-if-error'?: number;
321
+ 'stale-while-revalidate'?: number;
322
+ }
323
+ /**
324
+ * Parses a string Cache-Control header value into an object with the following structure:
325
+ *
326
+ * ```ts
327
+ * interface CacheControlValue {
328
+ * immutable?: boolean;
329
+ * 'max-age'?: number;
330
+ * 'must-revalidate'?: boolean;
331
+ * 'must-understand'?: boolean;
332
+ * 'no-cache'?: boolean;
333
+ * 'no-store'?: boolean;
334
+ * 'no-transform'?: boolean;
335
+ * 'only-if-cached'?: boolean;
336
+ * private?: boolean;
337
+ * 'proxy-revalidate'?: boolean;
338
+ * public?: boolean;
339
+ * 's-maxage'?: number;
340
+ * 'stale-if-error'?: number;
341
+ * 'stale-while-revalidate'?: number;
342
+ * }
343
+ * ```
344
+ * @method parseCacheControl
345
+ * @static
346
+ * @public
347
+ * @for @ember-data/request-utils
348
+ * @param {string} header
349
+ * @return {CacheControlValue}
350
+ */
351
+ export function parseCacheControl(header: string): CacheControlValue;
352
+ export type PolicyConfig = {
353
+ apiCacheSoftExpires: number;
354
+ apiCacheHardExpires: number;
355
+ };
356
+ /**
357
+ * A basic CachePolicy that can be added to the Store service.
358
+ *
359
+ * Determines staleness based on time since the request was last received from the API
360
+ * using the `date` header.
361
+ *
362
+ * Invalidates any request for which `cacheOptions.types` was provided when a createRecord
363
+ * request for that type is successful.
364
+ *
365
+ * For this to work, the `createRecord` request must include the `cacheOptions.types` array
366
+ * with the types that should be invalidated, or its request should specify the identifiers
367
+ * of the records that are being created via `records`. Providing both is valid.
368
+ *
369
+ * > [!NOTE]
370
+ * > only requests that had specified `cacheOptions.types` and occurred prior to the
371
+ * > createRecord request will be invalidated. This means that a given request should always
372
+ * > specify the types that would invalidate it to opt into this behavior. Abstracting this
373
+ * > behavior via builders is recommended to ensure consistency.
374
+ *
375
+ * This allows the Store's CacheHandler to determine if a request is expired and
376
+ * should be refetched upon next request.
377
+ *
378
+ * The `Fetch` handler provided by `@ember-data/request/fetch` will automatically
379
+ * add the `date` header to responses if it is not present.
380
+ *
381
+ * > [!NOTE]
382
+ * > Date headers do not have millisecond precision, so expiration times should
383
+ * > generally be larger than 1000ms.
384
+ *
385
+ * Usage:
386
+ *
387
+ * ```ts
388
+ * import { CachePolicy } from '@ember-data/request-utils';
389
+ * import DataStore from '@ember-data/store';
390
+ *
391
+ * // ...
392
+ *
393
+ * export class Store extends DataStore {
394
+ * constructor(args) {
395
+ * super(args);
396
+ * this.lifetimes = new CachePolicy({ apiCacheSoftExpires: 30_000, apiCacheHardExpires: 60_000 });
397
+ * }
398
+ * }
399
+ * ```
400
+ *
401
+ * @class CachePolicy
402
+ * @public
403
+ * @module @ember-data/request-utils
404
+ */
405
+ export class CachePolicy {
406
+ config: PolicyConfig;
407
+ _stores: WeakMap<Store, {
408
+ invalidated: Set<StableDocumentIdentifier>;
409
+ types: Map<string, Set<StableDocumentIdentifier>>;
410
+ }>;
411
+ _getStore(store: Store): {
412
+ invalidated: Set<StableDocumentIdentifier>;
413
+ types: Map<string, Set<StableDocumentIdentifier>>;
414
+ };
415
+ constructor(config: PolicyConfig);
416
+ /**
417
+ * Invalidate a request by its identifier for a given store instance.
418
+ *
419
+ * While the store argument may seem redundant, the CachePolicy
420
+ * is designed to be shared across multiple stores / forks
421
+ * of the store.
422
+ *
423
+ * ```ts
424
+ * store.lifetimes.invalidateRequest(store, identifier);
425
+ * ```
426
+ *
427
+ * @method invalidateRequest
428
+ * @public
429
+ * @param {StableDocumentIdentifier} identifier
430
+ * @param {Store} store
431
+ */
432
+ invalidateRequest(identifier: StableDocumentIdentifier, store: Store): void;
433
+ /**
434
+ * Invalidate all requests associated to a specific type
435
+ * for a given store instance.
436
+ *
437
+ * While the store argument may seem redundant, the CachePolicy
438
+ * is designed to be shared across multiple stores / forks
439
+ * of the store.
440
+ *
441
+ * This invalidation is done automatically when using this service
442
+ * for both the CacheHandler and the LegacyNetworkHandler.
443
+ *
444
+ * ```ts
445
+ * store.lifetimes.invalidateRequestsForType(store, 'person');
446
+ * ```
447
+ *
448
+ * @method invalidateRequestsForType
449
+ * @public
450
+ * @param {string} type
451
+ * @param {Store} store
452
+ */
453
+ invalidateRequestsForType(type: string, store: Store): void;
454
+ /**
455
+ * Invoked when a request has been fulfilled from the configured request handlers.
456
+ * This is invoked by the CacheHandler for both foreground and background requests
457
+ * once the cache has been updated.
458
+ *
459
+ * Note, this is invoked by the CacheHandler regardless of whether
460
+ * the request has a cache-key.
461
+ *
462
+ * This method should not be invoked directly by consumers.
463
+ *
464
+ * @method didRequest
465
+ * @public
466
+ * @param {ImmutableRequestInfo} request
467
+ * @param {ImmutableResponse} response
468
+ * @param {Store} store
469
+ * @param {StableDocumentIdentifier | null} identifier
470
+ * @return {void}
471
+ */
472
+ didRequest(request: ImmutableRequestInfo, response: Response | ResponseInfo | null, identifier: StableDocumentIdentifier | null, store: Store): void;
473
+ /**
474
+ * Invoked to determine if the request may be fulfilled from cache
475
+ * if possible.
476
+ *
477
+ * Note, this is only invoked by the CacheHandler if the request has
478
+ * a cache-key.
479
+ *
480
+ * If no cache entry is found or the entry is hard expired,
481
+ * the request will be fulfilled from the configured request handlers
482
+ * and the cache will be updated before returning the response.
483
+ *
484
+ * @method isHardExpired
485
+ * @public
486
+ * @param {StableDocumentIdentifier} identifier
487
+ * @param {Store} store
488
+ * @return {boolean} true if the request is considered hard expired
489
+ */
490
+ isHardExpired(identifier: StableDocumentIdentifier, store: Store): boolean;
491
+ /**
492
+ * Invoked if `isHardExpired` is false to determine if the request
493
+ * should be update behind the scenes if cache data is already available.
494
+ *
495
+ * Note, this is only invoked by the CacheHandler if the request has
496
+ * a cache-key.
497
+ *
498
+ * If true, the request will be fulfilled from cache while a backgrounded
499
+ * request is made to update the cache via the configured request handlers.
500
+ *
501
+ * @method isSoftExpired
502
+ * @public
503
+ * @param {StableDocumentIdentifier} identifier
504
+ * @param {Store} store
505
+ * @return {boolean} true if the request is considered soft expired
506
+ */
507
+ isSoftExpired(identifier: StableDocumentIdentifier, store: Store): boolean;
508
+ }
509
+ export class LifetimesService extends CachePolicy {
510
+ constructor(config: PolicyConfig);
511
+ }
512
+ export {};
513
+ }
514
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACtH,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEzF,KAAK,gBAAgB,GAAG,MAAM,CAAC;AAC/B,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;;;;;;;;;;;;;;OAiBG;IACH,UAAU,CACR,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI,EACxC,UAAU,EAAE,wBAAwB,GAAG,IAAI,EAC3C,KAAK,EAAE,KAAK,GACX,IAAI;IAgCP;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO;IAW1E;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CAAC,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO;CAK3E;AAED,qBAAa,gBAAiB,SAAQ,WAAW;gBACnC,MAAM,EAAE,YAAY;CAgBjC"}
@@ -0,0 +1,5 @@
1
+ declare module '@ember-data/request-utils/string' {
2
+ export { pluralize, singularize, singular, plural, loadIrregular, loadUncountable, irregular, uncountable, resetToDefaults, clear, clearRules, } from '@ember-data/request-utils/-private/string/inflect';
3
+ export { dasherize, camelize, capitalize, underscore, setMaxLRUCacheSize } from '@ember-data/request-utils/-private/string/transform';
4
+ }
5
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,MAAM,EACN,aAAa,EACb,eAAe,EACf,SAAS,EACT,WAAW,EACX,eAAe,EACf,KAAK,EACL,UAAU,GACX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC"}