@retaila/shared-types 1.1.118 → 1.1.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,50 @@
1
1
  // shared-types/src/index.ts - Main exports for shared types package
2
2
 
3
+ // src/common/Country.ts
4
+ var SUPPORTED_COUNTRIES = ["UY", "AR"];
5
+ function isSupportedCountry(code) {
6
+ return SUPPORTED_COUNTRIES.includes(code);
7
+ }
8
+ var COUNTRY_DEFAULTS = {
9
+ UY: {
10
+ name: "Uruguay",
11
+ timezone: "America/Montevideo",
12
+ currency: "UYU",
13
+ phoneCountryCode: "+598",
14
+ locale: "es-UY",
15
+ defaultBranchAddress: {
16
+ country: "Uruguay",
17
+ department: "Montevideo",
18
+ locality: "Centro",
19
+ street: "Calle 123",
20
+ number: "123",
21
+ mapPosition: { lat: -34.9211269, lng: -56.161656 }
22
+ },
23
+ defaultTaxes: [{ name: "IVA", rate: 22, rateType: "PERCENTAGE" }]
24
+ },
25
+ AR: {
26
+ name: "Argentina",
27
+ timezone: "America/Argentina/Buenos_Aires",
28
+ currency: "ARS",
29
+ phoneCountryCode: "+54",
30
+ locale: "es-AR",
31
+ defaultBranchAddress: {
32
+ country: "Argentina",
33
+ department: "Buenos Aires",
34
+ locality: "CABA",
35
+ street: "Calle ejemplo",
36
+ number: "123",
37
+ mapPosition: { lat: -34.6037, lng: -58.3816 }
38
+ },
39
+ defaultTaxes: [{ name: "IVA", rate: 21, rateType: "PERCENTAGE" }]
40
+ }
41
+ };
42
+ function getCountryDefaults(code) {
43
+ if (!code || code.length !== 2) return null;
44
+ const key = code.toUpperCase();
45
+ return COUNTRY_DEFAULTS[key] ?? null;
46
+ }
47
+
3
48
  // src/common/Media.ts
4
49
  var MediaType = /* @__PURE__ */ ((MediaType2) => {
5
50
  MediaType2["IMAGE"] = "IMAGE";
@@ -938,6 +983,7 @@ export {
938
983
  AiCreditTransactionReason,
939
984
  AiCreditType,
940
985
  AnalyticsEventType,
986
+ COUNTRY_DEFAULTS,
941
987
  CampaignBudgetType,
942
988
  CampaignStatus,
943
989
  CartDeliveryType,
@@ -989,6 +1035,7 @@ export {
989
1035
  PubSubTopics,
990
1036
  RoundingMethod,
991
1037
  RoundingRule,
1038
+ SUPPORTED_COUNTRIES,
992
1039
  StandardCategoryStatus,
993
1040
  StoreBannerStatus,
994
1041
  StorePageStatus,
@@ -1003,6 +1050,7 @@ export {
1003
1050
  SupportConversationVisibility,
1004
1051
  TrafficSource,
1005
1052
  getAccountPaymentMethodStatusInfo,
1053
+ getCountryDefaults,
1006
1054
  getCurrencySymbol,
1007
1055
  getFulfillmentStatusInfo,
1008
1056
  getIntegrationCategoryName,
@@ -1012,6 +1060,7 @@ export {
1012
1060
  getPaymentStatusInfo,
1013
1061
  getProductStatusInfo,
1014
1062
  isLegacyLayout,
1063
+ isSupportedCountry,
1015
1064
  isZonedLayout,
1016
1065
  parsePriceFormatPattern
1017
1066
  };