@daffodil/external-router 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/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/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-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
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
2
|
-
/**
|
|
3
|
-
* When a driver fails to find a resolution, it should return a 404.
|
|
4
|
-
* This const represents the standard "Not Found" resolution that a driver
|
|
5
|
-
* should return. Drivers are not required to return this value, but may do so
|
|
6
|
-
* if they would like.
|
|
7
|
-
*/
|
|
8
|
-
export declare const DAFF_EXTERNAL_ROUTER_NOT_FOUND_RESOLUTION: DaffExternallyResolvableUrl;
|
package/driver/public_api.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DaffExternallyResolvableUrl, DaffExternalRouteType } from '@daffodil/external-router';
|
|
2
|
-
/**
|
|
3
|
-
* The configuration for the testing driver. It is a dictionary of "url": "type",
|
|
4
|
-
* pairs, where the URL is a URL-safe routeable path, e.g. "sweatshirts" or "t-shirts"
|
|
5
|
-
* and the type is a known type to your application, e.g. "CATEGORY".
|
|
6
|
-
*/
|
|
7
|
-
export interface DaffExternalRouterDriverTestingConfig {
|
|
8
|
-
[url: string]: DaffExternalRouteType | DaffExternallyResolvableUrl;
|
|
9
|
-
}
|
|
10
|
-
export declare const DAFF_EXTERNAL_ROUTER_DRIVER_TESTING_CONFIG: import("@angular/core").InjectionToken<DaffExternalRouterDriverTestingConfig>, provideDaffExternalRouterDriverTestingConfig: <R extends DaffExternalRouterDriverTestingConfig = DaffExternalRouterDriverTestingConfig>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
|
-
import { DaffExternalRouterDriverTestingConfig } from './config';
|
|
3
|
-
/**
|
|
4
|
-
* Provides a testing implementation of {@link DaffExternalRouterDriver}
|
|
5
|
-
*/
|
|
6
|
-
export declare const provideDaffExternalRouterTestingDriver: (config: DaffExternalRouterDriverTestingConfig | InjectionToken<DaffExternalRouterDriverTestingConfig>) => EnvironmentProviders;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { DaffExternalRouterTestingDriver } from './testing.service';
|
|
2
|
-
export { DaffExternalRouterDriverTestingModule } from './testing.module';
|
|
3
|
-
export { DaffExternalRouterDriverTestingConfig } from './config';
|
|
4
|
-
export { provideDaffExternalRouterTestingDriver } from './provider';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { DaffExternalRouterDriverTestingConfig } from './config';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
/**
|
|
6
|
-
* The `DaffExternalRouterDriverTestingModule` is an importable NgModule that can
|
|
7
|
-
* be used to configure the {@link DaffExternalRouterTestingDriver}.
|
|
8
|
-
*/
|
|
9
|
-
export declare class DaffExternalRouterDriverTestingModule {
|
|
10
|
-
static forRoot(config: DaffExternalRouterDriverTestingConfig): ModuleWithProviders<DaffExternalRouterDriverTestingModule>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterDriverTestingModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffExternalRouterDriverTestingModule, never, [typeof i1.CommonModule], never>;
|
|
13
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffExternalRouterDriverTestingModule>;
|
|
14
|
-
}
|
|
@@ -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 { DaffExternalRouterDriverTestingConfig } from './config';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* The DaffExternalRouterTestingDriver is responsible for translating an
|
|
8
|
-
* arbitrary URI into a DaffExternallyResolvableUrl in testing environments.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*
|
|
12
|
-
* @see {@link DaffExternalRouterTestingDriver}
|
|
13
|
-
*/
|
|
14
|
-
export declare class DaffExternalRouterTestingDriver implements DaffExternalRouterDriverInterface {
|
|
15
|
-
private testingConfiguration;
|
|
16
|
-
constructor(testingConfiguration?: DaffExternalRouterDriverTestingConfig);
|
|
17
|
-
resolve(url: string): Observable<DaffExternallyResolvableUrl>;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalRouterTestingDriver, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffExternalRouterTestingDriver>;
|
|
20
|
-
}
|
package/model/public_api.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
import { DaffRouteData } from './route-data';
|
|
3
|
-
import { DaffExternalRouteType } from './route-type';
|
|
4
|
-
/**
|
|
5
|
-
* A `DaffExternallyResolvableUrl` describes the relationship between a "type" of route
|
|
6
|
-
* as determined by an external platform and a URI.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* export const resolvableRoute: DaffExternallyResolvableUrl = {
|
|
11
|
-
* id: "id-of-resource",
|
|
12
|
-
* url: "some/path/to-a-resource",
|
|
13
|
-
* type: "RESOURCE_TYPE"
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export interface DaffExternallyResolvableUrl extends DaffIdentifiable {
|
|
18
|
-
/**
|
|
19
|
-
* The URL that will be used for the path of the route inserted
|
|
20
|
-
* into the Angular routing config.
|
|
21
|
-
* Should not contain URL fragments, query parameters, or leading slashes.
|
|
22
|
-
*/
|
|
23
|
-
url: string;
|
|
24
|
-
/**
|
|
25
|
-
* The type of the route
|
|
26
|
-
*
|
|
27
|
-
* @see {@link DaffExternalRouteType}
|
|
28
|
-
*/
|
|
29
|
-
type: DaffExternalRouteType;
|
|
30
|
-
/**
|
|
31
|
-
* The HTTP status code for the resolvable route.
|
|
32
|
-
*/
|
|
33
|
-
code: number;
|
|
34
|
-
/**
|
|
35
|
-
* Additional route data. Note that this is not guaranteed to come from
|
|
36
|
-
* the driver, its only available when the driver makes it available.
|
|
37
|
-
*/
|
|
38
|
-
data?: DaffRouteData;
|
|
39
|
-
}
|
package/model/route-data.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data associated with a route.
|
|
3
|
-
*/
|
|
4
|
-
export interface DaffRouteData {
|
|
5
|
-
/**
|
|
6
|
-
* The canonical url of the route.
|
|
7
|
-
*/
|
|
8
|
-
canonical_url?: string;
|
|
9
|
-
/**
|
|
10
|
-
* The meta description of the route.
|
|
11
|
-
*/
|
|
12
|
-
meta_description?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The title of the route.
|
|
15
|
-
*/
|
|
16
|
-
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* An associated schema for the route. See {@link Schema} for full capabilities.
|
|
19
|
-
*/
|
|
20
|
-
schema?: Record<string, unknown>;
|
|
21
|
-
}
|
package/model/route-type.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Route } from '@angular/router';
|
|
2
|
-
import { DaffRouteData } from './route-data';
|
|
3
|
-
/**
|
|
4
|
-
* A type that describes the special data that Daffodil will store for SEO purposes on
|
|
5
|
-
* an external resolved route.
|
|
6
|
-
*/
|
|
7
|
-
export type DaffRouteWithSeoData = Route & {
|
|
8
|
-
data: Record<string, any> & {
|
|
9
|
-
daffSeoData: DaffRouteData;
|
|
10
|
-
};
|
|
11
|
-
};
|
package/public_api.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the driver encounters a 4xx error.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffExternalRouterClientError extends DaffInheritableError implements DaffError {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
constructor(message?: string);
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError } from '@daffodil/core';
|
|
2
|
-
import { DaffExternalRouterClientError } from './client-error';
|
|
3
|
-
/**
|
|
4
|
-
* An error thrown when the driver determines that a given url is not resolvable.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffExternalRouterNotFoundError extends DaffExternalRouterClientError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the driver determines that the url needs to be routed somewhere
|
|
4
|
-
* else permanently.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffExternalRouterPermanentRedirectError extends DaffInheritableError implements DaffError {
|
|
7
|
-
redirectUrl: string;
|
|
8
|
-
readonly code: string;
|
|
9
|
-
constructor(redirectUrl: string, message?: string);
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the platform performing url resolution fails.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffExternalRouterServerError extends DaffInheritableError implements DaffError {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
constructor(message?: string);
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the driver needs a URI to be temporarily redirected
|
|
4
|
-
* to another location.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffExternalRouterTemporaryRedirectError extends DaffInheritableError implements DaffError {
|
|
7
|
-
redirectUrl: string;
|
|
8
|
-
readonly code: string;
|
|
9
|
-
constructor(redirectUrl: string, message?: string);
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UrlSegment, UrlTree } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffRouteWithSeoData } from '@daffodil/external-router';
|
|
4
|
-
/**
|
|
5
|
-
* A `canMatch` guard function that will resolve a route externally, allowing Angular to match it.
|
|
6
|
-
*
|
|
7
|
-
* Depending on the resolution result, the route's data will contain `daffSeoData` with supplemental search engine data
|
|
8
|
-
* about the route. The data on the route is cumulative. If other data properties are set, they will be merged alongside daffSeoData.
|
|
9
|
-
*/
|
|
10
|
-
export declare const daffExternalMatcherTypeGuard: (type: string) => (route: DaffRouteWithSeoData, segments: Array<UrlSegment>) => Observable<boolean | UrlTree>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
2
|
-
/**
|
|
3
|
-
* Processes resolved URLs and throws the appropriate error so that External Router
|
|
4
|
-
* can handle routing errors.
|
|
5
|
-
*/
|
|
6
|
-
export declare const processErrors: (url: DaffExternallyResolvableUrl) => DaffExternallyResolvableUrl;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
|
|
2
|
-
/**
|
|
3
|
-
* Processes resolvedUrls and throws the appropriate error so that External Router
|
|
4
|
-
* can handle redirects.
|
|
5
|
-
*/
|
|
6
|
-
export declare const processRedirects: (url: DaffExternallyResolvableUrl) => DaffExternallyResolvableUrl;
|
package/routing/public_api.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { daffExternalMatcherTypeGuard } from './guard/external-matcher-type.guard';
|