breeze-client 2.2.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +83 -63
- package/adapters/abstract-data-service-adapter.d.ts +120 -0
- package/adapters/abstract-data-service-adapter.js +395 -0
- package/adapters/abstract-data-service-adapter.js.map +1 -0
- package/adapters/adapter-ajax-fetch.d.ts +12 -0
- package/adapters/adapter-ajax-fetch.js +13 -0
- package/adapters/adapter-ajax-fetch.js.map +1 -0
- package/{adapter-ajax-post → adapters}/adapter-ajax-post.d.ts +40 -36
- package/{fesm2022/breeze-client-adapter-ajax-post.mjs → adapters/adapter-ajax-post.js} +80 -82
- package/adapters/adapter-ajax-post.js.map +1 -0
- package/{adapter-ajax-fetch → adapters}/adapter-core.d.ts +4 -4
- package/{fesm2022/breeze-client-adapter-uri-builder-json.mjs → adapters/adapter-core.js} +48 -91
- package/adapters/adapter-core.js.map +1 -0
- package/adapters/adapter-data-service-webapi.d.ts +9 -0
- package/{fesm2022/breeze-client-adapter-data-service-webapi.mjs → adapters/adapter-data-service-webapi.js} +105 -107
- package/adapters/adapter-data-service-webapi.js.map +1 -0
- package/adapters/adapter-model-library-backing-store.d.ts +32 -0
- package/adapters/adapter-model-library-backing-store.js +321 -0
- package/adapters/adapter-model-library-backing-store.js.map +1 -0
- package/adapters/adapter-uri-builder-json.d.ts +11 -0
- package/adapters/adapter-uri-builder-json.js +40 -0
- package/adapters/adapter-uri-builder-json.js.map +1 -0
- package/adapters/http.d.ts +52 -0
- package/adapters/http.js +202 -0
- package/adapters/http.js.map +1 -0
- package/angular/adapter-angular-httpclient.d.ts +21 -0
- package/angular/adapter-angular-httpclient.js +70 -0
- package/angular/adapter-angular-httpclient.js.map +1 -0
- package/breeze.d.ts +215 -0
- package/breeze.js +141 -0
- package/breeze.js.map +1 -0
- package/config/config.d.ts +212 -0
- package/config/config.js +392 -0
- package/config/config.js.map +1 -0
- package/config/configure.d.ts +66 -0
- package/config/configure.js +46 -0
- package/config/configure.js.map +1 -0
- package/config/default-adapters.d.ts +1 -0
- package/config/default-adapters.js +40 -0
- package/config/default-adapters.js.map +1 -0
- package/config/interface-registry.d.ts +191 -0
- package/config/interface-registry.js +5 -0
- package/config/interface-registry.js.map +1 -0
- package/{src → core}/assert-param.d.ts +52 -60
- package/core/assert-param.js +390 -0
- package/core/assert-param.js.map +1 -0
- package/core/core.d.ts +285 -0
- package/core/core.js +772 -0
- package/core/core.js.map +1 -0
- package/core/enum.d.ts +116 -0
- package/core/enum.js +167 -0
- package/core/enum.js.map +1 -0
- package/core/event.d.ts +169 -0
- package/core/event.js +338 -0
- package/core/event.js.map +1 -0
- package/entity/array.d.ts +3 -0
- package/entity/array.js +4 -0
- package/entity/array.js.map +1 -0
- package/entity/complex-array.d.ts +17 -0
- package/entity/complex-array.js +104 -0
- package/entity/complex-array.js.map +1 -0
- package/entity/default-property-interceptor.d.ts +1 -0
- package/entity/default-property-interceptor.js +496 -0
- package/entity/default-property-interceptor.js.map +1 -0
- package/{src → entity}/entity-action.d.ts +36 -42
- package/entity/entity-action.js +45 -0
- package/entity/entity-action.js.map +1 -0
- package/entity/entity-aspect.d.ts +457 -0
- package/entity/entity-aspect.js +1262 -0
- package/entity/entity-aspect.js.map +1 -0
- package/entity/entity-base.d.ts +55 -0
- package/entity/entity-base.js +41 -0
- package/entity/entity-base.js.map +1 -0
- package/entity/entity-group.d.ts +1 -0
- package/entity/entity-group.js +224 -0
- package/entity/entity-group.js.map +1 -0
- package/entity/entity-key.d.ts +95 -0
- package/entity/entity-key.js +189 -0
- package/entity/entity-key.js.map +1 -0
- package/{src → entity}/entity-state.d.ts +112 -84
- package/entity/entity-state.js +135 -0
- package/entity/entity-state.js.map +1 -0
- package/entity/key-generator.d.ts +57 -0
- package/entity/key-generator.js +155 -0
- package/entity/key-generator.js.map +1 -0
- package/entity/observable-array.d.ts +25 -0
- package/entity/observable-array.js +230 -0
- package/entity/observable-array.js.map +1 -0
- package/entity/primitive-array.d.ts +12 -0
- package/entity/primitive-array.js +71 -0
- package/entity/primitive-array.js.map +1 -0
- package/entity/relation-array.d.ts +24 -0
- package/entity/relation-array.js +176 -0
- package/entity/relation-array.js.map +1 -0
- package/entity/unattached-children-map.d.ts +1 -0
- package/entity/unattached-children-map.js +105 -0
- package/entity/unattached-children-map.js.map +1 -0
- package/generate-entity-classes.js +1176 -0
- package/manager/entity-manager.d.ts +801 -0
- package/manager/entity-manager.js +2395 -0
- package/manager/entity-manager.js.map +1 -0
- package/{src → manager}/save-options.d.ts +48 -42
- package/manager/save-options.js +51 -0
- package/manager/save-options.js.map +1 -0
- package/{src → metadata}/data-service.d.ts +229 -184
- package/metadata/data-service.js +246 -0
- package/metadata/data-service.js.map +1 -0
- package/metadata/data-type.d.ts +122 -0
- package/metadata/data-type.js +465 -0
- package/metadata/data-type.js.map +1 -0
- package/metadata/entity-metadata.d.ts +1193 -0
- package/metadata/entity-metadata.js +2502 -0
- package/metadata/entity-metadata.js.map +1 -0
- package/{src → metadata}/local-query-comparison-options.d.ts +65 -59
- package/metadata/local-query-comparison-options.js +69 -0
- package/metadata/local-query-comparison-options.js.map +1 -0
- package/{src → metadata}/naming-convention.d.ts +75 -72
- package/metadata/naming-convention.js +97 -0
- package/metadata/naming-convention.js.map +1 -0
- package/mixins/mixin-get-entity-graph.d.ts +63 -0
- package/{fesm2022/breeze-client-mixin-get-entity-graph.mjs → mixins/mixin-get-entity-graph.js} +331 -253
- package/mixins/mixin-get-entity-graph.js.map +1 -0
- package/mixins/mixin-save-queuing.d.ts +98 -0
- package/{fesm2022/breeze-client-mixin-save-queuing.mjs → mixins/mixin-save-queuing.js} +493 -365
- package/mixins/mixin-save-queuing.js.map +1 -0
- package/package.json +63 -94
- package/query/entity-query.d.ts +521 -0
- package/query/entity-query.js +1149 -0
- package/query/entity-query.js.map +1 -0
- package/{src → query}/mapping-context.d.ts +44 -46
- package/query/mapping-context.js +412 -0
- package/query/mapping-context.js.map +1 -0
- package/query/predicate.d.ts +394 -0
- package/query/predicate.js +1294 -0
- package/query/predicate.js.map +1 -0
- package/query/property-path.d.ts +252 -0
- package/query/property-path.js +2 -0
- package/query/property-path.js.map +1 -0
- package/{src → query}/query-options.d.ts +143 -119
- package/query/query-options.js +180 -0
- package/query/query-options.js.map +1 -0
- package/rxjs/breeze-rxjs.d.ts +72 -0
- package/rxjs/breeze-rxjs.js +117 -0
- package/rxjs/breeze-rxjs.js.map +1 -0
- package/validation/validate.d.ts +583 -0
- package/validation/validate.js +961 -0
- package/validation/validate.js.map +1 -0
- package/{src → validation}/validation-options.d.ts +67 -63
- package/validation/validation-options.js +70 -0
- package/validation/validation-options.js.map +1 -0
- package/adapter-ajax-angularjs/adapter-ajax-angularjs.d.ts +0 -17
- package/adapter-ajax-angularjs/adapter-core.d.ts +0 -4
- package/adapter-ajax-angularjs/index.d.ts +0 -5
- package/adapter-ajax-fetch/adapter-ajax-fetch.d.ts +0 -18
- package/adapter-ajax-fetch/index.d.ts +0 -5
- package/adapter-ajax-httpclient/adapter-ajax-httpclient.d.ts +0 -13
- package/adapter-ajax-httpclient/adapter-core.d.ts +0 -4
- package/adapter-ajax-httpclient/index.d.ts +0 -5
- package/adapter-ajax-jquery/adapter-ajax-jquery.d.ts +0 -15
- package/adapter-ajax-jquery/index.d.ts +0 -5
- package/adapter-ajax-post/index.d.ts +0 -5
- package/adapter-data-service-odata/adapter-core.d.ts +0 -4
- package/adapter-data-service-odata/adapter-data-service-odata.d.ts +0 -17
- package/adapter-data-service-odata/index.d.ts +0 -5
- package/adapter-data-service-webapi/adapter-data-service-webapi.d.ts +0 -15
- package/adapter-data-service-webapi/index.d.ts +0 -5
- package/adapter-model-library-backing-store/adapter-model-library-backing-store.d.ts +0 -10
- package/adapter-model-library-backing-store/index.d.ts +0 -5
- package/adapter-model-library-ko/adapter-model-library-ko.d.ts +0 -10
- package/adapter-model-library-ko/index.d.ts +0 -5
- package/adapter-uri-builder-json/adapter-core.d.ts +0 -4
- package/adapter-uri-builder-json/adapter-uri-builder-json.d.ts +0 -8
- package/adapter-uri-builder-json/index.d.ts +0 -5
- package/adapter-uri-builder-odata/adapter-core.d.ts +0 -4
- package/adapter-uri-builder-odata/adapter-uri-builder-odata.d.ts +0 -8
- package/adapter-uri-builder-odata/index.d.ts +0 -5
- package/esm2022/adapter-ajax-angularjs/adapter-ajax-angularjs.mjs +0 -135
- package/esm2022/adapter-ajax-angularjs/adapter-core.mjs +0 -49
- package/esm2022/adapter-ajax-angularjs/breeze-client-adapter-ajax-angularjs.mjs +0 -5
- package/esm2022/adapter-ajax-fetch/adapter-ajax-fetch.mjs +0 -135
- package/esm2022/adapter-ajax-fetch/adapter-core.mjs +0 -49
- package/esm2022/adapter-ajax-fetch/breeze-client-adapter-ajax-fetch.mjs +0 -5
- package/esm2022/adapter-ajax-httpclient/adapter-ajax-httpclient.mjs +0 -139
- package/esm2022/adapter-ajax-httpclient/adapter-core.mjs +0 -49
- package/esm2022/adapter-ajax-httpclient/breeze-client-adapter-ajax-httpclient.mjs +0 -5
- package/esm2022/adapter-ajax-jquery/adapter-ajax-jquery.mjs +0 -107
- package/esm2022/adapter-ajax-jquery/breeze-client-adapter-ajax-jquery.mjs +0 -5
- package/esm2022/adapter-ajax-post/adapter-ajax-post.mjs +0 -77
- package/esm2022/adapter-ajax-post/breeze-client-adapter-ajax-post.mjs +0 -5
- package/esm2022/adapter-data-service-odata/adapter-core.mjs +0 -49
- package/esm2022/adapter-data-service-odata/adapter-data-service-odata.mjs +0 -461
- package/esm2022/adapter-data-service-odata/breeze-client-adapter-data-service-odata.mjs +0 -5
- package/esm2022/adapter-data-service-webapi/adapter-data-service-webapi.mjs +0 -100
- package/esm2022/adapter-data-service-webapi/breeze-client-adapter-data-service-webapi.mjs +0 -5
- package/esm2022/adapter-model-library-backing-store/adapter-model-library-backing-store.mjs +0 -269
- package/esm2022/adapter-model-library-backing-store/breeze-client-adapter-model-library-backing-store.mjs +0 -5
- package/esm2022/adapter-model-library-ko/adapter-model-library-ko.mjs +0 -241
- package/esm2022/adapter-model-library-ko/breeze-client-adapter-model-library-ko.mjs +0 -5
- package/esm2022/adapter-uri-builder-json/adapter-core.mjs +0 -49
- package/esm2022/adapter-uri-builder-json/adapter-uri-builder-json.mjs +0 -37
- package/esm2022/adapter-uri-builder-json/breeze-client-adapter-uri-builder-json.mjs +0 -5
- package/esm2022/adapter-uri-builder-odata/adapter-core.mjs +0 -49
- package/esm2022/adapter-uri-builder-odata/adapter-uri-builder-odata.mjs +0 -191
- package/esm2022/adapter-uri-builder-odata/breeze-client-adapter-uri-builder-odata.mjs +0 -5
- package/esm2022/breeze-client.mjs +0 -5
- package/esm2022/index.mjs +0 -2
- package/esm2022/mixin-get-entity-graph/breeze-client-mixin-get-entity-graph.mjs +0 -5
- package/esm2022/mixin-get-entity-graph/mixin-get-entity-graph.mjs +0 -269
- package/esm2022/mixin-save-queuing/breeze-client-mixin-save-queuing.mjs +0 -5
- package/esm2022/mixin-save-queuing/mixin-save-queuing.mjs +0 -421
- package/esm2022/src/abstract-data-service-adapter.mjs +0 -325
- package/esm2022/src/array.mjs +0 -4
- package/esm2022/src/assert-param.mjs +0 -330
- package/esm2022/src/breeze.mjs +0 -85
- package/esm2022/src/complex-array.mjs +0 -117
- package/esm2022/src/config.mjs +0 -232
- package/esm2022/src/core.mjs +0 -712
- package/esm2022/src/csdl-metadata-parser.mjs +0 -385
- package/esm2022/src/data-service.mjs +0 -221
- package/esm2022/src/data-type.mjs +0 -510
- package/esm2022/src/default-property-interceptor.mjs +0 -460
- package/esm2022/src/entity-action.mjs +0 -45
- package/esm2022/src/entity-aspect.mjs +0 -897
- package/esm2022/src/entity-group.mjs +0 -192
- package/esm2022/src/entity-key.mjs +0 -125
- package/esm2022/src/entity-manager.mjs +0 -2163
- package/esm2022/src/entity-metadata.mjs +0 -2242
- package/esm2022/src/entity-query.mjs +0 -1024
- package/esm2022/src/entity-state.mjs +0 -107
- package/esm2022/src/enum.mjs +0 -143
- package/esm2022/src/event.mjs +0 -264
- package/esm2022/src/interface-registry.mjs +0 -39
- package/esm2022/src/key-generator.mjs +0 -110
- package/esm2022/src/local-query-comparison-options.mjs +0 -65
- package/esm2022/src/mapping-context.mjs +0 -411
- package/esm2022/src/naming-convention.mjs +0 -92
- package/esm2022/src/observable-array.mjs +0 -183
- package/esm2022/src/predicate.mjs +0 -1259
- package/esm2022/src/primitive-array.mjs +0 -85
- package/esm2022/src/query-options.mjs +0 -152
- package/esm2022/src/relation-array.mjs +0 -173
- package/esm2022/src/save-options.mjs +0 -41
- package/esm2022/src/unattached-children-map.mjs +0 -56
- package/esm2022/src/validate.mjs +0 -995
- package/esm2022/src/validation-options.mjs +0 -64
- package/fesm2022/breeze-client-adapter-ajax-angularjs.mjs +0 -190
- package/fesm2022/breeze-client-adapter-ajax-angularjs.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-ajax-fetch.mjs +0 -190
- package/fesm2022/breeze-client-adapter-ajax-fetch.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-ajax-httpclient.mjs +0 -194
- package/fesm2022/breeze-client-adapter-ajax-httpclient.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-ajax-jquery.mjs +0 -114
- package/fesm2022/breeze-client-adapter-ajax-jquery.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-ajax-post.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-data-service-odata.mjs +0 -516
- package/fesm2022/breeze-client-adapter-data-service-odata.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-data-service-webapi.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-model-library-backing-store.mjs +0 -276
- package/fesm2022/breeze-client-adapter-model-library-backing-store.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-model-library-ko.mjs +0 -248
- package/fesm2022/breeze-client-adapter-model-library-ko.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-uri-builder-json.mjs.map +0 -1
- package/fesm2022/breeze-client-adapter-uri-builder-odata.mjs +0 -246
- package/fesm2022/breeze-client-adapter-uri-builder-odata.mjs.map +0 -1
- package/fesm2022/breeze-client-mixin-get-entity-graph.mjs.map +0 -1
- package/fesm2022/breeze-client-mixin-save-queuing.mjs.map +0 -1
- package/fesm2022/breeze-client.mjs +0 -14144
- package/fesm2022/breeze-client.mjs.map +0 -1
- package/index.d.ts +0 -1
- package/mixin-get-entity-graph/index.d.ts +0 -5
- package/mixin-get-entity-graph/mixin-get-entity-graph.d.ts +0 -31
- package/mixin-save-queuing/index.d.ts +0 -5
- package/mixin-save-queuing/mixin-save-queuing.d.ts +0 -32
- package/src/abstract-data-service-adapter.d.ts +0 -84
- package/src/array.d.ts +0 -3
- package/src/breeze.d.ts +0 -139
- package/src/complex-array.d.ts +0 -13
- package/src/config.d.ts +0 -104
- package/src/core.d.ts +0 -164
- package/src/csdl-metadata-parser.d.ts +0 -7
- package/src/data-type.d.ts +0 -89
- package/src/default-property-interceptor.d.ts +0 -4
- package/src/entity-aspect.d.ts +0 -332
- package/src/entity-group.d.ts +0 -28
- package/src/entity-key.d.ts +0 -77
- package/src/entity-manager.d.ts +0 -680
- package/src/entity-metadata.d.ts +0 -988
- package/src/entity-query.d.ts +0 -444
- package/src/enum.d.ts +0 -100
- package/src/event.d.ts +0 -142
- package/src/interface-registry.d.ts +0 -150
- package/src/key-generator.d.ts +0 -12
- package/src/observable-array.d.ts +0 -52
- package/src/predicate.d.ts +0 -376
- package/src/primitive-array.d.ts +0 -7
- package/src/relation-array.d.ts +0 -18
- package/src/unattached-children-map.d.ts +0 -19
- package/src/validate.d.ts +0 -650
package/breeze.js
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { AbstractDataServiceAdapter } from './adapters/abstract-data-service-adapter.js';
|
|
2
|
+
import { assertParam, assertConfig, Param } from './core/assert-param.js';
|
|
3
|
+
import { BreezeConfig } from './config/config.js';
|
|
4
|
+
import { BreezeEnum } from './core/enum.js';
|
|
5
|
+
import { BreezeEvent } from './core/event.js';
|
|
6
|
+
import { DataService, JsonResultsAdapter } from './metadata/data-service.js';
|
|
7
|
+
import { DataType } from './metadata/data-type.js';
|
|
8
|
+
import { EntityAction } from './entity/entity-action.js';
|
|
9
|
+
import { EntityAspect, ComplexAspect } from './entity/entity-aspect.js';
|
|
10
|
+
import { EntityBase, ComplexObjectBase } from './entity/entity-base.js';
|
|
11
|
+
import { EntityKey } from './entity/entity-key.js';
|
|
12
|
+
import { EntityManager, ProblemTypes, isConcurrencyError } from './manager/entity-manager.js';
|
|
13
|
+
import { EntityQuery, FilterQueryOp, BooleanQueryOp, OrderByClause, ExpandClause, SelectClause } from './query/entity-query.js';
|
|
14
|
+
import { EntityState } from './entity/entity-state.js';
|
|
15
|
+
import { InterfaceRegistry } from './config/interface-registry.js';
|
|
16
|
+
import { KeyGenerator } from './entity/key-generator.js';
|
|
17
|
+
import { LocalQueryComparisonOptions } from './metadata/local-query-comparison-options.js';
|
|
18
|
+
import { MappingContext } from './query/mapping-context.js';
|
|
19
|
+
import { MetadataStore, EntityType, ComplexType, DataProperty, NavigationProperty, AutoGeneratedKeyType, entityTypeForCtor } from './metadata/entity-metadata.js';
|
|
20
|
+
import { NamingConvention } from './metadata/naming-convention.js';
|
|
21
|
+
import { Predicate, UnaryPredicate, BinaryPredicate, AnyAllPredicate, AndOrPredicate, LitExpr, FnExpr, PropExpr } from './query/predicate.js';
|
|
22
|
+
import { QueryOptions, FetchStrategy, MergeStrategy } from './query/query-options.js';
|
|
23
|
+
import { SaveOptions } from './manager/save-options.js';
|
|
24
|
+
import { ValidationError, Validator } from './validation/validate.js';
|
|
25
|
+
import { ValidationOptions } from './validation/validation-options.js';
|
|
26
|
+
import { config } from './config/config.js';
|
|
27
|
+
import { configureBreeze } from './config/configure.js';
|
|
28
|
+
import { core } from './core/core.js';
|
|
29
|
+
import { makeRelationArray, makePrimitiveArray, makeComplexArray } from './entity/array.js';
|
|
30
|
+
export { BreezeConfig };
|
|
31
|
+
export { AbstractDataServiceAdapter, AndOrPredicate, AnyAllPredicate, assertConfig, assertParam, AutoGeneratedKeyType, BinaryPredicate, BreezeEnum, BreezeEvent, ComplexAspect, ComplexObjectBase, ComplexType, config, configureBreeze, core, DataProperty, DataService, DataType, EntityAction, EntityAspect, EntityBase, EntityKey, EntityManager, EntityQuery, EntityState, EntityType, entityTypeForCtor, ExpandClause, FetchStrategy, FilterQueryOp, FnExpr, InterfaceRegistry, JsonResultsAdapter, KeyGenerator, LitExpr, LocalQueryComparisonOptions, makeComplexArray, makePrimitiveArray, makeRelationArray, MappingContext, MergeStrategy, MetadataStore, NamingConvention, NavigationProperty, OrderByClause, Predicate, PropExpr, QueryOptions, SaveOptions, SelectClause, UnaryPredicate, ValidationError, ValidationOptions, Validator, ProblemTypes, isConcurrencyError, };
|
|
32
|
+
/** Every class, enum and helper of the Breeze 2.x API in one object - the `breeze` that 2.x code
|
|
33
|
+
imports or finds as a global. Kept so that code written against 2.x runs unchanged. New code
|
|
34
|
+
imports what it uses by name, which lets a bundler leave out the rest. */
|
|
35
|
+
export const breeze = {
|
|
36
|
+
/** The base class of Breeze's data service adapters, for anyone writing one. The same as the
|
|
37
|
+
`AbstractDataServiceAdapter` export. */
|
|
38
|
+
AbstractDataServiceAdapter: AbstractDataServiceAdapter,
|
|
39
|
+
/** Always `null`. Breeze 2.x exposed its argument-checking helpers here; Breeze 3 does not. */
|
|
40
|
+
assertConfig: null,
|
|
41
|
+
/** Always `null`. Breeze 2.x exposed its argument-checking helpers here; Breeze 3 does not. */
|
|
42
|
+
assertParam: null,
|
|
43
|
+
/** The same as the {@link AutoGeneratedKeyType} export. */
|
|
44
|
+
AutoGeneratedKeyType: AutoGeneratedKeyType,
|
|
45
|
+
/** The operators that combine predicates in a query - `and`, `or` and `not` - as an enum. The
|
|
46
|
+
same as the `BooleanQueryOp` export. */
|
|
47
|
+
BooleanQueryOp: BooleanQueryOp,
|
|
48
|
+
/** The same as the {@link ComplexAspect} export. */
|
|
49
|
+
ComplexAspect: ComplexAspect,
|
|
50
|
+
/** The same as the {@link ComplexType} export. */
|
|
51
|
+
ComplexType: ComplexType,
|
|
52
|
+
/** The same as the {@link config} export: the older adapter-registration API. New code calls
|
|
53
|
+
{@link configureBreeze} instead. */
|
|
54
|
+
config: config,
|
|
55
|
+
/** The same as the {@link core} export. */
|
|
56
|
+
core: core,
|
|
57
|
+
/** The same as the {@link DataProperty} export. */
|
|
58
|
+
DataProperty: DataProperty,
|
|
59
|
+
/** The same as the {@link DataService} export. */
|
|
60
|
+
DataService: DataService,
|
|
61
|
+
/** The same as the {@link DataType} export. */
|
|
62
|
+
DataType: DataType,
|
|
63
|
+
/** The same as the {@link EntityAction} export. */
|
|
64
|
+
EntityAction: EntityAction,
|
|
65
|
+
/** The same as the {@link EntityAspect} export. */
|
|
66
|
+
EntityAspect: EntityAspect,
|
|
67
|
+
/** The same as the {@link EntityKey} export. */
|
|
68
|
+
EntityKey: EntityKey,
|
|
69
|
+
/** The same as the {@link EntityManager} export. */
|
|
70
|
+
EntityManager: EntityManager,
|
|
71
|
+
/** The same as the {@link EntityQuery} export. */
|
|
72
|
+
EntityQuery: EntityQuery,
|
|
73
|
+
/** The same as the {@link EntityState} export. */
|
|
74
|
+
EntityState: EntityState,
|
|
75
|
+
/** The same as the {@link EntityType} export. */
|
|
76
|
+
EntityType: EntityType,
|
|
77
|
+
/** The same as the {@link BreezeEvent} export, under its 2.x name. */
|
|
78
|
+
Event: BreezeEvent,
|
|
79
|
+
/** The same as the {@link FetchStrategy} export. */
|
|
80
|
+
FetchStrategy: FetchStrategy,
|
|
81
|
+
/** The same as the {@link FilterQueryOp} export. */
|
|
82
|
+
FilterQueryOp: FilterQueryOp,
|
|
83
|
+
/** The same as the {@link InterfaceRegistry} export. */
|
|
84
|
+
InterfaceRegistry: InterfaceRegistry,
|
|
85
|
+
/** The same as the {@link JsonResultsAdapter} export. */
|
|
86
|
+
JsonResultsAdapter: JsonResultsAdapter,
|
|
87
|
+
/** The same as the {@link KeyGenerator} export. */
|
|
88
|
+
KeyGenerator: KeyGenerator,
|
|
89
|
+
/** The same as the {@link LocalQueryComparisonOptions} export. */
|
|
90
|
+
LocalQueryComparisonOptions: LocalQueryComparisonOptions,
|
|
91
|
+
/** Turns an array into the array behind a collection of complex objects. For model library
|
|
92
|
+
adapter authors; Breeze's own adapter calls it when it sets up an entity. */
|
|
93
|
+
makeComplexArray: makeComplexArray,
|
|
94
|
+
/** Turns an array into the array behind a collection of primitive values. For model library
|
|
95
|
+
adapter authors; Breeze's own adapter calls it when it sets up an entity. */
|
|
96
|
+
makePrimitiveArray: makePrimitiveArray,
|
|
97
|
+
/** Turns an array into the {@link RelationArray} behind a collection navigation property. For
|
|
98
|
+
model library adapter authors; Breeze's own adapter calls it when it sets up an entity. */
|
|
99
|
+
makeRelationArray: makeRelationArray,
|
|
100
|
+
/** The same as the {@link MergeStrategy} export. */
|
|
101
|
+
MergeStrategy: MergeStrategy,
|
|
102
|
+
/** The same as the {@link MetadataStore} export. */
|
|
103
|
+
MetadataStore: MetadataStore,
|
|
104
|
+
/** The same as the {@link NamingConvention} export. */
|
|
105
|
+
NamingConvention: NamingConvention,
|
|
106
|
+
/** The same as the {@link NavigationProperty} export. */
|
|
107
|
+
NavigationProperty: NavigationProperty,
|
|
108
|
+
/** The class that holds a query's `orderBy`. Exposed for Breeze's own tests; applications do not
|
|
109
|
+
need it. */
|
|
110
|
+
OrderByClause: OrderByClause, // for testing only
|
|
111
|
+
/** Breeze's internal argument-checking helper. Applications do not need it. */
|
|
112
|
+
Param,
|
|
113
|
+
/** The same as the {@link Predicate} export. */
|
|
114
|
+
Predicate: Predicate,
|
|
115
|
+
/** The same as the {@link QueryOptions} export. */
|
|
116
|
+
QueryOptions: QueryOptions,
|
|
117
|
+
/** The same as the {@link SaveOptions} export. */
|
|
118
|
+
SaveOptions: SaveOptions,
|
|
119
|
+
/** The same as the {@link ValidationError} export. */
|
|
120
|
+
ValidationError: ValidationError,
|
|
121
|
+
/** The same as the {@link ValidationOptions} export. */
|
|
122
|
+
ValidationOptions: ValidationOptions,
|
|
123
|
+
/** The same as the {@link Validator} export. */
|
|
124
|
+
Validator: Validator,
|
|
125
|
+
/** The version of `breeze-client`. A test keeps it equal to the one in package.json. */
|
|
126
|
+
version: "3.0.0"
|
|
127
|
+
};
|
|
128
|
+
// The 2.x global. Unbundled, this always runs. Under "sideEffects": false a bundler keeps it only
|
|
129
|
+
// when the bundle uses the `breeze` object above - which holds every class, so keeping it for
|
|
130
|
+
// every bundle would defeat tree-shaking. See CHANGES-DEV.md.
|
|
131
|
+
/** @hidden @internal */
|
|
132
|
+
let win;
|
|
133
|
+
try {
|
|
134
|
+
win = window ? window : (global ? global.window : undefined);
|
|
135
|
+
}
|
|
136
|
+
catch (e) {
|
|
137
|
+
}
|
|
138
|
+
if (win) {
|
|
139
|
+
win.breeze = breeze;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=breeze.js.map
|
package/breeze.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breeze.js","sourceRoot":"","sources":["../src/breeze.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,iBAAiB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wD;IACxD,iBAAiB,EAAE,iBAAiB;IACpC,gDAAgD;IAChD,SAAS,EAAE,SAAS;IACpB,wFAAwF;IACxF,OAAO,EAAE,OAAO;CACjB,CAAC;AA6CF,kGAAkG;AAClG,8FAA8F;AAC9F,8DAA8D;AAC9D,wBAAwB;AACxB,IAAI,GAAQ,CAAC;AACb,IAAI,CAAC;IACH,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC/D,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;AAEb,CAAC;AACD,IAAI,GAAG,EAAE,CAAC;IACR,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC;AACtB,CAAC","sourcesContent":["\r\nimport { AbstractDataServiceAdapter } from './adapters/abstract-data-service-adapter.js';\r\nimport { assertParam, assertConfig, Param } from './core/assert-param.js';\r\nimport { BreezeConfig } from './config/config.js';\r\nimport { BreezeEnum } from './core/enum.js';\r\nimport { BreezeEvent } from './core/event.js';\r\nimport type { ComplexArray } from './entity/complex-array.js';\r\nimport { DataService, JsonResultsAdapter } from './metadata/data-service.js';\r\nimport type { DataServiceConfig, JsonResultsAdapterConfig, NodeContext, NodeMeta } from './metadata/data-service.js';\r\nimport { DataType } from './metadata/data-type.js';\r\nimport { EntityAction } from './entity/entity-action.js';\r\nimport { EntityAspect, ComplexAspect } from './entity/entity-aspect.js';\r\nimport { EntityBase, ComplexObjectBase } from './entity/entity-base.js';\r\nimport type { Entity, ComplexObject, StructuralObject, PropertyChangedEventArgs, QueriedAs, EntityAspectOf, ComplexAspectOf } from './entity/entity-aspect.js';\r\nimport { EntityKey } from './entity/entity-key.js';\r\nimport { EntityManager, ProblemTypes, isConcurrencyError } from './manager/entity-manager.js';\r\nimport type { EntityManagerConfig, EntityError, EntityChangedEventArgs, SaveContext, SaveBundle, HttpResponse, KeyMapping, ServerError, SaveResult, QueryResult, ValidationErrorsChangedEventArgs, HasChangesChangedEventArgs } from './manager/entity-manager.js';\r\nimport { EntityQuery, FilterQueryOp, BooleanQueryOp, OrderByClause, ExpandClause, SelectClause } from './query/entity-query.js';\r\nimport { EntityState } from './entity/entity-state.js';\r\nimport { InterfaceRegistry } from './config/interface-registry.js';\r\nimport type { AjaxAdapter, AjaxConfig, BreezeFetch, DataServiceAdapter, ModelLibraryAdapter, ChangeRequestInterceptor, UriBuilderAdapter, InterfaceRegistryConfig, AjaxRequestInterceptor } from './config/interface-registry.js';\r\nimport { KeyGenerator } from './entity/key-generator.js';\r\nimport { LocalQueryComparisonOptions } from './metadata/local-query-comparison-options.js';\r\nimport { MappingContext } from './query/mapping-context.js';\r\nimport { MetadataStore, EntityType, ComplexType, DataProperty, NavigationProperty, AutoGeneratedKeyType, entityTypeForCtor } from './metadata/entity-metadata.js';\r\nimport type { StructuralType, EntityProperty } from './metadata/entity-metadata.js';\r\nimport { NamingConvention } from './metadata/naming-convention.js';\r\nimport { Predicate, UnaryPredicate, BinaryPredicate, AnyAllPredicate, AndOrPredicate, LitExpr, FnExpr, PropExpr } from './query/predicate.js';\r\nimport type { VisitContext, Visitor, ExpressionContext } from './query/predicate.js';\r\nimport { QueryOptions, FetchStrategy, MergeStrategy } from './query/query-options.js';\r\nimport { SaveOptions } from './manager/save-options.js';\r\nimport { ValidationError, Validator } from './validation/validate.js';\r\nimport { ValidationOptions } from './validation/validation-options.js';\r\n\r\nimport { config } from './config/config.js';\r\nimport type { BaseAdapter } from './config/config.js';\r\nimport { configureBreeze } from './config/configure.js';\r\nimport type { BreezeSetupOptions, AdapterRegistration, AjaxAdapterRegistration } from './config/configure.js';\r\nimport { core } from './core/core.js';\r\nimport type { Callback, ErrorCallback } from './core/core.js';\r\nimport { makeRelationArray, makePrimitiveArray, makeComplexArray } from './entity/array.js';\r\n\r\nimport type { RelationArray } from './entity/relation-array.js';\r\nimport type { ArrayChangedArgs } from './entity/observable-array.js';\r\n\r\nexport { BreezeConfig };\r\nexport type { ComplexArray, RelationArray };\r\n\r\nexport {\r\n AbstractDataServiceAdapter,\r\n AndOrPredicate,\r\n AnyAllPredicate,\r\n assertConfig,\r\n assertParam,\r\n AutoGeneratedKeyType,\r\n BinaryPredicate,\r\n BreezeEnum,\r\n BreezeEvent,\r\n ComplexAspect,\r\n ComplexObjectBase,\r\n ComplexType,\r\n config,\r\n configureBreeze,\r\n core,\r\n DataProperty,\r\n DataService,\r\n DataType,\r\n EntityAction,\r\n EntityAspect,\r\n EntityBase,\r\n EntityKey,\r\n EntityManager,\r\n EntityQuery,\r\n EntityState,\r\n EntityType,\r\n entityTypeForCtor,\r\n ExpandClause,\r\n FetchStrategy,\r\n FilterQueryOp,\r\n FnExpr,\r\n InterfaceRegistry,\r\n JsonResultsAdapter,\r\n KeyGenerator,\r\n LitExpr,\r\n LocalQueryComparisonOptions,\r\n makeComplexArray,\r\n makePrimitiveArray,\r\n makeRelationArray,\r\n MappingContext,\r\n MergeStrategy,\r\n MetadataStore,\r\n NamingConvention,\r\n NavigationProperty,\r\n OrderByClause,\r\n Predicate,\r\n PropExpr,\r\n QueryOptions,\r\n SaveOptions,\r\n SelectClause,\r\n UnaryPredicate,\r\n ValidationError,\r\n ValidationOptions,\r\n Validator,\r\n ProblemTypes,\r\n isConcurrencyError,\r\n};\r\n\r\n// Type-only exports. These are erased at runtime, so they must be re-exported\r\n// with `export type`: a bundler transpiling file-by-file cannot tell otherwise,\r\n// and emits a runtime export that does not exist. Browser ESM rejects that.\r\nexport type {\r\n AjaxAdapter,\r\n AjaxConfig,\r\n AjaxRequestInterceptor,\r\n ArrayChangedArgs,\r\n BaseAdapter,\r\n BreezeFetch,\r\n Callback,\r\n ChangeRequestInterceptor,\r\n ComplexObject,\r\n BreezeSetupOptions,\r\n AdapterRegistration,\r\n AjaxAdapterRegistration,\r\n DataServiceAdapter,\r\n DataServiceConfig,\r\n Entity,\r\n EntityChangedEventArgs,\r\n EntityError,\r\n EntityManagerConfig,\r\n EntityProperty,\r\n ErrorCallback,\r\n ExpressionContext,\r\n HasChangesChangedEventArgs,\r\n HttpResponse,\r\n InterfaceRegistryConfig,\r\n JsonResultsAdapterConfig,\r\n KeyMapping,\r\n ModelLibraryAdapter,\r\n NodeContext,\r\n NodeMeta,\r\n PropertyChangedEventArgs,\r\n QueriedAs,\r\n EntityAspectOf,\r\n ComplexAspectOf,\r\n QueryResult,\r\n SaveBundle,\r\n SaveContext,\r\n SaveResult,\r\n ServerError,\r\n StructuralObject,\r\n StructuralType,\r\n UriBuilderAdapter,\r\n ValidationErrorsChangedEventArgs,\r\n VisitContext,\r\n Visitor,\r\n};\r\n\r\n/** Every class, enum and helper of the Breeze 2.x API in one object - the `breeze` that 2.x code\r\n imports or finds as a global. Kept so that code written against 2.x runs unchanged. New code\r\n imports what it uses by name, which lets a bundler leave out the rest. */\r\nexport const breeze = {\r\n /** The base class of Breeze's data service adapters, for anyone writing one. The same as the\r\n `AbstractDataServiceAdapter` export. */\r\n AbstractDataServiceAdapter: AbstractDataServiceAdapter,\r\n /** Always `null`. Breeze 2.x exposed its argument-checking helpers here; Breeze 3 does not. */\r\n assertConfig: null as any,\r\n /** Always `null`. Breeze 2.x exposed its argument-checking helpers here; Breeze 3 does not. */\r\n assertParam: null as any,\r\n /** The same as the {@link AutoGeneratedKeyType} export. */\r\n AutoGeneratedKeyType: AutoGeneratedKeyType,\r\n /** The operators that combine predicates in a query - `and`, `or` and `not` - as an enum. The\r\n same as the `BooleanQueryOp` export. */\r\n BooleanQueryOp: BooleanQueryOp,\r\n /** The same as the {@link ComplexAspect} export. */\r\n ComplexAspect: ComplexAspect,\r\n /** The same as the {@link ComplexType} export. */\r\n ComplexType: ComplexType,\r\n /** The same as the {@link config} export: the older adapter-registration API. New code calls\r\n {@link configureBreeze} instead. */\r\n config: config,\r\n /** The same as the {@link core} export. */\r\n core: core,\r\n /** The same as the {@link DataProperty} export. */\r\n DataProperty: DataProperty,\r\n /** The same as the {@link DataService} export. */\r\n DataService: DataService,\r\n /** The same as the {@link DataType} export. */\r\n DataType: DataType,\r\n /** The same as the {@link EntityAction} export. */\r\n EntityAction: EntityAction,\r\n /** The same as the {@link EntityAspect} export. */\r\n EntityAspect: EntityAspect,\r\n /** The same as the {@link EntityKey} export. */\r\n EntityKey: EntityKey,\r\n /** The same as the {@link EntityManager} export. */\r\n EntityManager: EntityManager,\r\n /** The same as the {@link EntityQuery} export. */\r\n EntityQuery: EntityQuery,\r\n /** The same as the {@link EntityState} export. */\r\n EntityState: EntityState,\r\n /** The same as the {@link EntityType} export. */\r\n EntityType: EntityType,\r\n /** The same as the {@link BreezeEvent} export, under its 2.x name. */\r\n Event: BreezeEvent,\r\n /** The same as the {@link FetchStrategy} export. */\r\n FetchStrategy: FetchStrategy,\r\n /** The same as the {@link FilterQueryOp} export. */\r\n FilterQueryOp: FilterQueryOp,\r\n /** The same as the {@link InterfaceRegistry} export. */\r\n InterfaceRegistry: InterfaceRegistry,\r\n /** The same as the {@link JsonResultsAdapter} export. */\r\n JsonResultsAdapter: JsonResultsAdapter,\r\n /** The same as the {@link KeyGenerator} export. */\r\n KeyGenerator: KeyGenerator,\r\n /** The same as the {@link LocalQueryComparisonOptions} export. */\r\n LocalQueryComparisonOptions: LocalQueryComparisonOptions,\r\n /** Turns an array into the array behind a collection of complex objects. For model library\r\n adapter authors; Breeze's own adapter calls it when it sets up an entity. */\r\n makeComplexArray: makeComplexArray,\r\n /** Turns an array into the array behind a collection of primitive values. For model library\r\n adapter authors; Breeze's own adapter calls it when it sets up an entity. */\r\n makePrimitiveArray: makePrimitiveArray,\r\n /** Turns an array into the {@link RelationArray} behind a collection navigation property. For\r\n model library adapter authors; Breeze's own adapter calls it when it sets up an entity. */\r\n makeRelationArray: makeRelationArray,\r\n /** The same as the {@link MergeStrategy} export. */\r\n MergeStrategy: MergeStrategy,\r\n /** The same as the {@link MetadataStore} export. */\r\n MetadataStore: MetadataStore,\r\n /** The same as the {@link NamingConvention} export. */\r\n NamingConvention: NamingConvention,\r\n /** The same as the {@link NavigationProperty} export. */\r\n NavigationProperty: NavigationProperty,\r\n /** The class that holds a query's `orderBy`. Exposed for Breeze's own tests; applications do not\r\n need it. */\r\n OrderByClause: OrderByClause, // for testing only\r\n /** Breeze's internal argument-checking helper. Applications do not need it. */\r\n Param,\r\n /** The same as the {@link Predicate} export. */\r\n Predicate: Predicate,\r\n /** The same as the {@link QueryOptions} export. */\r\n QueryOptions: QueryOptions,\r\n /** The same as the {@link SaveOptions} export. */\r\n SaveOptions: SaveOptions,\r\n /** The same as the {@link ValidationError} export. */\r\n ValidationError: ValidationError,\r\n /** The same as the {@link ValidationOptions} export. */\r\n ValidationOptions: ValidationOptions,\r\n /** The same as the {@link Validator} export. */\r\n Validator: Validator,\r\n /** The version of `breeze-client`. A test keeps it equal to the one in package.json. */\r\n version: \"3.0.0\"\r\n};\r\n\r\n// breeze.assertConfig = assertConfig as any;\r\n// breeze.assertParam = assertParam as any;\r\n\r\n// Shapes that public signatures accept or return: constructor config objects, event args,\r\n// callbacks, and what adapter authors implement against. Type-only, so no runtime cost -\r\n// exported so applications can name them.\r\nexport type { AdapterCtor, AdapterType } from './config/config.js';\r\nexport type { AjaxRequest, ChangeRequestInterceptorCtor } from './config/interface-registry.js';\r\nexport type {\r\n ComplexTypeConfig, DataPropertyConfig, EntityTypeConfig, EntityTypeSetConfig,\r\n MetadataFetchedEventArgs, MetadataStoreConfig, NavigationPropertyConfig,\r\n} from './metadata/entity-metadata.js';\r\nexport type {\r\n EntityByKeyResult, EntityTypeArg, ExportEntitiesArg, IEntityByKeyResult, ImportConfig, ImportResult, InitialValues, ITempKeyMap,\r\n QueryErrorCallback, QuerySuccessCallback, SaveError,\r\n} from './manager/entity-manager.js';\r\nexport type { LocalQueryComparisonOptionsConfig } from './metadata/local-query-comparison-options.js';\r\nexport type { NamingConventionConfig } from './metadata/naming-convention.js';\r\nexport type {\r\n CollectionElement, CollectionPath, FilterOpFor, FilterValueExpression, FilterValueFor, FunctionExpressionPath,\r\n FilterClause, FilterOpsObject, FilterOpNameFor, NavigationPath, OrderByPath,\r\n KeyValues, OriginalValues, PropertyPath, PropertyValue, QuantifierOp, SelectPath, WhereObject,\r\n} from './query/property-path.js';\r\nexport type { TypedPredicateFactory } from './query/predicate.js';\r\nexport type { QueryOptionsConfig } from './query/query-options.js';\r\nexport type { SaveOptionsConfig } from './manager/save-options.js';\r\nexport type { ValidationContext, ValidationFn, ValidationMessageContext } from './validation/validate.js';\r\nexport type { ValidationOptionsConfig } from './validation/validation-options.js';\r\n\r\n/** Kept for code written against Breeze 2.x and `breeze-bridge2-angular`. Breeze 3 uses native\r\n promises and has nothing to configure here. */\r\nexport namespace promises {\r\n /** An empty interface, kept so that code written for `breeze-bridge2-angular`, which named it,\r\n still compiles. Breeze 3 uses native promises. */\r\n export interface IPromiseService {}\r\n}\r\n\r\n/** @hidden @internal */\r\ndeclare var window: any;\r\n\r\n/** @hidden @internal */\r\ndeclare var global: any;\r\n\r\n// The 2.x global. Unbundled, this always runs. Under \"sideEffects\": false a bundler keeps it only\r\n// when the bundle uses the `breeze` object above - which holds every class, so keeping it for\r\n// every bundle would defeat tree-shaking. See CHANGES-DEV.md.\r\n/** @hidden @internal */\r\nlet win: any;\r\ntry {\r\n win = window ? window : (global ? global.window : undefined);\r\n} catch (e) {\r\n\r\n}\r\nif (win) {\r\n win.breeze = breeze;\r\n}\r\n"]}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import type { AjaxAdapter, BreezeFetch, DataServiceAdapter, ModelLibraryAdapter, UriBuilderAdapter } from './interface-registry.js';
|
|
2
|
+
import { BreezeEvent } from '../core/event.js';
|
|
3
|
+
/** @hidden */
|
|
4
|
+
export interface AdapterCtor<T extends BaseAdapter> {
|
|
5
|
+
new (...args: any[]): T;
|
|
6
|
+
}
|
|
7
|
+
/** @hidden */
|
|
8
|
+
export interface IDef<T extends BaseAdapter> {
|
|
9
|
+
ctor: AdapterCtor<T>;
|
|
10
|
+
defaultInstance?: T;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
The names of the adapter interfaces, as passed to the 2.x-style methods on {@link BreezeConfig}
|
|
14
|
+
such as `registerAdapter` and `initializeAdapterInstance`. With {@link configureBreeze} you pass
|
|
15
|
+
the adapter classes instead and never need these names.
|
|
16
|
+
*/
|
|
17
|
+
export type AdapterType = 'dataService' | 'modelLibrary' | 'ajax' | 'uriBuilder';
|
|
18
|
+
export declare class InterfaceDef<T extends BaseAdapter> {
|
|
19
|
+
name: string;
|
|
20
|
+
defaultInstance?: T;
|
|
21
|
+
constructor(name: string);
|
|
22
|
+
/** Define an implementation of the given adaptername */
|
|
23
|
+
registerCtor(adapterName: string, ctor: AdapterCtor<T>): void;
|
|
24
|
+
/** Return the definition for the given adapterName */
|
|
25
|
+
getImpl(adapterName: string): IDef<T>;
|
|
26
|
+
/** Return the first implementation for this InterfaceDef */
|
|
27
|
+
getFirstImpl(): IDef<T>;
|
|
28
|
+
getDefaultInstance(): T;
|
|
29
|
+
}
|
|
30
|
+
/** Registers adapters used by Breeze */
|
|
31
|
+
export declare class InterfaceRegistry {
|
|
32
|
+
/** Creates a registry with no adapters in it. {@link config} holds the one Breeze uses;
|
|
33
|
+
applications do not create their own. */
|
|
34
|
+
constructor();
|
|
35
|
+
/** The registered {@link AjaxAdapter}s, and the default one if any. Deprecated: Breeze 3 sends requests through `config.fetch` and needs no ajax adapter. */
|
|
36
|
+
ajax: InterfaceDef<AjaxAdapter>;
|
|
37
|
+
/** The registered {@link ModelLibraryAdapter}s, and the default one. */
|
|
38
|
+
modelLibrary: InterfaceDef<ModelLibraryAdapter>;
|
|
39
|
+
/** The registered {@link DataServiceAdapter}s, and the default one. */
|
|
40
|
+
dataService: InterfaceDef<DataServiceAdapter>;
|
|
41
|
+
/** The registered {@link UriBuilderAdapter}s, and the default one. */
|
|
42
|
+
uriBuilder: InterfaceDef<UriBuilderAdapter>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
What every Breeze adapter implements: the model library, data service, URI builder and
|
|
46
|
+
(deprecated) ajax adapters all extend this interface.
|
|
47
|
+
*/
|
|
48
|
+
export interface BaseAdapter {
|
|
49
|
+
/**
|
|
50
|
+
The name the adapter is registered under, such as `'webApi'` or `'backingStore'`. Names are
|
|
51
|
+
matched without regard to case. `registerAdapter` reads it from a throwaway instance and throws
|
|
52
|
+
if it is empty.
|
|
53
|
+
*/
|
|
54
|
+
name: string;
|
|
55
|
+
/**
|
|
56
|
+
Called by Breeze each time the adapter is initialized: when it is first created, and again
|
|
57
|
+
whenever it is initialized by name or registered again, for example by {@link configureBreeze}.
|
|
58
|
+
Resolve anything the adapter depends on here, not in the constructor.
|
|
59
|
+
*/
|
|
60
|
+
initialize(): void;
|
|
61
|
+
/**
|
|
62
|
+
Optional. Called each time any adapter is initialized after this one first was, with
|
|
63
|
+
`{ interfaceName, instance, isDefault }`, so that this adapter can pick up a new dependency. The data service adapters use
|
|
64
|
+
it to re-resolve their ajax adapter when a new default ajax adapter is initialized.
|
|
65
|
+
*/
|
|
66
|
+
checkForRecomposition?: (context: any) => void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
An adapter Breeze falls back to for an interface when nothing has been registered for it.
|
|
70
|
+
@hidden
|
|
71
|
+
*/
|
|
72
|
+
export interface DefaultAdapter {
|
|
73
|
+
ctor: AdapterCtor<any>;
|
|
74
|
+
/** Use only when asked for by name, never as the unnamed default. */
|
|
75
|
+
namedOnly?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
Breeze's global configuration: the adapter registry, the `fetch` transport, and registries Breeze
|
|
79
|
+
uses to find functions and objects by name when it deserializes metadata. The single instance is
|
|
80
|
+
{@link config}.
|
|
81
|
+
|
|
82
|
+
To configure Breeze, use {@link configureBreeze}. The adapter methods here (`registerAdapter`,
|
|
83
|
+
`initializeAdapterInstance`, `getAdapterInstance` and the rest) are the 2.x API. They still
|
|
84
|
+
work, and adapters' own static `register()` methods use them, but an application does not
|
|
85
|
+
normally need to call them.
|
|
86
|
+
*/
|
|
87
|
+
export declare class BreezeConfig {
|
|
88
|
+
/**
|
|
89
|
+
Functions registered by name with {@link BreezeConfig.registerFunction}. Breeze looks up
|
|
90
|
+
validator factories here, under `"Validator." + name`, when it imports metadata. Applications do
|
|
91
|
+
not normally need it; use {@link Validator.register} and {@link Validator.registerFactory}.
|
|
92
|
+
*/
|
|
93
|
+
functionRegistry: Record<string, Function>;
|
|
94
|
+
/**
|
|
95
|
+
Constructors registered by name with {@link BreezeConfig.registerType}. Nothing in Breeze 3
|
|
96
|
+
reads it; applications do not normally need it.
|
|
97
|
+
*/
|
|
98
|
+
typeRegistry: Record<string, Function>;
|
|
99
|
+
/**
|
|
100
|
+
Named instances Breeze can find again by name, keyed `"<TypeName>.<name>"`: every
|
|
101
|
+
{@link JsonResultsAdapter}, {@link NamingConvention} and {@link LocalQueryComparisonOptions}
|
|
102
|
+
registers itself here when created. Breeze uses it to resolve the names in exported metadata and
|
|
103
|
+
exported entities. Applications do not normally need it.
|
|
104
|
+
*/
|
|
105
|
+
objectRegistry: Record<string, any>;
|
|
106
|
+
/**
|
|
107
|
+
Published each time an adapter is initialized, with the interface name, the adapter instance
|
|
108
|
+
and whether it became the default for its interface. Breeze uses it to let adapters that depend
|
|
109
|
+
on each other recompose (see {@link BaseAdapter.checkForRecomposition}); applications do not
|
|
110
|
+
normally need it.
|
|
111
|
+
*/
|
|
112
|
+
interfaceInitialized: BreezeEvent<{
|
|
113
|
+
/** The interface the adapter implements: `"ajax"`, `"dataService"`, `"modelLibrary"` or `"uriBuilder"`. */
|
|
114
|
+
interfaceName: string;
|
|
115
|
+
/** The adapter that was initialized. */
|
|
116
|
+
instance: BaseAdapter;
|
|
117
|
+
/** Whether it became the default adapter for its interface. */
|
|
118
|
+
isDefault: boolean;
|
|
119
|
+
}>;
|
|
120
|
+
/**
|
|
121
|
+
The indentation Breeze passes to `JSON.stringify` when it serializes exported entities
|
|
122
|
+
(`EntityManager.exportEntities`) and exported metadata (`MetadataStore.exportMetadata`).
|
|
123
|
+
The default, `''`, produces compact JSON; set it to, say, `' '` for readable output.
|
|
124
|
+
*/
|
|
125
|
+
stringifyPad: string;
|
|
126
|
+
/**
|
|
127
|
+
* The function Breeze makes HTTP requests with, unless a (deprecated) ajax adapter is
|
|
128
|
+
* registered. Set it with `configureBreeze({ fetch })`. When unset, `globalThis.fetch`.
|
|
129
|
+
*/
|
|
130
|
+
fetch?: BreezeFetch;
|
|
131
|
+
/** Creates a configuration with nothing registered. Breeze creates the one instance there is,
|
|
132
|
+
{@link config}; applications do not create their own. */
|
|
133
|
+
constructor();
|
|
134
|
+
/**
|
|
135
|
+
Method use to register implementations of standard breeze interfaces. Calls to this method are usually
|
|
136
|
+
made as the last step within an adapter implementation.
|
|
137
|
+
@param interfaceName {String} - one of the following interface names: "ajax", "dataService", "modelLibrary", "uriBuilder"
|
|
138
|
+
@param adapterCtor {Function} - an ctor function that returns an instance of the specified interface.
|
|
139
|
+
|
|
140
|
+
@deprecated For configuring an application, use `configureBreeze({ ajax: MyAdapter, ... })`
|
|
141
|
+
instead: the adapter classes are passed directly, so a misspelled name is a compile error
|
|
142
|
+
rather than a runtime one. An adapter's own static `register()` still calls this - that is
|
|
143
|
+
how an adapter registers itself, and is not deprecated. Not scheduled for removal.
|
|
144
|
+
*/
|
|
145
|
+
registerAdapter<T extends BaseAdapter>(interfaceName: AdapterType, adapterCtor: AdapterCtor<T>): void;
|
|
146
|
+
/**
|
|
147
|
+
Returns the ctor function used to implement a specific interface with a specific adapter name.
|
|
148
|
+
@param interfaceName {String} One of the following interface names: "ajax", "dataService", "modelLibrary", "uriBuilder"
|
|
149
|
+
@param [adapterName] {String} The name of any previously registered adapter. If this parameter is omitted then
|
|
150
|
+
this method returns the "default" adapter for this interface. If there is no default adapter, then a null is returned.
|
|
151
|
+
@returns {Function|null} Returns either a ctor function or null.
|
|
152
|
+
*/
|
|
153
|
+
getAdapter(interfaceName: AdapterType, adapterName: string): any;
|
|
154
|
+
/**
|
|
155
|
+
Initializes a single adapter implementation. Initialization means either newing a instance of the
|
|
156
|
+
specified interface and then calling "initialize" on it or simply calling "initialize" on the instance
|
|
157
|
+
if it already exists.
|
|
158
|
+
@param interfaceName {String} The name of the interface to which the adapter to initialize belongs.
|
|
159
|
+
@param adapterName {String} - The name of a previously registered adapter to initialize.
|
|
160
|
+
@param [isDefault=true] {Boolean} - Whether to make this the default "adapter" for this interface.
|
|
161
|
+
@returns {an instance of the specified adapter}
|
|
162
|
+
|
|
163
|
+
@deprecated For configuring an application, use `configureBreeze({ ajax: MyAdapter, ... })`
|
|
164
|
+
instead: the adapter classes are passed directly, so a misspelled name is a compile error
|
|
165
|
+
rather than a runtime one. An adapter's own static `register()` still calls this - that is
|
|
166
|
+
how an adapter registers itself, and is not deprecated. Not scheduled for removal.
|
|
167
|
+
*/
|
|
168
|
+
initializeAdapterInstance(interfaceName: AdapterType, adapterName: string, isDefault?: boolean): BaseAdapter;
|
|
169
|
+
/**
|
|
170
|
+
Returns the adapter instance corresponding to the specified interface and adapter names.
|
|
171
|
+
@param interfaceName {String} The name of the interface.
|
|
172
|
+
@param [adapterName] {String} - The name of a previously registered adapter. If this parameter is
|
|
173
|
+
omitted then the default implementation of the specified interface is returned. If there is
|
|
174
|
+
no defaultInstance of this interface, then the first registered instance of this interface is returned.
|
|
175
|
+
@returns {an instance of the specified adapter}
|
|
176
|
+
*/
|
|
177
|
+
getAdapterInstance<T extends BaseAdapter>(interfaceName: AdapterType, adapterName?: string): T | undefined;
|
|
178
|
+
/** this is needed for reflection purposes when deserializing an object that needs a fn or ctor.
|
|
179
|
+
Used to register validators. */
|
|
180
|
+
registerFunction(fn: Function, fnName: string): void;
|
|
181
|
+
/**
|
|
182
|
+
Registers a constructor under a type name: stamps the name on its prototype as `_$typeName` and
|
|
183
|
+
adds it to {@link BreezeConfig.typeRegistry}. Breeze registers `KeyGenerator` this way;
|
|
184
|
+
applications do not normally need it.
|
|
185
|
+
@param ctor - The constructor to register.
|
|
186
|
+
@param typeName - The name to register it under.
|
|
187
|
+
*/
|
|
188
|
+
registerType(ctor: Function, typeName: string): void;
|
|
189
|
+
/**
|
|
190
|
+
Returns the function registered under the given name with {@link BreezeConfig.registerFunction},
|
|
191
|
+
or `undefined` if there is none. Validators are registered as `"Validator." + name`, so
|
|
192
|
+
`config.getRegisteredFunction('Validator.maxLength')` returns the `maxLength` factory.
|
|
193
|
+
@param fnName - The name the function was registered under.
|
|
194
|
+
*/
|
|
195
|
+
getRegisteredFunction(fnName: string): Function;
|
|
196
|
+
/**
|
|
197
|
+
Returns the registry entry for one adapter interface, which holds its registered adapters and
|
|
198
|
+
its default instance. The name is matched without regard to case.
|
|
199
|
+
Used by the adapter registration methods; applications do not normally need it.
|
|
200
|
+
@param interfaceName - `'ajax'`, `'dataService'`, `'modelLibrary'` or `'uriBuilder'`.
|
|
201
|
+
@throws if there is no interface with that name.
|
|
202
|
+
*/
|
|
203
|
+
getInterfaceDef<T extends BaseAdapter>(interfaceName: string): InterfaceDef<T>;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
The global {@link BreezeConfig}, used by every `EntityManager`, `MetadataStore` and `DataService`.
|
|
207
|
+
|
|
208
|
+
To configure Breeze, use {@link configureBreeze}, which sets this object's adapters and `fetch`.
|
|
209
|
+
The 2.x calls on it, such as `config.registerAdapter(...)` and
|
|
210
|
+
`config.initializeAdapterInstance(...)`, still work and are not scheduled for removal.
|
|
211
|
+
*/
|
|
212
|
+
export declare const config: BreezeConfig;
|