@warp-drive/core-types 5.4.0-alpha.142 → 5.4.0-alpha.144

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/LICENSE.md CHANGED
@@ -1,9 +1,23 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (C) 2023 EmberData and WarpDrive contributors
3
+ Copyright (c) 2017-2025 Ember.js and contributors
4
+ Copyright (c) 2011-2017 Tilde, Inc. and contributors
5
+ Copyright (c) 2011 LivingSocial Inc.
4
6
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
6
13
 
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
8
16
 
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <p align="center">
2
2
  <img
3
3
  class="project-logo"
4
- src="./NCC-1701-a-blue.svg#gh-light-mode-only"
4
+ src="./logos/NCC-1701-a-blue.svg#gh-light-mode-only"
5
5
  alt="WarpDrive"
6
6
  width="120px"
7
7
  title="WarpDrive" />
8
8
  <img
9
9
  class="project-logo"
10
- src="./NCC-1701-a.svg#gh-dark-mode-only"
10
+ src="./logos/NCC-1701-a.svg#gh-dark-mode-only"
11
11
  alt="WarpDrive"
12
12
  width="120px"
13
13
  title="WarpDrive" />
package/dist/-private.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
2
2
  const name = "@warp-drive/core-types";
3
- const version = "5.4.0-alpha.142";
3
+ const version = "5.4.0-alpha.144";
4
4
 
5
5
  // in testing mode, we utilize globals to ensure only one copy exists of
6
6
  // these maps, due to bugs in ember-auto-import
@@ -1 +1 @@
1
- {"version":3,"file":"identifier.js","sources":["../src/identifier.ts"],"sourcesContent":["/**\n @module @ember-data/store\n*/\n\nimport { DEBUG } from '@warp-drive/build-config/env';\n\n// provided for additional debuggability\nexport const DEBUG_CLIENT_ORIGINATED: unique symbol = Symbol('record-originated-on-client');\nexport const DEBUG_IDENTIFIER_BUCKET: unique symbol = Symbol('identifier-bucket');\nexport const DEBUG_STALE_CACHE_OWNER: unique symbol = Symbol('warpDriveStaleCache');\n\nfunction ProdSymbol<T extends string>(str: T): T {\n return DEBUG ? (Symbol(str) as unknown as T) : str;\n}\n\n// also present in production\nexport const CACHE_OWNER = ProdSymbol('__$co');\n\nexport type IdentifierBucket = 'record' | 'document';\n\nexport interface Identifier {\n lid: string;\n clientId?: string;\n}\n\nexport interface ExistingRecordIdentifier<T extends string = string> extends Identifier {\n id: string;\n type: T;\n}\n\nexport interface NewRecordIdentifier<T extends string = string> extends Identifier {\n id: string | null;\n type: T;\n}\n\nexport type StableDocumentIdentifier = {\n lid: string;\n};\n\n/**\n * An Identifier specific to a record which may or may not\n * be present in the cache.\n *\n * The absence of an `id` DOES NOT indicate that this\n * Identifier is for a new client-created record as it\n * may also indicate that it was generated for a secondary\n * index and the primary `id` index is not yet known.\n *\n * @internal\n */\nexport type RecordIdentifier<T extends string = string> = ExistingRecordIdentifier<T> | NewRecordIdentifier<T>;\n\n/**\n * Used when an Identifier is known to be the stable version\n *\n * @internal\n */\nexport interface StableIdentifier extends Identifier {\n [DEBUG_IDENTIFIER_BUCKET]?: string;\n}\n\n/**\n * Used when a StableRecordIdentifier was not created locally as part\n * of a call to store.createRecord\n *\n * Distinguishing between this Identifier and one for a client created\n * record that was created with an ID is generally speaking not possible\n * at runtime, so anything with an ID typically narrows to this.\n *\n * @internal\n */\nexport interface StableExistingRecordIdentifier<T extends string = string> extends StableIdentifier {\n id: string;\n type: T;\n [DEBUG_CLIENT_ORIGINATED]?: boolean;\n [CACHE_OWNER]: number | undefined;\n [DEBUG_STALE_CACHE_OWNER]?: number | undefined;\n}\n\n/**\n * Used when a StableRecordIdentifier was created locally\n * (by a call to store.createRecord).\n *\n * It is possible in rare circumstances to have a StableRecordIdentifier\n * that is not for a new record but does not have an ID. This would\n * happen if a user intentionally created one for use with a secondary-index\n * prior to the record having been fully loaded.\n *\n * @internal\n */\nexport interface StableNewRecordIdentifier<T extends string = string> extends StableIdentifier {\n id: string | null;\n type: T;\n [DEBUG_CLIENT_ORIGINATED]?: boolean;\n [CACHE_OWNER]: number | undefined;\n [DEBUG_STALE_CACHE_OWNER]?: number | undefined;\n}\n\n/**\n * A referentially stable object with a unique string (lid) that can be used\n * as a reference to data in the cache.\n *\n * Every record instance has a unique identifier, and identifiers may refer\n * to data that has never been loaded (for instance, in an async relationship).\n *\n * @class StableRecordIdentifier\n * @public\n */\n\n/**\n * A string representing a unique identity.\n *\n * @property {string} lid\n * @public\n */\n/**\n * the primary resource `type` or `modelName` this identity belongs to.\n *\n * @property {string} type\n * @public\n */\n/**\n * the primary id for the record this identity belongs to. `null`\n * if not yet assigned an id.\n *\n * @property {string | null} id\n * @public\n */\nexport type StableRecordIdentifier<T extends string = string> =\n | StableExistingRecordIdentifier<T>\n | StableNewRecordIdentifier<T>;\n"],"names":["DEBUG_CLIENT_ORIGINATED","Symbol","DEBUG_IDENTIFIER_BUCKET","DEBUG_STALE_CACHE_OWNER","ProdSymbol","str","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","CACHE_OWNER"],"mappings":";;AAAA;AACA;AACA;AAIA;MACaA,uBAAsC,GAAGC,MAAM,CAAC,6BAA6B;MAC7EC,uBAAsC,GAAGD,MAAM,CAAC,mBAAmB;MACnEE,uBAAsC,GAAGF,MAAM,CAAC,qBAAqB;AAElF,SAASG,UAAUA,CAAmBC,GAAM,EAAK;AAC/C,EAAA,OAAOC,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAC,KAAA,IAAST,MAAM,CAACI,GAAG,CAAC,GAAoBA,GAAG;AACpD;;AAEA;MACaM,WAAW,GAAGP,UAAU,CAAC,OAAO;;AAuB7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"identifier.js","sources":["../src/identifier.ts"],"sourcesContent":["/**\n @module @ember-data/store\n*/\n\nimport { DEBUG } from '@warp-drive/build-config/env';\n\n// provided for additional debuggability\nexport const DEBUG_CLIENT_ORIGINATED: unique symbol = Symbol('record-originated-on-client');\nexport const DEBUG_IDENTIFIER_BUCKET: unique symbol = Symbol('identifier-bucket');\nexport const DEBUG_STALE_CACHE_OWNER: unique symbol = Symbol('warpDriveStaleCache');\n\nfunction ProdSymbol<T extends string>(str: T): T {\n return DEBUG ? (Symbol(str) as unknown as T) : str;\n}\n\n// also present in production\nexport const CACHE_OWNER: '__$co' = ProdSymbol('__$co');\n\nexport type IdentifierBucket = 'record' | 'document';\n\nexport interface Identifier {\n lid: string;\n clientId?: string;\n}\n\nexport interface ExistingRecordIdentifier<T extends string = string> extends Identifier {\n id: string;\n type: T;\n}\n\nexport interface NewRecordIdentifier<T extends string = string> extends Identifier {\n id: string | null;\n type: T;\n}\n\nexport type StableDocumentIdentifier = {\n lid: string;\n};\n\n/**\n * An Identifier specific to a record which may or may not\n * be present in the cache.\n *\n * The absence of an `id` DOES NOT indicate that this\n * Identifier is for a new client-created record as it\n * may also indicate that it was generated for a secondary\n * index and the primary `id` index is not yet known.\n *\n * @internal\n */\nexport type RecordIdentifier<T extends string = string> = ExistingRecordIdentifier<T> | NewRecordIdentifier<T>;\n\n/**\n * Used when an Identifier is known to be the stable version\n *\n * @internal\n */\nexport interface StableIdentifier extends Identifier {\n [DEBUG_IDENTIFIER_BUCKET]?: string;\n}\n\n/**\n * Used when a StableRecordIdentifier was not created locally as part\n * of a call to store.createRecord\n *\n * Distinguishing between this Identifier and one for a client created\n * record that was created with an ID is generally speaking not possible\n * at runtime, so anything with an ID typically narrows to this.\n *\n * @internal\n */\nexport interface StableExistingRecordIdentifier<T extends string = string> extends StableIdentifier {\n id: string;\n type: T;\n [DEBUG_CLIENT_ORIGINATED]?: boolean;\n [CACHE_OWNER]: number | undefined;\n [DEBUG_STALE_CACHE_OWNER]?: number | undefined;\n}\n\n/**\n * Used when a StableRecordIdentifier was created locally\n * (by a call to store.createRecord).\n *\n * It is possible in rare circumstances to have a StableRecordIdentifier\n * that is not for a new record but does not have an ID. This would\n * happen if a user intentionally created one for use with a secondary-index\n * prior to the record having been fully loaded.\n *\n * @internal\n */\nexport interface StableNewRecordIdentifier<T extends string = string> extends StableIdentifier {\n id: string | null;\n type: T;\n [DEBUG_CLIENT_ORIGINATED]?: boolean;\n [CACHE_OWNER]: number | undefined;\n [DEBUG_STALE_CACHE_OWNER]?: number | undefined;\n}\n\n/**\n * A referentially stable object with a unique string (lid) that can be used\n * as a reference to data in the cache.\n *\n * Every record instance has a unique identifier, and identifiers may refer\n * to data that has never been loaded (for instance, in an async relationship).\n *\n * @class StableRecordIdentifier\n * @public\n */\n\n/**\n * A string representing a unique identity.\n *\n * @property {string} lid\n * @public\n */\n/**\n * the primary resource `type` or `modelName` this identity belongs to.\n *\n * @property {string} type\n * @public\n */\n/**\n * the primary id for the record this identity belongs to. `null`\n * if not yet assigned an id.\n *\n * @property {string | null} id\n * @public\n */\nexport type StableRecordIdentifier<T extends string = string> =\n | StableExistingRecordIdentifier<T>\n | StableNewRecordIdentifier<T>;\n"],"names":["DEBUG_CLIENT_ORIGINATED","Symbol","DEBUG_IDENTIFIER_BUCKET","DEBUG_STALE_CACHE_OWNER","ProdSymbol","str","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","CACHE_OWNER"],"mappings":";;AAAA;AACA;AACA;AAIA;MACaA,uBAAsC,GAAGC,MAAM,CAAC,6BAA6B;MAC7EC,uBAAsC,GAAGD,MAAM,CAAC,mBAAmB;MACnEE,uBAAsC,GAAGF,MAAM,CAAC,qBAAqB;AAElF,SAASG,UAAUA,CAAmBC,GAAM,EAAK;AAC/C,EAAA,OAAOC,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAC,KAAA,IAAST,MAAM,CAACI,GAAG,CAAC,GAAoBA,GAAG;AACpD;;AAEA;MACaM,WAAoB,GAAGP,UAAU,CAAC,OAAO;;AAuBtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sources":["../src/request.ts"],"sourcesContent":["import { getOrSetGlobal, getOrSetUniversal } from './-private';\nimport type { StableRecordIdentifier } from './identifier';\nimport type { QueryParamsSerializationOptions } from './params';\nimport type { ExtractSuggestedCacheTypes, Includes, TypedRecordInstance, TypeFromInstanceOrString } from './record';\nimport type { ResourceIdentifierObject } from './spec/json-api-raw';\nimport type { RequestSignature } from './symbols';\n\ntype Store = unknown;\n\nexport const SkipCache = getOrSetUniversal('SkipCache', Symbol.for('wd:skip-cache'));\nexport const EnableHydration = getOrSetUniversal('EnableHydration', Symbol.for('wd:enable-hydration'));\nexport const IS_FUTURE = getOrSetGlobal('IS_FUTURE', Symbol('IS_FUTURE'));\nexport const STRUCTURED = getOrSetGlobal('DOC', Symbol('DOC'));\n\nexport type HTTPMethod =\n | 'QUERY'\n | 'GET'\n | 'OPTIONS'\n | 'POST'\n | 'PUT'\n | 'PATCH'\n | 'DELETE'\n | 'HEAD'\n | 'CONNECT'\n | 'TRACE';\n\n/**\n * Use these options to adjust CacheHandler behavior for a request.\n *\n * @typedoc\n */\nexport type CacheOptions<T = unknown> = {\n /**\n * A key that uniquely identifies this request. If not present, the url wil be used\n * as the key for any GET request, while all other requests will not be cached.\n *\n * @typedoc\n */\n key?: string;\n /**\n * If true, the request will be made even if a cached response is present\n * and not expired.\n *\n * @typedoc\n */\n reload?: boolean;\n /**\n * If true, and a cached response is present and not expired, the request\n * will be made in the background and the cached response will be returned.\n *\n * @typedoc\n */\n backgroundReload?: boolean;\n /**\n * Useful for metadata around when to invalidate the cache. Typically used\n * by strategies that invalidate requests by resource type when a new resource\n * of that type has been created. See the CachePolicy implementation\n * provided by `@ember-data/request-utils` for an example.\n *\n * It is recommended to only use this for query/queryRecord requests where\n * new records created later would affect the results, though using it for\n * findRecord requests is also supported if desired where it may be useful\n * when a create may affect the result of a sideloaded relationship.\n *\n * Generally it is better to patch the cache directly for relationship updates\n * than to invalidate findRecord requests for one.\n *\n * @typedoc\n */\n types?: T extends TypedRecordInstance ? ExtractSuggestedCacheTypes<T>[] : string[];\n\n /**\n * If true, the request will never be handled by the cache-manager and thus\n * will never resolve from cache nor update the cache.\n *\n * Generally this is only used for legacy request that manage resource cache\n * updates in a non-standard way via the LegacyNetworkHandler.\n *\n * @typedoc\n */\n [SkipCache]?: boolean;\n};\nexport type FindRecordRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions?: CacheOptions<T>;\n op: 'findRecord';\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type QueryRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions?: CacheOptions<T>;\n op: 'query';\n [RequestSignature]?: RT;\n};\n\nexport type PostQueryRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'POST' | 'QUERY';\n headers: Headers;\n body?: string | BodyInit | FormData;\n cacheOptions: CacheOptions<T> & { key: string };\n op: 'query';\n [RequestSignature]?: RT;\n};\n\nexport type DeleteRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'DELETE';\n headers: Headers;\n op: 'deleteRecord';\n body?: string | BodyInit | FormData;\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\ntype ImmutableRequest<T> = Readonly<T> & {\n readonly headers: ImmutableHeaders;\n readonly records: [StableRecordIdentifier];\n};\n\nexport type UpdateRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'PATCH' | 'PUT';\n headers: Headers;\n op: 'updateRecord';\n body?: string | BodyInit | FormData;\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type CreateRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'POST';\n headers: Headers;\n op: 'createRecord';\n body?: string | BodyInit | FormData;\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type ImmutableDeleteRequestOptions = ImmutableRequest<DeleteRequestOptions>;\nexport type ImmutableUpdateRequestOptions = ImmutableRequest<UpdateRequestOptions>;\nexport type ImmutableCreateRequestOptions = ImmutableRequest<CreateRequestOptions>;\n\nexport type RemotelyAccessibleIdentifier<T extends string = string> = {\n id: string;\n type: T;\n lid?: string;\n};\n\nexport type ConstrainedRequestOptions = {\n reload?: boolean;\n backgroundReload?: boolean;\n host?: string;\n namespace?: string;\n resourcePath?: string;\n urlParamsSettings?: QueryParamsSerializationOptions;\n};\n\nexport type FindRecordOptions<T = unknown> = ConstrainedRequestOptions & {\n include?: T extends TypedRecordInstance ? Includes<T>[] : string | string[];\n};\n\nexport interface StructuredDataDocument<T> {\n [STRUCTURED]?: true;\n /**\n * @see {@link ImmutableRequestInfo}\n * @typedoc\n */\n request: ImmutableRequestInfo;\n response: Response | ResponseInfo | null;\n content: T;\n}\nexport interface StructuredErrorDocument<T = unknown> extends Error {\n [STRUCTURED]?: true;\n request: ImmutableRequestInfo;\n response: Response | ResponseInfo | null;\n error: string | object;\n content?: T;\n}\nexport type StructuredDocument<T> = StructuredDataDocument<T> | StructuredErrorDocument<T>;\n\n/**\n * JavaScript's native Request class.\n *\n * EmberData provides our own typings due to incompleteness in the native typings.\n *\n * @typedoc\n */\ntype Request = {\n /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.\n * @typedoc\n */\n cache?: RequestCache;\n /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.\n * @typedoc\n */\n credentials?: RequestCredentials;\n /** Returns the kind of resource requested by request, e.g., \"document\" or \"script\".\n * @typedoc\n */\n destination?: RequestDestination;\n /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the \"Host\" header.\n * @typedoc\n */\n headers?: Headers;\n /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]\n * @typedoc\n */\n integrity?: string;\n /** Returns a boolean indicating whether or not request can outlive the global in which it was created.\n * @typedoc\n */\n keepalive?: boolean;\n /** Returns request's HTTP method, which is \"GET\" by default.\n * @typedoc\n */\n method?: HTTPMethod;\n /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.\n * @typedoc\n */\n mode?: RequestMode;\n /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.\n * @typedoc\n */\n redirect?: RequestRedirect;\n /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and \"about:client\" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.\n * @typedoc\n */\n referrer?: string;\n /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.\n * @typedoc\n */\n referrerPolicy?: ReferrerPolicy;\n /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.\n * @typedoc\n */\n signal?: AbortSignal;\n /** Returns the URL of request as a string.\n * @typedoc\n */\n url?: string;\n /** Any body that you want to add to your request. Note that a GET or HEAD request may not have a body.\n * @typedoc\n */\n body?: BodyInit | null;\n};\n\nexport type ImmutableHeaders = Headers & { clone?(): Headers; toJSON(): [string, string][] };\n\n/**\n * Extends JavaScript's native {@link Request} object with additional\n * properties specific to the RequestManager's capabilities.\n *\n * @typedoc\n */\nexport type RequestInfo<T = unknown, RT = unknown> = Request & {\n /**\n * If provided, used instead of the AbortController auto-configured for each request by the RequestManager\n *\n * @typedoc\n */\n controller?: AbortController;\n\n /**\n * @see {@link CacheOptions}\n * @typedoc\n */\n cacheOptions?: CacheOptions<T>;\n store?: Store;\n\n op?: string;\n\n /**\n * The identifiers of the primary resources involved in the request\n * (if any). This may be used by handlers to perform transactional\n * operations on the store.\n *\n * @typedoc\n */\n records?: StableRecordIdentifier[];\n\n disableTestWaiter?: boolean;\n /**\n * data that a handler should convert into\n * the query (GET) or body (POST).\n *\n * Note: It is recommended that builders set query params\n * and body directly in most scenarios.\n *\n * @typedoc\n */\n data?: Record<string, unknown>;\n /**\n * options specifically intended for handlers\n * to utilize to process the request\n *\n * @typedoc\n */\n options?: Record<string, unknown>;\n\n [RequestSignature]?: RT;\n\n [EnableHydration]?: boolean;\n};\n\n/**\n * Immutable version of {@link RequestInfo}. This is what is passed to handlers.\n *\n * @typedoc\n */\nexport type ImmutableRequestInfo<T = unknown, RT = unknown> = Readonly<Omit<RequestInfo<T, RT>, 'controller'>> & {\n readonly cacheOptions?: Readonly<CacheOptions<T>>;\n readonly headers?: ImmutableHeaders;\n readonly data?: Readonly<Record<string, unknown>>;\n readonly options?: Readonly<Record<string, unknown>>;\n\n /** Whether the request body has been read.\n * @typedoc\n */\n readonly bodyUsed?: boolean;\n};\n\nexport interface ResponseInfo {\n readonly headers: ImmutableHeaders; // to do, maybe not this?\n readonly ok: boolean;\n readonly redirected: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly type: ResponseType;\n readonly url: string;\n}\n\nexport interface RequestContext {\n /**\n * @see {@link ImmutableRequestInfo}\n * @typedoc\n */\n request: ImmutableRequestInfo;\n id: number;\n\n setStream(stream: ReadableStream | Promise<ReadableStream | null>): void;\n setResponse(response: Response | ResponseInfo | null): void;\n}\n"],"names":["SkipCache","getOrSetUniversal","Symbol","for","EnableHydration","IS_FUTURE","getOrSetGlobal","STRUCTURED"],"mappings":";;AASaA,MAAAA,SAAS,GAAGC,iBAAiB,CAAC,WAAW,EAAEC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AACtEC,MAAAA,eAAe,GAAGH,iBAAiB,CAAC,iBAAiB,EAAEC,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAC;AAC9F,MAAME,SAAS,GAAGC,cAAc,CAAC,WAAW,EAAEJ,MAAM,CAAC,WAAW,CAAC;AACjE,MAAMK,UAAU,GAAGD,cAAc,CAAC,KAAK,EAAEJ,MAAM,CAAC,KAAK,CAAC;;AAc7D;AACA;AACA;AACA;AACA;;AAuKA;AACA;AACA;AACA;AACA;AACA;AACA;;AA8DA;AACA;AACA;AACA;AACA;AACA;;AAmDA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"request.js","sources":["../src/request.ts"],"sourcesContent":["import { getOrSetGlobal, getOrSetUniversal } from './-private';\nimport type { StableRecordIdentifier } from './identifier';\nimport type { QueryParamsSerializationOptions } from './params';\nimport type { ExtractSuggestedCacheTypes, Includes, TypedRecordInstance, TypeFromInstanceOrString } from './record';\nimport type { ResourceIdentifierObject } from './spec/json-api-raw';\nimport type { RequestSignature } from './symbols';\n\ntype Store = unknown;\n\nexport const SkipCache: '___(unique) Symbol(SkipCache)' = getOrSetUniversal('SkipCache', Symbol.for('wd:skip-cache'));\nexport const EnableHydration: '___(unique) Symbol(EnableHydration)' = getOrSetUniversal(\n 'EnableHydration',\n Symbol.for('wd:enable-hydration')\n);\nexport const IS_FUTURE: '___(unique) Symbol(IS_FUTURE)' = getOrSetGlobal('IS_FUTURE', Symbol('IS_FUTURE'));\nexport const STRUCTURED: '___(unique) Symbol(DOC)' = getOrSetGlobal('DOC', Symbol('DOC'));\n\nexport type HTTPMethod =\n | 'QUERY'\n | 'GET'\n | 'OPTIONS'\n | 'POST'\n | 'PUT'\n | 'PATCH'\n | 'DELETE'\n | 'HEAD'\n | 'CONNECT'\n | 'TRACE';\n\n/**\n * Use these options to adjust CacheHandler behavior for a request.\n *\n * @typedoc\n */\nexport type CacheOptions<T = unknown> = {\n /**\n * A key that uniquely identifies this request. If not present, the url wil be used\n * as the key for any GET request, while all other requests will not be cached.\n *\n * @typedoc\n */\n key?: string;\n /**\n * If true, the request will be made even if a cached response is present\n * and not expired.\n *\n * @typedoc\n */\n reload?: boolean;\n /**\n * If true, and a cached response is present and not expired, the request\n * will be made in the background and the cached response will be returned.\n *\n * @typedoc\n */\n backgroundReload?: boolean;\n /**\n * Useful for metadata around when to invalidate the cache. Typically used\n * by strategies that invalidate requests by resource type when a new resource\n * of that type has been created. See the CachePolicy implementation\n * provided by `@ember-data/request-utils` for an example.\n *\n * It is recommended to only use this for query/queryRecord requests where\n * new records created later would affect the results, though using it for\n * findRecord requests is also supported if desired where it may be useful\n * when a create may affect the result of a sideloaded relationship.\n *\n * Generally it is better to patch the cache directly for relationship updates\n * than to invalidate findRecord requests for one.\n *\n * @typedoc\n */\n types?: T extends TypedRecordInstance ? ExtractSuggestedCacheTypes<T>[] : string[];\n\n /**\n * If true, the request will never be handled by the cache-manager and thus\n * will never resolve from cache nor update the cache.\n *\n * Generally this is only used for legacy request that manage resource cache\n * updates in a non-standard way via the LegacyNetworkHandler.\n *\n * @typedoc\n */\n [SkipCache]?: boolean;\n};\nexport type FindRecordRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions?: CacheOptions<T>;\n op: 'findRecord';\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type QueryRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions?: CacheOptions<T>;\n op: 'query';\n [RequestSignature]?: RT;\n};\n\nexport type PostQueryRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'POST' | 'QUERY';\n headers: Headers;\n body?: string | BodyInit | FormData;\n cacheOptions: CacheOptions<T> & { key: string };\n op: 'query';\n [RequestSignature]?: RT;\n};\n\nexport type DeleteRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'DELETE';\n headers: Headers;\n op: 'deleteRecord';\n body?: string | BodyInit | FormData;\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\ntype ImmutableRequest<T> = Readonly<T> & {\n readonly headers: ImmutableHeaders;\n readonly records: [StableRecordIdentifier];\n};\n\nexport type UpdateRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'PATCH' | 'PUT';\n headers: Headers;\n op: 'updateRecord';\n body?: string | BodyInit | FormData;\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type CreateRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'POST';\n headers: Headers;\n op: 'createRecord';\n body?: string | BodyInit | FormData;\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type ImmutableDeleteRequestOptions = ImmutableRequest<DeleteRequestOptions>;\nexport type ImmutableUpdateRequestOptions = ImmutableRequest<UpdateRequestOptions>;\nexport type ImmutableCreateRequestOptions = ImmutableRequest<CreateRequestOptions>;\n\nexport type RemotelyAccessibleIdentifier<T extends string = string> = {\n id: string;\n type: T;\n lid?: string;\n};\n\nexport type ConstrainedRequestOptions = {\n reload?: boolean;\n backgroundReload?: boolean;\n host?: string;\n namespace?: string;\n resourcePath?: string;\n urlParamsSettings?: QueryParamsSerializationOptions;\n};\n\nexport type FindRecordOptions<T = unknown> = ConstrainedRequestOptions & {\n include?: T extends TypedRecordInstance ? Includes<T>[] : string | string[];\n};\n\nexport interface StructuredDataDocument<T> {\n [STRUCTURED]?: true;\n /**\n * @see {@link ImmutableRequestInfo}\n * @typedoc\n */\n request: ImmutableRequestInfo;\n response: Response | ResponseInfo | null;\n content: T;\n}\nexport interface StructuredErrorDocument<T = unknown> extends Error {\n [STRUCTURED]?: true;\n request: ImmutableRequestInfo;\n response: Response | ResponseInfo | null;\n error: string | object;\n content?: T;\n}\nexport type StructuredDocument<T> = StructuredDataDocument<T> | StructuredErrorDocument<T>;\n\n/**\n * JavaScript's native Request class.\n *\n * EmberData provides our own typings due to incompleteness in the native typings.\n *\n * @typedoc\n */\ntype Request = {\n /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.\n * @typedoc\n */\n cache?: RequestCache;\n /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.\n * @typedoc\n */\n credentials?: RequestCredentials;\n /** Returns the kind of resource requested by request, e.g., \"document\" or \"script\".\n * @typedoc\n */\n destination?: RequestDestination;\n /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the \"Host\" header.\n * @typedoc\n */\n headers?: Headers;\n /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]\n * @typedoc\n */\n integrity?: string;\n /** Returns a boolean indicating whether or not request can outlive the global in which it was created.\n * @typedoc\n */\n keepalive?: boolean;\n /** Returns request's HTTP method, which is \"GET\" by default.\n * @typedoc\n */\n method?: HTTPMethod;\n /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.\n * @typedoc\n */\n mode?: RequestMode;\n /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.\n * @typedoc\n */\n redirect?: RequestRedirect;\n /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and \"about:client\" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.\n * @typedoc\n */\n referrer?: string;\n /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.\n * @typedoc\n */\n referrerPolicy?: ReferrerPolicy;\n /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.\n * @typedoc\n */\n signal?: AbortSignal;\n /** Returns the URL of request as a string.\n * @typedoc\n */\n url?: string;\n /** Any body that you want to add to your request. Note that a GET or HEAD request may not have a body.\n * @typedoc\n */\n body?: BodyInit | null;\n};\n\nexport interface ImmutableHeaders extends Headers {\n clone?(): Headers;\n toJSON(): [string, string][];\n}\n\n/**\n * Extends JavaScript's native {@link Request} object with additional\n * properties specific to the RequestManager's capabilities.\n *\n * @typedoc\n */\nexport type RequestInfo<T = unknown, RT = unknown> = Request & {\n /**\n * If provided, used instead of the AbortController auto-configured for each request by the RequestManager\n *\n * @typedoc\n */\n controller?: AbortController;\n\n /**\n * @see {@link CacheOptions}\n * @typedoc\n */\n cacheOptions?: CacheOptions<T>;\n store?: Store;\n\n op?: string;\n\n /**\n * The identifiers of the primary resources involved in the request\n * (if any). This may be used by handlers to perform transactional\n * operations on the store.\n *\n * @typedoc\n */\n records?: StableRecordIdentifier[];\n\n disableTestWaiter?: boolean;\n /**\n * data that a handler should convert into\n * the query (GET) or body (POST).\n *\n * Note: It is recommended that builders set query params\n * and body directly in most scenarios.\n *\n * @typedoc\n */\n data?: Record<string, unknown>;\n /**\n * options specifically intended for handlers\n * to utilize to process the request\n *\n * @typedoc\n */\n options?: Record<string, unknown>;\n\n [RequestSignature]?: RT;\n\n [EnableHydration]?: boolean;\n};\n\n/**\n * Immutable version of {@link RequestInfo}. This is what is passed to handlers.\n *\n * @typedoc\n */\nexport type ImmutableRequestInfo<T = unknown, RT = unknown> = Readonly<Omit<RequestInfo<T, RT>, 'controller'>> & {\n readonly cacheOptions?: Readonly<CacheOptions<T>>;\n readonly headers?: ImmutableHeaders;\n readonly data?: Readonly<Record<string, unknown>>;\n readonly options?: Readonly<Record<string, unknown>>;\n\n /** Whether the request body has been read.\n * @typedoc\n */\n readonly bodyUsed?: boolean;\n};\n\nexport interface ResponseInfo {\n readonly headers: ImmutableHeaders; // to do, maybe not this?\n readonly ok: boolean;\n readonly redirected: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly type: ResponseType;\n readonly url: string;\n}\n\nexport interface RequestContext {\n /**\n * @see {@link ImmutableRequestInfo}\n * @typedoc\n */\n request: ImmutableRequestInfo;\n id: number;\n\n setStream(stream: ReadableStream | Promise<ReadableStream | null>): void;\n setResponse(response: Response | ResponseInfo | null): void;\n}\n"],"names":["SkipCache","getOrSetUniversal","Symbol","for","EnableHydration","IS_FUTURE","getOrSetGlobal","STRUCTURED"],"mappings":";;AASaA,MAAAA,SAA0C,GAAGC,iBAAiB,CAAC,WAAW,EAAEC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AACvGC,MAAAA,eAAsD,GAAGH,iBAAiB,CACrF,iBAAiB,EACjBC,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAClC;AACO,MAAME,SAA0C,GAAGC,cAAc,CAAC,WAAW,EAAEJ,MAAM,CAAC,WAAW,CAAC;AAClG,MAAMK,UAAqC,GAAGD,cAAc,CAAC,KAAK,EAAEJ,MAAM,CAAC,KAAK,CAAC;;AAcxF;AACA;AACA;AACA;AACA;;AAuKA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiEA;AACA;AACA;AACA;AACA;AACA;;AAmDA;AACA;AACA;AACA;AACA;;;;"}
@@ -0,0 +1,307 @@
1
+ /**
2
+ * @module @warp-drive/core-types
3
+ */
4
+
5
+ /**
6
+ * A generic "field" that can be used to define
7
+ * primitive value fields.
8
+ *
9
+ * Replaces "attribute" for primitive value fields.
10
+ * Can also be used to eject from deep-tracking of
11
+ * objects or arrays.
12
+ *
13
+ * A major difference between "field" and "attribute"
14
+ * is that "type" points to a legacy transform on
15
+ * "attribute" that a serializer *might* use, while
16
+ * "type" points to a new-style transform on "field"
17
+ * that a record implmentation *must* use.
18
+ *
19
+ * @typedoc
20
+ */
21
+
22
+ /**
23
+ * A field that can be used to alias one key to another
24
+ * key present in the cache version of the resource.
25
+ *
26
+ * Unlike DerivedField, an AliasField may write to its
27
+ * source when a record is in an editable mode.
28
+ *
29
+ * AliasFields may utilize a transform, specified by type,
30
+ * to pre/post process the field.
31
+ *
32
+ * An AliasField may also specify a `kind` via options.
33
+ * `kind` may be any other valid field kind other than
34
+ *
35
+ * - `@hash`
36
+ * - `@id`
37
+ * - `@local`
38
+ * - `derived`
39
+ *
40
+ * This allows an AliasField to rename any field in the cache.
41
+ *
42
+ * Alias fields are generally intended to be used to support migrating
43
+ * between different schemas, though there are times where they are useful
44
+ * as a form of advanced derivation when used with a transform. For instance,
45
+ * an AliasField could be used to expose both a string and a Date version of the
46
+ * same field, with both being capable of being written to.
47
+ *
48
+ * @typedoc
49
+ */
50
+
51
+ /**
52
+ * Represents a field whose value is the primary
53
+ * key of the resource.
54
+ *
55
+ * This allows any field to serve as the primary
56
+ * key while still being able to drive identity
57
+ * needs within the system.
58
+ *
59
+ * This is useful for resources that use for instance
60
+ * 'uuid', 'urn' or 'entityUrn' or 'primaryKey' as their
61
+ * primary key field instead of 'id'.
62
+ *
63
+ * @typedoc
64
+ */
65
+
66
+ /**
67
+ * Represents a specialized field whose computed value
68
+ * will be used as the primary key of a schema-object
69
+ * for serializability and comparison purposes.
70
+ *
71
+ * This field functions similarly to derived fields in that
72
+ * it is non-settable, derived state but differs in that
73
+ * it is only able to compute off of cache state and is given
74
+ * no access to a record instance.
75
+ *
76
+ * This means that if a hashing function wants to compute its value
77
+ * taking into account transformations and derivations it must
78
+ * perform those itself.
79
+ *
80
+ * A schema-array can declare its "key" value to be `@hash` if
81
+ * a schema-object has such a field.
82
+ *
83
+ * Only one hash field is permittable per schema-object, and
84
+ * it should be placed in the `ResourceSchema`'s `@id` field
85
+ * in place of an `IdentityField`.
86
+ *
87
+ * @typedoc
88
+ */
89
+
90
+ /**
91
+ * Represents a field whose value is a local
92
+ * value that is not stored in the cache, nor
93
+ * is it sent to the server.
94
+ *
95
+ * Local fields can be written to, and their
96
+ * value is both memoized and reactive (though
97
+ * not deep-tracked).
98
+ *
99
+ * Because their state is not derived from the cache
100
+ * data or the server, they represent a divorced
101
+ * uncanonical source of state.
102
+ *
103
+ * For this reason Local fields should be used sparingly.
104
+ *
105
+ * Currently, while we document this feature here,
106
+ * only allow our own SchemaRecord should utilize them
107
+ * and the feature should be considered private.
108
+ *
109
+ * Example use cases that drove the creation of local
110
+ * fields are states like `isDestroying` and `isDestroyed`
111
+ * which are specific to a record instance but not
112
+ * stored in the cache. We wanted to be able to drive
113
+ * these fields from schema the same as all other fields.
114
+ *
115
+ * Don't make us regret this decision.
116
+ *
117
+ * @typedoc
118
+ */
119
+
120
+ /**
121
+ * Represents a field whose value is an object
122
+ * with keys pointing to values that are primitive
123
+ * values.
124
+ *
125
+ * If values of the keys are not primitives, or
126
+ * if the key/value pairs have well-defined shape,
127
+ * use 'schema-object' instead.
128
+ *
129
+ * @typedoc
130
+ */
131
+
132
+ /**
133
+ * Represents a field whose value is an object
134
+ * with a well-defined structure described by
135
+ * a non-resource schema.
136
+ *
137
+ * If the object's structure is not well-defined,
138
+ * use 'object' instead.
139
+ *
140
+ * @typedoc
141
+ */
142
+
143
+ /**
144
+ * Represents a field whose value is an array
145
+ * of primitive values.
146
+ *
147
+ * If the array's elements are not primitive
148
+ * values, use 'schema-array' instead.
149
+ *
150
+ * @typedoc
151
+ */
152
+
153
+ /**
154
+ * Represents a field whose value is an array
155
+ * of objects with a well-defined structure
156
+ * described by a non-resource schema.
157
+ *
158
+ * If the array's elements are not well-defined,
159
+ * use 'array' instead.
160
+ *
161
+ * @typedoc
162
+ */
163
+
164
+ /**
165
+ * Represents a field whose value is derived
166
+ * from other fields in the schema.
167
+ *
168
+ * The value is read-only, and is not stored
169
+ * in the cache, nor is it sent to the server.
170
+ *
171
+ * Usage of derived fields should be minimized
172
+ * to scenarios where the derivation is known
173
+ * to be safe. For instance, derivations that
174
+ * required fields that are not always loaded
175
+ * or that require access to related resources
176
+ * that may not be loaded should be avoided.
177
+ *
178
+ * @typedoc
179
+ */
180
+
181
+ /**
182
+ * Represents a field that is a reference to
183
+ * another resource.
184
+ *
185
+ * @typedoc
186
+ */
187
+
188
+ /**
189
+ * Represents a field that is a reference to
190
+ * a collection of other resources, potentially
191
+ * paginate.
192
+ *
193
+ * @typedoc
194
+ */
195
+
196
+ /**
197
+ * > [!CAUTION]
198
+ * > This Field is LEGACY
199
+ *
200
+ * A generic "field" that can be used to define
201
+ * primitive value fields.
202
+ *
203
+ * If the field points to an object or array,
204
+ * it will not be deep-tracked.
205
+ *
206
+ * Transforms when defined are legacy transforms
207
+ * that a serializer *might* use, but their usage
208
+ * is not guaranteed.
209
+ *
210
+ * @typedoc
211
+ */
212
+
213
+ /**
214
+ * > [!CAUTION]
215
+ * > This Field is LEGACY
216
+ *
217
+ * Represents a field that is a reference to
218
+ * another resource.
219
+ *
220
+ * This is the legacy version of the `ResourceField`.
221
+ *
222
+ * @typedoc
223
+ */
224
+
225
+ /**
226
+ * > [!CAUTION]
227
+ * > This Field is LEGACY
228
+ *
229
+ * Represents a field that is a reference to
230
+ * a collection of other resources.
231
+ *
232
+ * This is the legacy version of the `CollectionField`.
233
+ *
234
+ * @typedoc
235
+ */
236
+
237
+ /**
238
+ * Represents a schema for a primary resource.
239
+ *
240
+ * Primary resources are objects with a unique identity of their
241
+ * own which may allow them to appear in relationships, or is multiple
242
+ * response document.
243
+ *
244
+ * @typedoc
245
+ */
246
+
247
+ /**
248
+ * Represents a schema for an object that is not
249
+ * a primary resource (has no unique identity of its own).
250
+ *
251
+ * ObjectSchemas may not currently contain relationships.
252
+ *
253
+ * @typedoc
254
+ */
255
+
256
+ /**
257
+ * A no-op type utility that enables type-checking resource schema
258
+ * definitions.
259
+ *
260
+ * Will return the passed in schema.
261
+ *
262
+ * This will not validate relationship inverses or related types,
263
+ * as doing so would require a full schema graph to be passed in
264
+ * and no cycles in the graph to be present.
265
+ *
266
+ * @method resourceSchema
267
+ * @static
268
+ * @for @warp-drive/core-types
269
+ * @param {ResourceSchema} schema
270
+ * @returns {ResourceSchema} the passed in schema
271
+ * @public
272
+ */
273
+ function resourceSchema(schema) {
274
+ return schema;
275
+ }
276
+
277
+ /**
278
+ * A no-op type utility that enables type-checking object schema
279
+ * definitions.
280
+ *
281
+ * Will return the passed in schema.
282
+ *
283
+ * @method objectSchema
284
+ * @static
285
+ * @for @warp-drive/core-types
286
+ * @param {ObjectSchema} schema
287
+ * @returns {ObjectSchema} the passed in schema
288
+ * @public
289
+ */
290
+ function objectSchema(schema) {
291
+ return schema;
292
+ }
293
+
294
+ /**
295
+ * A type utility to narrow a schema to a ResourceSchema
296
+ *
297
+ * @method isResourceSchema
298
+ * @static
299
+ * @for @warp-drive/core-types
300
+ * @param schema
301
+ * @returns {boolean}
302
+ * @public
303
+ */
304
+ function isResourceSchema(schema) {
305
+ return schema?.identity?.kind === '@id';
306
+ }
307
+ export { isResourceSchema, objectSchema, resourceSchema };
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"fields.js","sources":["../../src/schema/fields.ts"],"sourcesContent":["/**\n * @module @warp-drive/core-types\n */\nimport type { ObjectValue, PrimitiveValue } from '../json/raw';\n\n/**\n * A generic \"field\" that can be used to define\n * primitive value fields.\n *\n * Replaces \"attribute\" for primitive value fields.\n * Can also be used to eject from deep-tracking of\n * objects or arrays.\n *\n * A major difference between \"field\" and \"attribute\"\n * is that \"type\" points to a legacy transform on\n * \"attribute\" that a serializer *might* use, while\n * \"type\" points to a new-style transform on \"field\"\n * that a record implmentation *must* use.\n *\n * @typedoc\n */\nexport type GenericField = {\n kind: 'field';\n name: string;\n /**\n * the name of the transform to use, if any\n * @typedoc\n */\n type?: string;\n /**\n * Options to pass to the transform, if any\n *\n * Must comply to the specific transform's options\n * schema.\n *\n * @typedoc\n */\n options?: ObjectValue;\n};\n\n/**\n * A field that can be used to alias one key to another\n * key present in the cache version of the resource.\n *\n * Unlike DerivedField, an AliasField may write to its\n * source when a record is in an editable mode.\n *\n * AliasFields may utilize a transform, specified by type,\n * to pre/post process the field.\n *\n * An AliasField may also specify a `kind` via options.\n * `kind` may be any other valid field kind other than\n *\n * - `@hash`\n * - `@id`\n * - `@local`\n * - `derived`\n *\n * This allows an AliasField to rename any field in the cache.\n *\n * Alias fields are generally intended to be used to support migrating\n * between different schemas, though there are times where they are useful\n * as a form of advanced derivation when used with a transform. For instance,\n * an AliasField could be used to expose both a string and a Date version of the\n * same field, with both being capable of being written to.\n *\n * @typedoc\n */\nexport type AliasField = {\n kind: 'alias';\n name: string;\n type: null; // should always be null\n\n /**\n * The field def for which this is an alias.\n *\n * @typedoc\n */\n options:\n | GenericField\n | ObjectField\n | SchemaObjectField\n | ArrayField\n | SchemaArrayField\n | ResourceField\n | CollectionField\n | LegacyAttributeField\n | LegacyBelongsToField\n | LegacyHasManyField;\n};\n\n/**\n * Represents a field whose value is the primary\n * key of the resource.\n *\n * This allows any field to serve as the primary\n * key while still being able to drive identity\n * needs within the system.\n *\n * This is useful for resources that use for instance\n * 'uuid', 'urn' or 'entityUrn' or 'primaryKey' as their\n * primary key field instead of 'id'.\n *\n * @typedoc\n */\nexport type IdentityField = {\n kind: '@id';\n\n /**\n * The name of the field that serves as the\n * primary key for the resource.\n *\n * @typedoc\n */\n name: string;\n};\n\n/**\n * Represents a specialized field whose computed value\n * will be used as the primary key of a schema-object\n * for serializability and comparison purposes.\n *\n * This field functions similarly to derived fields in that\n * it is non-settable, derived state but differs in that\n * it is only able to compute off of cache state and is given\n * no access to a record instance.\n *\n * This means that if a hashing function wants to compute its value\n * taking into account transformations and derivations it must\n * perform those itself.\n *\n * A schema-array can declare its \"key\" value to be `@hash` if\n * a schema-object has such a field.\n *\n * Only one hash field is permittable per schema-object, and\n * it should be placed in the `ResourceSchema`'s `@id` field\n * in place of an `IdentityField`.\n *\n * @typedoc\n */\nexport type HashField = {\n kind: '@hash';\n\n /**\n * The name of the field that serves as the\n * hash for the resource.\n *\n * Only required if access to this value by\n * the UI is desired, it can be `null` otherwise.\n *\n * @typedoc\n */\n name: string | null;\n\n /**\n * The name of a function to run to compute the hash.\n * The function will only have access to the cached\n * data for the record.\n *\n * @typedoc\n */\n type: string;\n\n /**\n * Any options that should be provided to the hash\n * function.\n *\n * @typedoc\n */\n options?: ObjectValue;\n};\n\n/**\n * Represents a field whose value is a local\n * value that is not stored in the cache, nor\n * is it sent to the server.\n *\n * Local fields can be written to, and their\n * value is both memoized and reactive (though\n * not deep-tracked).\n *\n * Because their state is not derived from the cache\n * data or the server, they represent a divorced\n * uncanonical source of state.\n *\n * For this reason Local fields should be used sparingly.\n *\n * Currently, while we document this feature here,\n * only allow our own SchemaRecord should utilize them\n * and the feature should be considered private.\n *\n * Example use cases that drove the creation of local\n * fields are states like `isDestroying` and `isDestroyed`\n * which are specific to a record instance but not\n * stored in the cache. We wanted to be able to drive\n * these fields from schema the same as all other fields.\n *\n * Don't make us regret this decision.\n *\n * @typedoc\n */\nexport type LocalField = {\n kind: '@local';\n name: string;\n /**\n * Not currently utilized, we are considering\n * allowing transforms to operate on local fields\n *\n * @typedoc\n */\n type?: string;\n options?: { defaultValue?: PrimitiveValue };\n};\n\n/**\n * Represents a field whose value is an object\n * with keys pointing to values that are primitive\n * values.\n *\n * If values of the keys are not primitives, or\n * if the key/value pairs have well-defined shape,\n * use 'schema-object' instead.\n *\n * @typedoc\n */\nexport type ObjectField = {\n kind: 'object';\n name: string;\n\n /**\n * The name of a transform to pass the entire object\n * through before displaying or serializing it.\n *\n * @typedoc\n */\n type?: string;\n\n /**\n * Options to pass to the transform, if any\n *\n * Must comply to the specific transform's options\n * schema.\n *\n * @typedoc\n */\n options?: ObjectValue;\n};\n\n/**\n * Represents a field whose value is an object\n * with a well-defined structure described by\n * a non-resource schema.\n *\n * If the object's structure is not well-defined,\n * use 'object' instead.\n *\n * @typedoc\n */\nexport type SchemaObjectField = {\n kind: 'schema-object';\n name: string;\n\n /**\n * The name of the schema that describes the\n * structure of the object.\n *\n * These schemas\n *\n * @typedoc\n */\n type: string;\n\n options?: {\n /**\n * Whether this SchemaObject is Polymorphic.\n *\n * If the SchemaObject is polymorphic, `options.type` must also be supplied.\n *\n * @typedoc\n */\n polymorphic?: boolean;\n\n /**\n * If the SchemaObject is Polymorphic, the key on the raw cache data to use\n * as the \"resource-type\" value for the schema-object.\n *\n * Defaults to \"type\".\n *\n * @typedoc\n */\n type?: string;\n };\n};\n\n/**\n * Represents a field whose value is an array\n * of primitive values.\n *\n * If the array's elements are not primitive\n * values, use 'schema-array' instead.\n *\n * @typedoc\n */\nexport type ArrayField = {\n kind: 'array';\n name: string;\n\n /**\n * The name of a transform to pass each item\n * in the array through before displaying or\n * or serializing it.\n *\n * @typedoc\n */\n type?: string;\n\n /**\n * Options to pass to the transform, if any\n *\n * Must comply to the specific transform's options\n * schema.\n *\n * @typedoc\n */\n options?: ObjectValue;\n};\n\n/**\n * Represents a field whose value is an array\n * of objects with a well-defined structure\n * described by a non-resource schema.\n *\n * If the array's elements are not well-defined,\n * use 'array' instead.\n *\n * @typedoc\n */\nexport type SchemaArrayField = {\n kind: 'schema-array';\n name: string;\n\n /**\n * The name of the schema that describes the\n * structure of the objects in the array.\n *\n * @typedoc\n */\n type: string;\n\n /**\n * Options for configuring the behavior of the\n * SchemaArray.\n *\n * @typedoc\n */\n\n /**\n * Options for configuring the behavior of the\n * SchemaArray.\n *\n * @typedoc\n */\n options?: {\n /**\n * Configures how the SchemaArray determines whether\n * an object in the cache is the same as an object\n * previously used to instantiate one of the schema-objects\n * it contains.\n *\n * The default is `'@identity'`.\n *\n * Valid options are:\n *\n * - `'@identity'` (default) : the cached object's referential identity will be used.\n * This may result in significant instability when resource data is updated from the API\n * - `'@index'` : the cached object's index in the array will be used.\n * This is only a good choice for arrays that rarely if ever change membership\n * - `'@hash'` : will lookup the `@hash` function supplied in the ResourceSchema for\n * The contained schema-object and use the computed result to determine and compare identity.\n * - <field-name> (string) : the name of a field to use as the key, only GenericFields (kind `field`)\n * Are valid field names for this purpose. The cache state without transforms applied will be\n * used when comparing values. The field value should be unique enough to guarantee two schema-objects\n * of the same type will not collide.\n *\n * @typedoc\n */\n key?: '@identity' | '@index' | '@hash' | string;\n\n /**\n * Whether this SchemaArray is Polymorphic.\n *\n * If the SchemaArray is polymorphic, `options.type` must also be supplied.\n *\n * @typedoc\n */\n polymorphic?: boolean;\n\n /**\n * If the SchemaArray is Polymorphic, the key on the raw cache data to use\n * as the \"resource-type\" value for the schema-object.\n *\n * Defaults to \"type\".\n *\n * @typedoc\n */\n type?: string;\n };\n};\n\n/**\n * Represents a field whose value is derived\n * from other fields in the schema.\n *\n * The value is read-only, and is not stored\n * in the cache, nor is it sent to the server.\n *\n * Usage of derived fields should be minimized\n * to scenarios where the derivation is known\n * to be safe. For instance, derivations that\n * required fields that are not always loaded\n * or that require access to related resources\n * that may not be loaded should be avoided.\n *\n * @typedoc\n */\nexport type DerivedField = {\n kind: 'derived';\n name: string;\n\n /**\n * The name of the derivation to use.\n *\n * Derivations are functions that take the\n * record, options, and the name of the field\n * as arguments, and return the derived value.\n *\n * Derivations are memoized, and are only\n * recomputed when the fields they depend on\n * change.\n *\n * Derivations are not stored in the cache,\n * and are not sent to the server.\n *\n * Derivation functions must be explicitly\n * registered with the schema service.\n *\n * @typedoc\n */\n type: string;\n\n /**\n * Options to pass to the derivation, if any\n *\n * Must comply to the specific derivation's\n * options schema.\n *\n * @typedoc\n */\n options?: ObjectValue;\n};\n\n/**\n * Represents a field that is a reference to\n * another resource.\n *\n * @typedoc\n */\nexport type ResourceField = {\n kind: 'resource';\n name: string;\n\n /**\n * The name of the resource that this field\n * refers to. In the case of a polymorphic\n * relationship, this should be the trait\n * or abstract type.\n *\n * @typedoc\n */\n type: string;\n\n /**\n * Options for resources are optional. If\n * not present, all options are presumed\n * to be falsey\n *\n * @typedoc\n */\n options?: {\n /**\n * Whether the relationship is async\n *\n * If true, it is expected that the cache\n * data for this field will contain a link\n * that can be used to fetch the related\n * resource when needed.\n *\n * @typedoc\n */\n async?: boolean;\n\n /**\n * The name of the inverse field on the\n * related resource that points back to\n * this field on this resource to form a\n * bidirectional relationship.\n *\n * If null, the relationship is unidirectional.\n *\n * @typedoc\n */\n inverse?: string | null;\n\n /**\n * If this field is satisfying a polymorphic\n * relationship on another resource, then this\n * should be set to the trait or abstract type\n * that this resource implements.\n *\n * @typedoc\n */\n as?: string;\n\n /**\n * Whether this field is a polymorphic relationship,\n * meaning that it can point to multiple types of\n * resources so long as they implement the trait\n * or abstract type specified in `type`.\n *\n * @typedoc\n */\n polymorphic?: boolean;\n };\n};\n\n/**\n * Represents a field that is a reference to\n * a collection of other resources, potentially\n * paginate.\n *\n * @typedoc\n */\nexport type CollectionField = {\n kind: 'collection';\n name: string;\n\n /**\n * The name of the resource that this field\n * refers to. In the case of a polymorphic\n * relationship, this should be the trait\n * or abstract type.\n *\n * @typedoc\n */\n type: string;\n\n /**\n * Options for resources are optional. If\n * not present, all options are presumed\n * to be falsey\n *\n * @typedoc\n */\n options?: {\n /**\n * Whether the relationship is async\n *\n * If true, it is expected that the cache\n * data for this field will contain links\n * that can be used to fetch the related\n * resources when needed.\n *\n * When false, it is expected that all related\n * resources are loaded together with this resource,\n * and that the cache data for this field will\n * contain the full list of pointers.\n *\n * When true, it is expected that the relationship\n * is paginated. If the relationship is not paginated,\n * then the cache data for \"page 1\" would contain the\n * full list of pointers, and loading \"page 1\" would\n * load all related resources.\n *\n * @typedoc\n */\n async?: boolean;\n\n /**\n * The name of the inverse field on the\n * related resource that points back to\n * this field on this resource to form a\n * bidirectional relationship.\n *\n * If null, the relationship is unidirectional.\n *\n * @typedoc\n */\n inverse?: string | null;\n\n /**\n * If this field is satisfying a polymorphic\n * relationship on another resource, then this\n * should be set to the trait or abstract type\n * that this resource implements.\n *\n * @typedoc\n */\n as?: string;\n\n /**\n * Whether this field is a polymorphic relationship,\n * meaning that it can point to multiple types of\n * resources so long as they implement the trait\n * or abstract type specified in `type`.\n *\n * @typedoc\n */\n polymorphic?: boolean;\n };\n};\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n *\n * A generic \"field\" that can be used to define\n * primitive value fields.\n *\n * If the field points to an object or array,\n * it will not be deep-tracked.\n *\n * Transforms when defined are legacy transforms\n * that a serializer *might* use, but their usage\n * is not guaranteed.\n *\n * @typedoc\n */\nexport type LegacyAttributeField = {\n kind: 'attribute';\n name: string;\n /**\n * The name of the transform to use, if any\n *\n * @typedoc\n */\n type?: string | null;\n /**\n * Options to pass to the transform, if any\n *\n * Must comply to the specific transform's options\n * schema.\n *\n * @typedoc\n */\n options?: ObjectValue;\n};\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n *\n * Represents a field that is a reference to\n * another resource.\n *\n * This is the legacy version of the `ResourceField`.\n *\n * @typedoc\n */\nexport type LegacyBelongsToField = {\n kind: 'belongsTo';\n name: string;\n\n /**\n * The name of the resource that this field\n * refers to. In the case of a polymorphic\n * relationship, this should be the trait\n * or abstract type.\n *\n * @typedoc\n */\n type: string;\n\n /**\n * Options for belongsTo are mandatory.\n *\n * @typedoc\n */\n options: {\n /**\n * Whether the relationship is async\n *\n * If true, it is expected that the cache\n * data for this field will contain a link\n * or a pointer that can be used to fetch\n * the related resource when needed.\n *\n * Pointers are highly discouraged.\n *\n * @typedoc\n */\n async: boolean;\n\n /**\n * The name of the inverse field on the\n * related resource that points back to\n * this field on this resource to form a\n * bidirectional relationship.\n *\n * If null, the relationship is unidirectional.\n *\n * @typedoc\n */\n inverse: string | null;\n\n /**\n * If this field is satisfying a polymorphic\n * relationship on another resource, then this\n * should be set to the trait or abstract type\n * that this resource implements.\n *\n * @typedoc\n */\n as?: string;\n\n /**\n * Whether this field is a polymorphic relationship,\n * meaning that it can point to multiple types of\n * resources so long as they implement the trait\n * or abstract type specified in `type`.\n *\n * @typedoc\n */\n polymorphic?: boolean;\n\n /**\n * Whether this field should ever make use of the legacy support infra\n * from @ember-data/model and the LegacyNetworkMiddleware for adapters and serializers.\n *\n * When true, none of the legacy support will be utilized. Sync relationships\n * will be expected to already have all their data. When reloading a sync relationship\n * you would be expected to have a `related link` available from a prior relationship\n * payload e.g.\n *\n * ```ts\n * {\n * data: {\n * type: 'user',\n * id: '2',\n * attributes: { name: 'Chris' },\n * relationships: {\n * bestFriend: {\n * links: { related: \"/users/1/bestFriend\" },\n * data: { type: 'user', id: '1' },\n * }\n * }\n * },\n * included: [\n * { type: 'user', id: '1', attributes: { name: 'Krystan' } }\n * ]\n * }\n * ```\n *\n * Async relationships will be loaded via their link if needed.\n *\n * @typedoc\n */\n linksMode?: true;\n\n /**\n * When omitted, the cache data for this field will\n * clear local state of all changes except for the\n * addition of records still in the \"new\" state any\n * time the remote data for this field is updated.\n *\n * When set to `false`, the cache data for this field\n * will instead intelligently commit any changes from\n * local state that are present in the remote data,\n * leaving any remaining changes in local state still.\n *\n * @typedoc\n */\n resetOnRemoteUpdate?: false;\n };\n};\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n *\n * Represents a field that is a reference to\n * a collection of other resources.\n *\n * This is the legacy version of the `CollectionField`.\n *\n * @typedoc\n */\nexport type LegacyHasManyField = {\n kind: 'hasMany';\n name: string;\n type: string;\n\n /**\n * Options for hasMany are mandatory.\n *\n * @typedoc\n */\n options: {\n /**\n * Whether the relationship is async\n *\n * If true, it is expected that the cache\n * data for this field will contain links\n * or pointers that can be used to fetch\n * the related resources when needed.\n *\n * When false, it is expected that all related\n * resources are loaded together with this resource,\n * and that the cache data for this field will\n * contain the full list of pointers.\n *\n * hasMany relationships do not support pagination.\n *\n * @typedoc\n */\n async: boolean;\n\n /**\n * The name of the inverse field on the\n * related resource that points back to\n * this field on this resource to form a\n * bidirectional relationship.\n *\n * If null, the relationship is unidirectional.\n *\n * @typedoc\n */\n inverse: string | null;\n\n /**\n * If this field is satisfying a polymorphic\n * relationship on another resource, then this\n * should be set to the trait or abstract type\n * that this resource implements.\n *\n * @typedoc\n */\n as?: string;\n\n /**\n * Whether this field is a polymorphic relationship,\n * meaning that it can point to multiple types of\n * resources so long as they implement the trait\n * or abstract type specified in `type`.\n *\n * @typedoc\n */\n polymorphic?: boolean;\n\n /**\n * Whether this field should ever make use of the legacy support infra\n * from @ember-data/model and the LegacyNetworkMiddleware for adapters and serializers.\n *\n * When true, none of the legacy support will be utilized. Sync relationships\n * will be expected to already have all their data. When reloading a sync relationship\n * you would be expected to have a `related link` available from a prior relationship\n * payload e.g.\n *\n * ```ts\n * {\n * data: {\n * type: 'user',\n * id: '2',\n * attributes: { name: 'Chris' },\n * relationships: {\n * bestFriends: {\n * links: { related: \"/users/1/bestFriends\" },\n * data: [ { type: 'user', id: '1' } ],\n * }\n * }\n * },\n * included: [\n * { type: 'user', id: '1', attributes: { name: 'Krystan' } }\n * ]\n * }\n * ```\n *\n * Async relationships will be loaded via their link if needed.\n *\n * @typedoc\n */\n linksMode?: true;\n\n /**\n * When omitted, the cache data for this field will\n * clear local state of all changes except for the\n * addition of records still in the \"new\" state any\n * time the remote data for this field is updated.\n *\n * When set to `false`, the cache data for this field\n * will instead intelligently commit any changes from\n * local state that are present in the remote data,\n * leaving any remaining changes in local state still.\n *\n * @typedoc\n */\n resetOnRemoteUpdate?: false;\n };\n};\n\nexport type FieldSchema =\n | GenericField\n | AliasField\n | LocalField\n | ObjectField\n | SchemaObjectField\n | ArrayField\n | SchemaArrayField\n | DerivedField\n | ResourceField\n | CollectionField\n | LegacyAttributeField\n | LegacyBelongsToField\n | LegacyHasManyField;\n\nexport type ObjectFieldSchema =\n | GenericField\n | AliasField\n | LocalField\n | ObjectField\n | SchemaObjectField\n | ArrayField\n | SchemaArrayField\n | DerivedField;\n\n/**\n * Represents a schema for a primary resource.\n *\n * Primary resources are objects with a unique identity of their\n * own which may allow them to appear in relationships, or is multiple\n * response document.\n *\n * @typedoc\n */\nexport interface ResourceSchema {\n legacy?: boolean;\n\n /**\n * For primary resources, this should be an IdentityField\n *\n * for schema-objects, this should be either a HashField or null\n *\n * @typedoc\n */\n identity: IdentityField;\n\n /**\n * The name of the schema\n *\n * For cacheable resources, this should be the\n * primary resource type.\n *\n * For object schemas, this should be the name\n * of the object schema.\n *\n * The names of object and resource schemas share\n * a single namespace and must not conflict.\n *\n * We recommend a naming convention for object schemas\n * such as below for ensuring uniqueness:\n *\n * - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`\n * - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`\n * - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`\n *\n * @typedoc\n */\n type: string;\n\n /**\n * The fields that make up the shape of the resource\n *\n * @typedoc\n */\n fields: FieldSchema[];\n\n /**\n * A list of traits that this resource implements. The fields for these\n * traits should still be defined in the fields array.\n *\n * Each trait should be a string that matches the `type` of another\n * resource schema. The trait can be abstract and reference a resource\n * type that is never defined as a schema.\n *\n * @typedoc\n */\n traits?: string[];\n}\n\n/**\n * Represents a schema for an object that is not\n * a primary resource (has no unique identity of its own).\n *\n * ObjectSchemas may not currently contain relationships.\n *\n * @typedoc\n */\nexport interface ObjectSchema {\n /**\n * Either a HashField from which to calculate an identity or null\n *\n * In the case of `null`, the object's identity will be based\n * on the referential identity of the object in the cache itself\n * when an identity is needed.\n *\n * @typedoc\n */\n identity: HashField | null;\n\n /**\n * The name of the schema\n *\n * The names of object and resource schemas share\n * a single namespace and must not conflict.\n *\n * We recommend a naming convention for object schemas\n * such as below for ensuring uniqueness:\n *\n * - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`\n * - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`\n * - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`\n *\n * @typedoc\n */\n type: string;\n\n /**\n * The fields that make up the shape of the object\n *\n * @typedoc\n */\n fields: ObjectFieldSchema[];\n}\n\n/**\n * A no-op type utility that enables type-checking resource schema\n * definitions.\n *\n * Will return the passed in schema.\n *\n * This will not validate relationship inverses or related types,\n * as doing so would require a full schema graph to be passed in\n * and no cycles in the graph to be present.\n *\n * @method resourceSchema\n * @static\n * @for @warp-drive/core-types\n * @param {ResourceSchema} schema\n * @returns {ResourceSchema} the passed in schema\n * @public\n */\nexport function resourceSchema<T extends ResourceSchema>(schema: T): T {\n return schema;\n}\n\n/**\n * A no-op type utility that enables type-checking object schema\n * definitions.\n *\n * Will return the passed in schema.\n *\n * @method objectSchema\n * @static\n * @for @warp-drive/core-types\n * @param {ObjectSchema} schema\n * @returns {ObjectSchema} the passed in schema\n * @public\n */\nexport function objectSchema<T extends ObjectSchema>(schema: T): T {\n return schema;\n}\n\n/**\n * A type utility to narrow a schema to a ResourceSchema\n *\n * @method isResourceSchema\n * @static\n * @for @warp-drive/core-types\n * @param schema\n * @returns {boolean}\n * @public\n */\nexport function isResourceSchema(schema: ResourceSchema | ObjectSchema): schema is ResourceSchema {\n return schema?.identity?.kind === '@id';\n}\n\nexport type LegacyFieldSchema = LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField;\nexport type LegacyRelationshipSchema = LegacyBelongsToField | LegacyHasManyField;\n"],"names":["resourceSchema","schema","objectSchema","isResourceSchema","identity","kind"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqCA;AACA;AACA;AACA;AACA;AACA;;AAqEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAA2BC,MAAS,EAAK;AACrE,EAAA,OAAOA,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAAyBD,MAAS,EAAK;AACjE,EAAA,OAAOA,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,gBAAgBA,CAACF,MAAqC,EAA4B;AAChG,EAAA,OAAOA,MAAM,EAAEG,QAAQ,EAAEC,IAAI,KAAK,KAAK;AACzC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"symbols.js","sources":["../src/symbols.ts"],"sourcesContent":["import { getOrSetGlobal } from './-private';\n\n/*\n * @module @warp-drive/core-types\n */\nexport const RecordStore = getOrSetGlobal('Store', Symbol('Store'));\n\n/**\n * Symbol for the name of a resource, transformation\n * or derivation.\n *\n * ### With Resources\n *\n * This is an optional feature that can be used by\n * record implementations to provide a typescript\n * hint for the type of the resource.\n *\n * When used, EmberData and WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * ### With Derivations\n *\n * Required for derivations registered with\n * `store.registerDerivation(derivation)`.\n *\n * ```ts\n * function concat(record: object, options: ObjectValue | null, prop: string): string {}\n * concat[Name] = 'concat';\n * ```\n *\n * ### With Transforms\n *\n * Required for new-style transformations registered\n * with `store.registerTransform(transform)`.\n *\n * For legacy transforms, if not used,\n * `attr<Transform>('name')` will allow any string name.\n * `attr('name')` will always allow any string name.\n *\n * If used, `attr<Transform>('name')` will enforce\n * that the name is the same as the transform name.\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const Type = getOrSetGlobal('$type', Symbol('$type'));\n\n/**\n * Symbol for the type of a resource.\n *\n * This is an optional feature that can be used by\n * record implementations to provide a typescript\n * hint for the type of the resource.\n *\n * When used, EmberData and WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const ResourceType = Type;\n\n/**\n * Symbol for the name of a transform.\n *\n * This is an optional feature that can be used by\n * transform implementations to provide a typescript\n * hint for the name of the transform.\n *\n * If not used, `attr<Transform>('name')` will\n * allow any string name. `attr('name')` will always\n * allow any string name.\n *\n * If used, `attr<Transform>('name')` will enforce\n * that the name is the same as the transform name.\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const TransformName = Type;\n\n/**\n * Symbol for use by builders to indicate the return type\n * generic to use for store.request()\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const RequestSignature = getOrSetGlobal('RequestSignature', Symbol('RequestSignature'));\n"],"names":["RecordStore","getOrSetGlobal","Symbol","Type","ResourceType","TransformName","RequestSignature"],"mappings":";;AAEA;AACA;AACA;AACO,MAAMA,WAAW,GAAGC,cAAc,CAAC,OAAO,EAAEC,MAAM,CAAC,OAAO,CAAC;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,IAAI,GAAGF,cAAc,CAAC,OAAO,EAAEC,MAAM,CAAC,OAAO,CAAC;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,YAAY,GAAGD;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,aAAa,GAAGF;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,gBAAgB,GAAGL,cAAc,CAAC,kBAAkB,EAAEC,MAAM,CAAC,kBAAkB,CAAC;;;;"}
1
+ {"version":3,"file":"symbols.js","sources":["../src/symbols.ts"],"sourcesContent":["import { getOrSetGlobal } from './-private';\n\n/*\n * @module @warp-drive/core-types\n */\nexport const RecordStore: '___(unique) Symbol(Store)' = getOrSetGlobal('Store', Symbol('Store'));\n\n/**\n * Symbol for the name of a resource, transformation\n * or derivation.\n *\n * ### With Resources\n *\n * This is an optional feature that can be used by\n * record implementations to provide a typescript\n * hint for the type of the resource.\n *\n * When used, EmberData and WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * ### With Derivations\n *\n * Required for derivations registered with\n * `store.registerDerivation(derivation)`.\n *\n * ```ts\n * function concat(record: object, options: ObjectValue | null, prop: string): string {}\n * concat[Name] = 'concat';\n * ```\n *\n * ### With Transforms\n *\n * Required for new-style transformations registered\n * with `store.registerTransform(transform)`.\n *\n * For legacy transforms, if not used,\n * `attr<Transform>('name')` will allow any string name.\n * `attr('name')` will always allow any string name.\n *\n * If used, `attr<Transform>('name')` will enforce\n * that the name is the same as the transform name.\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const Type: '___(unique) Symbol($type)' = getOrSetGlobal('$type', Symbol('$type'));\n\n/**\n * Symbol for the type of a resource.\n *\n * This is an optional feature that can be used by\n * record implementations to provide a typescript\n * hint for the type of the resource.\n *\n * When used, EmberData and WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const ResourceType: '___(unique) Symbol($type)' = Type;\n\n/**\n * Symbol for the name of a transform.\n *\n * This is an optional feature that can be used by\n * transform implementations to provide a typescript\n * hint for the name of the transform.\n *\n * If not used, `attr<Transform>('name')` will\n * allow any string name. `attr('name')` will always\n * allow any string name.\n *\n * If used, `attr<Transform>('name')` will enforce\n * that the name is the same as the transform name.\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const TransformName: '___(unique) Symbol($type)' = Type;\n\n/**\n * Symbol for use by builders to indicate the return type\n * generic to use for store.request()\n *\n * @type {Symbol}\n * @typedoc\n */\nexport const RequestSignature: '___(unique) Symbol(RequestSignature)' = getOrSetGlobal(\n 'RequestSignature',\n Symbol('RequestSignature')\n);\n"],"names":["RecordStore","getOrSetGlobal","Symbol","Type","ResourceType","TransformName","RequestSignature"],"mappings":";;AAEA;AACA;AACA;AACO,MAAMA,WAAwC,GAAGC,cAAc,CAAC,OAAO,EAAEC,MAAM,CAAC,OAAO,CAAC;;AAE/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,IAAiC,GAAGF,cAAc,CAAC,OAAO,EAAEC,MAAM,CAAC,OAAO,CAAC;;AAExF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,YAAyC,GAAGD;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,aAA0C,GAAGF;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,gBAAwD,GAAGL,cAAc,CACpF,kBAAkB,EAClBC,MAAM,CAAC,kBAAkB,CAC3B;;;;"}
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
3
+ <path fill="#FFC474" d="m1096.3 402.82c-53.148-53.008-117.12-79.516-191.93-79.516-67.488 0-126.55 21.938-177.16 65.805-50.617 43.871-80.988 98.285-91.113 163.25l53.57 4.2188c14.625 0.28125 25.449 6.75 32.48 19.406h18.984c11.809 0 17.715 5.7617 17.715 17.293s-5.9062 17.293-17.715 17.293h-17.297c-6.75 14.344-18.137 21.797-34.168 22.359l-53.57 4.6406c10.125 64.68 40.496 118.95 91.113 162.82 50.617 43.871 109.68 65.805 177.16 65.805 74.805 0 138.78-26.574 191.93-79.723 53.152-53.148 79.727-116.98 79.727-191.51 0-75.086-26.574-139.13-79.727-192.14zm-79.422 185.27c0 2.9531 2.3906 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477 0-2.9492-2.3945-5.3438-5.3477-5.3438-2.9531 0-5.3438 2.3945-5.3438 5.3438zm-104.54-111.07c0 2.9531 2.3945 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477s-2.3945-5.3438-5.3477-5.3438c-2.9492 0-5.3438 2.3906-5.3438 5.3438zm-12.473 0c0 2.9531 2.3906 5.3477 5.3438 5.3477s5.3477-2.3945 5.3477-5.3477-2.3945-5.3438-5.3477-5.3438-5.3438 2.3906-5.3438 5.3438zm117.01 123.55c0 2.9492 2.3906 5.3438 5.3438 5.3438 2.9531 0 5.3477-2.3945 5.3477-5.3438 0-2.9531-2.3945-5.3477-5.3477-5.3477-2.9531 0-5.3438 2.3945-5.3438 5.3477zm-104.54 111.66c0 2.9531 2.3945 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477s-2.3945-5.3438-5.3477-5.3438c-2.9492 0-5.3438 2.3906-5.3438 5.3438zm-12.473 0c0 2.9531 2.3906 5.3477 5.3438 5.3477s5.3477-2.3945 5.3477-5.3477-2.3945-5.3438-5.3477-5.3438-5.3438 2.3906-5.3438 5.3438zm-848-318.48c14.062-2.5312 30.934-4.5 50.621-5.9062l-46.402-0.84375zm499.86 169.15c-8.7188-2.25-18.141-8.7188-28.266-19.402l-101.23-103.35h-111.36l173.79 126.12v4.2188c21.652 6.1836 44.008 3.6562 67.07-7.5938zm47.664-148.48c-0.84375 3.3711-2.8125 6.6055-5.9062 9.6992h-5.0625l-6.3242-5.0625h-79.305v-4.6367zm-5.9062-16.031c3.0938 3.0938 5.0625 6.4688 5.9062 10.125h-96.598v-4.6406h79.305l6.3242-5.4844zm-541.62 397.78 4.2188 6.7461 46.402-0.84375c-22.5-2.2461-39.371-4.2148-50.621-5.9023zm499.86-169.15c-23.062-11.531-45.418-14.062-67.07-7.5938v4.2188l-173.79 126.12h111.36l101.23-103.77c10.406-10.684 19.828-17.012 28.266-18.98zm47.664 148.48h-96.598v-4.6406h79.305l6.3242-5.4805h5.0625c3.0938 3.6523 5.0625 7.0273 5.9062 10.121zm-5.9062 15.609h-5.0625l-6.3242-5.0625h-79.305v-4.6406h96.598c-0.84375 3.0938-2.8125 6.3281-5.9062 9.7031zm-102.5 9.6992c3.6562 1.4062 7.4531 2.1094 11.391 2.1094h64.961c24.746 0 37.121-8.4336 37.121-25.309 0-8.4375-4.6406-14.691-13.922-18.77-9.2773-4.0781-17.012-6.1172-23.199-6.1172h-64.961c-4.7812 0-8.5781 0.5625-11.391 1.6875h-333.66c-5.0625 0-28.543 1.6172-70.445 4.8516-41.902 3.2344-62.852 7.3828-62.852 12.441v11.812c0 4.5 20.949 8.5078 62.852 12.023 41.902 3.5156 65.383 5.2695 70.445 5.2695zm125.28-207.54h-42.602c-3.375 1.125-3.375 2.25 0 3.375h42.602zm-43.445 8.4375h-5.4844v-13.5h5.4844c17.152-6.1875 33.605-9.9844 49.352-11.391l4.6406-25.309 4.6406 0.42188c0.5625-4.2188 1.6875-10.262 3.375-18.137-28.684-0.5625-64.398 1.6875-107.14 6.75 3.6562 4.2148 7.4531 7.8711 11.391 10.965 4.7812 3.375 9.4219 5.625 13.918 6.75l12.656 2.9531-11.812 5.9062c-13.496 6.75-30.23 10.121-50.195 10.121-5.0625 0-8.5781-0.14062-10.547-0.42188-4.2188-0.5625-7.5898-1.1211-10.121-1.6836l-3.375-1.2656v-5.4844l-24.043-17.297c-41.34 5.625-69.32 8.5781-83.945 8.8594-31.496 0.28125-47.242 11.953-47.242 35.012 0 22.215 15.746 33.887 47.242 35.012 18.844 0.28125 46.824 3.2344 83.945 8.8594l24.043-17.297v-5.4844l3.375-1.2656c2.5312-0.84375 5.9023-1.4062 10.121-1.6875 1.9688-0.28125 5.4844-0.42187 10.547-0.42187 19.965 0 36.699 3.375 50.195 10.125l11.812 5.4844-12.656 3.375c-4.4961 0.84375-9.1367 3.0938-13.918 6.75-3.6562 2.2461-7.4531 5.7617-11.391 10.543 40.777 5.0625 76.492 7.4531 107.14 7.1719-1.6875-7.3125-2.8125-13.359-3.375-18.137h-4.6406l-4.6406-24.891c-17.434-2.25-33.887-6.043-49.352-11.387zm48.508-20.25c-12.652 1.6875-23.762 3.9375-33.324 6.75h29.105l3.7969-4.2188zm-4.2188 20.25h-29.105c9.5625 2.5312 20.672 4.7812 33.324 6.7461l-0.42188-2.5273zm136.67-8.4375c0-8.4375-4.2188-12.656-12.652-12.656h-21.516c-6.4688-12.652-16.59-18.98-30.371-18.98l-58.211-5.0625-5.9062 29.527-4.2188 5.0625v7.5938l4.2188 5.0625 5.9062 29.105 58.211-5.0625c15.469 0 26.012-7.3125 31.637-21.934h20.25c8.4336 0 12.652-4.2188 12.652-12.656zm-46.82 1.6875c0-11.531-5.9062-17.297-17.719-17.297-11.527 0-17.293 5.7656-17.293 17.297 0 11.812 5.7656 17.715 17.293 17.715 11.812 0 17.719-5.9023 17.719-17.715zm4.6406 0c0 14.902-7.4531 22.355-22.359 22.355-14.902 0-22.355-7.4531-22.355-22.355 0-14.906 7.4531-22.355 22.355-22.355 14.906 0 22.359 7.4492 22.359 22.355zm-13.922 0c0-5.625-2.8125-8.4375-8.4375-8.4375-5.3438 0-8.0156 2.8125-8.0156 8.4375s2.6719 8.4375 8.0156 8.4375c5.625 0 8.4375-2.8125 8.4375-8.4375zm4.6406 0c0 8.7188-4.3594 13.078-13.078 13.078-8.4375 0-12.652-4.3594-12.652-13.078s4.2148-13.078 12.652-13.078c8.7188 0 13.078 4.3594 13.078 13.078zm-43.871-2.1094v4.2188h-35.012v-4.2188zm258.58 2.1094c-0.5625-8.4375-4.7812-12.656-12.656-12.656-8.4336 0-12.652 4.2188-12.652 12.656s4.2188 12.656 12.652 12.656c8.4375 0 12.656-4.2188 12.656-12.656zm4.6406 0c0 11.531-5.7656 17.293-17.297 17.293-11.527 0-17.293-5.7617-17.293-17.293s5.7656-17.297 17.293-17.297c11.531 0 17.297 5.7656 17.297 17.297zm32.48 0c0-13.781-4.9219-25.59-14.766-35.434-9.5586-9.5625-21.23-14.344-35.012-14.344-15.184 0-31.777 5.7656-49.773 17.297-18.559 11.531-27.84 22.355-27.84 32.48 0 9.8438 9.2812 20.668 27.84 32.48 17.996 11.531 34.59 17.293 49.773 17.293 13.781 0 25.453-4.918 35.012-14.762 9.8438-9.5625 14.766-21.234 14.766-35.012zm5.0625 0c0 14.902-5.3438 27.699-16.031 38.387-10.684 10.684-23.621 16.027-38.809 16.027-15.746 0-33.18-6.0469-52.305-18.137-20.246-12.656-30.371-24.746-30.371-36.277s10.125-23.762 30.371-36.699c19.125-12.094 36.559-18.137 52.305-18.137 14.625 0 27.562 5.3398 38.809 16.027 10.688 10.969 16.031 23.902 16.031 38.809zm-54.418-29.105c-3.9336 0-10.262 1.6875-18.98 5.0625-7.875 3.9375-11.812 6.4648-11.812 7.5898v32.48c0 3.0938 3.9375 5.625 11.812 7.5938 7.875 3.375 14.203 5.0625 18.98 5.0625 19.406 0 29.391-9.2812 29.953-27.84 0-19.688-9.9844-29.668-29.953-29.949zm34.59 29.105v0.84375c0 21.371-11.527 32.34-34.59 32.902-4.4961 0-11.527-1.8281-21.09-5.4844-7.0312-3.9375-10.969-6.3281-11.809-7.1719-1.6875-1.4062-2.5312-3.0938-2.5312-5.0625v-32.48c0-1.4062 0.70312-2.9492 2.1094-4.6367 3.0898-2.8125 7.168-5.2031 12.23-7.1719 9-3.6562 16.031-5.4844 21.09-5.4844 22.5 0.28125 34.027 11.531 34.59 33.746zm-448.4-206.27h-333.66c-5.0625 0-28.543 1.6875-70.445 5.0625-41.902 3.375-62.852 7.5938-62.852 12.656v11.387c0 4.7812 20.949 8.8594 62.852 12.234 41.902 3.375 65.383 5.0625 70.445 5.0625h333.66c3.6562 1.4062 7.4531 2.1094 11.391 2.1094h64.961c5.3438 0 12.867-2.25 22.566-6.75 9.7031-4.5 14.555-10.547 14.555-18.137 0.28125-16.875-12.094-25.312-37.121-25.312h-64.961c-4.7812 0-8.5781 0.5625-11.391 1.6875z" fill-rule="evenodd"/>
4
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="M91.36 33.566q-6.645-6.623-15.997-6.625-8.439 0-14.761 5.485-6.329 5.484-7.594 13.605l4.465.352Q59.3 46.418 60.18 48h1.582q1.476 0 1.476 1.441 0 1.44-1.476 1.438H60.32q-.843 1.793-2.847 1.863l-4.465.387q1.266 8.085 7.594 13.57t14.761 5.485q9.352 0 15.996-6.645 6.645-6.646 6.645-15.957 0-9.389-6.645-16.012Zm-6.622 15.442a.445.445 0 1 0 .89 0 .445.445 0 0 0-.89 0m-8.71-9.258c0 .246.199.45.445.45a.45.45 0 0 0 .445-.45.445.445 0 1 0-.89 0m-1.04 0c0 .246.2.45.446.45a.45.45 0 0 0 .445-.45.445.445 0 1 0-.89 0m9.75 10.297a.445.445 0 1 0 .89 0 .445.445 0 0 0-.89 0m-8.71 9.305a.445.445 0 1 0 .89 0 .445.445 0 0 0-.89 0m-1.04 0a.445.445 0 1 0 .89 0 .445.445 0 0 0-.89 0M4.32 32.812q1.757-.315 4.22-.492l-3.868-.07ZM45.977 46.91q-1.09-.28-2.356-1.617l-8.437-8.613h-9.278l14.48 10.508v.351q2.708.774 5.59-.633Zm3.972-12.375q-.105.421-.492.809h-.422l-.527-.422h-6.61v-.387Zm-.492-1.336q.387.388.492.844H41.9v-.387h6.609l.527-.457ZM4.32 66.348l.352.562 3.867-.07q-2.812-.282-4.219-.492M45.977 52.25q-2.883-1.44-5.59-.633v.352L25.907 62.48h9.277l8.437-8.648q1.3-1.335 2.356-1.582m3.972 12.375H41.9v-.387h6.609l.527-.457h.422q.387.457.492.844m-.492 1.3h-.422l-.527-.421h-6.61v-.387h8.051q-.105.387-.492.809m-8.543.81q.457.175.95.175h5.413q3.094 0 3.094-2.11 0-1.052-1.16-1.562t-1.934-.511h-5.414q-.598 0-.949.14H13.11q-.633.001-5.87.406-5.24.404-5.239 1.036v.984q0 .561 5.238 1 5.239.44 5.871.441Zm10.441-17.297h-3.55q-.423.14 0 .28h3.55Zm-3.62.703h-.458v-1.125h.457q2.145-.773 4.114-.95l.386-2.109.387.035c.047-.351.14-.851.281-1.508q-3.585-.07-8.93.563.458.523.95.91.597.422 1.16.563l1.055.246-.985.492q-1.688.843-4.183.844-.633 0-.88-.036a10 10 0 0 1-.843-.14l-.281-.106v-.457l-2.004-1.441q-5.162.704-6.992.738-3.938.035-3.938 2.918 0 2.777 3.938 2.918 2.356.036 6.992.738l2.004-1.441v-.457l.281-.106q.316-.105.844-.14.246-.035.879-.035 2.496 0 4.183.843l.985.457-1.055.282q-.563.106-1.16.562-.457.281-.95.88 5.1.631 8.93.597-.21-.915-.28-1.512h-.388l-.386-2.074a20.7 20.7 0 0 1-4.114-.95m4.042-1.688q-1.581.21-2.777.563h2.426l.316-.352Zm-.351 1.688H49q1.196.316 2.777.562l-.035-.21Zm11.386-.703q0-1.055-1.05-1.055h-1.793q-.81-1.582-2.532-1.582l-4.851-.422-.492 2.46-.352.423v.633l.352.421.492 2.426 4.852-.422q1.933 0 2.636-1.828h1.688q1.05 0 1.05-1.054m-3.898.14q0-1.44-1.477-1.441-1.44 0-1.44 1.441 0 1.476 1.44 1.477 1.477 0 1.477-1.477m.387 0q0 1.863-1.864 1.863-1.863 0-1.863-1.863t1.864-1.863 1.863 1.863m-1.16 0q0-.703-.703-.703-.668 0-.668.703t.667.703q.704 0 .704-.703m.386 0q0 1.09-1.09 1.09-1.054 0-1.054-1.09t1.054-1.09q1.09 0 1.09 1.09m-3.656-.176v.352h-2.918v-.352Zm21.547.176q-.07-1.055-1.055-1.055-1.054 0-1.054 1.055t1.054 1.055 1.055-1.055m.387 0q0 1.442-1.442 1.442-1.44 0-1.441-1.442 0-1.44 1.441-1.441 1.442 0 1.442 1.441m2.707 0q0-1.723-1.23-2.953-1.196-1.195-2.919-1.195-1.898 0-4.148 1.441-2.32 1.441-2.32 2.707 0 1.23 2.32 2.707 2.25 1.442 4.148 1.442 1.723 0 2.918-1.23 1.23-1.196 1.23-2.919m.422 0q0 1.863-1.336 3.2-1.337 1.335-3.235 1.335-1.968 0-4.36-1.511-2.53-1.583-2.53-3.024 0-1.44 2.53-3.058c1.595-1.008 3.048-1.508 4.36-1.508 1.219 0 2.297.441 3.235 1.332q1.335 1.371 1.336 3.234m-4.536-2.426q-.492 0-1.582.422-.984.493-.984.633v2.707q0 .387.984.633.985.422 1.582.422 2.427 0 2.497-2.32 0-2.461-2.497-2.497m2.883 2.426v.07q0 2.673-2.883 2.743-.562 0-1.757-.457-.879-.493-.985-.598a.53.53 0 0 1-.21-.422v-2.707q0-.175.175-.387.387-.351 1.02-.597 1.125-.457 1.757-.457 2.813.034 2.883 2.812M40.914 32.391H13.11q-.633 0-5.87.422-5.24.42-5.239 1.054v.95q0 .597 5.238 1.019t5.871.422h27.805q.457.176.95.176h5.413q.667 0 1.88-.563t1.214-1.512q.035-2.109-3.094-2.109h-5.414q-.598 0-.949.14m0 0" style="stroke:none;fill-rule:evenodd;fill:#ffc474;fill-opacity:1"/></svg>
@@ -0,0 +1 @@
1
+ data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj48cGF0aCBkPSJNOTEuMzYgMzMuNTY2cS02LjY0NS02LjYyMy0xNS45OTctNi42MjUtOC40MzkgMC0xNC43NjEgNS40ODUtNi4zMjkgNS40ODQtNy41OTQgMTMuNjA1bDQuNDY1LjM1MlE1OS4zIDQ2LjQxOCA2MC4xOCA0OGgxLjU4MnExLjQ3NiAwIDEuNDc2IDEuNDQxIDAgMS40NC0xLjQ3NiAxLjQzOEg2MC4zMnEtLjg0MyAxLjc5My0yLjg0NyAxLjg2M2wtNC40NjUuMzg3cTEuMjY2IDguMDg1IDcuNTk0I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EuMTI1LS40NTcgMS43NTctLjQ1NyAyLjgxMy4wMzQgMi44ODMgMi44MTJNNDAuOTE0IDMyLjM5MUgxMy4xMXEtLjYzMyAwLTUuODcuNDIyLTUuMjQuNDItNS4yMzkgMS4wNTR2Ljk1cTAgLjU5NyA1LjIzOCAxLjAxOXQ1Ljg3MS40MjJoMjcuODA1cS40NTcuMTc2Ljk1LjE3Nmg1LjQxM3EuNjY3IDAgMS44OC0uNTYzdDEuMjE0LTEuNTEycS4wMzUtMi4xMDktMy4wOTQtMi4xMDloLTUuNDE0cS0uNTk4IDAtLjk0OS4xNG0wIDAiIHN0eWxlPSJzdHJva2U6bm9uZTtmaWxsLXJ1bGU6ZXZlbm9kZDtmaWxsOiNmZmM0NzQ7ZmlsbC1vcGFjaXR5OjEiLz48L3N2Zz4=
@@ -0,0 +1,4 @@
1
+ # Autogeneration Notice
2
+
3
+ This directory is maintained in the root of the monorepo and sync'd to public
4
+ repositories by running `bun sync-logos`
@@ -0,0 +1,2 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="75" height="20" role="img" aria-label="Api Docs"><title>Api Docs</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="75" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="0" height="20" fill="#555"/><rect x="0" width="75" height="20" fill="#555"/><rect width="75" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><image x="5" y="3" width="14" height="14" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj48cGF0aCBkPSJNOTEuMzYgMzMuNTY2cS02LjY0NS02LjYyMy0xNS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4NS40MjIgMS41ODIuNDIyIDIuNDI3IDAgMi40OTctMi4zMiAwLTIuNDYxLTIuNDk3LTIuNDk3bTIuODgzIDIuNDI2di4wN3EwIDIuNjczLTIuODgzIDIuNzQzLS41NjIgMC0xLjc1Ny0uNDU3LS44NzktLjQ5My0uOTg1LS41OThhLjUzLjUzIDAgMCAxLS4yMS0uNDIydi0yLjcwN3EwLS4xNzUuMTc1LS4zODcuMzg3LS4zNTEgMS4wMi0uNTk3IDEuMTI1LS40NTcgMS43NTctLjQ1NyAyLjgxMy4wMzQgMi44ODMgMi44MTJNNDAuOTE0IDMyLjM5MUgxMy4xMXEtLjYzMyAwLTUuODcuNDIyLTUuMjQuNDItNS4yMzkgMS4wNTR2Ljk1cTAgLjU5NyA1LjIzOCAxLjAxOXQ1Ljg3MS40MjJoMjcuODA1cS40NTcuMTc2Ljk1LjE3Nmg1LjQxM3EuNjY3IDAgMS44OC0uNTYzdDEuMjE0LTEuNTEycS4wMzUtMi4xMDktMy4wOTQtMi4xMDloLTUuNDE0cS0uNTk4IDAtLjk0OS4xNG0wIDAiIHN0eWxlPSJzdHJva2U6bm9uZTtmaWxsLXJ1bGU6ZXZlbm9kZDtmaWxsOiNmZmM0NzQ7ZmlsbC1vcGFjaXR5OjEiLz48L3N2Zz4=
2
+ "/><text aria-hidden="true" x="465" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="470">Api Docs</text><text x="465" y="140" transform="scale(.1)" fill="#fff" textLength="470">Api Docs</text></g></svg>