@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,169 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceabilityService = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const crypto_1 = require("crypto");
7
+ const core_1 = require("@pvh-afl/core");
8
+ /**
9
+ * Serviceability Service
10
+ *
11
+ * Business logic for product delivery serviceability checks.
12
+ * Implements caching with stale-while-revalidate pattern.
13
+ *
14
+ * Cache Strategy:
15
+ * - TTL: 5 minutes
16
+ * - Stale At: 4 minutes
17
+ * - Key: {brand}:serviceability:{pincode}:{hash of SKU IDs}
18
+ */
19
+ let ServiceabilityService = class ServiceabilityService {
20
+ integrationFactory;
21
+ cacheService;
22
+ // Cache TTL constants (in seconds)
23
+ CACHE_TTL = 300; // 5 minutes
24
+ CACHE_STALE_TTL = 240; // 4 minutes
25
+ constructor(integrationFactory, cacheService) {
26
+ this.integrationFactory = integrationFactory;
27
+ this.cacheService = cacheService;
28
+ }
29
+ /**
30
+ * Check serviceability for items at a given location.
31
+ * Uses cache with background refresh on stale hits.
32
+ */
33
+ async checkServiceability(brand, input) {
34
+ const cacheKey = this.buildCacheKey(brand, input);
35
+ // Try cache first
36
+ const cached = await this.cacheService.get(cacheKey);
37
+ if (cached && !cached.isStale) {
38
+ core_1.logger.info('Serviceability cache hit', { brand, pincode: input.pincode });
39
+ return cached.data;
40
+ }
41
+ if (cached?.isStale) {
42
+ // Return stale data and refresh in background
43
+ core_1.logger.info('Serviceability cache stale, refreshing in background', {
44
+ brand,
45
+ pincode: input.pincode,
46
+ });
47
+ this.refreshInBackground(brand, input, cacheKey);
48
+ return cached.data;
49
+ }
50
+ // Cache miss - fetch fresh data
51
+ return this.fetchAndCache(brand, input, cacheKey);
52
+ }
53
+ /**
54
+ * Fetch fresh serviceability data and cache it.
55
+ */
56
+ async fetchAndCache(brand, input, cacheKey) {
57
+ const omsService = this.integrationFactory.get(brand, 'oms');
58
+ if (!omsService) {
59
+ core_1.logger.warn('OMS integration not configured', { brand });
60
+ // Return all items as not serviceable if OMS not configured
61
+ return input.items.map((item) => ({
62
+ skuId: item.skuId,
63
+ eoisSkuID: item.eoisSkuID,
64
+ serviceable: false,
65
+ deliveryOptions: [],
66
+ }));
67
+ }
68
+ // Build request
69
+ const request = {
70
+ location: input.pincode,
71
+ coordinates: input.coordinates
72
+ ? { latitude: input.coordinates.latitude, longitude: input.coordinates.longitude }
73
+ : undefined,
74
+ storePickup: input.storePickup ? 'true' : undefined,
75
+ deliveryMode: input.deliveryModes,
76
+ items: input.items.map((item) => ({
77
+ skuId: item.skuId,
78
+ eoisSkuID: item.eoisSkuID,
79
+ quantity: item.quantity,
80
+ sellerId: item.sellerId,
81
+ })),
82
+ };
83
+ const response = await omsService.checkServiceability(request);
84
+ if (!response.success || !response.data) {
85
+ core_1.logger.error('Serviceability check failed', {
86
+ brand,
87
+ error: response.error,
88
+ });
89
+ // Return items as not serviceable on error
90
+ return input.items.map((item) => ({
91
+ skuId: item.skuId,
92
+ eoisSkuID: item.eoisSkuID,
93
+ serviceable: false,
94
+ deliveryOptions: [],
95
+ }));
96
+ }
97
+ const results = this.mapResponse(input, response.data);
98
+ // Cache the results
99
+ await this.cacheService.set(cacheKey, results, this.CACHE_TTL, this.CACHE_STALE_TTL);
100
+ return results;
101
+ }
102
+ /**
103
+ * Refresh cache in background without blocking.
104
+ */
105
+ refreshInBackground(brand, input, cacheKey) {
106
+ this.fetchAndCache(brand, input, cacheKey).catch((error) => {
107
+ core_1.logger.error('Background serviceability refresh failed', {
108
+ brand,
109
+ pincode: input.pincode,
110
+ error: error instanceof Error ? error.message : 'Unknown',
111
+ });
112
+ });
113
+ }
114
+ /**
115
+ * Map Omuni response to GraphQL result type.
116
+ */
117
+ mapResponse(input, response) {
118
+ // Create a map of responses by skuId for quick lookup
119
+ const responseMap = new Map(response.items.map((item) => [item.skuId, item]));
120
+ return input.items.map((inputItem) => {
121
+ const responseItem = responseMap.get(inputItem.skuId);
122
+ if (!responseItem || !responseItem.deliverymodes?.length) {
123
+ return {
124
+ skuId: inputItem.skuId,
125
+ eoisSkuID: inputItem.eoisSkuID,
126
+ serviceable: false,
127
+ deliveryOptions: [],
128
+ };
129
+ }
130
+ const deliveryOptions = responseItem.deliverymodes.map((mode) => ({
131
+ deliveryType: mode.deliveryType,
132
+ paymentType: mode.paymentType,
133
+ deliveryTimeHours: mode.deliveryTime,
134
+ deliveryCost: {
135
+ currency: mode.deliveryCost.currencyIso,
136
+ amount: mode.deliveryCost.value,
137
+ },
138
+ courierName: mode.courierName,
139
+ fulfillmentCenterId: mode.fCenterId,
140
+ expectedDeliveryDate: mode.deliveryDate,
141
+ }));
142
+ return {
143
+ skuId: responseItem.skuId,
144
+ eoisSkuID: responseItem.eoisSkuID,
145
+ serviceable: true,
146
+ deliveryOptions,
147
+ };
148
+ });
149
+ }
150
+ /**
151
+ * Build cache key with hash of sorted SKU IDs.
152
+ */
153
+ buildCacheKey(brand, input) {
154
+ // Sort SKU IDs for consistent hashing
155
+ const sortedSkus = [...input.items]
156
+ .map((item) => item.skuId)
157
+ .sort()
158
+ .join(',');
159
+ const hash = (0, crypto_1.createHash)('md5').update(sortedSkus).digest('hex').slice(0, 8);
160
+ return `${brand}:serviceability:${input.pincode}:${hash}`;
161
+ }
162
+ };
163
+ exports.ServiceabilityService = ServiceabilityService;
164
+ exports.ServiceabilityService = ServiceabilityService = tslib_1.__decorate([
165
+ (0, common_1.Injectable)(),
166
+ tslib_1.__metadata("design:paramtypes", [core_1.IntegrationFactory,
167
+ core_1.CacheService])
168
+ ], ServiceabilityService);
169
+ //# sourceMappingURL=serviceability.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceability.service.js","sourceR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CAAC;IACL,CAAC;IAED;;OAEG;IACK,aAAa,CAAC,KAAa,EAAE,KAA+B;QAClE,sCAAsC;QACtC,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;aAChC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;aACzB,IAAI,EAAE;aACN,IAAI,CAAC,GAAG,CAAC,CAAC;QAEb,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE5E,OAAO,GAAG,KAAK,mBAAmB,KAAK,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;IAC5D,CAAC;CACF,CAAA;AA3LY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;6CAO4B,yBAAkB;QACxB,mBAAY;GAPlC,qBAAqB,CA2LjC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GraphQL Types for Serviceability Check
3
+ *
4
+ * Input types for the serviceability query and output types for results.
5
+ */
6
+ export declare class ServiceabilityItemInput {
7
+ skuId: string;
8
+ eoisSkuID?: string;
9
+ quantity: number;
10
+ sellerId?: string;
11
+ }
12
+ export declare class CoordinatesInput {
13
+ latitude?: string;
14
+ longitude?: string;
15
+ }
16
+ export declare class ServiceabilityCheckInput {
17
+ pincode: string;
18
+ coordinates?: CoordinatesInput;
19
+ deliveryModes?: string[];
20
+ items: ServiceabilityItemInput[];
21
+ storePickup?: boolean;
22
+ }
23
+ export declare class DeliveryCost {
24
+ currency: string;
25
+ amount: number;
26
+ }
27
+ export declare class DeliveryOption {
28
+ deliveryType: string;
29
+ paymentType: string;
30
+ deliveryTimeHours: string;
31
+ deliveryCost: DeliveryCost;
32
+ courierName: string;
33
+ fulfillmentCenterId: string;
34
+ expectedDeliveryDate: string;
35
+ }
36
+ export declare class ServiceabilityResult {
37
+ skuId: string;
38
+ eoisSkuID?: string;
39
+ serviceable: boolean;
40
+ deliveryOptions?: DeliveryOption[];
41
+ }
42
+ //# sourceMappingURL=serviceability.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceability.types.d.ts","sourceRoot":"","sources":["../../src/serviceability/serviceability.types.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAMH,qBACa,uBAAuB;IAElC,KAAK,EAAG,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBACa,gBAAgB;IAE3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBACa,wBAAwB;IAEnC,OAAO,EAAG,MAAM,CAAC;IAMjB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAM/B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAKzB,KAAK,EAAG,uBAAuB,EAAE,CAAC;IAGlC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAMD,qBACa,YAAY;IAEvB,QAAQ,EAAG,MAAM,CAAC;IAGlB,MAAM,EAAG,MAAM,CAAC;CACjB;AAED,qBACa,cAAc;IAEzB,YAAY,EAAG,MAAM,CAAC;IAGtB,WAAW,EAAG,MAAM,CAAC;IAGrB,iBAAiB,EAAG,MAAM,CAAC;IAG3B,YAAY,EAAG,YAAY,CAAC;IAG5B,WAAW,EAAG,MAAM,CAAC;IAGrB,mBAAmB,EAAG,MAAM,CAAC;IAG7B,oBAAoB,EAAG,MAAM,CAAC;CAC/B;AAED,qBACa,oBAAoB;IAE/B,KAAK,EAAG,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,WAAW,EAAG,OAAO,CAAC;IAMtB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;CACpC"}
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceabilityResult = exports.DeliveryOption = exports.DeliveryCost = exports.ServiceabilityCheckInput = exports.CoordinatesInput = exports.ServiceabilityItemInput = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_1 = require("@nestjs/graphql");
6
+ /**
7
+ * GraphQL Types for Serviceability Check
8
+ *
9
+ * Input types for the serviceability query and output types for results.
10
+ */
11
+ // ============================================================================
12
+ // Input Types
13
+ // ============================================================================
14
+ let ServiceabilityItemInput = class ServiceabilityItemInput {
15
+ skuId;
16
+ eoisSkuID;
17
+ quantity;
18
+ sellerId;
19
+ };
20
+ exports.ServiceabilityItemInput = ServiceabilityItemInput;
21
+ tslib_1.__decorate([
22
+ (0, graphql_1.Field)({ description: 'SKU ID of the product' }),
23
+ tslib_1.__metadata("design:type", String)
24
+ ], ServiceabilityItemInput.prototype, "skuId", void 0);
25
+ tslib_1.__decorate([
26
+ (0, graphql_1.Field)({ nullable: true, description: 'External OIS SKU ID' }),
27
+ tslib_1.__metadata("design:type", String)
28
+ ], ServiceabilityItemInput.prototype, "eoisSkuID", void 0);
29
+ tslib_1.__decorate([
30
+ (0, graphql_1.Field)(() => graphql_1.Int, { description: 'Quantity to check serviceability for' }),
31
+ tslib_1.__metadata("design:type", Number)
32
+ ], ServiceabilityItemInput.prototype, "quantity", void 0);
33
+ tslib_1.__decorate([
34
+ (0, graphql_1.Field)({ nullable: true, description: 'Seller ID if applicable' }),
35
+ tslib_1.__metadata("design:type", String)
36
+ ], ServiceabilityItemInput.prototype, "sellerId", void 0);
37
+ exports.ServiceabilityItemInput = ServiceabilityItemInput = tslib_1.__decorate([
38
+ (0, graphql_1.InputType)()
39
+ ], ServiceabilityItemInput);
40
+ let CoordinatesInput = class CoordinatesInput {
41
+ latitude;
42
+ longitude;
43
+ };
44
+ exports.CoordinatesInput = CoordinatesInput;
45
+ tslib_1.__decorate([
46
+ (0, graphql_1.Field)({ nullable: true, description: 'Latitude coordinate' }),
47
+ tslib_1.__metadata("design:type", String)
48
+ ], CoordinatesInput.prototype, "latitude", void 0);
49
+ tslib_1.__decorate([
50
+ (0, graphql_1.Field)({ nullable: true, description: 'Longitude coordinate' }),
51
+ tslib_1.__metadata("design:type", String)
52
+ ], CoordinatesInput.prototype, "longitude", void 0);
53
+ exports.CoordinatesInput = CoordinatesInput = tslib_1.__decorate([
54
+ (0, graphql_1.InputType)()
55
+ ], CoordinatesInput);
56
+ let ServiceabilityCheckInput = class ServiceabilityCheckInput {
57
+ pincode;
58
+ coordinates;
59
+ deliveryModes;
60
+ items;
61
+ storePickup;
62
+ };
63
+ exports.ServiceabilityCheckInput = ServiceabilityCheckInput;
64
+ tslib_1.__decorate([
65
+ (0, graphql_1.Field)({ description: 'Pincode/postal code for delivery location' }),
66
+ tslib_1.__metadata("design:type", String)
67
+ ], ServiceabilityCheckInput.prototype, "pincode", void 0);
68
+ tslib_1.__decorate([
69
+ (0, graphql_1.Field)(() => CoordinatesInput, {
70
+ nullable: true,
71
+ description: 'GPS coordinates for more precise location',
72
+ }),
73
+ tslib_1.__metadata("design:type", CoordinatesInput)
74
+ ], ServiceabilityCheckInput.prototype, "coordinates", void 0);
75
+ tslib_1.__decorate([
76
+ (0, graphql_1.Field)(() => [String], {
77
+ nullable: true,
78
+ description: 'Delivery modes to check (e.g., standard, sdd, ndd). Defaults to all.',
79
+ }),
80
+ tslib_1.__metadata("design:type", Array)
81
+ ], ServiceabilityCheckInput.prototype, "deliveryModes", void 0);
82
+ tslib_1.__decorate([
83
+ (0, graphql_1.Field)(() => [ServiceabilityItemInput], {
84
+ description: 'Items to check serviceability for',
85
+ }),
86
+ tslib_1.__metadata("design:type", Array)
87
+ ], ServiceabilityCheckInput.prototype, "items", void 0);
88
+ tslib_1.__decorate([
89
+ (0, graphql_1.Field)({ nullable: true, description: 'Enable store pickup option' }),
90
+ tslib_1.__metadata("design:type", Boolean)
91
+ ], ServiceabilityCheckInput.prototype, "storePickup", void 0);
92
+ exports.ServiceabilityCheckInput = ServiceabilityCheckInput = tslib_1.__decorate([
93
+ (0, graphql_1.InputType)()
94
+ ], ServiceabilityCheckInput);
95
+ // ============================================================================
96
+ // Output Types
97
+ // ============================================================================
98
+ let DeliveryCost = class DeliveryCost {
99
+ currency;
100
+ amount;
101
+ };
102
+ exports.DeliveryCost = DeliveryCost;
103
+ tslib_1.__decorate([
104
+ (0, graphql_1.Field)({ description: 'Currency code (e.g., INR)' }),
105
+ tslib_1.__metadata("design:type", String)
106
+ ], DeliveryCost.prototype, "currency", void 0);
107
+ tslib_1.__decorate([
108
+ (0, graphql_1.Field)(() => graphql_1.Float, { description: 'Delivery cost amount' }),
109
+ tslib_1.__metadata("design:type", Number)
110
+ ], DeliveryCost.prototype, "amount", void 0);
111
+ exports.DeliveryCost = DeliveryCost = tslib_1.__decorate([
112
+ (0, graphql_1.ObjectType)()
113
+ ], DeliveryCost);
114
+ let DeliveryOption = class DeliveryOption {
115
+ deliveryType;
116
+ paymentType;
117
+ deliveryTimeHours;
118
+ deliveryCost;
119
+ courierName;
120
+ fulfillmentCenterId;
121
+ expectedDeliveryDate;
122
+ };
123
+ exports.DeliveryOption = DeliveryOption;
124
+ tslib_1.__decorate([
125
+ (0, graphql_1.Field)({ description: 'Type of delivery (e.g., standard, sdd, ndd)' }),
126
+ tslib_1.__metadata("design:type", String)
127
+ ], DeliveryOption.prototype, "deliveryType", void 0);
128
+ tslib_1.__decorate([
129
+ (0, graphql_1.Field)({ description: 'Payment type (e.g., cod, prepaid)' }),
130
+ tslib_1.__metadata("design:type", String)
131
+ ], DeliveryOption.prototype, "paymentType", void 0);
132
+ tslib_1.__decorate([
133
+ (0, graphql_1.Field)({ description: 'Estimated delivery time in hours' }),
134
+ tslib_1.__metadata("design:type", String)
135
+ ], DeliveryOption.prototype, "deliveryTimeHours", void 0);
136
+ tslib_1.__decorate([
137
+ (0, graphql_1.Field)(() => DeliveryCost, { description: 'Delivery cost details' }),
138
+ tslib_1.__metadata("design:type", DeliveryCost)
139
+ ], DeliveryOption.prototype, "deliveryCost", void 0);
140
+ tslib_1.__decorate([
141
+ (0, graphql_1.Field)({ description: 'Courier/carrier name' }),
142
+ tslib_1.__metadata("design:type", String)
143
+ ], DeliveryOption.prototype, "courierName", void 0);
144
+ tslib_1.__decorate([
145
+ (0, graphql_1.Field)({ description: 'Fulfillment center ID' }),
146
+ tslib_1.__metadata("design:type", String)
147
+ ], DeliveryOption.prototype, "fulfillmentCenterId", void 0);
148
+ tslib_1.__decorate([
149
+ (0, graphql_1.Field)({ description: 'Expected delivery date (DD-MM-YYYY HH:mm:ss)' }),
150
+ tslib_1.__metadata("design:type", String)
151
+ ], DeliveryOption.prototype, "expectedDeliveryDate", void 0);
152
+ exports.DeliveryOption = DeliveryOption = tslib_1.__decorate([
153
+ (0, graphql_1.ObjectType)()
154
+ ], DeliveryOption);
155
+ let ServiceabilityResult = class ServiceabilityResult {
156
+ skuId;
157
+ eoisSkuID;
158
+ serviceable;
159
+ deliveryOptions;
160
+ };
161
+ exports.ServiceabilityResult = ServiceabilityResult;
162
+ tslib_1.__decorate([
163
+ (0, graphql_1.Field)({ description: 'SKU ID of the product' }),
164
+ tslib_1.__metadata("design:type", String)
165
+ ], ServiceabilityResult.prototype, "skuId", void 0);
166
+ tslib_1.__decorate([
167
+ (0, graphql_1.Field)({ nullable: true, description: 'External OIS SKU ID' }),
168
+ tslib_1.__metadata("design:type", String)
169
+ ], ServiceabilityResult.prototype, "eoisSkuID", void 0);
170
+ tslib_1.__decorate([
171
+ (0, graphql_1.Field)({ description: 'Whether the item is serviceable at the location' }),
172
+ tslib_1.__metadata("design:type", Boolean)
173
+ ], ServiceabilityResult.prototype, "serviceable", void 0);
174
+ tslib_1.__decorate([
175
+ (0, graphql_1.Field)(() => [DeliveryOption], {
176
+ nullable: true,
177
+ description: 'Available delivery options if serviceable',
178
+ }),
179
+ tslib_1.__metadata("design:type", Array)
180
+ ], ServiceabilityResult.prototype, "deliveryOptions", void 0);
181
+ exports.ServiceabilityResult = ServiceabilityResult = tslib_1.__decorate([
182
+ (0, graphql_1.ObjectType)()
183
+ ], ServiceabilityResult);
184
+ //# sourceMappingURL=serviceability.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceability.types.js","sourceRoot":"","sources":["../../src/serviceability/serviceability.types.ts"],"names":[],"mappings":";;;;AAAA,6CAA2E;AAE3E;;;;GAIG;AAEH,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAGxE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAElC,KAAK,CAAU;IAGf,SAAS,CAAU;IAGnB,QAAQ,CAAU;IAGlB,QAAQ,CAAU;CACnB,CAAA;AAZY,0DAAuB;AAElC;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;sDACjC;AAGf;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;;0DAC3C;AAGnB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,EAAE,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;;yDACxD;AAGlB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;yDAChD;kCAXP,uBAAuB;IADnC,IAAA,mBAAS,GAAE;GACC,uBAAuB,CAYnC;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,QAAQ,CAAU;IAGlB,SAAS,CAAU;CACpB,CAAA;AANY,4CAAgB;AAE3B;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;;kDAC5C;AAGlB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;;m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,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;;yDACpD;AAMtB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,cAAc,CAAC,EAAE;QAC7B,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,2CAA2C;KACzD,CAAC;;6DACiC;+BAdxB,oBAAoB;IADhC,IAAA,oBAAU,GAAE;GACA,oBAAoB,CAehC"}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@pvh-afl/graphql",
3
+ "version": "1.0.0",
4
+ "description": "AFL GraphQL - Shared GraphQL modules for multi-brand commerce platform",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc -p tsconfig.build.json",
12
+ "test": "jest --passWithNoTests",
13
+ "test:watch": "jest --watch",
14
+ "test:cov": "jest --coverage",
15
+ "lint": "eslint \"src/**/*.ts\"",
16
+ "lint:fix": "eslint \"src/**/*.ts\" --fix",
17
+ "clean": "rimraf dist",
18
+ "prepublishOnly": "npm run build"
19
+ },
20
+ "peerDependencies": {
21
+ "@nestjs/apollo": "^12.0.0",
22
+ "@nestjs/common": "^10.0.0",
23
+ "@nestjs/core": "^10.0.0",
24
+ "@nestjs/graphql": "^12.0.0",
25
+ "@pvh-afl/core": "^1.0.0",
26
+ "graphql": "^16.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "@apollo/server": "^4.11.0",
30
+ "@nestjs/apollo": "^12.2.0",
31
+ "@nestjs/common": "^10.4.0",
32
+ "@nestjs/core": "^10.4.0",
33
+ "@nestjs/graphql": "^12.2.0",
34
+ "@nestjs/testing": "^10.4.0",
35
+ "@pvh-afl/core": "^1.0.0",
36
+ "@types/jest": "^29.5.0",
37
+ "graphql": "^16.9.0",
38
+ "graphql-type-json": "^0.3.2",
39
+ "jest": "^29.7.0",
40
+ "rimraf": "^5.0.0",
41
+ "ts-jest": "^29.2.0",
42
+ "typescript": "^5.6.0"
43
+ },
44
+ "dependencies": {
45
+ "graphql-type-json": "^0.3.2"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/devx-commerce/afl-packages.git",
50
+ "directory": "packages/graphql"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public"
54
+ },
55
+ "engines": {
56
+ "node": ">=22.0.0"
57
+ },
58
+ "keywords": [
59
+ "afl",
60
+ "graphql",
61
+ "nestjs",
62
+ "commerce",
63
+ "multi-brand"
64
+ ],
65
+ "author": "AFL Platform Team",
66
+ "license": "UNLICENSED"
67
+ }