@daffodil/driver 0.88.1 → 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 +7 -7
- 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 +13 -13
- 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 -27
- package/in-memory/backend/public_api.d.ts +0 -6
- package/in-memory/backend/root.service.d.ts +0 -19
- 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 -15
- 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/provider.d.ts +0 -19
- package/in-memory/public_api.d.ts +0 -5
- package/magento/apollo/create-http-link.d.ts +0 -8
- package/magento/apollo/possible-types.d.ts +0 -37
- package/magento/apollo/type-policies.d.ts +0 -10
- 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 -9
- 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/provider.d.ts +0 -14
- package/magento/public_api.d.ts +0 -8
- 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
|
@@ -1 +1,80 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _daffodil_driver_shopify from '@daffodil/driver/shopify';
|
|
2
|
+
import { ShopifyImageNode, ShopifyProductImages, ShopifyMoney, CurrencyCode, ShopifyProductPriceRange, ShopifyProductNode, ShopifyProductGraph } from '@daffodil/driver/shopify';
|
|
3
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
|
|
6
|
+
declare class MockShopifyProductImageNode implements ShopifyImageNode {
|
|
7
|
+
id: string;
|
|
8
|
+
url: string;
|
|
9
|
+
altText: string;
|
|
10
|
+
}
|
|
11
|
+
declare class ShopifyProductImageNodeFactory extends DaffModelFactory<ShopifyImageNode, typeof MockShopifyProductImageNode> {
|
|
12
|
+
constructor();
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShopifyProductImageNodeFactory, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShopifyProductImageNodeFactory>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class MockShopifyProductImages implements ShopifyProductImages {
|
|
18
|
+
protected shopifyProductImageNodeFactory: ShopifyProductImageNodeFactory;
|
|
19
|
+
nodes: _daffodil_driver_shopify.ShopifyImageNode[];
|
|
20
|
+
constructor(shopifyProductImageNodeFactory: ShopifyProductImageNodeFactory);
|
|
21
|
+
}
|
|
22
|
+
declare class ShopifyProductImagesFactory extends DaffModelFactory<ShopifyProductImages, typeof MockShopifyProductImages> {
|
|
23
|
+
constructor(shopifyProductImageNodeFactory: ShopifyProductImageNodeFactory);
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShopifyProductImagesFactory, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShopifyProductImagesFactory>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class MockShopifyMoney implements ShopifyMoney {
|
|
29
|
+
amount: number;
|
|
30
|
+
currencyCode: CurrencyCode;
|
|
31
|
+
}
|
|
32
|
+
declare class ShopifyMoneyFactory extends DaffModelFactory<ShopifyMoney, typeof MockShopifyMoney> {
|
|
33
|
+
constructor();
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShopifyMoneyFactory, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShopifyMoneyFactory>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class MockShopifyProductPriceRange implements ShopifyProductPriceRange {
|
|
39
|
+
protected shopifyMoneyFactory: ShopifyMoneyFactory;
|
|
40
|
+
maxVariantPrice: _daffodil_driver_shopify.ShopifyMoney;
|
|
41
|
+
minVariantPrice: _daffodil_driver_shopify.ShopifyMoney;
|
|
42
|
+
constructor(shopifyMoneyFactory: ShopifyMoneyFactory);
|
|
43
|
+
}
|
|
44
|
+
declare class ShopifyProductPriceRangeFactory extends DaffModelFactory<ShopifyProductPriceRange, typeof MockShopifyProductPriceRange> {
|
|
45
|
+
constructor(shopifyMoneyFactory: ShopifyMoneyFactory);
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShopifyProductPriceRangeFactory, never>;
|
|
47
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShopifyProductPriceRangeFactory>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare class MockShopifyProductNode implements ShopifyProductNode {
|
|
51
|
+
protected shopifyProductPriceRangeFactory: ShopifyProductPriceRangeFactory;
|
|
52
|
+
protected shopifyProductImagesFactory: ShopifyProductImagesFactory;
|
|
53
|
+
title: string;
|
|
54
|
+
handle: string;
|
|
55
|
+
id: string;
|
|
56
|
+
description: string;
|
|
57
|
+
onlineStoreUrl: string;
|
|
58
|
+
availableForSale: boolean;
|
|
59
|
+
priceRange: _daffodil_driver_shopify.ShopifyProductPriceRange;
|
|
60
|
+
images: _daffodil_driver_shopify.ShopifyProductImages;
|
|
61
|
+
constructor(shopifyProductPriceRangeFactory: ShopifyProductPriceRangeFactory, shopifyProductImagesFactory: ShopifyProductImagesFactory);
|
|
62
|
+
}
|
|
63
|
+
declare class ShopifyProductNodeFactory extends DaffModelFactory<ShopifyProductNode, typeof MockShopifyProductNode> {
|
|
64
|
+
constructor(shopifyProductPriceRangeFactory: ShopifyProductPriceRangeFactory, shopifyProductImagesFactory: ShopifyProductImagesFactory);
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShopifyProductNodeFactory, never>;
|
|
66
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShopifyProductNodeFactory>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare class MockShopifyProductGraph implements ShopifyProductGraph {
|
|
70
|
+
protected shopifyProductNodeFactory: ShopifyProductNodeFactory;
|
|
71
|
+
nodes: _daffodil_driver_shopify.ShopifyProductNode[];
|
|
72
|
+
constructor(shopifyProductNodeFactory: ShopifyProductNodeFactory);
|
|
73
|
+
}
|
|
74
|
+
declare class ShopifyProductGraphFactory extends DaffModelFactory<ShopifyProductGraph, typeof MockShopifyProductGraph> {
|
|
75
|
+
constructor(shopifyProductNodeFactory: ShopifyProductNodeFactory);
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShopifyProductGraphFactory, never>;
|
|
77
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShopifyProductGraphFactory>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { ShopifyMoneyFactory, ShopifyProductGraphFactory, ShopifyProductImageNodeFactory, ShopifyProductImagesFactory, ShopifyProductNodeFactory, ShopifyProductPriceRangeFactory };
|
package/errors/bad-input.d.ts
DELETED
package/errors/codes.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
export declare const DAFF_DRIVER_NETWORK_ERROR_CODE = "DAFF_DRIVER_NETWORK_ERROR";
|
|
3
|
-
/**
|
|
4
|
-
* An error thrown when the a driver encounters a problem with network connectivity.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffDriverNetworkError extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
package/errors/public_api.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DaffDriverHttpClientCacheServiceInterface } from './service.type';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* A noop service. Always does nothing for every single method.
|
|
5
|
-
*
|
|
6
|
-
* @inheritdoc
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {
|
|
9
|
-
reset(): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffDriverHttpClientCacheNoopService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffDriverHttpClientCacheNoopService>;
|
|
12
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DaffDriverHttpClientCacheServiceInterface } from './service.type';
|
|
2
|
-
export declare const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE: import("@angular/core").InjectionToken<DaffDriverHttpClientCacheServiceInterface>, provideDaffDriverHttpClientCacheService: <R extends DaffDriverHttpClientCacheServiceInterface = DaffDriverHttpClientCacheServiceInterface>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A service for interacting with the request cache of the HTTP client currently in use.
|
|
3
|
-
* This has nothing to do with local storage or any kind of persistent client data.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffDriverHttpClientCacheServiceInterface {
|
|
6
|
-
/**
|
|
7
|
-
* Resets the client's cache store to the initial state.
|
|
8
|
-
*/
|
|
9
|
-
reset(): void;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Title } from '@angular/platform-browser';
|
|
3
|
-
import { Router } from '@angular/router';
|
|
4
|
-
import { DaffHubspotConfig } from './models/config';
|
|
5
|
-
import { DaffHubspotFormsInterface } from './models/forms';
|
|
6
|
-
/**
|
|
7
|
-
* Factory for {@link DaffHubspotFormsService}.
|
|
8
|
-
*/
|
|
9
|
-
export declare const daffHubspotFormsServiceFactory: (http: HttpClient, document: Document, router: Router, title: Title, config: DaffHubspotConfig) => DaffHubspotFormsInterface;
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
import { DaffHubspotConfig } from './models/config';
|
|
6
|
-
import { DaffHubspotFormsInterface } from './models/forms';
|
|
7
|
-
import { HubspotResponse } from './models/hubspot-response';
|
|
8
|
-
/**
|
|
9
|
-
* Service for interacting with Hubspot Forms API.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffHubspotFormsService implements DaffHubspotFormsInterface {
|
|
12
|
-
private http;
|
|
13
|
-
private document;
|
|
14
|
-
private route;
|
|
15
|
-
private title;
|
|
16
|
-
private config;
|
|
17
|
-
constructor(http: HttpClient, document: Document, route: Router, title: Title, config: DaffHubspotConfig);
|
|
18
|
-
submit(payload: Record<string, any>): Observable<HubspotResponse>;
|
|
19
|
-
private makeRequest;
|
|
20
|
-
private generateUrl;
|
|
21
|
-
private getCookie;
|
|
22
|
-
private getPageURI;
|
|
23
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { HubspotResponse } from './hubspot-response';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for interacting with Hubspot Forms API.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffHubspotFormsInterface {
|
|
7
|
-
submit(payload: Record<string, any>): Observable<HubspotResponse>;
|
|
8
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface DaffHubspotRequest {
|
|
2
|
-
fields: FieldValue[];
|
|
3
|
-
context?: HubspotContext;
|
|
4
|
-
}
|
|
5
|
-
export interface HubspotContext {
|
|
6
|
-
hutk?: string;
|
|
7
|
-
ipAddress?: string;
|
|
8
|
-
pageName?: string;
|
|
9
|
-
pageUri?: string;
|
|
10
|
-
pageId?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface FieldValue {
|
|
13
|
-
name: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}
|
package/hubspot/public_api.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { DaffHubspotFormsService } from './hubspot-forms.service';
|
|
2
|
-
export { DaffHubspotConfig } from './models/config';
|
|
3
|
-
export { DaffHubspotRequest } from './models/hubspot-request';
|
|
4
|
-
export { HubspotResponse, HubspotError, } from './models/hubspot-response';
|
|
5
|
-
export { DaffHubspotFormsInterface } from './models/forms';
|
|
6
|
-
export { daffHubspotFormsServiceFactory } from './hubspot-forms.provider';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
-
import { HubspotError, HubspotResponse } from '@daffodil/driver/hubspot';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class MockHubspotResponse implements HubspotResponse {
|
|
5
|
-
redirectUri?: string;
|
|
6
|
-
inlineMessage: string;
|
|
7
|
-
errors: HubspotError[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Model factory for {@link MockHubspotResponse}s.
|
|
11
|
-
*
|
|
12
|
-
* Should be used to create {@link MockHubspotResponse}s for testing purposes.
|
|
13
|
-
*/
|
|
14
|
-
export declare class DaffHubspotResponseFactory extends DaffModelFactory<HubspotResponse> {
|
|
15
|
-
constructor();
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffHubspotResponseFactory, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffHubspotResponseFactory>;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './hubspot-response.factory';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './factories/public_api';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DaffInMemoryBackendInterface } from './type';
|
|
2
|
-
export declare const DAFF_IN_MEMORY_BACKENDS: import("@angular/core").InjectionToken<DaffInMemoryBackendInterface[]>, provideDaffInMemoryBackends: <R extends DaffInMemoryBackendInterface = DaffInMemoryBackendInterface>(...classes: import("@angular/core").Type<R>[]) => Array<import("@angular/core").ExistingProvider>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
/**
|
|
4
|
-
* An interface for defining in memory services that can handle CRUD requests.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffInMemoryDataServiceInterface {
|
|
7
|
-
/**
|
|
8
|
-
* The R in CRUD.
|
|
9
|
-
*/
|
|
10
|
-
get?(reqInfo: RequestInfo): Observable<any>;
|
|
11
|
-
/**
|
|
12
|
-
* The C in CRUD.
|
|
13
|
-
*/
|
|
14
|
-
post?(reqInfo: RequestInfo): Observable<any>;
|
|
15
|
-
/**
|
|
16
|
-
* The U in CRUD.
|
|
17
|
-
*/
|
|
18
|
-
put?(reqInfo: RequestInfo): Observable<any>;
|
|
19
|
-
/**
|
|
20
|
-
* The D in CRUD.
|
|
21
|
-
*/
|
|
22
|
-
delete?(reqInfo: RequestInfo): Observable<any>;
|
|
23
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffInMemoryDataServiceInterface } from './data-service.type';
|
|
4
|
-
import { DaffInMemoryRouteableBackend } from './routeable.type';
|
|
5
|
-
import { DaffInMemoryDriverConfig } from '../public_api';
|
|
6
|
-
declare enum Method {
|
|
7
|
-
GET = "get",
|
|
8
|
-
POST = "post",
|
|
9
|
-
PUT = "put",
|
|
10
|
-
DELETE = "delete"
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* An class that automatically delegates requests to in-memory backends.
|
|
14
|
-
*
|
|
15
|
-
* @inheritdoc
|
|
16
|
-
*/
|
|
17
|
-
export declare class DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface {
|
|
18
|
-
protected backends: Array<DaffInMemoryRouteableBackend>;
|
|
19
|
-
protected config: DaffInMemoryDriverConfig;
|
|
20
|
-
constructor(backends: Array<DaffInMemoryRouteableBackend>, config: DaffInMemoryDriverConfig);
|
|
21
|
-
protected delegateRequest(reqInfo: RequestInfo, method: Method): Observable<any>;
|
|
22
|
-
get?(reqInfo: RequestInfo): Observable<any>;
|
|
23
|
-
post?(reqInfo: RequestInfo): Observable<any>;
|
|
24
|
-
put?(reqInfo: RequestInfo): Observable<any>;
|
|
25
|
-
delete?(reqInfo: RequestInfo): Observable<any>;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { InMemoryDbService, RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemoryDataServiceInterface } from './data-service.type';
|
|
3
|
-
import { DaffInMemoryBackendDelegate } from './delegate.class';
|
|
4
|
-
import { DaffInMemoryBackendInterface } from './type';
|
|
5
|
-
import { DaffInMemoryDriverConfig } from '../public_api';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* An in-memory backend that automatically delegates requests to backends provided to {@link DAFF_IN_MEMORY_BACKENDS}.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffInMemoryRootBackend extends DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface, InMemoryDbService {
|
|
13
|
-
private _backends;
|
|
14
|
-
private _config;
|
|
15
|
-
constructor(_backends: Array<DaffInMemoryBackendInterface>, _config: DaffInMemoryDriverConfig);
|
|
16
|
-
createDb(reqInfo?: RequestInfo): import("rxjs").Observable<{}>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryRootBackend, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryRootBackend>;
|
|
19
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { DaffInMemoryDataServiceInterface } from './data-service.type';
|
|
2
|
-
/**
|
|
3
|
-
* A routing target that handles a single collection.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffInMemorySingleRouteableBackend extends DaffInMemoryDataServiceInterface {
|
|
6
|
-
/**
|
|
7
|
-
* The collection name of the backend service where the backend only serves one collection.
|
|
8
|
-
* Used for routing requests to the correct backend.
|
|
9
|
-
*/
|
|
10
|
-
readonly collectionName: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A routing target that handles multiple collections.
|
|
14
|
-
*/
|
|
15
|
-
export interface DaffInMemoryMultiRouteableBackend extends DaffInMemoryDataServiceInterface {
|
|
16
|
-
/**
|
|
17
|
-
* Returns true if the backend can handle the request with the specified collection name.
|
|
18
|
-
* Used for backends that handle multiple collections.
|
|
19
|
-
*/
|
|
20
|
-
canHandle(collectionName: string): boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* An in-memory backend that can be easily routed to based on the available capabilities.
|
|
24
|
-
*/
|
|
25
|
-
export type DaffInMemoryRouteableBackend = DaffInMemorySingleRouteableBackend | DaffInMemoryMultiRouteableBackend;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { InMemoryDbService } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemoryRouteableBackend } from './routeable.type';
|
|
3
|
-
/**
|
|
4
|
-
* An interface for defining in memory backends that use the angular in memory web api.
|
|
5
|
-
*/
|
|
6
|
-
export type DaffInMemoryBackendInterface = InMemoryDbService & DaffInMemoryRouteableBackend;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DaffInMemoryDriverConfig } from './type';
|
|
2
|
-
export declare const DAFF_IN_MEMORY_DRIVER_CONFIG: import("@angular/core").InjectionToken<DaffInMemoryDriverConfig>, provideDaffInMemoryDriverConfig: <R extends DaffInMemoryDriverConfig = DaffInMemoryDriverConfig>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface DaffInMemoryDriverConfig {
|
|
2
|
-
/**
|
|
3
|
-
* The base path segment of the API route.
|
|
4
|
-
*/
|
|
5
|
-
apiBase: string;
|
|
6
|
-
/**
|
|
7
|
-
* When enabled, requests that do not match any configured backend
|
|
8
|
-
* will be automatically forwarded to the provided backend endpoint.
|
|
9
|
-
*
|
|
10
|
-
* This acts as a "catch-all" or fallback mechanism, ensuring that
|
|
11
|
-
* unknown or unconfigured routes are still proxied instead of being
|
|
12
|
-
* rejected.
|
|
13
|
-
*/
|
|
14
|
-
passThroughUnknownRequests?: boolean;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InMemoryBackendConfigArgs } from 'angular-in-memory-web-api';
|
|
2
|
-
/**
|
|
3
|
-
* The base class for in-memory drivers.
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class DaffInMemoryDriverBase {
|
|
6
|
-
private config;
|
|
7
|
-
private collectionName;
|
|
8
|
-
/**
|
|
9
|
-
* The URL of the corresponding backend.
|
|
10
|
-
* Does not include a trailing slash, it is of the form: `/<api base>/<collection name>`.
|
|
11
|
-
*/
|
|
12
|
-
protected readonly url: string;
|
|
13
|
-
constructor(config: InMemoryBackendConfigArgs, collectionName: string);
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './base.class';
|
package/in-memory/module.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { DaffInMemoryDriverConfig } from './config/public_api';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Sets up the angular in memory web API with the {@link DaffInMemoryRootBackend}.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffInMemoryDriverModule {
|
|
8
|
-
static forRoot(config?: DaffInMemoryDriverConfig): ModuleWithProviders<DaffInMemoryDriverModule>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryDriverModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffInMemoryDriverModule, never, never, never>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffInMemoryDriverModule>;
|
|
12
|
-
}
|
package/in-memory/provider.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, Type } from '@angular/core';
|
|
2
|
-
import { DaffInMemoryBackendInterface, DaffInMemoryDriverConfig } from './public_api';
|
|
3
|
-
/**
|
|
4
|
-
* Configures the Angular in-memory web API with Daffodil backend services.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* bootstrapApplication(AppComponent, {
|
|
9
|
-
* providers: [
|
|
10
|
-
* provideDaffInMemoryDriver(
|
|
11
|
-
* { delay: 300 },
|
|
12
|
-
* DaffProductInMemoryBackendService,
|
|
13
|
-
* DaffCartInMemoryBackendService
|
|
14
|
-
* )
|
|
15
|
-
* ]
|
|
16
|
-
* });
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare const provideDaffInMemoryDriver: (config?: DaffInMemoryDriverConfig, ...backends: Array<Type<DaffInMemoryBackendInterface>>) => EnvironmentProviders[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ApolloLink, UriFunction } from '@apollo/client/core';
|
|
2
|
-
/**
|
|
3
|
-
* Creates an Apollo HTTP link for GraphQL requests.
|
|
4
|
-
*
|
|
5
|
-
* @param url - The Shopify Storefront API endpoint URL for GraphQL requests.
|
|
6
|
-
* @returns An ApolloLink instance configured with the provided URL.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createHttpLink(url: string | UriFunction): ApolloLink;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Magento GraphQL possible types configuration for Apollo Client.
|
|
3
|
-
*
|
|
4
|
-
* This object defines the possible concrete types for each GraphQL interface
|
|
5
|
-
* used in Magento's GraphQL API. Apollo Client uses this information for
|
|
6
|
-
* proper fragment matching and union/interface type resolution.
|
|
7
|
-
*
|
|
8
|
-
* When Apollo Client encounters a GraphQL interface or union type in a query,
|
|
9
|
-
* it needs to know which concrete types can implement that interface to
|
|
10
|
-
* properly cache and normalize the data.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* new InMemoryCache({
|
|
15
|
-
* possibleTypes: MAGENTO_POSSIBLE_TYPES
|
|
16
|
-
* })
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare const MAGENTO_POSSIBLE_TYPES: {
|
|
20
|
-
CartAddressInterface: string[];
|
|
21
|
-
CartItemInterface: string[];
|
|
22
|
-
ProductInterface: string[];
|
|
23
|
-
CategoryInterface: string[];
|
|
24
|
-
MediaGalleryInterface: string[];
|
|
25
|
-
ProductLinksInterface: string[];
|
|
26
|
-
CreditMemoItemInterface: string[];
|
|
27
|
-
OrderItemInterface: string[];
|
|
28
|
-
InvoiceItemInterface: string[];
|
|
29
|
-
ShipmentItemInterface: string[];
|
|
30
|
-
AggregationOptionInterface: string[];
|
|
31
|
-
LayerFilterItemInterface: string[];
|
|
32
|
-
PhysicalProductInterface: string[];
|
|
33
|
-
CustomizableOptionInterface: string[];
|
|
34
|
-
CustomizableProductInterface: string[];
|
|
35
|
-
SwatchDataInterface: string[];
|
|
36
|
-
SwatchLayerFilterItemInterface: string[];
|
|
37
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom type policies that allow us to have more granular control
|
|
3
|
-
* over how ApolloClient reads from and writes to the cache.
|
|
4
|
-
*
|
|
5
|
-
* https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields
|
|
6
|
-
* https://www.apollographql.com/docs/react/caching/cache-field-behavior/
|
|
7
|
-
*/
|
|
8
|
-
import { TypePolicies } from '@apollo/client/cache';
|
|
9
|
-
declare const typePolicies: TypePolicies;
|
|
10
|
-
export default typePolicies;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
export declare const DAFF_DRIVER_MAGENTO_ERROR_CODE = "DAFF_DRIVER_MAGENTO_ERROR";
|
|
3
|
-
/**
|
|
4
|
-
* A very general error thrown when a more specific error type cannot be determined.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffDriverMagentoError extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const magentoMoneyFragment: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const magentoSearchResultPageInfoFragment: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ApolloLink } from '@apollo/client/core';
|
|
2
|
-
import { DaffApolloLinkGenerator } from '@daffodil/core/graphql';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare const MAGENTO_CUSTOMER_CACHE_ID_HEADER = "X-Magento-Cache-Id";
|
|
5
|
-
/**
|
|
6
|
-
* Stores and sets the Magento cache ID header.
|
|
7
|
-
* This will set the `X-Magento-Cache-Id` header from the most recent value encountered
|
|
8
|
-
* on a response, if there was a response with that header set.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffMagentoCacheHeaderApolloLinkGenerator implements DaffApolloLinkGenerator {
|
|
13
|
-
private _cacheHeader?;
|
|
14
|
-
getLink(): ApolloLink;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCacheHeaderApolloLinkGenerator, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCacheHeaderApolloLinkGenerator>;
|
|
17
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Interacts with the Apollo client.
|
|
5
|
-
*
|
|
6
|
-
* @inheritdoc
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffDriverHttpClientCacheMagentoService implements DaffDriverHttpClientCacheServiceInterface {
|
|
9
|
-
private platformId;
|
|
10
|
-
constructor(platformId: string);
|
|
11
|
-
reset(): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffDriverHttpClientCacheMagentoService, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffDriverHttpClientCacheMagentoService>;
|
|
14
|
-
}
|
package/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ApolloLink } from '@apollo/client/core';
|
|
2
|
-
import { DaffApolloLinkGenerator } from '@daffodil/core/graphql';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
|
|
6
|
-
*
|
|
7
|
-
* @inheritdoc
|
|
8
|
-
*/
|
|
9
|
-
export declare class DaffMagentoApolloCacheableOperationsLinkGenerator implements DaffApolloLinkGenerator {
|
|
10
|
-
private apolloGetRequests;
|
|
11
|
-
constructor(apolloGetRequests: string[]);
|
|
12
|
-
getLink(): ApolloLink;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator>;
|
|
15
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_MAGENTO_CACHEABLE_OPERATIONS: import("@angular/core").InjectionToken<string[]>, provideManyDaffMagentoCacheableOperations: <R extends string = string>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
|
|
2
|
-
/**
|
|
3
|
-
* Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.
|
|
4
|
-
*/
|
|
5
|
-
export declare function provideDaffMagentoCacheableOperation(operationName: string): {
|
|
6
|
-
provide: import("@angular/core").InjectionToken<string[]>;
|
|
7
|
-
useValue: string;
|
|
8
|
-
multi: boolean;
|
|
9
|
-
};
|