@daffodil/external-router 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.
Files changed (95) hide show
  1. package/driver/in-memory/index.d.ts +42 -1
  2. package/driver/index.d.ts +32 -1
  3. package/driver/magento/2.4.1/index.d.ts +50 -1
  4. package/driver/magento/2.4.2/index.d.ts +50 -1
  5. package/driver/magento/2.4.3/index.d.ts +56 -1
  6. package/driver/magento/index.d.ts +281 -1
  7. package/driver/testing/index.d.ts +50 -1
  8. package/fesm2022/daffodil-external-router-driver-in-memory.mjs +3 -3
  9. package/fesm2022/daffodil-external-router-driver-in-memory.mjs.map +1 -1
  10. package/fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs +7 -7
  11. package/fesm2022/daffodil-external-router-driver-magento-2.4.1.mjs.map +1 -1
  12. package/fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs +7 -7
  13. package/fesm2022/daffodil-external-router-driver-magento-2.4.2.mjs.map +1 -1
  14. package/fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs +9 -9
  15. package/fesm2022/daffodil-external-router-driver-magento-2.4.3.mjs.map +1 -1
  16. package/fesm2022/daffodil-external-router-driver-magento.mjs.map +1 -1
  17. package/fesm2022/daffodil-external-router-driver-testing.mjs +7 -7
  18. package/fesm2022/daffodil-external-router-driver-testing.mjs.map +1 -1
  19. package/fesm2022/daffodil-external-router-driver.mjs.map +1 -1
  20. package/fesm2022/daffodil-external-router-routing.mjs.map +1 -1
  21. package/fesm2022/daffodil-external-router.mjs.map +1 -1
  22. package/index.d.ts +96 -1
  23. package/package.json +1 -1
  24. package/routing/index.d.ts +13 -1
  25. package/config.d.ts +0 -11
  26. package/driver/in-memory/config.d.ts +0 -14
  27. package/driver/in-memory/in-memory.service.d.ts +0 -20
  28. package/driver/in-memory/provider.d.ts +0 -6
  29. package/driver/in-memory/public_api.d.ts +0 -3
  30. package/driver/interfaces/external-router-driver.interface.d.ts +0 -18
  31. package/driver/magento/2.4.1/graphql/queries/resolve-url-v2.4.1.d.ts +0 -6
  32. package/driver/magento/2.4.1/magento.module.d.ts +0 -29
  33. package/driver/magento/2.4.1/magento.service.d.ts +0 -18
  34. package/driver/magento/2.4.1/public_api.d.ts +0 -2
  35. package/driver/magento/2.4.1/transforms/resolution-to-resolvable-url.d.ts +0 -3
  36. package/driver/magento/2.4.2/graphql/queries/resolve-url-v2.4.2.d.ts +0 -6
  37. package/driver/magento/2.4.2/magento.module.d.ts +0 -29
  38. package/driver/magento/2.4.2/magento.service.d.ts +0 -18
  39. package/driver/magento/2.4.2/public_api.d.ts +0 -2
  40. package/driver/magento/2.4.2/transforms/resolution-to-resolvable-url.d.ts +0 -3
  41. package/driver/magento/2.4.3/graphql/queries/resolve.d.ts +0 -6
  42. package/driver/magento/2.4.3/magento.module.d.ts +0 -29
  43. package/driver/magento/2.4.3/magento.service.d.ts +0 -19
  44. package/driver/magento/2.4.3/provider.d.ts +0 -5
  45. package/driver/magento/2.4.3/public_api.d.ts +0 -3
  46. package/driver/magento/2.4.3/transforms/resolution-to-resolvable-url.d.ts +0 -3
  47. package/driver/magento/2.4.3/transforms/schema/category/category.d.ts +0 -2
  48. package/driver/magento/2.4.3/transforms/schema/clientify-url-path.d.ts +0 -1
  49. package/driver/magento/2.4.3/transforms/schema/page/page.d.ts +0 -2
  50. package/driver/magento/2.4.3/transforms/schema/product/base.d.ts +0 -2
  51. package/driver/magento/2.4.3/transforms/schema/product/bundle.d.ts +0 -2
  52. package/driver/magento/2.4.3/transforms/schema/product/configurable.d.ts +0 -2
  53. package/driver/magento/2.4.3/transforms/schema/product/product.d.ts +0 -5
  54. package/driver/magento/2.4.3/transforms/schema/product/simple.d.ts +0 -2
  55. package/driver/magento/2.4.3/transforms/schema/rescale-rating.d.ts +0 -5
  56. package/driver/magento/2.4.3/transforms/schema/transform-schema.d.ts +0 -2
  57. package/driver/magento/2.4.3/transforms/transform-client-urls.d.ts +0 -2
  58. package/driver/magento/model/category-route-product.d.ts +0 -77
  59. package/driver/magento/model/category-route.d.ts +0 -41
  60. package/driver/magento/model/page-route.type.d.ts +0 -23
  61. package/driver/magento/model/product-route.d.ts +0 -85
  62. package/driver/magento/model/public_api.d.ts +0 -8
  63. package/driver/magento/model/resolution-types.d.ts +0 -5
  64. package/driver/magento/model/routable.d.ts +0 -14
  65. package/driver/magento/model/route-response.d.ts +0 -4
  66. package/driver/magento/model/route.d.ts +0 -5
  67. package/driver/magento/model/url-resolver-response.d.ts +0 -4
  68. package/driver/magento/model/url-resolver.d.ts +0 -13
  69. package/driver/magento/public_api.d.ts +0 -2
  70. package/driver/magento/transforms/public_api.d.ts +0 -1
  71. package/driver/magento/transforms/redirect-to-http.d.ts +0 -4
  72. package/driver/not-found-resolution.d.ts +0 -8
  73. package/driver/public_api.d.ts +0 -2
  74. package/driver/testing/config.d.ts +0 -10
  75. package/driver/testing/provider.d.ts +0 -6
  76. package/driver/testing/public_api.d.ts +0 -4
  77. package/driver/testing/testing.module.d.ts +0 -14
  78. package/driver/testing/testing.service.d.ts +0 -20
  79. package/model/public_api.d.ts +0 -4
  80. package/model/resolvable-route.d.ts +0 -39
  81. package/model/route-data.d.ts +0 -21
  82. package/model/route-type.d.ts +0 -6
  83. package/model/route-with-seo-data.d.ts +0 -11
  84. package/provide-external-router.d.ts +0 -3
  85. package/public_api.d.ts +0 -3
  86. package/routing/errors/client-error.d.ts +0 -8
  87. package/routing/errors/not-found-error.d.ts +0 -9
  88. package/routing/errors/permanent-redirect.d.ts +0 -10
  89. package/routing/errors/server-error.d.ts +0 -8
  90. package/routing/errors/temporary-redirect.d.ts +0 -10
  91. package/routing/guard/external-matcher-type.guard.d.ts +0 -10
  92. package/routing/helper/convert-to-path.d.ts +0 -7
  93. package/routing/processors/process-errors.d.ts +0 -6
  94. package/routing/processors/process-redirect.d.ts +0 -6
  95. package/routing/public_api.d.ts +0 -1
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,3 +0,0 @@
1
- export { DaffExternalRouterInMemoryDriver } from './in-memory.service';
2
- export { DaffExternalRouterDriverInMemoryConfig, DaffExternalRouterDriverInMemoryResolver, } from './config';
3
- export { provideDaffExternalRouterInMemoryDriver } from './provider';
@@ -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,2 +0,0 @@
1
- export { DaffExternalRouterMagentoDriver } from './magento.service';
2
- export { DaffExternalRouterDriverMagentoModule } from './magento.module';
@@ -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,2 +0,0 @@
1
- export { DaffExternalRouterMagentoDriver } from './magento.service';
2
- export { DaffExternalRouterDriverMagentoModule } from './magento.module';
@@ -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,5 +0,0 @@
1
- import { EnvironmentProviders } from '@angular/core';
2
- /**
3
- * Provides a Magento implementation of {@link DaffExternalRouterDriver}.
4
- */
5
- export declare const provideDaffExternalRouterMagentoDriver: () => EnvironmentProviders;
@@ -1,3 +0,0 @@
1
- export { DaffExternalRouterMagentoDriver } from './magento.service';
2
- export { DaffExternalRouterDriverMagentoModule } from './magento.module';
3
- export { provideDaffExternalRouterMagentoDriver } from './provider';
@@ -1,3 +0,0 @@
1
- import { DaffExternallyResolvableUrl } from '@daffodil/external-router';
2
- import { MagentoRoute } from '@daffodil/external-router/driver/magento';
3
- export declare const transformResolutionToResolvableUrlv243: (resolution: MagentoRoute) => DaffExternallyResolvableUrl;
@@ -1,2 +0,0 @@
1
- import { MagentoCategoryRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformMagentoCategorySchema: (resolution: MagentoCategoryRoute) => Record<string, unknown>;
@@ -1 +0,0 @@
1
- export declare const clientifyUrlPath: <T extends string | null>(path: T, domain: string) => string;
@@ -1,2 +0,0 @@
1
- import { MagentoCmsPageRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformMagentoPageSchema: (resolution: MagentoCmsPageRoute) => Record<string, unknown>;
@@ -1,2 +0,0 @@
1
- import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformMagentoBaseProduct: (product: MagentoProductRoute) => Record<string, unknown>;
@@ -1,2 +0,0 @@
1
- import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformMagentoBundleProduct: (resolution: MagentoProductRoute) => Record<string, unknown>;
@@ -1,2 +0,0 @@
1
- import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformMagentoConfigurableProduct: (resolution: MagentoProductRoute) => Record<string, unknown>;
@@ -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,2 +0,0 @@
1
- import { MagentoProductRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformMagentoSimpleProduct: (resolution: MagentoProductRoute) => Record<string, unknown>;
@@ -1,5 +0,0 @@
1
- /**
2
- * Rescales a rating value from it's max rating
3
- * to a scale of 5.
4
- */
5
- export declare const rescaleRatingOutOf5: (rating: number | null, max: number) => string;
@@ -1,2 +0,0 @@
1
- import { MagentoRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformSchema: (resolution: MagentoRoute) => Record<string, any> | null;
@@ -1,2 +0,0 @@
1
- import { MagentoRoute } from '@daffodil/external-router/driver/magento';
2
- export declare const transformClientUrls: <T extends MagentoRoute>(route: T, origin: string) => T;
@@ -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
- }
@@ -1,85 +0,0 @@
1
- export interface MagentoProductRoute {
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 meta description of the route
24
- */
25
- meta_description: string | null;
26
- /**
27
- * The name of the route
28
- */
29
- name: string;
30
- /**
31
- * The title of the route
32
- */
33
- meta_title: string | null;
34
- /**
35
- * The sku of a product.
36
- */
37
- sku: string;
38
- /**
39
- * The number of reviews of a product.
40
- */
41
- review_count: number | null;
42
- /**
43
- * The rating of a product.
44
- */
45
- rating_summary: number | null;
46
- /**
47
- * The images of a product.
48
- */
49
- image?: {
50
- url: string;
51
- };
52
- /**
53
- * The type of route.
54
- */
55
- __typename: string;
56
- /**
57
- * The price of the item.
58
- */
59
- price_range: {
60
- maximum_price: {
61
- final_price: {
62
- currency: string;
63
- value: number;
64
- };
65
- regular_price: {
66
- currency: string;
67
- value: number;
68
- };
69
- };
70
- minimum_price: {
71
- final_price: {
72
- currency: string;
73
- value: number;
74
- };
75
- regular_price: {
76
- currency: string;
77
- value: number;
78
- };
79
- };
80
- };
81
- /**
82
- * The stock status of a product.
83
- */
84
- stock_status: 'IN_STOCK' | 'OUT_OF_STOCK';
85
- }
@@ -1,8 +0,0 @@
1
- export { MagentoUrlResolver } from './url-resolver';
2
- export { MagentoUrlRewriteEntityTypeEnum } from './resolution-types';
3
- export { MagentoUrlResolverResponse } from './url-resolver-response';
4
- export { MagentoRoute } from './route';
5
- export { MagentoRouteResponse } from './route-response';
6
- export { MagentoProductRoute } from './product-route';
7
- export { MagentoCategoryRoute } from './category-route';
8
- export { MagentoCmsPageRoute } from './page-route.type';
@@ -1,5 +0,0 @@
1
- export declare enum MagentoUrlRewriteEntityTypeEnum {
2
- PRODUCT = "PRODUCT",
3
- CATEGORY = "CATEGORY",
4
- CMS_PAGE = "CMS_PAGE"
5
- }
@@ -1,14 +0,0 @@
1
- export interface MagentoRoutable {
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: 'UNKNOWN' | null;
10
- /**
11
- * The HTTP code for the page.
12
- */
13
- redirect_code: number;
14
- }
@@ -1,4 +0,0 @@
1
- import { MagentoRoute } from './route';
2
- export interface MagentoRouteResponse {
3
- route: MagentoRoute;
4
- }
@@ -1,5 +0,0 @@
1
- import { MagentoCategoryRoute } from './category-route';
2
- import { MagentoCmsPageRoute } from './page-route.type';
3
- import { MagentoProductRoute } from './product-route';
4
- import { MagentoRoutable } from './routable';
5
- export type MagentoRoute = MagentoRoutable | MagentoProductRoute | MagentoCategoryRoute | MagentoCmsPageRoute;
@@ -1,4 +0,0 @@
1
- import { MagentoUrlResolver } from './url-resolver';
2
- export interface MagentoUrlResolverResponse {
3
- urlResolver: MagentoUrlResolver;
4
- }
@@ -1,13 +0,0 @@
1
- export interface MagentoUrlResolver {
2
- relative_url: string;
3
- type: string;
4
- redirectCode: number;
5
- /**
6
- * In v2.4.2 this became the standard id field
7
- */
8
- entity_uid?: string;
9
- /**
10
- * The original id field from Magento
11
- */
12
- id?: number;
13
- }
@@ -1,2 +0,0 @@
1
- export * from './model/public_api';
2
- export * from './transforms/public_api';
@@ -1 +0,0 @@
1
- export { magentoTransformRedirectToHttpCode } from './redirect-to-http';