@pvh-afl/graphql 1.0.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 (202) hide show
  1. package/README.md +135 -0
  2. package/dist/cart/cart.hooks.d.ts +66 -0
  3. package/dist/cart/cart.hooks.d.ts.map +1 -0
  4. package/dist/cart/cart.hooks.js +12 -0
  5. package/dist/cart/cart.hooks.js.map +1 -0
  6. package/dist/cart/cart.module.d.ts +25 -0
  7. package/dist/cart/cart.module.d.ts.map +1 -0
  8. package/dist/cart/cart.module.js +44 -0
  9. package/dist/cart/cart.module.js.map +1 -0
  10. package/dist/cart/cart.resolver.d.ts +23 -0
  11. package/dist/cart/cart.resolver.d.ts.map +1 -0
  12. package/dist/cart/cart.resolver.js +153 -0
  13. package/dist/cart/cart.resolver.js.map +1 -0
  14. package/dist/cart/cart.service.d.ts +31 -0
  15. package/dist/cart/cart.service.d.ts.map +1 -0
  16. package/dist/cart/cart.service.js +305 -0
  17. package/dist/cart/cart.service.js.map +1 -0
  18. package/dist/cart/cart.types.d.ts +144 -0
  19. package/dist/cart/cart.types.d.ts.map +1 -0
  20. package/dist/cart/cart.types.js +629 -0
  21. package/dist/cart/cart.types.js.map +1 -0
  22. package/dist/cart/index.d.ts +6 -0
  23. package/dist/cart/index.d.ts.map +1 -0
  24. package/dist/cart/index.js +9 -0
  25. package/dist/cart/index.js.map +1 -0
  26. package/dist/cms/cms.module.d.ts +3 -0
  27. package/dist/cms/cms.module.d.ts.map +1 -0
  28. package/dist/cms/cms.module.js +18 -0
  29. package/dist/cms/cms.module.js.map +1 -0
  30. package/dist/cms/cms.resolver.d.ts +15 -0
  31. package/dist/cms/cms.resolver.d.ts.map +1 -0
  32. package/dist/cms/cms.resolver.js +44 -0
  33. package/dist/cms/cms.resolver.js.map +1 -0
  34. package/dist/cms/cms.service.d.ts +14 -0
  35. package/dist/cms/cms.service.d.ts.map +1 -0
  36. package/dist/cms/cms.service.js +111 -0
  37. package/dist/cms/cms.service.js.map +1 -0
  38. package/dist/cms/cms.types.d.ts +20 -0
  39. package/dist/cms/cms.types.d.ts.map +1 -0
  40. package/dist/cms/cms.types.js +89 -0
  41. package/dist/cms/cms.types.js.map +1 -0
  42. package/dist/cms/index.d.ts +5 -0
  43. package/dist/cms/index.d.ts.map +1 -0
  44. package/dist/cms/index.js +8 -0
  45. package/dist/cms/index.js.map +1 -0
  46. package/dist/collection/collection.module.d.ts +3 -0
  47. package/dist/collection/collection.module.d.ts.map +1 -0
  48. package/dist/collection/collection.module.js +19 -0
  49. package/dist/collection/collection.module.js.map +1 -0
  50. package/dist/collection/collection.resolver.d.ts +15 -0
  51. package/dist/collection/collection.resolver.d.ts.map +1 -0
  52. package/dist/collection/collection.resolver.js +45 -0
  53. package/dist/collection/collection.resolver.js.map +1 -0
  54. package/dist/collection/collection.service.d.ts +19 -0
  55. package/dist/collection/collection.service.d.ts.map +1 -0
  56. package/dist/collection/collection.service.js +132 -0
  57. package/dist/collection/collection.service.js.map +1 -0
  58. package/dist/collection/collection.types.d.ts +18 -0
  59. package/dist/collection/collection.types.d.ts.map +1 -0
  60. package/dist/collection/collection.types.js +75 -0
  61. package/dist/collection/collection.types.js.map +1 -0
  62. package/dist/collection/index.d.ts +5 -0
  63. package/dist/collection/index.d.ts.map +1 -0
  64. package/dist/collection/index.js +8 -0
  65. package/dist/collection/index.js.map +1 -0
  66. package/dist/common/index.d.ts +8 -0
  67. package/dist/common/index.d.ts.map +1 -0
  68. package/dist/common/index.js +16 -0
  69. package/dist/common/index.js.map +1 -0
  70. package/dist/graphql.module.d.ts +3 -0
  71. package/dist/graphql.module.d.ts.map +1 -0
  72. package/dist/graphql.module.js +46 -0
  73. package/dist/graphql.module.js.map +1 -0
  74. package/dist/header/header.module.d.ts +9 -0
  75. package/dist/header/header.module.d.ts.map +1 -0
  76. package/dist/header/header.module.js +21 -0
  77. package/dist/header/header.module.js.map +1 -0
  78. package/dist/header/header.resolver.d.ts +18 -0
  79. package/dist/header/header.resolver.d.ts.map +1 -0
  80. package/dist/header/header.resolver.js +42 -0
  81. package/dist/header/header.resolver.js.map +1 -0
  82. package/dist/header/index.d.ts +4 -0
  83. package/dist/header/index.d.ts.map +1 -0
  84. package/dist/header/index.js +7 -0
  85. package/dist/header/index.js.map +1 -0
  86. package/dist/header/types/header.types.d.ts +36 -0
  87. package/dist/header/types/header.types.d.ts.map +1 -0
  88. package/dist/header/types/header.types.js +154 -0
  89. package/dist/header/types/header.types.js.map +1 -0
  90. package/dist/header/types/index.d.ts +3 -0
  91. package/dist/header/types/index.d.ts.map +1 -0
  92. package/dist/header/types/index.js +6 -0
  93. package/dist/header/types/index.js.map +1 -0
  94. package/dist/header/types/response.types.d.ts +13 -0
  95. package/dist/header/types/response.types.d.ts.map +1 -0
  96. package/dist/header/types/response.types.js +54 -0
  97. package/dist/header/types/response.types.js.map +1 -0
  98. package/dist/index.d.ts +16 -0
  99. package/dist/index.d.ts.map +1 -0
  100. package/dist/index.js +29 -0
  101. package/dist/index.js.map +1 -0
  102. package/dist/page-content/index.d.ts +5 -0
  103. package/dist/page-content/index.d.ts.map +1 -0
  104. package/dist/page-content/index.js +8 -0
  105. package/dist/page-content/index.js.map +1 -0
  106. package/dist/page-content/page-content.module.d.ts +9 -0
  107. package/dist/page-content/page-content.module.d.ts.map +1 -0
  108. package/dist/page-content/page-content.module.js +25 -0
  109. package/dist/page-content/page-content.module.js.map +1 -0
  110. package/dist/page-content/page-content.resolver.d.ts +18 -0
  111. package/dist/page-content/page-content.resolver.d.ts.map +1 -0
  112. package/dist/page-content/page-content.resolver.js +42 -0
  113. package/dist/page-content/page-content.resolver.js.map +1 -0
  114. package/dist/page-content/page-content.service.d.ts +59 -0
  115. package/dist/page-content/page-content.service.d.ts.map +1 -0
  116. package/dist/page-content/page-content.service.js +253 -0
  117. package/dist/page-content/page-content.service.js.map +1 -0
  118. package/dist/page-content/types/common.types.d.ts +49 -0
  119. package/dist/page-content/types/common.types.d.ts.map +1 -0
  120. package/dist/page-content/types/common.types.js +217 -0
  121. package/dist/page-content/types/common.types.js.map +1 -0
  122. package/dist/page-content/types/index.d.ts +4 -0
  123. package/dist/page-content/types/index.d.ts.map +1 -0
  124. package/dist/page-content/types/index.js +7 -0
  125. package/dist/page-content/types/index.js.map +1 -0
  126. package/dist/page-content/types/response.types.d.ts +8 -0
  127. package/dist/page-content/types/response.types.d.ts.map +1 -0
  128. package/dist/page-content/types/response.types.js +29 -0
  129. package/dist/page-content/types/response.types.js.map +1 -0
  130. package/dist/page-content/types/section.types.d.ts +276 -0
  131. package/dist/page-content/types/section.types.d.ts.map +1 -0
  132. package/dist/page-content/types/section.types.js +1252 -0
  133. package/dist/page-content/types/section.types.js.map +1 -0
  134. package/dist/product/index.d.ts +5 -0
  135. package/dist/product/index.d.ts.map +1 -0
  136. package/dist/product/index.js +8 -0
  137. package/dist/product/index.js.map +1 -0
  138. package/dist/product/product.module.d.ts +3 -0
  139. package/dist/product/product.module.d.ts.map +1 -0
  140. package/dist/product/product.module.js +19 -0
  141. package/dist/product/product.module.js.map +1 -0
  142. package/dist/product/product.resolver.d.ts +15 -0
  143. package/dist/product/product.resolver.d.ts.map +1 -0
  144. package/dist/product/product.resolver.js +45 -0
  145. package/dist/product/product.resolver.js.map +1 -0
  146. package/dist/product/product.service.d.ts +38 -0
  147. package/dist/product/product.service.d.ts.map +1 -0
  148. package/dist/product/product.service.js +337 -0
  149. package/dist/product/product.service.js.map +1 -0
  150. package/dist/product/product.types.d.ts +63 -0
  151. package/dist/product/product.types.d.ts.map +1 -0
  152. package/dist/product/product.types.js +276 -0
  153. package/dist/product/product.types.js.map +1 -0
  154. package/dist/product-content/index.d.ts +5 -0
  155. package/dist/product-content/index.d.ts.map +1 -0
  156. package/dist/product-content/index.js +8 -0
  157. package/dist/product-content/index.js.map +1 -0
  158. package/dist/product-content/product-content.module.d.ts +3 -0
  159. package/dist/product-content/product-content.module.d.ts.map +1 -0
  160. package/dist/product-content/product-content.module.js +27 -0
  161. package/dist/product-content/product-content.module.js.map +1 -0
  162. package/dist/product-content/product-content.resolver.d.ts +20 -0
  163. package/dist/product-content/product-content.resolver.d.ts.map +1 -0
  164. package/dist/product-content/product-content.resolver.js +44 -0
  165. package/dist/product-content/product-content.resolver.js.map +1 -0
  166. package/dist/product-content/product-content.service.d.ts +40 -0
  167. package/dist/product-content/product-content.service.d.ts.map +1 -0
  168. package/dist/product-content/product-content.service.js +239 -0
  169. package/dist/product-content/product-content.service.js.map +1 -0
  170. package/dist/product-content/types/common.types.d.ts +85 -0
  171. package/dist/product-content/types/common.types.d.ts.map +1 -0
  172. package/dist/product-content/types/common.types.js +384 -0
  173. package/dist/product-content/types/common.types.js.map +1 -0
  174. package/dist/product-content/types/index.d.ts +3 -0
  175. package/dist/product-content/types/index.d.ts.map +1 -0
  176. package/dist/product-content/types/index.js +6 -0
  177. package/dist/product-content/types/index.js.map +1 -0
  178. package/dist/product-content/types/response.types.d.ts +10 -0
  179. package/dist/product-content/types/response.types.d.ts.map +1 -0
  180. package/dist/product-content/types/response.types.js +39 -0
  181. package/dist/product-content/types/response.types.js.map +1 -0
  182. package/dist/serviceability/index.d.ts +5 -0
  183. package/dist/serviceability/index.d.ts.map +1 -0
  184. package/dist/serviceability/index.js +8 -0
  185. package/dist/serviceability/index.js.map +1 -0
  186. package/dist/serviceability/serviceability.module.d.ts +3 -0
  187. package/dist/serviceability/serviceability.module.d.ts.map +1 -0
  188. package/dist/serviceability/serviceability.module.js +18 -0
  189. package/dist/serviceability/serviceability.module.js.map +1 -0
  190. package/dist/serviceability/serviceability.resolver.d.ts +19 -0
  191. package/dist/serviceability/serviceability.resolver.d.ts.map +1 -0
  192. package/dist/serviceability/serviceability.resolver.js +40 -0
  193. package/dist/serviceability/serviceability.resolver.js.map +1 -0
  194. package/dist/serviceability/serviceability.service.d.ts +42 -0
  195. package/dist/serviceability/serviceability.service.d.ts.map +1 -0
  196. package/dist/serviceability/serviceability.service.js +169 -0
  197. package/dist/serviceability/serviceability.service.js.map +1 -0
  198. package/dist/serviceability/serviceability.types.d.ts +42 -0
  199. package/dist/serviceability/serviceability.types.d.ts.map +1 -0
  200. package/dist/serviceability/serviceability.types.js +184 -0
  201. package/dist/serviceability/serviceability.types.js.map +1 -0
  202. package/package.json +67 -0
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeaderContentResponse = exports.HeaderError = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_1 = require("@nestjs/graphql");
6
+ const header_types_1 = require("./header.types");
7
+ let HeaderError = class HeaderError {
8
+ code;
9
+ message;
10
+ };
11
+ exports.HeaderError = HeaderError;
12
+ tslib_1.__decorate([
13
+ (0, graphql_1.Field)(),
14
+ tslib_1.__metadata("design:type", String)
15
+ ], HeaderError.prototype, "code", void 0);
16
+ tslib_1.__decorate([
17
+ (0, graphql_1.Field)(),
18
+ tslib_1.__metadata("design:type", String)
19
+ ], HeaderError.prototype, "message", void 0);
20
+ exports.HeaderError = HeaderError = tslib_1.__decorate([
21
+ (0, graphql_1.ObjectType)()
22
+ ], HeaderError);
23
+ let HeaderContentResponse = class HeaderContentResponse {
24
+ success;
25
+ data;
26
+ error;
27
+ isStale;
28
+ triggeredRefresh;
29
+ };
30
+ exports.HeaderContentResponse = HeaderContentResponse;
31
+ tslib_1.__decorate([
32
+ (0, graphql_1.Field)(),
33
+ tslib_1.__metadata("design:type", Boolean)
34
+ ], HeaderContentResponse.prototype, "success", void 0);
35
+ tslib_1.__decorate([
36
+ (0, graphql_1.Field)(() => header_types_1.HeaderContent, { nullable: true }),
37
+ tslib_1.__metadata("design:type", header_types_1.HeaderContent)
38
+ ], HeaderContentResponse.prototype, "data", void 0);
39
+ tslib_1.__decorate([
40
+ (0, graphql_1.Field)(() => HeaderError, { nullable: true }),
41
+ tslib_1.__metadata("design:type", HeaderError)
42
+ ], HeaderContentResponse.prototype, "error", void 0);
43
+ tslib_1.__decorate([
44
+ (0, graphql_1.Field)(),
45
+ tslib_1.__metadata("design:type", Boolean)
46
+ ], HeaderContentResponse.prototype, "isStale", void 0);
47
+ tslib_1.__decorate([
48
+ (0, graphql_1.Field)(),
49
+ tslib_1.__metadata("design:type", Boolean)
50
+ ], HeaderContentResponse.prototype, "triggeredRefresh", void 0);
51
+ exports.HeaderContentResponse = HeaderContentResponse = tslib_1.__decorate([
52
+ (0, graphql_1.ObjectType)()
53
+ ], HeaderContentResponse);
54
+ //# sourceMappingURL=response.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.types.js","sourceRoot":"","sources":["../../../src/header/types/response.types.ts"],"names":[],"mappings":";;;;AAAA,6CAAoD;AACpD,iDAA+C;AAGxC,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEtB,IAAI,CAAS;IAGb,OAAO,CAAS;CACjB,CAAA;AANY,kCAAW;AAEtB;IADC,IAAA,eAAK,GAAE;;yCACK;AAGb;IADC,IAAA,eAAK,GAAE;;4CACQ;sBALL,WAAW;IADvB,IAAA,oBAAU,GAAE;GACA,WAAW,CAMvB;AAGM,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAEhC,OAAO,CAAU;IAGjB,IAAI,CAAiB;IAGrB,KAAK,CAAe;IAGpB,OAAO,CAAU;IAGjB,gBAAgB,CAAU;CAC3B,CAAA;AAfY,sDAAqB;AAEhC;IADC,IAAA,eAAK,GAAE;;sDACS;AAGjB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,4BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACxC,4BAAa;mDAAC;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACrC,WAAW;oDAAC;AAGpB;IADC,IAAA,eAAK,GAAE;;sDACS;AAGjB;IADC,IAAA,eAAK,GAAE;;+DACkB;gCAdf,qBAAqB;IADjC,IAAA,oBAAU,GAAE;GACA,qBAAqB,CAejC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @devx-commerce/graphql
3
+ *
4
+ * Shared GraphQL modules for the AFL multi-brand commerce platform.
5
+ */
6
+ export * from './graphql.module';
7
+ export * from './product';
8
+ export * from './cart';
9
+ export * from './collection';
10
+ export * from './serviceability';
11
+ export * from './page-content';
12
+ export * from './product-content';
13
+ export * from './header';
14
+ export * from './cms';
15
+ export * from './common';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,kBAAkB,CAAC;AAGjC,cAAc,WAAW,CAAC;AAG1B,cAAc,QAAQ,CAAC;AAGvB,cAAc,cAAc,CAAC;AAG7B,cAAc,kBAAkB,CAAC;AAGjC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,UAAU,CAAC;AAGzB,cAAc,OAAO,CAAC;AAGtB,cAAc,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * @devx-commerce/graphql
4
+ *
5
+ * Shared GraphQL modules for the AFL multi-brand commerce platform.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const tslib_1 = require("tslib");
9
+ // GraphQL Module (main module that re-exports all)
10
+ tslib_1.__exportStar(require("./graphql.module"), exports);
11
+ // Product
12
+ tslib_1.__exportStar(require("./product"), exports);
13
+ // Cart
14
+ tslib_1.__exportStar(require("./cart"), exports);
15
+ // Collection
16
+ tslib_1.__exportStar(require("./collection"), exports);
17
+ // Serviceability
18
+ tslib_1.__exportStar(require("./serviceability"), exports);
19
+ // Page Content
20
+ tslib_1.__exportStar(require("./page-content"), exports);
21
+ // Product Content
22
+ tslib_1.__exportStar(require("./product-content"), exports);
23
+ // Header
24
+ tslib_1.__exportStar(require("./header"), exports);
25
+ // CMS
26
+ tslib_1.__exportStar(require("./cms"), exports);
27
+ // Common GraphQL utilities
28
+ tslib_1.__exportStar(require("./common"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mDAAmD;AACnD,2DAAiC;AAEjC,UAAU;AACV,oDAA0B;AAE1B,OAAO;AACP,iDAAuB;AAEvB,aAAa;AACb,uDAA6B;AAE7B,iBAAiB;AACjB,2DAAiC;AAEjC,eAAe;AACf,yDAA+B;AAE/B,kBAAkB;AAClB,4DAAkC;AAElC,SAAS;AACT,mDAAyB;AAEzB,MAAM;AACN,gDAAsB;AAEtB,2BAA2B;AAC3B,mDAAyB"}
@@ -0,0 +1,5 @@
1
+ export * from './page-content.module';
2
+ export * from './page-content.service';
3
+ export * from './page-content.resolver';
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/page-content/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./page-content.module"), exports);
5
+ tslib_1.__exportStar(require("./page-content.service"), exports);
6
+ tslib_1.__exportStar(require("./page-content.resolver"), exports);
7
+ tslib_1.__exportStar(require("./types"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/page-content/index.ts"],"names":[],"mappings":";;;AAAA,gEAAsC;AACtC,iEAAuC;AACvC,kEAAwC;AACxC,kDAAwB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * PageContentModule
3
+ *
4
+ * Note: This module depends on ThemeContentService which should be provided
5
+ * via ThemeModule.forRoot() in the root application module.
6
+ */
7
+ export declare class PageContentModule {
8
+ }
9
+ //# sourceMappingURL=page-content.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-content.module.d.ts","sourceRoot":"","sources":["../../src/page-content/page-content.module.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,qBAKa,iBAAiB;CAAG"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageContentModule = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const core_1 = require("@pvh-afl/core");
7
+ const page_content_resolver_1 = require("./page-content.resolver");
8
+ const page_content_service_1 = require("./page-content.service");
9
+ /**
10
+ * PageContentModule
11
+ *
12
+ * Note: This module depends on ThemeContentService which should be provided
13
+ * via ThemeModule.forRoot() in the root application module.
14
+ */
15
+ let PageContentModule = class PageContentModule {
16
+ };
17
+ exports.PageContentModule = PageContentModule;
18
+ exports.PageContentModule = PageContentModule = tslib_1.__decorate([
19
+ (0, common_1.Module)({
20
+ imports: [core_1.ConfigModule],
21
+ providers: [page_content_resolver_1.PageContentResolver, page_content_service_1.PageContentService],
22
+ exports: [page_content_service_1.PageContentService],
23
+ })
24
+ ], PageContentModule);
25
+ //# sourceMappingURL=page-content.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-content.module.js","sourceRoot":"","sources":["../../src/page-content/page-content.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,wCAA6C;AAC7C,mEAA8D;AAC9D,iEAA4D;AAE5D;;;;;GAKG;AAMI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAL7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,mBAAY,CAAC;QACvB,SAAS,EAAE,CAAC,2CAAmB,EAAE,yCAAkB,CAAC;QACpD,OAAO,EAAE,CAAC,yCAAkB,CAAC;KAC9B,CAAC;GACW,iBAAiB,CAAG"}
@@ -0,0 +1,18 @@
1
+ import { PageContentService } from './page-content.service';
2
+ import { PageContentResponse } from './types';
3
+ interface GqlContext {
4
+ req: {
5
+ brand: string;
6
+ };
7
+ }
8
+ export declare class PageContentResolver {
9
+ private readonly pageContentService;
10
+ constructor(pageContentService: PageContentService);
11
+ /**
12
+ * Get page content by slug.
13
+ * @param slug - Page slug (e.g., "home", "mens", "womens", "kids")
14
+ */
15
+ pages(ctx: GqlContext, slug: string): Promise<PageContentResponse>;
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=page-content.resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-content.resolver.d.ts","sourceRoot":"","sources":["../../src/page-content/page-content.resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,UAAU;IAClB,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACxB;AAED,qBAEa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAEnE;;;OAGG;IAIG,KAAK,CACE,GAAG,EAAE,UAAU,EAK1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,mBAAmB,CAAC;CAGhC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageContentResolver = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_1 = require("@nestjs/graphql");
6
+ const common_1 = require("@nestjs/common");
7
+ const core_1 = require("@pvh-afl/core");
8
+ const page_content_service_1 = require("./page-content.service");
9
+ const types_1 = require("./types");
10
+ let PageContentResolver = class PageContentResolver {
11
+ pageContentService;
12
+ constructor(pageContentService) {
13
+ this.pageContentService = pageContentService;
14
+ }
15
+ /**
16
+ * Get page content by slug.
17
+ * @param slug - Page slug (e.g., "home", "mens", "womens", "kids")
18
+ */
19
+ async pages(ctx, slug) {
20
+ return this.pageContentService.getPageBySlug(ctx.req.brand, slug);
21
+ }
22
+ };
23
+ exports.PageContentResolver = PageContentResolver;
24
+ tslib_1.__decorate([
25
+ (0, graphql_1.Query)(() => types_1.PageContentResponse, {
26
+ description: 'Get page content by slug',
27
+ }),
28
+ tslib_1.__param(0, (0, graphql_1.Context)()),
29
+ tslib_1.__param(1, (0, graphql_1.Args)('slug', {
30
+ type: () => String,
31
+ description: 'Page slug (e.g., "home", "mens", "womens", "kids")',
32
+ })),
33
+ tslib_1.__metadata("design:type", Function),
34
+ tslib_1.__metadata("design:paramtypes", [Object, String]),
35
+ tslib_1.__metadata("design:returntype", Promise)
36
+ ], PageContentResolver.prototype, "pages", null);
37
+ exports.PageContentResolver = PageContentResolver = tslib_1.__decorate([
38
+ (0, graphql_1.Resolver)(),
39
+ (0, common_1.UseGuards)(core_1.TenantGuard),
40
+ tslib_1.__metadata("design:paramtypes", [page_content_service_1.PageContentService])
41
+ ], PageContentResolver);
42
+ //# sourceMappingURL=page-content.resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-content.resolver.js","sourceRoot":"","sources":["../../src/page-content/page-content.resolver.ts"],"names":[],"mappings":";;;;AAAA,6CAAiE;AACjE,2CAA2C;AAC3C,wCAA4C;AAC5C,iEAA4D;AAC5D,mCAA8C;AAQvC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IACD;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE;;;OAGG;IAIG,AAAN,KAAK,CAAC,KAAK,CACE,GAAe,EAK1B,IAAY;QAEZ,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpE,CAAC;CACF,CAAA;AApBY,kDAAmB;AAUxB;IAHL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,2BAAmB,EAAE;QAChC,WAAW,EAAE,0BAA0B;KACxC,CAAC;IAEC,mBAAA,IAAA,iBAAO,GAAE,CAAA;IACT,mBAAA,IAAA,cAAI,EAAC,MAAM,EAAE;QACZ,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM;QAClB,WAAW,EAAE,oDAAoD;KAClE,CAAC,CAAA;;;;gDAIH;8BAnBU,mBAAmB;IAF/B,IAAA,kBAAQ,GAAE;IACV,IAAA,kBAAS,EAAC,kBAAW,CAAC;6CAE4B,yCAAkB;GADxD,mBAAmB,CAoB/B"}
@@ -0,0 +1,59 @@
1
+ import { ThemeContentService, ConfigService } from '@pvh-afl/core';
2
+ import { PageContentResponse } from './types';
3
+ export declare class PageContentService {
4
+ private readonly themeContentService;
5
+ private readonly configService;
6
+ constructor(themeContentService: ThemeContentService, configService: ConfigService);
7
+ /**
8
+ * Get page content by slug.
9
+ * Maps slug to template path and fetches content.
10
+ * @param brand - Brand identifier
11
+ * @param slug - Page slug (e.g., "home", "mens", "womens")
12
+ */
13
+ getPageBySlug(brand: string, slug: string): Promise<PageContentResponse>;
14
+ /**
15
+ * Get page content by template path.
16
+ * @param brand - Brand identifier
17
+ * @param path - Full template path (e.g., "templates/index.json")
18
+ * @param pageType - Page type for feature flag filtering (e.g., "home", "mens")
19
+ */
20
+ getPageContent(brand: string, path: string, pageType: string): Promise<PageContentResponse>;
21
+ /**
22
+ * Filters out unknown section types to prevent GraphQL resolution errors.
23
+ * Returns only sections with known types.
24
+ */
25
+ private filterKnownSectionTypes;
26
+ /**
27
+ * Filters sections by visibility setting.
28
+ * Only includes sections where settings.visibility is "mobile" or "common" (case-insensitive).
29
+ * Sections without a visibility setting are included by default.
30
+ */
31
+ private filterByVisibility;
32
+ /**
33
+ * Filters sections based on feature flags.
34
+ * Checks page-specific flags first: {pageType}.sections.{sectionType}
35
+ * If a section type has a corresponding feature flag set to false, it will be excluded.
36
+ * Unknown section types or sections without feature flags are included by default.
37
+ */
38
+ private filterSectionsByFeatureFlags;
39
+ private readonly urlFieldNames;
40
+ /**
41
+ * Transforms shopify:// URLs by removing the protocol prefix.
42
+ * e.g., "shopify://collections/women" becomes "/collections/women"
43
+ */
44
+ private transformShopifyUrls;
45
+ /**
46
+ * Recursively transforms URL fields in blocks, including nested blocks.
47
+ */
48
+ private transformBlocksUrls;
49
+ /**
50
+ * Transforms all URL fields in a settings object.
51
+ */
52
+ private transformUrlFieldsInSettings;
53
+ /**
54
+ * Removes shopify:// prefix from URL.
55
+ * e.g., "shopify://collections/women" becomes "/collections/women"
56
+ */
57
+ private stripShopifyProtocol;
58
+ }
59
+ //# sourceMappingURL=page-content.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-content.service.d.ts","sourceRoot":"","sources":["../../src/page-content/page-content.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAmB,MAAM,SAAS,CAAC;AA8B/D,qBACa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,mBAAmB,EAAE,mBAAmB,EACxC,aAAa,EAAE,aAAa;IAG/C;;;;;OAKG;IACG,aAAa,CACjB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,mBAAmB,CAAC;IAQ/B;;;;;OAKG;IACG,cAAc,CAClB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,CAAC;IAgE/B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAe/B;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAmB1B;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;IAkCpC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAM5B;IAEF;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA8B5B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA8B3B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAmBpC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;CAM7B"}
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageContentService = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const core_1 = require("@pvh-afl/core");
7
+ // Slug to template path mapping
8
+ const SLUG_TO_TEMPLATE = {
9
+ home: 'templates/index.json',
10
+ index: 'templates/index.json',
11
+ men: 'templates/page.men.json',
12
+ women: 'templates/page.women.json',
13
+ kids: 'templates/page.kids.json',
14
+ };
15
+ // Known section types that have explicit GraphQL type definitions
16
+ const KNOWN_SECTION_TYPES = new Set([
17
+ 'banner',
18
+ 'promo-banner',
19
+ 'banner-with-buttons',
20
+ 'featured-products',
21
+ 'shop-by-category',
22
+ 'newsletter',
23
+ 'category-tiles',
24
+ 'category-grid',
25
+ 'recently-viewed-products',
26
+ 'featured-collection',
27
+ 'feature-grid',
28
+ 'image-card-grid',
29
+ ]);
30
+ // Visibility values that should be included for mobile (case-insensitive)
31
+ const MOBILE_VISIBLE_VALUES = new Set(['mobile', 'common']);
32
+ let PageContentService = class PageContentService {
33
+ themeContentService;
34
+ configService;
35
+ constructor(themeContentService, configService) {
36
+ this.themeContentService = themeContentService;
37
+ this.configService = configService;
38
+ }
39
+ /**
40
+ * Get page content by slug.
41
+ * Maps slug to template path and fetches content.
42
+ * @param brand - Brand identifier
43
+ * @param slug - Page slug (e.g., "home", "mens", "womens")
44
+ */
45
+ async getPageBySlug(brand, slug) {
46
+ const normalizedSlug = slug.toLowerCase();
47
+ const templatePath = SLUG_TO_TEMPLATE[normalizedSlug] || `templates/${normalizedSlug}.json`;
48
+ return this.getPageContent(brand, templatePath, normalizedSlug);
49
+ }
50
+ /**
51
+ * Get page content by template path.
52
+ * @param brand - Brand identifier
53
+ * @param path - Full template path (e.g., "templates/index.json")
54
+ * @param pageType - Page type for feature flag filtering (e.g., "home", "mens")
55
+ */
56
+ async getPageContent(brand, path, pageType) {
57
+ try {
58
+ const result = await this.themeContentService.getContent(brand, path);
59
+ core_1.logger.info('Page content result', {
60
+ brand,
61
+ path,
62
+ pageType,
63
+ hasData: !!result.data,
64
+ isStale: result.isStale,
65
+ triggeredRefresh: result.triggeredRefresh,
66
+ });
67
+ if (!result.data) {
68
+ return {
69
+ success: false,
70
+ error: {
71
+ code: 'CACHE_MISS',
72
+ message: 'Page content not found in cache',
73
+ },
74
+ };
75
+ }
76
+ // Filter and transform sections
77
+ const sections = result.data;
78
+ // Filter out unknown section types to prevent GraphQL resolution errors
79
+ const knownSections = this.filterKnownSectionTypes(sections);
80
+ // Filter by visibility (only include sections with visibility "mobile" or "common")
81
+ const visibleSections = this.filterByVisibility(knownSections);
82
+ // Filter sections based on feature flags
83
+ const filteredSections = this.filterSectionsByFeatureFlags(brand, visibleSections, pageType);
84
+ // Transform shopify:// URLs
85
+ const transformedSections = this.transformShopifyUrls(filteredSections);
86
+ return {
87
+ success: true,
88
+ data: transformedSections,
89
+ };
90
+ }
91
+ catch (error) {
92
+ core_1.logger.error('Failed to fetch page content', {
93
+ brand,
94
+ path,
95
+ pageType,
96
+ error: error instanceof Error ? error.message : 'Unknown',
97
+ });
98
+ return {
99
+ success: false,
100
+ error: {
101
+ code: 'INTERNAL_ERROR',
102
+ message: 'Failed to fetch page content',
103
+ },
104
+ };
105
+ }
106
+ }
107
+ /**
108
+ * Filters out unknown section types to prevent GraphQL resolution errors.
109
+ * Returns only sections with known types.
110
+ */
111
+ filterKnownSectionTypes(sections) {
112
+ if (!Array.isArray(sections)) {
113
+ return sections;
114
+ }
115
+ return sections.filter((section) => {
116
+ const sectionType = section.type;
117
+ if (!sectionType || !KNOWN_SECTION_TYPES.has(sectionType)) {
118
+ core_1.logger.warn('Filtering out unknown section type', { sectionType });
119
+ return false;
120
+ }
121
+ return true;
122
+ });
123
+ }
124
+ /**
125
+ * Filters sections by visibility setting.
126
+ * Only includes sections where settings.visibility is "mobile" or "common" (case-insensitive).
127
+ * Sections without a visibility setting are included by default.
128
+ */
129
+ filterByVisibility(sections) {
130
+ if (!Array.isArray(sections)) {
131
+ return sections;
132
+ }
133
+ return sections.filter((section) => {
134
+ const settings = section
135
+ .settings;
136
+ const visibility = settings?.visibility?.toLowerCase();
137
+ // If no visibility setting, include the section by default
138
+ if (!visibility) {
139
+ return true;
140
+ }
141
+ return MOBILE_VISIBLE_VALUES.has(visibility);
142
+ });
143
+ }
144
+ /**
145
+ * Filters sections based on feature flags.
146
+ * Checks page-specific flags first: {pageType}.sections.{sectionType}
147
+ * If a section type has a corresponding feature flag set to false, it will be excluded.
148
+ * Unknown section types or sections without feature flags are included by default.
149
+ */
150
+ filterSectionsByFeatureFlags(brand, sections, pageType) {
151
+ if (!Array.isArray(sections)) {
152
+ return sections;
153
+ }
154
+ return sections.filter((section) => {
155
+ const sectionType = section.type;
156
+ if (!sectionType)
157
+ return true;
158
+ // Check page-specific feature flag: {pageType}.sections.{sectionType}
159
+ const flagPath = `${pageType}.sections.${sectionType}`;
160
+ const isEnabled = this.configService.getFeature(brand, flagPath);
161
+ // If flag is explicitly false, exclude the section
162
+ // If flag is undefined or true, include the section
163
+ if (isEnabled === false) {
164
+ core_1.logger.info('Section disabled by feature flag', {
165
+ brand,
166
+ pageType,
167
+ sectionType,
168
+ flagPath,
169
+ });
170
+ return false;
171
+ }
172
+ return true;
173
+ });
174
+ }
175
+ // URL field names that should have shopify:// protocol stripped
176
+ urlFieldNames = [
177
+ 'cta_url',
178
+ 'cta_men_url',
179
+ 'cta_women_url',
180
+ 'cta_kids_url',
181
+ 'url',
182
+ ];
183
+ /**
184
+ * Transforms shopify:// URLs by removing the protocol prefix.
185
+ * e.g., "shopify://collections/women" becomes "/collections/women"
186
+ */
187
+ transformShopifyUrls(sections) {
188
+ if (!Array.isArray(sections)) {
189
+ return sections;
190
+ }
191
+ return sections.map((section) => {
192
+ const transformed = { ...section };
193
+ // Handle blocks with URL fields in settings (recursively)
194
+ if ('blocks' in transformed && Array.isArray(transformed.blocks)) {
195
+ transformed.blocks = this.transformBlocksUrls(transformed.blocks);
196
+ }
197
+ // Handle settings with URL fields directly
198
+ const settings = transformed.settings;
199
+ if (settings) {
200
+ transformed.settings = this.transformUrlFieldsInSettings(settings);
201
+ }
202
+ return transformed;
203
+ });
204
+ }
205
+ /**
206
+ * Recursively transforms URL fields in blocks, including nested blocks.
207
+ */
208
+ transformBlocksUrls(blocks) {
209
+ return blocks.map((block) => {
210
+ const transformedBlock = { ...block };
211
+ // Transform settings
212
+ if (transformedBlock.settings) {
213
+ transformedBlock.settings = this.transformUrlFieldsInSettings(transformedBlock.settings);
214
+ }
215
+ // Recursively transform nested blocks
216
+ if (transformedBlock.blocks &&
217
+ Array.isArray(transformedBlock.blocks)) {
218
+ transformedBlock.blocks = this.transformBlocksUrls(transformedBlock.blocks);
219
+ }
220
+ return transformedBlock;
221
+ });
222
+ }
223
+ /**
224
+ * Transforms all URL fields in a settings object.
225
+ */
226
+ transformUrlFieldsInSettings(settings) {
227
+ const transformed = { ...settings };
228
+ for (const fieldName of this.urlFieldNames) {
229
+ if (fieldName in transformed &&
230
+ typeof transformed[fieldName] === 'string') {
231
+ transformed[fieldName] = this.stripShopifyProtocol(transformed[fieldName]);
232
+ }
233
+ }
234
+ return transformed;
235
+ }
236
+ /**
237
+ * Removes shopify:// prefix from URL.
238
+ * e.g., "shopify://collections/women" becomes "/collections/women"
239
+ */
240
+ stripShopifyProtocol(url) {
241
+ if (url?.startsWith('shopify://')) {
242
+ return '/' + url.slice('shopify://'.length);
243
+ }
244
+ return url;
245
+ }
246
+ };
247
+ exports.PageContentService = PageContentService;
248
+ exports.PageContentService = PageContentService = tslib_1.__decorate([
249
+ (0, common_1.Injectable)(),
250
+ tslib_1.__metadata("design:paramtypes", [core_1.ThemeContentService,
251
+ core_1.ConfigService])
252
+ ], PageContentService);
253
+ //# sourceMappingURL=page-content.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-content.service.js","sourceRoot":"","sources":["../../src/page-content/page-content.service.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,wCAA2E;AAG3E,gCAAgC;AAChC,MAAM,gBAAgB,GAA2B;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAsB;IAC7B,GAAG,EAAE,yBAAyB;IAC9B,KAAK,EAAE,2BAA2B;IAClC,IAAI,EAAE,0BAA0B;CACjC,CAAC;AAEF,kEAAkE;AAClE,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,QAAQ;IACR,cAAc;IACd,qBAAqB;IACrB,mBAAmB;IACnB,kBAAkB;IAClB,YAAY;IACZ,gBAAgB;IAChB,eAAe;IACf,0BAA0B;IAC1B,qBAAqB;IACrB,cAAc;IACd,iBAAiB;CAClB,CAAC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGrD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAEV;IACA;IAFnB,YACmB,mBAAwC,EACxC,aAA4B;QAD5B,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAEJ;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,KAAa,EACb,IAAY;QAEZ,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,YAAY,GAChB,gBAAgB,CAAC,cAAc,CAAC,IAAI,aAAa,cAAc,OAAO,CAAC;QAEzE,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,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C3C,IACE,SAAS,IAAI,WAAW;gBACxB,OAAO,WAAW,CAAC,SAAS,CAAC,KAAK,QAAQ,EAC1C,CAAC;gBACD,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAChD,WAAW,CAAC,SAAS,CAAW,CACjC,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACK,oBAAoB,CAAC,GAAW;QACtC,IAAI,GAAG,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAClC,OAAO,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AA/RY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;6CAG6B,0BAAmB;QACzB,oBAAa;GAHpC,kBAAkB,CA+R9B"}
@@ -0,0 +1,49 @@
1
+ export declare class PageError {
2
+ code: string;
3
+ message: string;
4
+ }
5
+ export declare class CMSImage {
6
+ url: string;
7
+ width?: number;
8
+ height?: number;
9
+ }
10
+ export declare class CMSVideo {
11
+ url: string;
12
+ width?: number;
13
+ height?: number;
14
+ }
15
+ export declare class PageImage {
16
+ id: string;
17
+ url: string;
18
+ altText?: string;
19
+ width: number;
20
+ height: number;
21
+ }
22
+ export declare class PageMoney {
23
+ amount: string;
24
+ currencyCode: string;
25
+ }
26
+ export declare class PagePriceRange {
27
+ minVariantPrice: PageMoney;
28
+ maxVariantPrice: PageMoney;
29
+ }
30
+ export declare class PageFeaturedImage {
31
+ url: string;
32
+ altText?: string;
33
+ width?: number;
34
+ height?: number;
35
+ }
36
+ export declare class PageProduct {
37
+ id: string;
38
+ title: string;
39
+ handle: string;
40
+ vendor?: string;
41
+ productType?: string;
42
+ featuredImage?: PageFeaturedImage;
43
+ images: PageImage[];
44
+ priceRange: PagePriceRange;
45
+ compareAtPrice?: PageMoney | null;
46
+ tags?: string[];
47
+ displayTag?: string | null;
48
+ }
49
+ //# sourceMappingURL=common.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../../src/page-content/types/common.types.ts"],"names":[],"mappings":"AAIA,qBACa,SAAS;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,qBACa,QAAQ;IAEnB,GAAG,EAAE,MAAM,CAAC;IAGZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBACa,QAAQ;IAEnB,GAAG,EAAE,MAAM,CAAC;IAGZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,qBACa,SAAS;IAEpB,EAAE,EAAE,MAAM,CAAC;IAGX,GAAG,EAAE,MAAM,CAAC;IAGZ,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,SAAS;IAEpB,MAAM,EAAE,MAAM,CAAC;IAGf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBACa,cAAc;IAEzB,eAAe,EAAE,SAAS,CAAC;IAG3B,eAAe,EAAE,SAAS,CAAC;CAC5B;AAED,qBACa,iBAAiB;IAE5B,GAAG,EAAE,MAAM,CAAC;IAGZ,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBACa,WAAW;IAEtB,EAAE,EAAE,MAAM,CAAC;IAGX,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,aAAa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