@daffodil/driver 0.87.2 → 0.89.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/fesm2022/daffodil-driver-hubspot-testing.mjs +3 -3
- package/fesm2022/daffodil-driver-hubspot-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-hubspot.mjs.map +1 -1
- package/fesm2022/daffodil-driver-in-memory.mjs +52 -15
- package/fesm2022/daffodil-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-driver-magento-testing.mjs +9 -9
- package/fesm2022/daffodil-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-magento.mjs +482 -48
- package/fesm2022/daffodil-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-driver-shopify-testing.mjs +18 -18
- package/fesm2022/daffodil-driver-shopify-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-shopify.mjs +37 -18
- package/fesm2022/daffodil-driver-shopify.mjs.map +1 -1
- package/fesm2022/daffodil-driver.mjs +3 -3
- package/fesm2022/daffodil-driver.mjs.map +1 -1
- package/hubspot/index.d.ts +68 -1
- package/hubspot/testing/index.d.ts +21 -1
- package/in-memory/index.d.ts +162 -1
- package/index.d.ts +64 -1
- package/magento/index.d.ts +176 -1
- package/magento/testing/index.d.ts +23 -1
- package/package.json +1 -1
- package/shopify/index.d.ts +8296 -1
- package/shopify/testing/index.d.ts +80 -1
- package/errors/bad-input.d.ts +0 -6
- package/errors/codes.d.ts +0 -3
- package/errors/network-error.class.d.ts +0 -9
- package/errors/public_api.d.ts +0 -3
- package/http-client-cache/noop.service.d.ts +0 -12
- package/http-client-cache/public_api.d.ts +0 -3
- package/http-client-cache/service.token.d.ts +0 -2
- package/http-client-cache/service.type.d.ts +0 -10
- package/hubspot/hubspot-forms.provider.d.ts +0 -9
- package/hubspot/hubspot-forms.service.d.ts +0 -23
- package/hubspot/models/config.d.ts +0 -5
- package/hubspot/models/forms.d.ts +0 -8
- package/hubspot/models/hubspot-request.d.ts +0 -15
- package/hubspot/models/hubspot-response.d.ts +0 -9
- package/hubspot/public_api.d.ts +0 -6
- package/hubspot/testing/factories/hubspot-response.factory.d.ts +0 -18
- package/hubspot/testing/factories/public_api.d.ts +0 -1
- package/hubspot/testing/public_api.d.ts +0 -1
- package/hubspot/transformers/json-builder.d.ts +0 -2
- package/in-memory/backend/backends.token.d.ts +0 -2
- package/in-memory/backend/data-service.type.d.ts +0 -23
- package/in-memory/backend/delegate.class.d.ts +0 -25
- package/in-memory/backend/public_api.d.ts +0 -6
- package/in-memory/backend/root.service.d.ts +0 -17
- package/in-memory/backend/routeable.type.d.ts +0 -25
- package/in-memory/backend/type.d.ts +0 -6
- package/in-memory/config/default.d.ts +0 -2
- package/in-memory/config/public_api.d.ts +0 -3
- package/in-memory/config/token.d.ts +0 -2
- package/in-memory/config/type.d.ts +0 -6
- package/in-memory/driver/base.class.d.ts +0 -14
- package/in-memory/driver/public_api.d.ts +0 -1
- package/in-memory/module.d.ts +0 -12
- package/in-memory/public_api.d.ts +0 -4
- package/magento/errors/error.class.d.ts +0 -9
- package/magento/errors/public_api.d.ts +0 -3
- package/magento/errors/transform-graphql.d.ts +0 -3
- package/magento/errors/transform.d.ts +0 -5
- package/magento/fragments/money.d.ts +0 -1
- package/magento/fragments/page-info.d.ts +0 -1
- package/magento/fragments/public_api.d.ts +0 -2
- package/magento/graphql/cache-header/cache-header-apollo-link.d.ts +0 -17
- package/magento/graphql/cache.service.d.ts +0 -14
- package/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.d.ts +0 -15
- package/magento/graphql/cacheable-operations/cacheable-operations-token.d.ts +0 -9
- package/magento/graphql/public_api.d.ts +0 -5
- package/magento/graphql/type-policies.d.ts +0 -12
- package/magento/magento.module.d.ts +0 -6
- package/magento/models/discount.d.ts +0 -6
- package/magento/models/filter-input.type.d.ts +0 -6
- package/magento/models/money.d.ts +0 -5
- package/magento/models/page-info.d.ts +0 -6
- package/magento/models/public_api.d.ts +0 -5
- package/magento/models/sort.enum.d.ts +0 -4
- package/magento/public_api.d.ts +0 -7
- package/magento/schema/schema.d.ts +0 -21
- package/magento/testing/factories/discount.factory.d.ts +0 -14
- package/magento/testing/factories/money.factory.d.ts +0 -13
- package/magento/testing/factories/page-info.factory.d.ts +0 -8
- package/magento/testing/factories/public_api.d.ts +0 -3
- package/magento/transforms/public_api.d.ts +0 -2
- package/magento/transforms/requests/public_api.d.ts +0 -1
- package/magento/transforms/requests/sort-direction.d.ts +0 -3
- package/magento/transforms/responses/page-info.d.ts +0 -3
- package/magento/transforms/responses/public_api.d.ts +0 -2
- package/magento/transforms/responses/sort-direction.d.ts +0 -3
- package/models/public_api.d.ts +0 -1
- package/models/response.interface.d.ts +0 -15
- package/public_api.d.ts +0 -3
- package/shopify/codegen/generated-shopify-types.d.ts +0 -8214
- package/shopify/codegen/public_api.d.ts +0 -1
- package/shopify/graphql/apollo-links/auth-link.d.ts +0 -8
- package/shopify/graphql/apollo-links/error-link.d.ts +0 -7
- package/shopify/graphql/apollo-links/http-link.d.ts +0 -8
- package/shopify/graphql/apollo-links/public_api.d.ts +0 -3
- package/shopify/graphql/provide-shopify-apollo-driver.d.ts +0 -8
- package/shopify/graphql/public_api.d.ts +0 -1
- package/shopify/models/image-node.d.ts +0 -5
- package/shopify/models/money.d.ts +0 -3
- package/shopify/models/product-graph.d.ts +0 -5
- package/shopify/models/product-images.d.ts +0 -5
- package/shopify/models/product-node.d.ts +0 -4
- package/shopify/models/product-price-range.d.ts +0 -5
- package/shopify/models/public_api.d.ts +0 -6
- package/shopify/public_api.d.ts +0 -4
- package/shopify/testing/factories/money.factory.d.ts +0 -13
- package/shopify/testing/factories/product-graph.factory.d.ts +0 -15
- package/shopify/testing/factories/product-image-node.factory.d.ts +0 -14
- package/shopify/testing/factories/product-images.factory.d.ts +0 -15
- package/shopify/testing/factories/product-node.factory.d.ts +0 -24
- package/shopify/testing/factories/product-price-range.factory.d.ts +0 -16
- package/shopify/testing/factories/public_api.d.ts +0 -6
- package/shopify/transforms/public_api.d.ts +0 -3
- package/shopify/transforms/shopify-handle-transform.d.ts +0 -7
- package/shopify/transforms/shopify-id-transform.d.ts +0 -10
- package/shopify/transforms/shopify-url-transform.d.ts +0 -9
|
@@ -33,10 +33,10 @@ class DaffDriverNetworkError extends DaffInheritableError {
|
|
|
33
33
|
*/
|
|
34
34
|
class DaffDriverHttpClientCacheNoopService {
|
|
35
35
|
reset() { }
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, providedIn: 'root' }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, decorators: [{
|
|
40
40
|
type: Injectable,
|
|
41
41
|
args: [{
|
|
42
42
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/codes.ts","../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/errors/network-error.class.ts","../../../libs/driver/src/http-client-cache/noop.service.ts","../../../libs/driver/src/http-client-cache/service.token.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["export enum DaffDriverErrorCodes {\n BAD_INPUT = 'DAFF_BAD_INPUT'\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffDriverErrorCodes } from './codes';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffDriverErrorCodes.BAD_INPUT;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_NETWORK_ERROR_CODE = 'DAFF_DRIVER_NETWORK_ERROR';\n\n/**\n * An error thrown when the a driver encounters a problem with network connectivity.\n */\nexport class DaffDriverNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\n/**\n * A noop service. Always does nothing for every single method.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {\n reset(): void {}\n}\n","import { inject } from '@angular/core';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nimport { DaffDriverHttpClientCacheNoopService } from './noop.service';\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\nexport const {\n token: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n /**\n * Provider function for {@link DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE}.\n */\n provider: provideDaffDriverHttpClientCacheService,\n} = createSingletonInjectionToken<DaffDriverHttpClientCacheServiceInterface>(\n 'DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE',\n { factory: () => inject(DaffDriverHttpClientCacheNoopService) },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAAY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,gBAA4B;AAC9B,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/codes.ts","../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/errors/network-error.class.ts","../../../libs/driver/src/http-client-cache/noop.service.ts","../../../libs/driver/src/http-client-cache/service.token.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["export enum DaffDriverErrorCodes {\n BAD_INPUT = 'DAFF_BAD_INPUT'\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffDriverErrorCodes } from './codes';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffDriverErrorCodes.BAD_INPUT;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_NETWORK_ERROR_CODE = 'DAFF_DRIVER_NETWORK_ERROR';\n\n/**\n * An error thrown when the a driver encounters a problem with network connectivity.\n */\nexport class DaffDriverNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\n/**\n * A noop service. Always does nothing for every single method.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {\n reset(): void {}\n}\n","import { inject } from '@angular/core';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nimport { DaffDriverHttpClientCacheNoopService } from './noop.service';\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\nexport const {\n token: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n /**\n * Provider function for {@link DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE}.\n */\n provider: provideDaffDriverHttpClientCacheService,\n} = createSingletonInjectionToken<DaffDriverHttpClientCacheServiceInterface>(\n 'DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE',\n { factory: () => inject(DaffDriverHttpClientCacheNoopService) },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAAY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,gBAA4B;AAC9B,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,GAAA,EAAA,CAAA,CAAA;;ACO1B,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAGzD,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC;QADG,IAAA,CAAA,OAAO,GAAP,OAAO;AAFV,QAAA,IAAA,CAAA,IAAI,GAAW,oBAAoB,CAAC,SAAS;IAI7D;AACD;;ACRM,MAAM,8BAA8B,GAAG;AAE9C;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG9D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC;QAHA,IAAA,CAAA,IAAI,GAAW,8BAA8B;IAI7D;AACD;;ACZD;;;;AAIG;MAIU,oCAAoC,CAAA;AAC/C,IAAA,KAAK,KAAU;8GADJ,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oCAAoC,cAFnC,MAAM,EAAA,CAAA,CAAA;;2FAEP,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAHhD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACJM,MAAM,EACX,KAAK,EAAE,qCAAqC;AAC5C;;AAEG;AACH,QAAQ,EAAE,uCAAuC,GAClD,GAAG,6BAA6B,CAC/B,uCAAuC,EACvC,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC,oCAAoC,CAAC,EAAE;;ACfjE;;AAEG;;;;"}
|
package/hubspot/index.d.ts
CHANGED
|
@@ -1 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Title } from '@angular/platform-browser';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
interface DaffHubspotConfig {
|
|
7
|
+
portalId: string;
|
|
8
|
+
guid: string;
|
|
9
|
+
version?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface HubspotError {
|
|
13
|
+
errorType: string;
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
interface HubspotResponse {
|
|
17
|
+
redirectUri?: string;
|
|
18
|
+
inlineMessage: string;
|
|
19
|
+
errors: HubspotError[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Interface for interacting with Hubspot Forms API.
|
|
24
|
+
*/
|
|
25
|
+
interface DaffHubspotFormsInterface {
|
|
26
|
+
submit(payload: Record<string, any>): Observable<HubspotResponse>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Service for interacting with Hubspot Forms API.
|
|
31
|
+
*/
|
|
32
|
+
declare class DaffHubspotFormsService implements DaffHubspotFormsInterface {
|
|
33
|
+
private http;
|
|
34
|
+
private document;
|
|
35
|
+
private route;
|
|
36
|
+
private title;
|
|
37
|
+
private config;
|
|
38
|
+
constructor(http: HttpClient, document: Document, route: Router, title: Title, config: DaffHubspotConfig);
|
|
39
|
+
submit(payload: Record<string, any>): Observable<HubspotResponse>;
|
|
40
|
+
private makeRequest;
|
|
41
|
+
private generateUrl;
|
|
42
|
+
private getCookie;
|
|
43
|
+
private getPageURI;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface DaffHubspotRequest {
|
|
47
|
+
fields: FieldValue[];
|
|
48
|
+
context?: HubspotContext;
|
|
49
|
+
}
|
|
50
|
+
interface HubspotContext {
|
|
51
|
+
hutk?: string;
|
|
52
|
+
ipAddress?: string;
|
|
53
|
+
pageName?: string;
|
|
54
|
+
pageUri?: string;
|
|
55
|
+
pageId?: string;
|
|
56
|
+
}
|
|
57
|
+
interface FieldValue {
|
|
58
|
+
name: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Factory for {@link DaffHubspotFormsService}.
|
|
64
|
+
*/
|
|
65
|
+
declare const daffHubspotFormsServiceFactory: (http: HttpClient, document: Document, router: Router, title: Title, config: DaffHubspotConfig) => DaffHubspotFormsInterface;
|
|
66
|
+
|
|
67
|
+
export { DaffHubspotFormsService, daffHubspotFormsServiceFactory };
|
|
68
|
+
export type { DaffHubspotConfig, DaffHubspotFormsInterface, DaffHubspotRequest, HubspotError, HubspotResponse };
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
+
import { HubspotResponse, HubspotError } from '@daffodil/driver/hubspot';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class MockHubspotResponse implements HubspotResponse {
|
|
6
|
+
redirectUri?: string;
|
|
7
|
+
inlineMessage: string;
|
|
8
|
+
errors: HubspotError[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Model factory for {@link MockHubspotResponse}s.
|
|
12
|
+
*
|
|
13
|
+
* Should be used to create {@link MockHubspotResponse}s for testing purposes.
|
|
14
|
+
*/
|
|
15
|
+
declare class DaffHubspotResponseFactory extends DaffModelFactory<HubspotResponse> {
|
|
16
|
+
constructor();
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffHubspotResponseFactory, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffHubspotResponseFactory>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { DaffHubspotResponseFactory, MockHubspotResponse };
|
package/in-memory/index.d.ts
CHANGED
|
@@ -1 +1,162 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ModuleWithProviders, Type, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { RequestInfo, InMemoryDbService, InMemoryBackendConfigArgs } from 'angular-in-memory-web-api';
|
|
4
|
+
import * as rxjs from 'rxjs';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* An interface for defining in memory services that can handle CRUD requests.
|
|
9
|
+
*/
|
|
10
|
+
interface DaffInMemoryDataServiceInterface {
|
|
11
|
+
/**
|
|
12
|
+
* The R in CRUD.
|
|
13
|
+
*/
|
|
14
|
+
get?(reqInfo: RequestInfo): Observable<any>;
|
|
15
|
+
/**
|
|
16
|
+
* The C in CRUD.
|
|
17
|
+
*/
|
|
18
|
+
post?(reqInfo: RequestInfo): Observable<any>;
|
|
19
|
+
/**
|
|
20
|
+
* The U in CRUD.
|
|
21
|
+
*/
|
|
22
|
+
put?(reqInfo: RequestInfo): Observable<any>;
|
|
23
|
+
/**
|
|
24
|
+
* The D in CRUD.
|
|
25
|
+
*/
|
|
26
|
+
delete?(reqInfo: RequestInfo): Observable<any>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A routing target that handles a single collection.
|
|
31
|
+
*/
|
|
32
|
+
interface DaffInMemorySingleRouteableBackend extends DaffInMemoryDataServiceInterface {
|
|
33
|
+
/**
|
|
34
|
+
* The collection name of the backend service where the backend only serves one collection.
|
|
35
|
+
* Used for routing requests to the correct backend.
|
|
36
|
+
*/
|
|
37
|
+
readonly collectionName: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A routing target that handles multiple collections.
|
|
41
|
+
*/
|
|
42
|
+
interface DaffInMemoryMultiRouteableBackend extends DaffInMemoryDataServiceInterface {
|
|
43
|
+
/**
|
|
44
|
+
* Returns true if the backend can handle the request with the specified collection name.
|
|
45
|
+
* Used for backends that handle multiple collections.
|
|
46
|
+
*/
|
|
47
|
+
canHandle(collectionName: string): boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* An in-memory backend that can be easily routed to based on the available capabilities.
|
|
51
|
+
*/
|
|
52
|
+
type DaffInMemoryRouteableBackend = DaffInMemorySingleRouteableBackend | DaffInMemoryMultiRouteableBackend;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* An interface for defining in memory backends that use the angular in memory web api.
|
|
56
|
+
*/
|
|
57
|
+
type DaffInMemoryBackendInterface = InMemoryDbService & DaffInMemoryRouteableBackend;
|
|
58
|
+
|
|
59
|
+
declare const DAFF_IN_MEMORY_BACKENDS: _angular_core.InjectionToken<DaffInMemoryBackendInterface[]>;
|
|
60
|
+
declare const provideDaffInMemoryBackends: <R extends DaffInMemoryBackendInterface = DaffInMemoryBackendInterface>(...classes: _angular_core.Type<R>[]) => Array<_angular_core.ExistingProvider>;
|
|
61
|
+
|
|
62
|
+
declare enum Method {
|
|
63
|
+
GET = "get",
|
|
64
|
+
POST = "post",
|
|
65
|
+
PUT = "put",
|
|
66
|
+
DELETE = "delete"
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* An class that automatically delegates requests to in-memory backends.
|
|
70
|
+
*
|
|
71
|
+
* @inheritdoc
|
|
72
|
+
*/
|
|
73
|
+
declare class DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface {
|
|
74
|
+
protected backends: Array<DaffInMemoryRouteableBackend>;
|
|
75
|
+
protected config: DaffInMemoryDriverConfig;
|
|
76
|
+
constructor(backends: Array<DaffInMemoryRouteableBackend>, config: DaffInMemoryDriverConfig);
|
|
77
|
+
protected delegateRequest(reqInfo: RequestInfo, method: Method): Observable<any>;
|
|
78
|
+
get?(reqInfo: RequestInfo): Observable<any>;
|
|
79
|
+
post?(reqInfo: RequestInfo): Observable<any>;
|
|
80
|
+
put?(reqInfo: RequestInfo): Observable<any>;
|
|
81
|
+
delete?(reqInfo: RequestInfo): Observable<any>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* An in-memory backend that automatically delegates requests to backends provided to {@link DAFF_IN_MEMORY_BACKENDS}.
|
|
86
|
+
*
|
|
87
|
+
* @inheritdoc
|
|
88
|
+
*/
|
|
89
|
+
declare class DaffInMemoryRootBackend extends DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface, InMemoryDbService {
|
|
90
|
+
private _backends;
|
|
91
|
+
private _config;
|
|
92
|
+
constructor(_backends: Array<DaffInMemoryBackendInterface>, _config: DaffInMemoryDriverConfig);
|
|
93
|
+
createDb(reqInfo?: RequestInfo): rxjs.Observable<{}>;
|
|
94
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffInMemoryRootBackend, never>;
|
|
95
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DaffInMemoryRootBackend>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The base class for in-memory drivers.
|
|
100
|
+
*/
|
|
101
|
+
declare abstract class DaffInMemoryDriverBase {
|
|
102
|
+
private config;
|
|
103
|
+
private collectionName;
|
|
104
|
+
/**
|
|
105
|
+
* The URL of the corresponding backend.
|
|
106
|
+
* Does not include a trailing slash, it is of the form: `/<api base>/<collection name>`.
|
|
107
|
+
*/
|
|
108
|
+
protected readonly url: string;
|
|
109
|
+
constructor(config: InMemoryBackendConfigArgs, collectionName: string);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface DaffInMemoryDriverConfig {
|
|
113
|
+
/**
|
|
114
|
+
* The base path segment of the API route.
|
|
115
|
+
*/
|
|
116
|
+
apiBase: string;
|
|
117
|
+
/**
|
|
118
|
+
* When enabled, requests that do not match any configured backend
|
|
119
|
+
* will be automatically forwarded to the provided backend endpoint.
|
|
120
|
+
*
|
|
121
|
+
* This acts as a "catch-all" or fallback mechanism, ensuring that
|
|
122
|
+
* unknown or unconfigured routes are still proxied instead of being
|
|
123
|
+
* rejected.
|
|
124
|
+
*/
|
|
125
|
+
passThroughUnknownRequests?: boolean;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare const DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT: DaffInMemoryDriverConfig;
|
|
129
|
+
|
|
130
|
+
declare const DAFF_IN_MEMORY_DRIVER_CONFIG: _angular_core.InjectionToken<DaffInMemoryDriverConfig>;
|
|
131
|
+
declare const provideDaffInMemoryDriverConfig: <R extends DaffInMemoryDriverConfig = DaffInMemoryDriverConfig>(config: Partial<R> | _angular_core.InjectionToken<Partial<R>>) => _angular_core.FactoryProvider;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Sets up the angular in memory web API with the {@link DaffInMemoryRootBackend}.
|
|
135
|
+
*/
|
|
136
|
+
declare class DaffInMemoryDriverModule {
|
|
137
|
+
static forRoot(config?: DaffInMemoryDriverConfig): ModuleWithProviders<DaffInMemoryDriverModule>;
|
|
138
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffInMemoryDriverModule, never>;
|
|
139
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<DaffInMemoryDriverModule, never, never, never>;
|
|
140
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<DaffInMemoryDriverModule>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Configures the Angular in-memory web API with Daffodil backend services.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* bootstrapApplication(AppComponent, {
|
|
149
|
+
* providers: [
|
|
150
|
+
* provideDaffInMemoryDriver(
|
|
151
|
+
* { delay: 300 },
|
|
152
|
+
* DaffProductInMemoryBackendService,
|
|
153
|
+
* DaffCartInMemoryBackendService
|
|
154
|
+
* )
|
|
155
|
+
* ]
|
|
156
|
+
* });
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
declare const provideDaffInMemoryDriver: (config?: DaffInMemoryDriverConfig, ...backends: Array<Type<DaffInMemoryBackendInterface>>) => EnvironmentProviders[];
|
|
160
|
+
|
|
161
|
+
export { DAFF_IN_MEMORY_BACKENDS, DAFF_IN_MEMORY_DRIVER_CONFIG, DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT, DaffInMemoryBackendDelegate, DaffInMemoryDriverBase, DaffInMemoryDriverModule, DaffInMemoryRootBackend, provideDaffInMemoryBackends, provideDaffInMemoryDriver, provideDaffInMemoryDriverConfig };
|
|
162
|
+
export type { DaffInMemoryBackendInterface, DaffInMemoryDataServiceInterface, DaffInMemoryDriverConfig, DaffInMemoryMultiRouteableBackend, DaffInMemoryRouteableBackend, DaffInMemorySingleRouteableBackend };
|
package/index.d.ts
CHANGED
|
@@ -1 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
import { DaffInheritableError, DaffError } from '@daffodil/core';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class DaffBadInputError extends DaffInheritableError implements DaffError {
|
|
5
|
+
message: string;
|
|
6
|
+
readonly code: string;
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare const DAFF_DRIVER_NETWORK_ERROR_CODE = "DAFF_DRIVER_NETWORK_ERROR";
|
|
11
|
+
/**
|
|
12
|
+
* An error thrown when the a driver encounters a problem with network connectivity.
|
|
13
|
+
*/
|
|
14
|
+
declare class DaffDriverNetworkError extends DaffInheritableError implements DaffError {
|
|
15
|
+
readonly code: string;
|
|
16
|
+
constructor(message?: string);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare enum DaffDriverErrorCodes {
|
|
20
|
+
BAD_INPUT = "DAFF_BAD_INPUT"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A driver response.
|
|
25
|
+
* Can contain a response, errors, or both.
|
|
26
|
+
*/
|
|
27
|
+
interface DaffDriverResponse<T> {
|
|
28
|
+
/**
|
|
29
|
+
* The body of the response.
|
|
30
|
+
*/
|
|
31
|
+
response?: T;
|
|
32
|
+
/**
|
|
33
|
+
* A list of errors that occured during the driver call.
|
|
34
|
+
*/
|
|
35
|
+
errors: DaffError[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A service for interacting with the request cache of the HTTP client currently in use.
|
|
40
|
+
* This has nothing to do with local storage or any kind of persistent client data.
|
|
41
|
+
*/
|
|
42
|
+
interface DaffDriverHttpClientCacheServiceInterface {
|
|
43
|
+
/**
|
|
44
|
+
* Resets the client's cache store to the initial state.
|
|
45
|
+
*/
|
|
46
|
+
reset(): void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* A noop service. Always does nothing for every single method.
|
|
51
|
+
*
|
|
52
|
+
* @inheritdoc
|
|
53
|
+
*/
|
|
54
|
+
declare class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {
|
|
55
|
+
reset(): void;
|
|
56
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffDriverHttpClientCacheNoopService, never>;
|
|
57
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DaffDriverHttpClientCacheNoopService>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE: _angular_core.InjectionToken<DaffDriverHttpClientCacheServiceInterface>;
|
|
61
|
+
declare const provideDaffDriverHttpClientCacheService: <R extends DaffDriverHttpClientCacheServiceInterface = DaffDriverHttpClientCacheServiceInterface>(klass: _angular_core.Type<R>) => _angular_core.ExistingProvider;
|
|
62
|
+
|
|
63
|
+
export { DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE, DAFF_DRIVER_NETWORK_ERROR_CODE, DaffBadInputError, DaffDriverErrorCodes, DaffDriverHttpClientCacheNoopService, DaffDriverNetworkError, provideDaffDriverHttpClientCacheService };
|
|
64
|
+
export type { DaffDriverHttpClientCacheServiceInterface, DaffDriverResponse };
|
package/magento/index.d.ts
CHANGED
|
@@ -1 +1,176 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
3
|
+
import { UriFunction, PossibleTypesMap, TypePolicies, ApolloLink } from '@apollo/client/core';
|
|
4
|
+
import { DaffErrorCodeMap, DaffError, DaffInheritableError, DaffCollectionMetadata, DaffSortDirectionEnum } from '@daffodil/core';
|
|
5
|
+
import { GraphQLFormattedError } from 'graphql';
|
|
6
|
+
import { DaffApolloLinkGenerator } from '@daffodil/core/graphql';
|
|
7
|
+
import { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';
|
|
8
|
+
import * as apollo_angular from 'apollo-angular';
|
|
9
|
+
|
|
10
|
+
declare const schema: {
|
|
11
|
+
possibleTypes: {
|
|
12
|
+
CartAddressInterface: string[];
|
|
13
|
+
CartItemInterface: string[];
|
|
14
|
+
ProductInterface: string[];
|
|
15
|
+
CategoryInterface: string[];
|
|
16
|
+
MediaGalleryInterface: string[];
|
|
17
|
+
ProductLinksInterface: string[];
|
|
18
|
+
CreditMemoItemInterface: string[];
|
|
19
|
+
OrderItemInterface: string[];
|
|
20
|
+
InvoiceItemInterface: string[];
|
|
21
|
+
ShipmentItemInterface: string[];
|
|
22
|
+
AggregationOptionInterface: string[];
|
|
23
|
+
LayerFilterItemInterface: string[];
|
|
24
|
+
PhysicalProductInterface: string[];
|
|
25
|
+
CustomizableOptionInterface: string[];
|
|
26
|
+
CustomizableProductInterface: string[];
|
|
27
|
+
SwatchDataInterface: string[];
|
|
28
|
+
SwatchLayerFilterItemInterface: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
interface DaffMagentoDriverConfig {
|
|
33
|
+
possibleTypes: PossibleTypesMap;
|
|
34
|
+
typePolicies: TypePolicies;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sets up the Magento Daffodil driver configuration for Magento's GraphQl API.
|
|
38
|
+
*
|
|
39
|
+
* Under the hood, this creates an Apollo Client configuration.
|
|
40
|
+
*
|
|
41
|
+
* @param endpoint - The Magento store domain (e.g. "https://www.my-store.com/graphql") or an injection token for a string or function that returns a string
|
|
42
|
+
*/
|
|
43
|
+
declare function provideMagentoDriver(endpoint: string | InjectionToken<string | UriFunction>, options?: DaffMagentoDriverConfig): Provider[];
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Transforms the passed error according to the lookup in the passed map.
|
|
47
|
+
*/
|
|
48
|
+
declare function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError;
|
|
49
|
+
|
|
50
|
+
declare function daffMagentoTransformGraphQlError<T extends DaffErrorCodeMap>(error: GraphQLFormattedError, map: T): DaffError;
|
|
51
|
+
|
|
52
|
+
declare const DAFF_DRIVER_MAGENTO_ERROR_CODE = "DAFF_DRIVER_MAGENTO_ERROR";
|
|
53
|
+
/**
|
|
54
|
+
* A very general error thrown when a more specific error type cannot be determined.
|
|
55
|
+
*/
|
|
56
|
+
declare class DaffDriverMagentoError extends DaffInheritableError implements DaffError {
|
|
57
|
+
readonly code: string;
|
|
58
|
+
constructor(message?: string);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
interface MagentoMoney {
|
|
62
|
+
__typename?: string;
|
|
63
|
+
value: number;
|
|
64
|
+
currency: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface MagentoDiscount {
|
|
68
|
+
__typename?: string;
|
|
69
|
+
amount: MagentoMoney;
|
|
70
|
+
label: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface MagentoSearchResultPageInfo {
|
|
74
|
+
__typename?: 'SearchResultPageInfo';
|
|
75
|
+
current_page: number;
|
|
76
|
+
page_size: number;
|
|
77
|
+
total_pages: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface MagentoFilterInput {
|
|
81
|
+
typename?: 'FilterStringTypeInput';
|
|
82
|
+
eq?: string;
|
|
83
|
+
in?: string;
|
|
84
|
+
match?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare enum MagentoSortEnum {
|
|
88
|
+
ASC = "ASC",
|
|
89
|
+
DESC = "DESC"
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
|
|
94
|
+
*
|
|
95
|
+
* @inheritdoc
|
|
96
|
+
*/
|
|
97
|
+
declare class DaffMagentoApolloCacheableOperationsLinkGenerator implements DaffApolloLinkGenerator {
|
|
98
|
+
private apolloGetRequests;
|
|
99
|
+
constructor(apolloGetRequests: string[]);
|
|
100
|
+
getLink(): ApolloLink;
|
|
101
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator, never>;
|
|
102
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare const DAFF_MAGENTO_CACHEABLE_OPERATIONS: i0.InjectionToken<string[]>;
|
|
106
|
+
declare const provideManyDaffMagentoCacheableOperations: <R extends string = string>(...values: R[]) => Array<i0.ValueProvider>;
|
|
107
|
+
/**
|
|
108
|
+
* Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.
|
|
109
|
+
*/
|
|
110
|
+
declare function provideDaffMagentoCacheableOperation(operationName: string): {
|
|
111
|
+
provide: i0.InjectionToken<string[]>;
|
|
112
|
+
useValue: string;
|
|
113
|
+
multi: boolean;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Custom type policies that allow us to have more granular control
|
|
118
|
+
* over how ApolloClient reads from and writes to the cache.
|
|
119
|
+
*
|
|
120
|
+
* This is applicable to Magento 2.4.3 and up.
|
|
121
|
+
* Heavily based on https://github.com/magento/pwa-studio/blob/99270701b2b607551f2e5881af272ed48ba7064c/packages/peregrine/lib/Apollo/policies/index.js.
|
|
122
|
+
*
|
|
123
|
+
* https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields
|
|
124
|
+
* https://www.apollographql.com/docs/react/caching/cache-field-behavior/
|
|
125
|
+
*/
|
|
126
|
+
declare const DAFF_MAGENTO_2_4_3_TYPE_POLICIES: TypePolicies;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Interacts with the Apollo client.
|
|
130
|
+
*
|
|
131
|
+
* @inheritdoc
|
|
132
|
+
*/
|
|
133
|
+
declare class DaffDriverHttpClientCacheMagentoService implements DaffDriverHttpClientCacheServiceInterface {
|
|
134
|
+
private platformId;
|
|
135
|
+
constructor(platformId: string);
|
|
136
|
+
reset(): void;
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffDriverHttpClientCacheMagentoService, never>;
|
|
138
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffDriverHttpClientCacheMagentoService>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare const MAGENTO_CUSTOMER_CACHE_ID_HEADER = "X-Magento-Cache-Id";
|
|
142
|
+
/**
|
|
143
|
+
* Stores and sets the Magento cache ID header.
|
|
144
|
+
* This will set the `X-Magento-Cache-Id` header from the most recent value encountered
|
|
145
|
+
* on a response, if there was a response with that header set.
|
|
146
|
+
*
|
|
147
|
+
* @inheritdoc
|
|
148
|
+
*/
|
|
149
|
+
declare class DaffMagentoCacheHeaderApolloLinkGenerator implements DaffApolloLinkGenerator {
|
|
150
|
+
private _cacheHeader?;
|
|
151
|
+
getLink(): ApolloLink;
|
|
152
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCacheHeaderApolloLinkGenerator, never>;
|
|
153
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCacheHeaderApolloLinkGenerator>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare function magentoPageInfoTransform(pageInfo: MagentoSearchResultPageInfo): Pick<DaffCollectionMetadata, 'pageSize' | 'currentPage' | 'totalPages'>;
|
|
157
|
+
|
|
158
|
+
declare function magentoSortDirectionResponseTransform(direction: MagentoSortEnum): DaffSortDirectionEnum;
|
|
159
|
+
|
|
160
|
+
declare function magentoSortDirectionRequestTransform(direction: DaffSortDirectionEnum): MagentoSortEnum;
|
|
161
|
+
|
|
162
|
+
declare const magentoSearchResultPageInfoFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
163
|
+
|
|
164
|
+
declare const magentoMoneyFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @deprecated in favor of {@link provideMagentoDriver} Deprecated in version 0.88.0. Will be removed in version 0.91.0.
|
|
168
|
+
*/
|
|
169
|
+
declare class DaffDriverMagentoModule {
|
|
170
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffDriverMagentoModule, never>;
|
|
171
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffDriverMagentoModule, never, never, never>;
|
|
172
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffDriverMagentoModule>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_MAGENTO_2_4_3_TYPE_POLICIES, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverHttpClientCacheMagentoService, DaffDriverMagentoError, DaffDriverMagentoModule, DaffMagentoApolloCacheableOperationsLinkGenerator, DaffMagentoCacheHeaderApolloLinkGenerator, MAGENTO_CUSTOMER_CACHE_ID_HEADER, MagentoSortEnum, daffMagentoTransformGraphQlError, daffTransformMagentoError, magentoMoneyFragment, magentoPageInfoTransform, magentoSearchResultPageInfoFragment, magentoSortDirectionRequestTransform, magentoSortDirectionResponseTransform, provideDaffMagentoCacheableOperation, provideMagentoDriver, provideManyDaffMagentoCacheableOperations, schema };
|
|
176
|
+
export type { MagentoDiscount, MagentoFilterInput, MagentoMoney, MagentoSearchResultPageInfo };
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
+
import { MagentoMoney, MagentoDiscount, MagentoSearchResultPageInfo } from '@daffodil/driver/magento';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class MagentoMoneyFactory extends DaffModelFactory<MagentoMoney> {
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoMoneyFactory, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoMoneyFactory>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class MagentoDiscountFactory extends DaffModelFactory<MagentoDiscount> {
|
|
12
|
+
constructor();
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoDiscountFactory, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoDiscountFactory>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class MagentoSearchResultPageInfoFactory extends DaffModelFactory<MagentoSearchResultPageInfo> {
|
|
18
|
+
constructor();
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoSearchResultPageInfoFactory, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoSearchResultPageInfoFactory>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { MagentoDiscountFactory, MagentoMoneyFactory, MagentoSearchResultPageInfoFactory };
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/driver","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/driver","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.89.0","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","optionalDependencies":{"angular-in-memory-web-api":"^0.20.0"},"peerDependencies":{"@angular/common":"^20.0.0","@angular/core":"^20.0.0","rxjs":"7.8.1"},"module":"fesm2022/daffodil-driver.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-driver.mjs"},"./hubspot":{"types":"./hubspot/index.d.ts","default":"./fesm2022/daffodil-driver-hubspot.mjs"},"./in-memory":{"types":"./in-memory/index.d.ts","default":"./fesm2022/daffodil-driver-in-memory.mjs"},"./magento":{"types":"./magento/index.d.ts","default":"./fesm2022/daffodil-driver-magento.mjs"},"./shopify":{"types":"./shopify/index.d.ts","default":"./fesm2022/daffodil-driver-shopify.mjs"},"./hubspot/testing":{"types":"./hubspot/testing/index.d.ts","default":"./fesm2022/daffodil-driver-hubspot-testing.mjs"},"./magento/testing":{"types":"./magento/testing/index.d.ts","default":"./fesm2022/daffodil-driver-magento-testing.mjs"},"./shopify/testing":{"types":"./shopify/testing/index.d.ts","default":"./fesm2022/daffodil-driver-shopify-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|