@daffodil/external-router 0.88.1 → 0.90.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/driver/in-memory/index.d.ts +42 -1
- package/driver/index.d.ts +32 -1
- package/driver/magento/2.4.1/index.d.ts +50 -1
- package/driver/magento/2.4.2/index.d.ts +50 -1
- package/driver/magento/2.4.3/index.d.ts +56 -1
- package/driver/magento/index.d.ts +281 -1
- package/driver/shopify/index.d.ts +15 -0
- package/driver/testing/index.d.ts +50 -1
- package/fesm2022/daffodil-external-router-driver-in-memory.mjs +3 -3
- package/fesm2022/daffodil-external-router-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs +7 -7
- package/fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs +7 -7
- package/fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs +9 -9
- package/fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver-shopify.mjs +40 -0
- package/fesm2022/daffodil-external-router-driver-shopify.mjs.map +1 -0
- package/fesm2022/daffodil-external-router-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-external-router-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-driver.mjs.map +1 -1
- package/fesm2022/daffodil-external-router-routing.mjs.map +1 -1
- package/fesm2022/daffodil-external-router.mjs.map +1 -1
- package/index.d.ts +96 -1
- package/package.json +1 -1
- package/routing/index.d.ts +13 -1
- package/config.d.ts +0 -11
- package/driver/in-memory/config.d.ts +0 -14
- package/driver/in-memory/in-memory.service.d.ts +0 -20
- package/driver/in-memory/provider.d.ts +0 -6
- package/driver/in-memory/public_api.d.ts +0 -3
- package/driver/interfaces/external-router-driver.interface.d.ts +0 -18
- package/driver/magento/2.4.1/graphql/queries/resolve-url-v2.4.1.d.ts +0 -6
- package/driver/magento/2.4.1/magento.module.d.ts +0 -29
- package/driver/magento/2.4.1/magento.service.d.ts +0 -18
- package/driver/magento/2.4.1/public_api.d.ts +0 -2
- package/driver/magento/2.4.1/transforms/resolution-to-resolvable-url.d.ts +0 -3
- package/driver/magento/2.4.2/graphql/queries/resolve-url-v2.4.2.d.ts +0 -6
- package/driver/magento/2.4.2/magento.module.d.ts +0 -29
- package/driver/magento/2.4.2/magento.service.d.ts +0 -18
- package/driver/magento/2.4.2/public_api.d.ts +0 -2
- package/driver/magento/2.4.2/transforms/resolution-to-resolvable-url.d.ts +0 -3
- package/driver/magento/2.4.3/graphql/queries/resolve.d.ts +0 -6
- package/driver/magento/2.4.3/magento.module.d.ts +0 -29
- package/driver/magento/2.4.3/magento.service.d.ts +0 -19
- package/driver/magento/2.4.3/provider.d.ts +0 -5
- package/driver/magento/2.4.3/public_api.d.ts +0 -3
- package/driver/magento/2.4.3/transforms/resolution-to-resolvable-url.d.ts +0 -3
- package/driver/magento/2.4.3/transforms/schema/category/category.d.ts +0 -2
- package/driver/magento/2.4.3/transforms/schema/clientify-url-path.d.ts +0 -1
- package/driver/magento/2.4.3/transforms/schema/page/page.d.ts +0 -2
- package/driver/magento/2.4.3/transforms/schema/product/base.d.ts +0 -2
- package/driver/magento/2.4.3/transforms/schema/product/bundle.d.ts +0 -2
- package/driver/magento/2.4.3/transforms/schema/product/configurable.d.ts +0 -2
- package/driver/magento/2.4.3/transforms/schema/product/product.d.ts +0 -5
- package/driver/magento/2.4.3/transforms/schema/product/simple.d.ts +0 -2
- package/driver/magento/2.4.3/transforms/schema/rescale-rating.d.ts +0 -5
- package/driver/magento/2.4.3/transforms/schema/transform-schema.d.ts +0 -2
- package/driver/magento/2.4.3/transforms/transform-client-urls.d.ts +0 -2
- package/driver/magento/model/category-route-product.d.ts +0 -77
- package/driver/magento/model/category-route.d.ts +0 -41
- package/driver/magento/model/page-route.type.d.ts +0 -23
- package/driver/magento/model/product-route.d.ts +0 -85
- package/driver/magento/model/public_api.d.ts +0 -8
- package/driver/magento/model/resolution-types.d.ts +0 -5
- package/driver/magento/model/routable.d.ts +0 -14
- package/driver/magento/model/route-response.d.ts +0 -4
- package/driver/magento/model/route.d.ts +0 -5
- package/driver/magento/model/url-resolver-response.d.ts +0 -4
- package/driver/magento/model/url-resolver.d.ts +0 -13
- package/driver/magento/public_api.d.ts +0 -2
- package/driver/magento/transforms/public_api.d.ts +0 -1
- package/driver/magento/transforms/redirect-to-http.d.ts +0 -4
- package/driver/not-found-resolution.d.ts +0 -8
- package/driver/public_api.d.ts +0 -2
- package/driver/testing/config.d.ts +0 -10
- package/driver/testing/provider.d.ts +0 -6
- package/driver/testing/public_api.d.ts +0 -4
- package/driver/testing/testing.module.d.ts +0 -14
- package/driver/testing/testing.service.d.ts +0 -20
- package/model/public_api.d.ts +0 -4
- package/model/resolvable-route.d.ts +0 -39
- package/model/route-data.d.ts +0 -21
- package/model/route-type.d.ts +0 -6
- package/model/route-with-seo-data.d.ts +0 -11
- package/provide-external-router.d.ts +0 -3
- package/public_api.d.ts +0 -3
- package/routing/errors/client-error.d.ts +0 -8
- package/routing/errors/not-found-error.d.ts +0 -9
- package/routing/errors/permanent-redirect.d.ts +0 -10
- package/routing/errors/server-error.d.ts +0 -8
- package/routing/errors/temporary-redirect.d.ts +0 -10
- package/routing/guard/external-matcher-type.guard.d.ts +0 -10
- package/routing/helper/convert-to-path.d.ts +0 -7
- package/routing/processors/process-errors.d.ts +0 -6
- package/routing/processors/process-redirect.d.ts +0 -6
- package/routing/public_api.d.ts +0 -1
package/index.d.ts
CHANGED
|
@@ -1 +1,96 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { DaffIdentifiable } from '@daffodil/core';
|
|
4
|
+
import { Route } from '@angular/router';
|
|
5
|
+
|
|
6
|
+
declare const DAFF_EXTERNAL_ROUTER_CONFIG: _angular_core.InjectionToken<DaffExternalRouterConfiguration>;
|
|
7
|
+
/**
|
|
8
|
+
* The configuration object for the external router package.
|
|
9
|
+
*/
|
|
10
|
+
interface DaffExternalRouterConfiguration {
|
|
11
|
+
/**
|
|
12
|
+
* The path to redirect to when external route resolution fails.
|
|
13
|
+
*/
|
|
14
|
+
failedResolutionPath: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Data associated with a route.
|
|
19
|
+
*/
|
|
20
|
+
interface DaffRouteData {
|
|
21
|
+
/**
|
|
22
|
+
* The canonical url of the route.
|
|
23
|
+
*/
|
|
24
|
+
canonical_url?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The meta description of the route.
|
|
27
|
+
*/
|
|
28
|
+
meta_description?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The title of the route.
|
|
31
|
+
*/
|
|
32
|
+
title?: string;
|
|
33
|
+
/**
|
|
34
|
+
* An associated schema for the route. See {@link Schema} for full capabilities.
|
|
35
|
+
*/
|
|
36
|
+
schema?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The routing type of a particular route. E.g. if there's a category
|
|
41
|
+
* called "Sweatshirts" with an externally resolved URL of "/sweatshirts"
|
|
42
|
+
* Then, this type could be something like "CATEGORY".
|
|
43
|
+
*/
|
|
44
|
+
type DaffExternalRouteType = string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A `DaffExternallyResolvableUrl` describes the relationship between a "type" of route
|
|
48
|
+
* as determined by an external platform and a URI.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* export const resolvableRoute: DaffExternallyResolvableUrl = {
|
|
53
|
+
* id: "id-of-resource",
|
|
54
|
+
* url: "some/path/to-a-resource",
|
|
55
|
+
* type: "RESOURCE_TYPE"
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
interface DaffExternallyResolvableUrl extends DaffIdentifiable {
|
|
60
|
+
/**
|
|
61
|
+
* The URL that will be used for the path of the route inserted
|
|
62
|
+
* into the Angular routing config.
|
|
63
|
+
* Should not contain URL fragments, query parameters, or leading slashes.
|
|
64
|
+
*/
|
|
65
|
+
url: string;
|
|
66
|
+
/**
|
|
67
|
+
* The type of the route
|
|
68
|
+
*
|
|
69
|
+
* @see {@link DaffExternalRouteType}
|
|
70
|
+
*/
|
|
71
|
+
type: DaffExternalRouteType;
|
|
72
|
+
/**
|
|
73
|
+
* The HTTP status code for the resolvable route.
|
|
74
|
+
*/
|
|
75
|
+
code: number;
|
|
76
|
+
/**
|
|
77
|
+
* Additional route data. Note that this is not guaranteed to come from
|
|
78
|
+
* the driver, its only available when the driver makes it available.
|
|
79
|
+
*/
|
|
80
|
+
data?: DaffRouteData;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A type that describes the special data that Daffodil will store for SEO purposes on
|
|
85
|
+
* an external resolved route.
|
|
86
|
+
*/
|
|
87
|
+
type DaffRouteWithSeoData = Route & {
|
|
88
|
+
data: Record<string, any> & {
|
|
89
|
+
daffSeoData: DaffRouteData;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
declare const provideExternalRouter: (config?: Partial<DaffExternalRouterConfiguration>) => EnvironmentProviders;
|
|
94
|
+
|
|
95
|
+
export { DAFF_EXTERNAL_ROUTER_CONFIG, provideExternalRouter };
|
|
96
|
+
export type { DaffExternalRouteType, DaffExternalRouterConfiguration, DaffExternallyResolvableUrl, DaffRouteData, DaffRouteWithSeoData };
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/external-router","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/external-router"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/external-router","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/external-router"]}}},"version":"0.90.0","description":"A platform-agnostic package that connects the @angular/router with an external routing service (e.g. an API), allowing for runtime route resolution.","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","peerDependencies":{"@angular/common":"^20.0.0","@angular/core":"^20.0.0","@angular/router":"^20.0.0","@daffodil/core":"0.90.0","rxjs":"^7.0.0"},"optionalDependencies":{"apollo-angular":"^11.0.0","@daffodil/driver":"0.90.0"},"module":"fesm2022/daffodil-external-router.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-external-router.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-external-router-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-external-router-routing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento.mjs"},"./driver/shopify":{"types":"./driver/shopify/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-shopify.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-testing.mjs"},"./driver/magento/2.4.1":{"types":"./driver/magento/2.4.1/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs"},"./driver/magento/2.4.2":{"types":"./driver/magento/2.4.2/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs"},"./driver/magento/2.4.3":{"types":"./driver/magento/2.4.3/index.d.ts","default":"./fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.6.2"}}
|
package/routing/index.d.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { UrlSegment, UrlTree } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DaffRouteWithSeoData } from '@daffodil/external-router';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A `canMatch` guard function that will resolve a route externally, allowing Angular to match it.
|
|
7
|
+
*
|
|
8
|
+
* Depending on the resolution result, the route's data will contain `daffSeoData` with supplemental search engine data
|
|
9
|
+
* about the route. The data on the route is cumulative. If other data properties are set, they will be merged alongside daffSeoData.
|
|
10
|
+
*/
|
|
11
|
+
declare const daffExternalMatcherTypeGuard: (type: string) => (route: DaffRouteWithSeoData, segments: Array<UrlSegment>) => Observable<boolean | UrlTree>;
|
|
12
|
+
|
|
13
|
+
export { daffExternalMatcherTypeGuard };
|
package/config.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const daffExternalRouterConfigurationDefault: DaffExternalRouterConfiguration;
|
|
2
|
-
export declare const DAFF_EXTERNAL_ROUTER_CONFIG: import("@angular/core").InjectionToken<DaffExternalRouterConfiguration>, provideDaffExternalRouterConfig: <R extends DaffExternalRouterConfiguration = DaffExternalRouterConfiguration>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
|
|
3
|
-
/**
|
|
4
|
-
* The configuration object for the external router package.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffExternalRouterConfiguration {
|
|
7
|
-
/**
|
|
8
|
-
* The path to redirect to when external route resolution fails.
|
|
9
|
-
*/
|
|
10
|
-
failedResolutionPath: string;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
2
|
-
/**
|
|
3
|
-
* A lookup for a URL.
|
|
4
|
-
* Returns an {@link DaffExternallyResolvableUrl} or
|
|
5
|
-
* {@link DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION} if the URL cannot be resolved
|
|
6
|
-
*/
|
|
7
|
-
export type DaffExternalRouterDriverInMemoryResolver = (url: string) => DaffExternallyResolvableUrl;
|
|
8
|
-
/**
|
|
9
|
-
* The configuration for the in-memory driver.
|
|
10
|
-
*/
|
|
11
|
-
export interface DaffExternalRouterDriverInMemoryConfig {
|
|
12
|
-
resolver: DaffExternalRouterDriverInMemoryResolver;
|
|
13
|
-
}
|
|
14
|
-
export declare const DAFF_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG: import("@angular/core").InjectionToken<DaffExternalRouterDriverInMemoryConfig>, provideDaffExternalRouterDriverInMemoryConfig: <R extends DaffExternalRouterDriverInMemoryConfig = DaffExternalRouterDriverInMemoryConfig>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
3
|
-
import { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';
|
|
4
|
-
import { DaffExternalRouterDriverInMemoryConfig } from './config';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* The DaffExternalRouterInMemoryDriver is responsible for resolving
|
|
8
|
-
* a URL using the resolver in the provided configuration.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*
|
|
12
|
-
* @see {@link DaffExternalRouterInMemoryDriver}
|
|
13
|
-
*/
|
|
14
|
-
export declare class DaffExternalRouterInMemoryDriver implements DaffExternalRouterDriverInterface {
|
|
15
|
-
private configuration;
|
|
16
|
-
constructor(configuration: DaffExternalRouterDriverInMemoryConfig);
|
|
17
|
-
resolve(url: string): Observable<DaffExternallyResolvableUrl>;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterInMemoryDriver, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffExternalRouterInMemoryDriver>;
|
|
20
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
|
-
import { DaffExternalRouterDriverInMemoryConfig } from './config';
|
|
3
|
-
/**
|
|
4
|
-
* Provides an in-memory implementation of {@link DaffExternalRouterDriver}
|
|
5
|
-
*/
|
|
6
|
-
export declare const provideDaffExternalRouterInMemoryDriver: (config?: DaffExternalRouterDriverInMemoryConfig | InjectionToken<DaffExternalRouterDriverInMemoryConfig>) => EnvironmentProviders;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
3
|
-
export declare const DaffExternalRouterDriver: import("@angular/core").InjectionToken<DaffExternalRouterDriverInterface>, provideDaffExternalRouterDriver: <R extends DaffExternalRouterDriverInterface = DaffExternalRouterDriverInterface>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
|
|
4
|
-
/**
|
|
5
|
-
* The interface for a `@daffodil/external-router` driver.
|
|
6
|
-
*
|
|
7
|
-
* This driver is responsible for translating a URL into a Route consumable by
|
|
8
|
-
* Daffodil.
|
|
9
|
-
*/
|
|
10
|
-
export interface DaffExternalRouterDriverInterface {
|
|
11
|
-
/**
|
|
12
|
-
* Resolves a URL with a platform.
|
|
13
|
-
* Returns information about the type of URL.
|
|
14
|
-
*
|
|
15
|
-
* @param url The full URL path qualified with file extension and leading slash but without domain. i.e. /full/path/to/thing.html
|
|
16
|
-
*/
|
|
17
|
-
resolve(url: string): Observable<DaffExternallyResolvableUrl>;
|
|
18
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = "MagentoResolveUrlv241";
|
|
2
|
-
/**
|
|
3
|
-
* This query retrieves a URL resolution from Magento and informs you about
|
|
4
|
-
* what type of route the URL is.
|
|
5
|
-
*/
|
|
6
|
-
export declare const MagentoResolveUrlv241: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
/**
|
|
5
|
-
* The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* @NgModule({
|
|
10
|
-
* declarations: [],
|
|
11
|
-
* imports: [
|
|
12
|
-
* ...
|
|
13
|
-
* DaffExternalRouterDriverMagentoModule.forRoot()
|
|
14
|
-
* ],
|
|
15
|
-
* })
|
|
16
|
-
* export class AppModule{}
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.
|
|
20
|
-
*/
|
|
21
|
-
export declare class DaffExternalRouterDriverMagentoModule {
|
|
22
|
-
/**
|
|
23
|
-
* Configures the package for the root injector.
|
|
24
|
-
*/
|
|
25
|
-
static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule>;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterDriverMagentoModule, never>;
|
|
27
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffExternalRouterDriverMagentoModule, never, [typeof i1.CommonModule], never>;
|
|
28
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffExternalRouterDriverMagentoModule>;
|
|
29
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Apollo } from 'apollo-angular';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
4
|
-
import { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* The DaffExternalRouterMagentoDriver is responsible for translating an
|
|
8
|
-
* arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffExternalRouterMagentoDriver implements DaffExternalRouterDriverInterface {
|
|
13
|
-
private apollo;
|
|
14
|
-
constructor(apollo: Apollo);
|
|
15
|
-
resolve(url: string): Observable<DaffExternallyResolvableUrl>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterMagentoDriver, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffExternalRouterMagentoDriver>;
|
|
18
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
2
|
-
import { MagentoUrlResolver } from '@daffodil/external-router/driver/magento';
|
|
3
|
-
export declare const transformResolutionToResolvableUrlv241: (resolution: MagentoUrlResolver) => DaffExternallyResolvableUrl;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = "MagentoResolveUrlv242";
|
|
2
|
-
/**
|
|
3
|
-
* This query retrieves a URL resolution from Magento and informs you about
|
|
4
|
-
* what type of route the URL is.
|
|
5
|
-
*/
|
|
6
|
-
export declare const MagentoResolveUrlv242: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
/**
|
|
5
|
-
* The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* @NgModule({
|
|
10
|
-
* declarations: [],
|
|
11
|
-
* imports: [
|
|
12
|
-
* ...
|
|
13
|
-
* DaffExternalRouterDriverMagentoModule.forRoot()
|
|
14
|
-
* ],
|
|
15
|
-
* })
|
|
16
|
-
* export class AppModule{}
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.
|
|
20
|
-
*/
|
|
21
|
-
export declare class DaffExternalRouterDriverMagentoModule {
|
|
22
|
-
/**
|
|
23
|
-
* Configures the package for the root injector.
|
|
24
|
-
*/
|
|
25
|
-
static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule>;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterDriverMagentoModule, never>;
|
|
27
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffExternalRouterDriverMagentoModule, never, [typeof i1.CommonModule], never>;
|
|
28
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffExternalRouterDriverMagentoModule>;
|
|
29
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Apollo } from 'apollo-angular';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
4
|
-
import { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* The DaffExternalRouterMagentoDriver is responsible for translating an
|
|
8
|
-
* arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffExternalRouterMagentoDriver implements DaffExternalRouterDriverInterface {
|
|
13
|
-
private apollo;
|
|
14
|
-
constructor(apollo: Apollo);
|
|
15
|
-
resolve(url: string): Observable<DaffExternallyResolvableUrl>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterMagentoDriver, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffExternalRouterMagentoDriver>;
|
|
18
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
2
|
-
import { MagentoUrlResolver } from '@daffodil/external-router/driver/magento';
|
|
3
|
-
export declare const transformResolutionToResolvableUrlv242: (resolution: MagentoUrlResolver) => DaffExternallyResolvableUrl;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_MAGENTO_RESOLVE_URL_QUERY_NAME = "MagentoResolveUrlv243";
|
|
2
|
-
/**
|
|
3
|
-
* This query retrieves a URL resolution from Magento and informs you about
|
|
4
|
-
* what type of route the URL is.
|
|
5
|
-
*/
|
|
6
|
-
export declare const MagentoResolveUrlv243: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
/**
|
|
5
|
-
* The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* @NgModule({
|
|
10
|
-
* declarations: [],
|
|
11
|
-
* imports: [
|
|
12
|
-
* ...
|
|
13
|
-
* DaffExternalRouterDriverMagentoModule.forRoot()
|
|
14
|
-
* ],
|
|
15
|
-
* })
|
|
16
|
-
* export class AppModule{}
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* Note that this package depends upon ApolloClient, as the Magento driver uses GraphQl to make it's API calls.
|
|
20
|
-
*/
|
|
21
|
-
export declare class DaffExternalRouterDriverMagentoModule {
|
|
22
|
-
/**
|
|
23
|
-
* Configures the package for the root injector.
|
|
24
|
-
*/
|
|
25
|
-
static forRoot(): ModuleWithProviders<DaffExternalRouterDriverMagentoModule>;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterDriverMagentoModule, never>;
|
|
27
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffExternalRouterDriverMagentoModule, never, [typeof i1.CommonModule], never>;
|
|
28
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffExternalRouterDriverMagentoModule>;
|
|
29
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Apollo } from 'apollo-angular';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
4
|
-
import { DaffExternalRouterDriverInterface } from '@daffodil/external-router/driver';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* The DaffExternalRouterMagentoDriver is responsible for translating an
|
|
8
|
-
* arbitrary URI into a DaffExternallyResolvableUrl with Magento environments.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffExternalRouterMagentoDriver implements DaffExternalRouterDriverInterface {
|
|
13
|
-
private apollo;
|
|
14
|
-
private document;
|
|
15
|
-
constructor(apollo: Apollo, document: Document);
|
|
16
|
-
resolve(url: string): Observable<DaffExternallyResolvableUrl>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterMagentoDriver, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffExternalRouterMagentoDriver>;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const clientifyUrlPath: <T extends string | null>(path: T, domain: string) => string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';
|
|
2
|
-
/**
|
|
3
|
-
* Computes supplementary SEO schema for Magento product routes.
|
|
4
|
-
*/
|
|
5
|
-
export declare const transformMagentoProductSchema: (resolution: MagentoProductRoute) => Record<string, unknown>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
export interface MagentoCategoryRouteProduct {
|
|
2
|
-
/**
|
|
3
|
-
* The relative path for the route.
|
|
4
|
-
*/
|
|
5
|
-
relative_url: string;
|
|
6
|
-
/**
|
|
7
|
-
* The type of route, typically PRODUCT, CATEGORY or CMS_PAGE
|
|
8
|
-
*/
|
|
9
|
-
type: 'PRODUCT';
|
|
10
|
-
/**
|
|
11
|
-
* The HTTP code for the page.
|
|
12
|
-
*/
|
|
13
|
-
redirect_code: number;
|
|
14
|
-
/**
|
|
15
|
-
* In v2.4.3 this became the standard field across types
|
|
16
|
-
*/
|
|
17
|
-
uid: string;
|
|
18
|
-
/**
|
|
19
|
-
* The canonical url of the route.
|
|
20
|
-
*/
|
|
21
|
-
canonical_url: string | null;
|
|
22
|
-
/**
|
|
23
|
-
* The name of the route
|
|
24
|
-
*/
|
|
25
|
-
name: string | null;
|
|
26
|
-
/**
|
|
27
|
-
* The title of the route
|
|
28
|
-
*/
|
|
29
|
-
meta_title: string | null;
|
|
30
|
-
/**
|
|
31
|
-
* The sku of a product.
|
|
32
|
-
*/
|
|
33
|
-
sku: string;
|
|
34
|
-
/**
|
|
35
|
-
* The number of reviews of a product.
|
|
36
|
-
*/
|
|
37
|
-
review_count: number;
|
|
38
|
-
/**
|
|
39
|
-
* The rating of a product.
|
|
40
|
-
*/
|
|
41
|
-
rating_summary: number;
|
|
42
|
-
/**
|
|
43
|
-
* The images of a product.
|
|
44
|
-
*/
|
|
45
|
-
image: {
|
|
46
|
-
url: string;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* The price of the item.
|
|
50
|
-
*/
|
|
51
|
-
price_range: {
|
|
52
|
-
maximum_price: {
|
|
53
|
-
final_price: {
|
|
54
|
-
currency: string;
|
|
55
|
-
value: number;
|
|
56
|
-
};
|
|
57
|
-
regular_price: {
|
|
58
|
-
currency: string;
|
|
59
|
-
value: number;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
minimum_price: {
|
|
63
|
-
final_price: {
|
|
64
|
-
currency: string;
|
|
65
|
-
value: number;
|
|
66
|
-
};
|
|
67
|
-
regular_price: {
|
|
68
|
-
currency: string;
|
|
69
|
-
value: number;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* The type of route.
|
|
75
|
-
*/
|
|
76
|
-
__typename: string;
|
|
77
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { MagentoCategoryRouteProduct } from './category-route-product';
|
|
2
|
-
export interface MagentoCategoryRoute {
|
|
3
|
-
/**
|
|
4
|
-
* The relative path for the route.
|
|
5
|
-
*/
|
|
6
|
-
relative_url: string;
|
|
7
|
-
/**
|
|
8
|
-
* The type of route, typically PRODUCT, CATEGORY or CMS_PAGE
|
|
9
|
-
*/
|
|
10
|
-
type: 'CATEGORY';
|
|
11
|
-
/**
|
|
12
|
-
* The HTTP code for the page.
|
|
13
|
-
*/
|
|
14
|
-
redirect_code: number;
|
|
15
|
-
/**
|
|
16
|
-
* In v2.4.3 this became the standard field across types
|
|
17
|
-
*/
|
|
18
|
-
uid?: string;
|
|
19
|
-
/**
|
|
20
|
-
* The canonical url of the route.
|
|
21
|
-
*/
|
|
22
|
-
canonical_url?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The meta description of the route
|
|
25
|
-
*/
|
|
26
|
-
meta_description?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The name of the route
|
|
29
|
-
*/
|
|
30
|
-
name?: string;
|
|
31
|
-
/**
|
|
32
|
-
* The title of the route
|
|
33
|
-
*/
|
|
34
|
-
meta_title?: string;
|
|
35
|
-
/**
|
|
36
|
-
* The list of items in the category.
|
|
37
|
-
*/
|
|
38
|
-
products: {
|
|
39
|
-
items: MagentoCategoryRouteProduct[];
|
|
40
|
-
};
|
|
41
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface MagentoCmsPageRoute {
|
|
2
|
-
/**
|
|
3
|
-
* The relative path for the route.
|
|
4
|
-
*/
|
|
5
|
-
relative_url: string;
|
|
6
|
-
/**
|
|
7
|
-
* The type of route, typically PRODUCT, CATEGORY or CMS_PAGE
|
|
8
|
-
*/
|
|
9
|
-
type: 'CMS_PAGE';
|
|
10
|
-
/**
|
|
11
|
-
* The HTTP code for the page.
|
|
12
|
-
*/
|
|
13
|
-
redirect_code: number;
|
|
14
|
-
content?: string;
|
|
15
|
-
content_heading?: string;
|
|
16
|
-
identifier?: string;
|
|
17
|
-
meta_description?: string;
|
|
18
|
-
meta_keywords?: string;
|
|
19
|
-
meta_title?: string;
|
|
20
|
-
page_layout?: string;
|
|
21
|
-
title?: string;
|
|
22
|
-
url_key?: string;
|
|
23
|
-
}
|