@pvh-afl/graphql 1.0.7 → 1.0.9

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 (32) hide show
  1. package/dist/graphql.module.d.ts.map +1 -1
  2. package/dist/graphql.module.js +2 -0
  3. package/dist/graphql.module.js.map +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +2 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/serviceability/serviceability.service.d.ts +6 -22
  9. package/dist/serviceability/serviceability.service.d.ts.map +1 -1
  10. package/dist/serviceability/serviceability.service.js +8 -64
  11. package/dist/serviceability/serviceability.service.js.map +1 -1
  12. package/dist/store-locator/index.d.ts +5 -0
  13. package/dist/store-locator/index.d.ts.map +1 -0
  14. package/dist/store-locator/index.js +8 -0
  15. package/dist/store-locator/index.js.map +1 -0
  16. package/dist/store-locator/store-locator.module.d.ts +8 -0
  17. package/dist/store-locator/store-locator.module.d.ts.map +1 -0
  18. package/dist/store-locator/store-locator.module.js +24 -0
  19. package/dist/store-locator/store-locator.module.js.map +1 -0
  20. package/dist/store-locator/store-locator.resolver.d.ts +15 -0
  21. package/dist/store-locator/store-locator.resolver.d.ts.map +1 -0
  22. package/dist/store-locator/store-locator.resolver.js +40 -0
  23. package/dist/store-locator/store-locator.resolver.js.map +1 -0
  24. package/dist/store-locator/store-locator.service.d.ts +28 -0
  25. package/dist/store-locator/store-locator.service.d.ts.map +1 -0
  26. package/dist/store-locator/store-locator.service.js +116 -0
  27. package/dist/store-locator/store-locator.service.js.map +1 -0
  28. package/dist/store-locator/store-locator.types.d.ts +58 -0
  29. package/dist/store-locator/store-locator.types.d.ts.map +1 -0
  30. package/dist/store-locator/store-locator.types.js +248 -0
  31. package/dist/store-locator/store-locator.types.js.map +1 -0
  32. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.module.d.ts","sourceRoot":"","sources":["../src/graphql.module.ts"],"names":[],"mappings":"AAmBA,qBAwBa,aAAa;CAAG"}
1
+ {"version":3,"file":"graphql.module.d.ts","sourceRoot":"","sources":["../src/graphql.module.ts"],"names":[],"mappings":"AAoBA,qBAyBa,aAAa;CAAG"}
@@ -14,6 +14,7 @@ const page_content_module_1 = require("./page-content/page-content.module");
14
14
  const product_content_module_1 = require("./product-content/product-content.module");
15
15
  const header_module_1 = require("./header/header.module");
16
16
  const serviceability_module_1 = require("./serviceability/serviceability.module");
17
+ const store_locator_module_1 = require("./store-locator/store-locator.module");
17
18
  let GraphqlModule = class GraphqlModule {
18
19
  };
19
20
  exports.GraphqlModule = GraphqlModule;
@@ -40,6 +41,7 @@ exports.GraphqlModule = GraphqlModule = tslib_1.__decorate([
40
41
  product_content_module_1.ProductContentModule,
41
42
  header_module_1.HeaderModule,
42
43
  serviceability_module_1.ServiceabilityModule,
44
+ store_locator_module_1.StoreLocatorModule,
43
45
  ],
44
46
  })
45
47
  ], GraphqlModule);
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.module.js","sourceRoot":"","sources":["../src/graphql.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,2CAAkE;AAClE,+BAA4B;AAE5B,6DAAyD;AACzD,sEAAkE;AAClE,oDAAgD;AAChD,iDAA6C;AAC7C,4EAAuE;AACvE,qFAAgF;AAChF,0DAAsD;AACtD,kFAA8E;AA+BvE,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAxBzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,OAAO,CAAqB;gBACxC,MAAM,EAAE,qBAAY;gBACpB,cAAc,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC;gBACrD,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE,IAAI;gBAChB,aAAa,EAAE,IAAI;gBACnB,OAAO,EAAE,CAAC,EAAE,GAAG,EAA6B,EAAE,EAAE,CAAC,CAAC;oBAChD,GAAG;oBACH,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,WAAW,EAAE,GAAG,CAAC,WAAW;iBAC7B,CAAC;aACH,CAAC;YACF,8BAAa;YACb,oCAAgB;YAChB,wBAAU;YACV,sBAAS;YACT,uCAAiB;YACjB,6CAAoB;YACpB,4BAAY;YACZ,4CAAoB;SACrB;KACF,CAAC;GACW,aAAa,CAAG"}
1
+ {"version":3,"file":"graphql.module.js","sourceRoot":"","sources":["../src/graphql.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,2CAAkE;AAClE,+BAA4B;AAE5B,6DAAyD;AACzD,sEAAkE;AAClE,oDAAgD;AAChD,iDAA6C;AAC7C,4EAAuE;AACvE,qFAAgF;AAChF,0DAAsD;AACtD,kFAA8E;AAC9E,+EAA0E;AAgCnE,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAzBzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,OAAO,CAAqB;gBACxC,MAAM,EAAE,qBAAY;gBACpB,cAAc,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC;gBACrD,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE,IAAI;gBAChB,aAAa,EAAE,IAAI;gBACnB,OAAO,EAAE,CAAC,EAAE,GAAG,EAA6B,EAAE,EAAE,CAAC,CAAC;oBAChD,GAAG;oBACH,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,WAAW,EAAE,GAAG,CAAC,WAAW;iBAC7B,CAAC;aACH,CAAC;YACF,8BAAa;YACb,oCAAgB;YAChB,wBAAU;YACV,sBAAS;YACT,uCAAiB;YACjB,6CAAoB;YACpB,4BAAY;YACZ,4CAAoB;YACpB,yCAAkB;SACnB;KACF,CAAC;GACW,aAAa,CAAG"}
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export * from './product';
8
8
  export * from './cart';
9
9
  export * from './collection';
10
10
  export * from './serviceability';
11
+ export * from './store-locator';
11
12
  export * from './page-content';
12
13
  export * from './product-content';
13
14
  export * from './header';
@@ -1 +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"}
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,iBAAiB,CAAC;AAGhC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,UAAU,CAAC;AAGzB,cAAc,OAAO,CAAC;AAGtB,cAAc,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -16,6 +16,8 @@ tslib_1.__exportStar(require("./cart"), exports);
16
16
  tslib_1.__exportStar(require("./collection"), exports);
17
17
  // Serviceability
18
18
  tslib_1.__exportStar(require("./serviceability"), exports);
19
+ // Store Locator
20
+ tslib_1.__exportStar(require("./store-locator"), exports);
19
21
  // Page Content
20
22
  tslib_1.__exportStar(require("./page-content"), exports);
21
23
  // Product Content
package/dist/index.js.map CHANGED
@@ -1 +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"}
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,gBAAgB;AAChB,0DAAgC;AAEhC,eAAe;AACf,yDAA+B;AAE/B,kBAAkB;AAClB,4DAAkC;AAElC,SAAS;AACT,mDAAyB;AAEzB,MAAM;AACN,gDAAsB;AAEtB,2BAA2B;AAC3B,mDAAyB"}
@@ -1,35 +1,23 @@
1
- import { IntegrationFactory, CacheService } from '@pvh-afl/core';
1
+ import { IntegrationFactory } from '@pvh-afl/core';
2
2
  import { ServiceabilityCheckInput, ServiceabilityResult } from './serviceability.types';
3
3
  /**
4
4
  * Serviceability Service
5
5
  *
6
6
  * Business logic for product delivery serviceability checks.
7
- * Implements caching with stale-while-revalidate pattern.
8
- *
9
- * Cache Strategy:
10
- * - TTL: 5 minutes
11
- * - Stale At: 4 minutes
12
- * - Key: {brand}:serviceability:{pincode}:{hash of SKU IDs}
7
+ * Fetches fresh data from OMS on each request.
13
8
  */
14
9
  export declare class ServiceabilityService {
15
10
  private readonly integrationFactory;
16
- private readonly cacheService;
17
- private readonly CACHE_TTL;
18
- private readonly CACHE_STALE_TTL;
19
- constructor(integrationFactory: IntegrationFactory, cacheService: CacheService);
11
+ constructor(integrationFactory: IntegrationFactory);
20
12
  /**
21
13
  * Check serviceability for items at a given location.
22
- * Uses cache with background refresh on stale hits.
14
+ * Always fetches fresh data from OMS (no caching).
23
15
  */
24
16
  checkServiceability(brand: string, input: ServiceabilityCheckInput): Promise<ServiceabilityResult[]>;
25
17
  /**
26
- * Fetch fresh serviceability data and cache it.
27
- */
28
- private fetchAndCache;
29
- /**
30
- * Refresh cache in background without blocking.
18
+ * Fetch serviceability data from OMS.
31
19
  */
32
- private refreshInBackground;
20
+ private fetchFromOms;
33
21
  /**
34
22
  * Map Omuni response to GraphQL result type.
35
23
  */
@@ -41,9 +29,5 @@ export declare class ServiceabilityService {
41
29
  * - If both present → both enabled
42
30
  */
43
31
  private extractPaymentMethodAvailability;
44
- /**
45
- * Build cache key with hash of sorted SKU IDs.
46
- */
47
- private buildCacheKey;
48
32
  }
49
33
  //# sourceMappingURL=serviceability.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serviceability.service.d.ts","sourceRoot":"","sources":["../../src/serviceability/serviceability.service.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,YAAY,EAKb,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,qBACa,qBAAqB;IAM9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAL/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAO;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAO;gBAGpB,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY;IAG7C;;;OAGG;IACG,mBAAmB,CACvB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAyBlC;;OAEG;YACW,aAAa;IAiE3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;OAEG;IACH,OAAO,CAAC,WAAW;IAqDnB;;;;;OAKG;IACH,OAAO,CAAC,gCAAgC;IAaxC;;OAEG;IACH,OAAO,CAAC,aAAa;CAWtB"}
1
+ {"version":3,"file":"serviceability.service.d.ts","sourceRoot":"","sources":["../../src/serviceability/serviceability.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAKnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AACH,qBACa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAEnE;;;OAGG;IACG,mBAAmB,CACvB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAIlC;;OAEG;YACW,YAAY;IAsD1B;;OAEG;IACH,OAAO,CAAC,WAAW;IAqDnB;;;;;OAKG;IACH,OAAO,CAAC,gCAAgC;CAazC"}
@@ -3,57 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServiceabilityService = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const common_1 = require("@nestjs/common");
6
- const crypto_1 = require("crypto");
7
6
  const core_1 = require("@pvh-afl/core");
8
7
  /**
9
8
  * Serviceability Service
10
9
  *
11
10
  * 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}
11
+ * Fetches fresh data from OMS on each request.
18
12
  */
19
13
  let ServiceabilityService = class ServiceabilityService {
20
14
  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) {
15
+ constructor(integrationFactory) {
26
16
  this.integrationFactory = integrationFactory;
27
- this.cacheService = cacheService;
28
17
  }
29
18
  /**
30
19
  * Check serviceability for items at a given location.
31
- * Uses cache with background refresh on stale hits.
20
+ * Always fetches fresh data from OMS (no caching).
32
21
  */
33
22
  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);
23
+ return this.fetchFromOms(brand, input);
52
24
  }
53
25
  /**
54
- * Fetch fresh serviceability data and cache it.
26
+ * Fetch serviceability data from OMS.
55
27
  */
56
- async fetchAndCache(brand, input, cacheKey) {
28
+ async fetchFromOms(brand, input) {
57
29
  const omsService = this.integrationFactory.get(brand, 'oms');
58
30
  if (!omsService) {
59
31
  core_1.logger.warn('OMS integration not configured', { brand });
@@ -96,22 +68,7 @@ let ServiceabilityService = class ServiceabilityService {
96
68
  deliveryOptions: [],
97
69
  }));
98
70
  }
99
- const results = this.mapResponse(input, response.data);
100
- // Cache the results
101
- await this.cacheService.set(cacheKey, results, this.CACHE_TTL, this.CACHE_STALE_TTL);
102
- return results;
103
- }
104
- /**
105
- * Refresh cache in background without blocking.
106
- */
107
- refreshInBackground(brand, input, cacheKey) {
108
- this.fetchAndCache(brand, input, cacheKey).catch((error) => {
109
- core_1.logger.error('Background serviceability refresh failed', {
110
- brand,
111
- pincode: input.pincode,
112
- error: error instanceof Error ? error.message : 'Unknown',
113
- });
114
- });
71
+ return this.mapResponse(input, response.data);
115
72
  }
116
73
  /**
117
74
  * Map Omuni response to GraphQL result type.
@@ -167,23 +124,10 @@ let ServiceabilityService = class ServiceabilityService {
167
124
  codEnabled: paymentTypes.has('cod'),
168
125
  };
169
126
  }
170
- /**
171
- * Build cache key with hash of sorted SKU IDs.
172
- */
173
- buildCacheKey(brand, input) {
174
- // Sort SKU IDs for consistent hashing
175
- const sortedSkus = [...input.items]
176
- .map((item) => item.skuId)
177
- .sort()
178
- .join(',');
179
- const hash = (0, crypto_1.createHash)('md5').update(sortedSkus).digest('hex').slice(0, 8);
180
- return `${brand}:serviceability:${input.pincode}:${hash}`;
181
- }
182
127
  };
183
128
  exports.ServiceabilityService = ServiceabilityService;
184
129
  exports.ServiceabilityService = ServiceabilityService = tslib_1.__decorate([
185
130
  (0, common_1.Injectable)(),
186
- tslib_1.__metadata("design:paramtypes", [core_1.IntegrationFactory,
187
- core_1.CacheService])
131
+ tslib_1.__metadata("design:paramtypes", [core_1.IntegrationFactory])
188
132
  ], ServiceabilityService);
189
133
  //# sourceMappingURL=serviceability.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serviceability.service.js","sourceRoot":"","sources":["../../src/serviceability/serviceability.service.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,mCAAoC;AACpC,wCAOuB;AAQvB;;;;;;;;;;GAUG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAMb;IACA;IANnB,mCAAmC;IAClB,SAAS,GAAG,GAAG,CAAC,CAAC,YAAY;IAC7B,eAAe,GAAG,GAAG,CAAC,CAAC,YAAY;IAEpD,YACmB,kBAAsC,EACtC,YAA0B;QAD1B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,iBAAY,GAAZ,YAAY,CAAc;IAC1C,CAAC;IAEJ;;;OAGG;IACH,KAAK,CAAC,mBAAmB,CACvB,KAAa,EACb,KAA+B;QAE/B,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EA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E,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAC5D,CAAC;QAEF,OAAO;YACL,cAAc,EAAE,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;YAC3C,UAAU,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC;SACpC,CAAC;IACJ,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;AAxNY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;6CAO4B,yBAAkB;QACxB,mBAAY;GAPlC,qBAAqB,CAwNjC"}
1
+ {"version":3,"file":"serviceability.service.js","sourceRoot":"","sources":["../../src/serviceability/serviceability.service.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,wCAMuB;AAQvB;;;;;GAKG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACH;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE;;;OAGG;IACH,KAAK,CAAC,mBAAmB,CACvB,KAAa,EACb,KAA+B;QAE/B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;IA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S,CAAC;YAC3C,UAAU,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC;SACpC,CAAC;IACJ,CAAC;CAEF,CAAA;AAlJY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;6CAEsC,yBAAkB;GADxD,qBAAqB,CAkJjC"}
@@ -0,0 +1,5 @@
1
+ export * from './store-locator.module';
2
+ export * from './store-locator.resolver';
3
+ export * from './store-locator.service';
4
+ export * from './store-locator.types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store-locator/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,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("./store-locator.module"), exports);
5
+ tslib_1.__exportStar(require("./store-locator.resolver"), exports);
6
+ tslib_1.__exportStar(require("./store-locator.service"), exports);
7
+ tslib_1.__exportStar(require("./store-locator.types"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store-locator/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC;AACvC,mEAAyC;AACzC,kEAAwC;AACxC,gEAAsC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Store Locator Module
3
+ *
4
+ * Provides GraphQL API for finding nearby stores.
5
+ */
6
+ export declare class StoreLocatorModule {
7
+ }
8
+ //# sourceMappingURL=store-locator.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.module.d.ts","sourceRoot":"","sources":["../../src/store-locator/store-locator.module.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,qBAKa,kBAAkB;CAAG"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StoreLocatorModule = 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 store_locator_resolver_1 = require("./store-locator.resolver");
8
+ const store_locator_service_1 = require("./store-locator.service");
9
+ /**
10
+ * Store Locator Module
11
+ *
12
+ * Provides GraphQL API for finding nearby stores.
13
+ */
14
+ let StoreLocatorModule = class StoreLocatorModule {
15
+ };
16
+ exports.StoreLocatorModule = StoreLocatorModule;
17
+ exports.StoreLocatorModule = StoreLocatorModule = tslib_1.__decorate([
18
+ (0, common_1.Module)({
19
+ imports: [core_1.IntegrationsModule],
20
+ providers: [store_locator_resolver_1.StoreLocatorResolver, store_locator_service_1.StoreLocatorService],
21
+ exports: [store_locator_service_1.StoreLocatorService],
22
+ })
23
+ ], StoreLocatorModule);
24
+ //# sourceMappingURL=store-locator.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.module.js","sourceRoot":"","sources":["../../src/store-locator/store-locator.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,wCAAmD;AACnD,qEAAgE;AAChE,mEAA8D;AAE9D;;;;GAIG;AAMI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAL9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAkB,CAAC;QAC7B,SAAS,EAAE,CAAC,6CAAoB,EAAE,2CAAmB,CAAC;QACtD,OAAO,EAAE,CAAC,2CAAmB,CAAC;KAC/B,CAAC;GACW,kBAAkB,CAAG"}
@@ -0,0 +1,15 @@
1
+ import { StoreLocatorService } from './store-locator.service';
2
+ import { StoreLocatorInput, StoreLocatorResult } from './store-locator.types';
3
+ /**
4
+ * Store Locator Resolver
5
+ *
6
+ * GraphQL resolver for finding nearby stores.
7
+ */
8
+ export declare class StoreLocatorResolver {
9
+ private readonly storeLocatorService;
10
+ constructor(storeLocatorService: StoreLocatorService);
11
+ findStores(input: StoreLocatorInput, context: {
12
+ brand: string;
13
+ }): Promise<StoreLocatorResult>;
14
+ }
15
+ //# sourceMappingURL=store-locator.resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.resolver.d.ts","sourceRoot":"","sources":["../../src/store-locator/store-locator.resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE9E;;;;GAIG;AACH,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,mBAAmB;IAM/D,UAAU,CACC,KAAK,EAAE,iBAAiB,EAC5B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GACpC,OAAO,CAAC,kBAAkB,CAAC;CAG/B"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StoreLocatorResolver = 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 store_locator_service_1 = require("./store-locator.service");
9
+ const store_locator_types_1 = require("./store-locator.types");
10
+ /**
11
+ * Store Locator Resolver
12
+ *
13
+ * GraphQL resolver for finding nearby stores.
14
+ */
15
+ let StoreLocatorResolver = class StoreLocatorResolver {
16
+ storeLocatorService;
17
+ constructor(storeLocatorService) {
18
+ this.storeLocatorService = storeLocatorService;
19
+ }
20
+ async findStores(input, context) {
21
+ return this.storeLocatorService.findStores(context.brand, input);
22
+ }
23
+ };
24
+ exports.StoreLocatorResolver = StoreLocatorResolver;
25
+ tslib_1.__decorate([
26
+ (0, graphql_1.Query)(() => store_locator_types_1.StoreLocatorResult, {
27
+ description: 'Find nearby stores by pincode or coordinates',
28
+ }),
29
+ (0, common_1.UseGuards)(core_1.TenantGuard),
30
+ tslib_1.__param(0, (0, graphql_1.Args)('input')),
31
+ tslib_1.__param(1, (0, graphql_1.Context)()),
32
+ tslib_1.__metadata("design:type", Function),
33
+ tslib_1.__metadata("design:paramtypes", [store_locator_types_1.StoreLocatorInput, Object]),
34
+ tslib_1.__metadata("design:returntype", Promise)
35
+ ], StoreLocatorResolver.prototype, "findStores", null);
36
+ exports.StoreLocatorResolver = StoreLocatorResolver = tslib_1.__decorate([
37
+ (0, graphql_1.Resolver)(),
38
+ tslib_1.__metadata("design:paramtypes", [store_locator_service_1.StoreLocatorService])
39
+ ], StoreLocatorResolver);
40
+ //# sourceMappingURL=store-locator.resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.resolver.js","sourceRoot":"","sources":["../../src/store-locator/store-locator.resolver.ts"],"names":[],"mappings":";;;;AAAA,6CAAiE;AACjE,2CAA2C;AAC3C,wCAA4C;AAC5C,mEAA8D;AAC9D,+DAA8E;AAE9E;;;;GAIG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACF;IAA7B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAMnE,AAAN,KAAK,CAAC,UAAU,CACC,KAAwB,EAC5B,OAA0B;QAErC,OAAO,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACnE,CAAC;CACF,CAAA;AAbY,oDAAoB;AAOzB;IAJL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,wCAAkB,EAAE;QAC/B,WAAW,EAAE,8CAA8C;KAC5D,CAAC;IACD,IAAA,kBAAS,EAAC,kBAAW,CAAC;IAEpB,mBAAA,IAAA,cAAI,EAAC,OAAO,CAAC,CAAA;IACb,mBAAA,IAAA,iBAAO,GAAE,CAAA;;6CADY,uCAAiB;;sDAIxC;+BAZU,oBAAoB;IADhC,IAAA,kBAAQ,GAAE;6CAEyC,2CAAmB;GAD1D,oBAAoB,CAahC"}
@@ -0,0 +1,28 @@
1
+ import { IntegrationFactory } from '@pvh-afl/core';
2
+ import { StoreLocatorInput, StoreLocatorResult } from './store-locator.types';
3
+ /**
4
+ * Store Locator Service
5
+ *
6
+ * Business logic for finding nearby stores.
7
+ */
8
+ export declare class StoreLocatorService {
9
+ private readonly integrationFactory;
10
+ constructor(integrationFactory: IntegrationFactory);
11
+ /**
12
+ * Find stores near a given location.
13
+ */
14
+ findStores(brand: string, input: StoreLocatorInput): Promise<StoreLocatorResult>;
15
+ /**
16
+ * Fetch store data from OMS.
17
+ */
18
+ private fetchFromOms;
19
+ /**
20
+ * Map Omuni response to GraphQL result type.
21
+ */
22
+ private mapResponse;
23
+ /**
24
+ * Format hours and minutes to HH:MM string.
25
+ */
26
+ private formatTime;
27
+ }
28
+ //# sourceMappingURL=store-locator.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.service.d.ts","sourceRoot":"","sources":["../../src/store-locator/store-locator.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAKnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAEnB,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,qBACa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAEnE;;OAEG;IACG,UAAU,CACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,kBAAkB,CAAC;IAI9B;;OAEG;YACW,YAAY;IAwC1B;;OAEG;IACH,OAAO,CAAC,WAAW;IA0CnB;;OAEG;IACH,OAAO,CAAC,UAAU;CAQnB"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StoreLocatorService = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const core_1 = require("@pvh-afl/core");
7
+ /**
8
+ * Store Locator Service
9
+ *
10
+ * Business logic for finding nearby stores.
11
+ */
12
+ let StoreLocatorService = class StoreLocatorService {
13
+ integrationFactory;
14
+ constructor(integrationFactory) {
15
+ this.integrationFactory = integrationFactory;
16
+ }
17
+ /**
18
+ * Find stores near a given location.
19
+ */
20
+ async findStores(brand, input) {
21
+ return this.fetchFromOms(brand, input);
22
+ }
23
+ /**
24
+ * Fetch store data from OMS.
25
+ */
26
+ async fetchFromOms(brand, input) {
27
+ const omsService = this.integrationFactory.get(brand, 'oms');
28
+ if (!omsService) {
29
+ core_1.logger.warn('OMS integration not configured', { brand });
30
+ return { stores: [], totalCount: 0 };
31
+ }
32
+ // Build request
33
+ const request = {
34
+ location: input.pincode,
35
+ coordinates: input.coordinates
36
+ ? { latitude: input.coordinates.latitude, longitude: input.coordinates.longitude }
37
+ : undefined,
38
+ onlyEnabled: input.onlyEnabled ? 'true' : '',
39
+ onlyStoreLocatorEnabled: input.onlyStoreLocatorEnabled ? 'true' : '',
40
+ brands: input.brands,
41
+ };
42
+ const response = await omsService.storeLocator(request);
43
+ if (!response.success || !response.data) {
44
+ core_1.logger.error('Store locator failed', {
45
+ brand,
46
+ error: response.error,
47
+ });
48
+ return { stores: [], totalCount: 0 };
49
+ }
50
+ const stores = this.mapResponse(response.data.data);
51
+ return {
52
+ stores,
53
+ totalCount: stores.length,
54
+ };
55
+ }
56
+ /**
57
+ * Map Omuni response to GraphQL result type.
58
+ */
59
+ mapResponse(omuniStores) {
60
+ if (!omuniStores || !Array.isArray(omuniStores)) {
61
+ return [];
62
+ }
63
+ return omuniStores.map((store) => ({
64
+ id: store.fcId,
65
+ name: store.fcName,
66
+ type: store.fcType,
67
+ address: {
68
+ streetNo: store.streetNo,
69
+ streetName: store.streetName,
70
+ area: store.area,
71
+ town: store.town,
72
+ city: store.city,
73
+ state: store.state,
74
+ country: store.country,
75
+ pincode: store.postCode,
76
+ },
77
+ coordinates: store.latitude && store.longitude
78
+ ? {
79
+ latitude: store.latitude,
80
+ longitude: store.longitude,
81
+ }
82
+ : undefined,
83
+ contact: {
84
+ person: store.contactPerson,
85
+ phone: store.contactNo,
86
+ },
87
+ timing: {
88
+ openingTime: this.formatTime(store.openingHours, store.openingMins),
89
+ closingTime: this.formatTime(store.closingHours, store.closingMins),
90
+ workingDays: store.workingDays?.split(',').map((day) => day.trim()),
91
+ },
92
+ distance: store.distance,
93
+ isEnabled: store.storeEnabled,
94
+ isStoreLocatorEnabled: store.storeLocatorEnabled,
95
+ storeBrand: store.storeBrand,
96
+ brands: store.brands,
97
+ }));
98
+ }
99
+ /**
100
+ * Format hours and minutes to HH:MM string.
101
+ */
102
+ formatTime(hours, mins) {
103
+ if (hours === undefined || hours === null) {
104
+ return undefined;
105
+ }
106
+ const h = hours.toString().padStart(2, '0');
107
+ const m = (mins ?? 0).toString().padStart(2, '0');
108
+ return `${h}:${m}`;
109
+ }
110
+ };
111
+ exports.StoreLocatorService = StoreLocatorService;
112
+ exports.StoreLocatorService = StoreLocatorService = tslib_1.__decorate([
113
+ (0, common_1.Injectable)(),
114
+ tslib_1.__metadata("design:paramtypes", [core_1.IntegrationFactory])
115
+ ], StoreLocatorService);
116
+ //# sourceMappingURL=store-locator.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.service.js","sourceRoot":"","sources":["../../src/store-locator/store-locator.service.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,wCAMuB;AAOvB;;;;GAIG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IACD;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE;;OAEG;IACH,KAAK,CAAC,UAAU,CACd,KAAa,EACb,KAAwB;QAExB,OAAO,IAAI,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,CAAC;gBACnE,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC;gBACnE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACpE;YACD,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,SAAS,EAAE,KAAK,CAAC,YAAY;YAC7B,qBAAqB,EAAE,KAAK,CAAC,mBAAmB;YAChD,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;OAEG;IACK,UAAU,CAAC,KAAc,EAAE,IAAa;QAC9C,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC1C,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAC5C,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAClD,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;IACrB,CAAC;CACF,CAAA;AAhHY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;6CAEsC,yBAAkB;GADxD,mBAAmB,CAgH/B"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * GraphQL Types for Store Locator
3
+ *
4
+ * Input types for the store locator query and output types for results.
5
+ */
6
+ export declare class StoreLocatorCoordinatesInput {
7
+ latitude?: string;
8
+ longitude?: string;
9
+ }
10
+ export declare class StoreLocatorInput {
11
+ pincode?: string;
12
+ coordinates?: StoreLocatorCoordinatesInput;
13
+ onlyEnabled?: boolean;
14
+ onlyStoreLocatorEnabled?: boolean;
15
+ brands?: string[];
16
+ }
17
+ export declare class StoreAddress {
18
+ streetNo?: string;
19
+ streetName?: string;
20
+ area?: string;
21
+ town?: string;
22
+ city?: string;
23
+ state?: string;
24
+ country?: string;
25
+ pincode?: string;
26
+ }
27
+ export declare class StoreCoordinates {
28
+ latitude?: number;
29
+ longitude?: number;
30
+ }
31
+ export declare class StoreContact {
32
+ person?: string;
33
+ phone?: string;
34
+ }
35
+ export declare class StoreTiming {
36
+ openingTime?: string;
37
+ closingTime?: string;
38
+ workingDays?: string[];
39
+ }
40
+ export declare class Store {
41
+ id: string;
42
+ name: string;
43
+ type?: string;
44
+ address: StoreAddress;
45
+ coordinates?: StoreCoordinates;
46
+ contact?: StoreContact;
47
+ timing?: StoreTiming;
48
+ distance?: number;
49
+ isEnabled: boolean;
50
+ isStoreLocatorEnabled: boolean;
51
+ storeBrand?: string;
52
+ brands?: string[];
53
+ }
54
+ export declare class StoreLocatorResult {
55
+ stores: Store[];
56
+ totalCount: number;
57
+ }
58
+ //# sourceMappingURL=store-locator.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.types.d.ts","sourceRoot":"","sources":["../../src/store-locator/store-locator.types.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAMH,qBACa,4BAA4B;IAEvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBACa,iBAAiB;IAE5B,OAAO,CAAC,EAAE,MAAM,CAAC;IAMjB,WAAW,CAAC,EAAE,4BAA4B,CAAC;IAG3C,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAGlC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAMD,qBACa,YAAY;IAEvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,UAAU,CAA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iming = exports.StoreContact = exports.StoreCoordinates = exports.StoreAddress = exports.StoreLocatorInput = exports.StoreLocatorCoordinatesInput = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_1 = require("@nestjs/graphql");
6
+ /**
7
+ * GraphQL Types for Store Locator
8
+ *
9
+ * Input types for the store locator query and output types for results.
10
+ */
11
+ // ============================================================================
12
+ // Input Types
13
+ // ============================================================================
14
+ let StoreLocatorCoordinatesInput = class StoreLocatorCoordinatesInput {
15
+ latitude;
16
+ longitude;
17
+ };
18
+ exports.StoreLocatorCoordinatesInput = StoreLocatorCoordinatesInput;
19
+ tslib_1.__decorate([
20
+ (0, graphql_1.Field)({ nullable: true, description: 'Latitude coordinate' }),
21
+ tslib_1.__metadata("design:type", String)
22
+ ], StoreLocatorCoordinatesInput.prototype, "latitude", void 0);
23
+ tslib_1.__decorate([
24
+ (0, graphql_1.Field)({ nullable: true, description: 'Longitude coordinate' }),
25
+ tslib_1.__metadata("design:type", String)
26
+ ], StoreLocatorCoordinatesInput.prototype, "longitude", void 0);
27
+ exports.StoreLocatorCoordinatesInput = StoreLocatorCoordinatesInput = tslib_1.__decorate([
28
+ (0, graphql_1.InputType)()
29
+ ], StoreLocatorCoordinatesInput);
30
+ let StoreLocatorInput = class StoreLocatorInput {
31
+ pincode;
32
+ coordinates;
33
+ onlyEnabled;
34
+ onlyStoreLocatorEnabled;
35
+ brands;
36
+ };
37
+ exports.StoreLocatorInput = StoreLocatorInput;
38
+ tslib_1.__decorate([
39
+ (0, graphql_1.Field)({ nullable: true, description: 'Pincode/postal code for location' }),
40
+ tslib_1.__metadata("design:type", String)
41
+ ], StoreLocatorInput.prototype, "pincode", void 0);
42
+ tslib_1.__decorate([
43
+ (0, graphql_1.Field)(() => StoreLocatorCoordinatesInput, {
44
+ nullable: true,
45
+ description: 'GPS coordinates for location',
46
+ }),
47
+ tslib_1.__metadata("design:type", StoreLocatorCoordinatesInput)
48
+ ], StoreLocatorInput.prototype, "coordinates", void 0);
49
+ tslib_1.__decorate([
50
+ (0, graphql_1.Field)({ nullable: true, description: 'Filter only enabled stores' }),
51
+ tslib_1.__metadata("design:type", Boolean)
52
+ ], StoreLocatorInput.prototype, "onlyEnabled", void 0);
53
+ tslib_1.__decorate([
54
+ (0, graphql_1.Field)({ nullable: true, description: 'Filter only store-locator enabled stores' }),
55
+ tslib_1.__metadata("design:type", Boolean)
56
+ ], StoreLocatorInput.prototype, "onlyStoreLocatorEnabled", void 0);
57
+ tslib_1.__decorate([
58
+ (0, graphql_1.Field)(() => [String], { nullable: true, description: 'Filter by brand names' }),
59
+ tslib_1.__metadata("design:type", Array)
60
+ ], StoreLocatorInput.prototype, "brands", void 0);
61
+ exports.StoreLocatorInput = StoreLocatorInput = tslib_1.__decorate([
62
+ (0, graphql_1.InputType)()
63
+ ], StoreLocatorInput);
64
+ // ============================================================================
65
+ // Output Types
66
+ // ============================================================================
67
+ let StoreAddress = class StoreAddress {
68
+ streetNo;
69
+ streetName;
70
+ area;
71
+ town;
72
+ city;
73
+ state;
74
+ country;
75
+ pincode;
76
+ };
77
+ exports.StoreAddress = StoreAddress;
78
+ tslib_1.__decorate([
79
+ (0, graphql_1.Field)({ nullable: true, description: 'Street number' }),
80
+ tslib_1.__metadata("design:type", String)
81
+ ], StoreAddress.prototype, "streetNo", void 0);
82
+ tslib_1.__decorate([
83
+ (0, graphql_1.Field)({ nullable: true, description: 'Street name' }),
84
+ tslib_1.__metadata("design:type", String)
85
+ ], StoreAddress.prototype, "streetName", void 0);
86
+ tslib_1.__decorate([
87
+ (0, graphql_1.Field)({ nullable: true, description: 'Area/locality' }),
88
+ tslib_1.__metadata("design:type", String)
89
+ ], StoreAddress.prototype, "area", void 0);
90
+ tslib_1.__decorate([
91
+ (0, graphql_1.Field)({ nullable: true, description: 'Town' }),
92
+ tslib_1.__metadata("design:type", String)
93
+ ], StoreAddress.prototype, "town", void 0);
94
+ tslib_1.__decorate([
95
+ (0, graphql_1.Field)({ nullable: true, description: 'City' }),
96
+ tslib_1.__metadata("design:type", String)
97
+ ], StoreAddress.prototype, "city", void 0);
98
+ tslib_1.__decorate([
99
+ (0, graphql_1.Field)({ nullable: true, description: 'State' }),
100
+ tslib_1.__metadata("design:type", String)
101
+ ], StoreAddress.prototype, "state", void 0);
102
+ tslib_1.__decorate([
103
+ (0, graphql_1.Field)({ nullable: true, description: 'Country' }),
104
+ tslib_1.__metadata("design:type", String)
105
+ ], StoreAddress.prototype, "country", void 0);
106
+ tslib_1.__decorate([
107
+ (0, graphql_1.Field)({ nullable: true, description: 'Pincode/postal code' }),
108
+ tslib_1.__metadata("design:type", String)
109
+ ], StoreAddress.prototype, "pincode", void 0);
110
+ exports.StoreAddress = StoreAddress = tslib_1.__decorate([
111
+ (0, graphql_1.ObjectType)()
112
+ ], StoreAddress);
113
+ let StoreCoordinates = class StoreCoordinates {
114
+ latitude;
115
+ longitude;
116
+ };
117
+ exports.StoreCoordinates = StoreCoordinates;
118
+ tslib_1.__decorate([
119
+ (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true, description: 'Latitude' }),
120
+ tslib_1.__metadata("design:type", Number)
121
+ ], StoreCoordinates.prototype, "latitude", void 0);
122
+ tslib_1.__decorate([
123
+ (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true, description: 'Longitude' }),
124
+ tslib_1.__metadata("design:type", Number)
125
+ ], StoreCoordinates.prototype, "longitude", void 0);
126
+ exports.StoreCoordinates = StoreCoordinates = tslib_1.__decorate([
127
+ (0, graphql_1.ObjectType)()
128
+ ], StoreCoordinates);
129
+ let StoreContact = class StoreContact {
130
+ person;
131
+ phone;
132
+ };
133
+ exports.StoreContact = StoreContact;
134
+ tslib_1.__decorate([
135
+ (0, graphql_1.Field)({ nullable: true, description: 'Contact person name' }),
136
+ tslib_1.__metadata("design:type", String)
137
+ ], StoreContact.prototype, "person", void 0);
138
+ tslib_1.__decorate([
139
+ (0, graphql_1.Field)({ nullable: true, description: 'Contact phone number' }),
140
+ tslib_1.__metadata("design:type", String)
141
+ ], StoreContact.prototype, "phone", void 0);
142
+ exports.StoreContact = StoreContact = tslib_1.__decorate([
143
+ (0, graphql_1.ObjectType)()
144
+ ], StoreContact);
145
+ let StoreTiming = class StoreTiming {
146
+ openingTime;
147
+ closingTime;
148
+ workingDays;
149
+ };
150
+ exports.StoreTiming = StoreTiming;
151
+ tslib_1.__decorate([
152
+ (0, graphql_1.Field)({ nullable: true, description: 'Opening time (HH:MM format)' }),
153
+ tslib_1.__metadata("design:type", String)
154
+ ], StoreTiming.prototype, "openingTime", void 0);
155
+ tslib_1.__decorate([
156
+ (0, graphql_1.Field)({ nullable: true, description: 'Closing time (HH:MM format)' }),
157
+ tslib_1.__metadata("design:type", String)
158
+ ], StoreTiming.prototype, "closingTime", void 0);
159
+ tslib_1.__decorate([
160
+ (0, graphql_1.Field)(() => [String], { nullable: true, description: 'Working days' }),
161
+ tslib_1.__metadata("design:type", Array)
162
+ ], StoreTiming.prototype, "workingDays", void 0);
163
+ exports.StoreTiming = StoreTiming = tslib_1.__decorate([
164
+ (0, graphql_1.ObjectType)()
165
+ ], StoreTiming);
166
+ let Store = class Store {
167
+ id;
168
+ name;
169
+ type;
170
+ address;
171
+ coordinates;
172
+ contact;
173
+ timing;
174
+ distance;
175
+ isEnabled;
176
+ isStoreLocatorEnabled;
177
+ storeBrand;
178
+ brands;
179
+ };
180
+ exports.Store = Store;
181
+ tslib_1.__decorate([
182
+ (0, graphql_1.Field)({ description: 'Store ID' }),
183
+ tslib_1.__metadata("design:type", String)
184
+ ], Store.prototype, "id", void 0);
185
+ tslib_1.__decorate([
186
+ (0, graphql_1.Field)({ description: 'Store name' }),
187
+ tslib_1.__metadata("design:type", String)
188
+ ], Store.prototype, "name", void 0);
189
+ tslib_1.__decorate([
190
+ (0, graphql_1.Field)({ nullable: true, description: 'Store type (e.g., Store, Warehouse)' }),
191
+ tslib_1.__metadata("design:type", String)
192
+ ], Store.prototype, "type", void 0);
193
+ tslib_1.__decorate([
194
+ (0, graphql_1.Field)(() => StoreAddress, { description: 'Store address' }),
195
+ tslib_1.__metadata("design:type", StoreAddress)
196
+ ], Store.prototype, "address", void 0);
197
+ tslib_1.__decorate([
198
+ (0, graphql_1.Field)(() => StoreCoordinates, { nullable: true, description: 'Store coordinates' }),
199
+ tslib_1.__metadata("design:type", StoreCoordinates)
200
+ ], Store.prototype, "coordinates", void 0);
201
+ tslib_1.__decorate([
202
+ (0, graphql_1.Field)(() => StoreContact, { nullable: true, description: 'Store contact details' }),
203
+ tslib_1.__metadata("design:type", StoreContact)
204
+ ], Store.prototype, "contact", void 0);
205
+ tslib_1.__decorate([
206
+ (0, graphql_1.Field)(() => StoreTiming, { nullable: true, description: 'Store timing' }),
207
+ tslib_1.__metadata("design:type", StoreTiming)
208
+ ], Store.prototype, "timing", void 0);
209
+ tslib_1.__decorate([
210
+ (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true, description: 'Distance from input location in KM' }),
211
+ tslib_1.__metadata("design:type", Number)
212
+ ], Store.prototype, "distance", void 0);
213
+ tslib_1.__decorate([
214
+ (0, graphql_1.Field)({ description: 'Whether the store is enabled' }),
215
+ tslib_1.__metadata("design:type", Boolean)
216
+ ], Store.prototype, "isEnabled", void 0);
217
+ tslib_1.__decorate([
218
+ (0, graphql_1.Field)({ description: 'Whether the store is enabled for store locator' }),
219
+ tslib_1.__metadata("design:type", Boolean)
220
+ ], Store.prototype, "isStoreLocatorEnabled", void 0);
221
+ tslib_1.__decorate([
222
+ (0, graphql_1.Field)({ nullable: true, description: 'Primary brand of the store' }),
223
+ tslib_1.__metadata("design:type", String)
224
+ ], Store.prototype, "storeBrand", void 0);
225
+ tslib_1.__decorate([
226
+ (0, graphql_1.Field)(() => [String], { nullable: true, description: 'Brands available at the store' }),
227
+ tslib_1.__metadata("design:type", Array)
228
+ ], Store.prototype, "brands", void 0);
229
+ exports.Store = Store = tslib_1.__decorate([
230
+ (0, graphql_1.ObjectType)()
231
+ ], Store);
232
+ let StoreLocatorResult = class StoreLocatorResult {
233
+ stores;
234
+ totalCount;
235
+ };
236
+ exports.StoreLocatorResult = StoreLocatorResult;
237
+ tslib_1.__decorate([
238
+ (0, graphql_1.Field)(() => [Store], { description: 'List of nearby stores' }),
239
+ tslib_1.__metadata("design:type", Array)
240
+ ], StoreLocatorResult.prototype, "stores", void 0);
241
+ tslib_1.__decorate([
242
+ (0, graphql_1.Field)(() => graphql_1.Int, { description: 'Total number of stores found' }),
243
+ tslib_1.__metadata("design:type", Number)
244
+ ], StoreLocatorResult.prototype, "totalCount", void 0);
245
+ exports.StoreLocatorResult = StoreLocatorResult = tslib_1.__decorate([
246
+ (0, graphql_1.ObjectType)()
247
+ ], StoreLocatorResult);
248
+ //# sourceMappingURL=store-locator.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-locator.types.js","sourceRoot":"","sources":["../../src/store-locator/store-locator.types.ts"],"names":[],"mappings":";;;;AAAA,6CAA2E;AAE3E;;;;GAIG;AAEH,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAGxE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAEvC,QAAQ,CAAU;IAGlB,SAAS,CAAU;CACpB,CAAA;AANY,oEAA4B;AAEvC;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;;8DAC5C;AAGlB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;;+DAC5C;uCALR,4BAA4B;IADxC,IAAA,mBAAS,GAAE;GACC,4BAA4B,CAMxC;AAGM,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAE5B,OAAO,CAAU;IAMjB,WAAW,CAAgC;IAG3C,WAAW,CAAW;IAGtB,uBAAuB,CAAW;IAGlC,MAAM,CAAY;CACnB,CAAA;AAlBY,8CAAiB;AAE5B;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WA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EAAE,CAAC;;kDAC9C;AAGjB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;;sDAC9C;6BALT,kBAAkB;IAD9B,IAAA,oBAAU,GAAE;GACA,kBAAkB,CAM9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pvh-afl/graphql",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "AFL GraphQL - Shared GraphQL modules for multi-brand commerce platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "@nestjs/core": "^10.4.0",
33
33
  "@nestjs/graphql": "^12.2.0",
34
34
  "@nestjs/testing": "^10.4.0",
35
- "@pvh-afl/core": "^1.0.4",
35
+ "@pvh-afl/core": "^1.0.8",
36
36
  "@types/jest": "^29.5.0",
37
37
  "graphql": "^16.9.0",
38
38
  "graphql-type-json": "^0.3.2",