@retaila/shared-types 1.1.118 → 1.1.120

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.js CHANGED
@@ -33,17 +33,22 @@ __export(index_exports, {
33
33
  AccountIntegrationEnvironment: () => AccountIntegrationEnvironment,
34
34
  AccountIntegrationStatus: () => AccountIntegrationStatus,
35
35
  AccountPaymentMethodStatus: () => AccountPaymentMethodStatus,
36
+ AccountServicePlanStatus: () => AccountServicePlanStatus,
36
37
  AccountStatus: () => AccountStatus,
37
38
  AiCreditSource: () => AiCreditSource,
38
39
  AiCreditTransactionReason: () => AiCreditTransactionReason,
39
40
  AiCreditType: () => AiCreditType,
40
41
  AnalyticsEventType: () => AnalyticsEventType,
42
+ BillingInterval: () => BillingInterval,
43
+ COUNTRY_DEFAULTS: () => COUNTRY_DEFAULTS,
41
44
  CampaignBudgetType: () => CampaignBudgetType,
42
45
  CampaignStatus: () => CampaignStatus,
43
46
  CartDeliveryType: () => CartDeliveryType,
44
47
  CartItemErrorCode: () => CartItemErrorCode,
45
48
  CartSource: () => CartSource,
46
49
  CartStatus: () => CartStatus,
50
+ ChargeStatus: () => ChargeStatus,
51
+ ChargeType: () => ChargeType,
47
52
  CollectionRuleField: () => CollectionRuleField,
48
53
  CollectionRuleFieldLabels: () => CollectionRuleFieldLabels,
49
54
  CollectionRuleOperator: () => CollectionRuleOperator,
@@ -89,6 +94,7 @@ __export(index_exports, {
89
94
  PubSubTopics: () => PubSubTopics,
90
95
  RoundingMethod: () => RoundingMethod,
91
96
  RoundingRule: () => RoundingRule,
97
+ SUPPORTED_COUNTRIES: () => SUPPORTED_COUNTRIES,
92
98
  StandardCategoryStatus: () => StandardCategoryStatus,
93
99
  StoreBannerStatus: () => StoreBannerStatus,
94
100
  StorePageStatus: () => StorePageStatus,
@@ -103,6 +109,7 @@ __export(index_exports, {
103
109
  SupportConversationVisibility: () => SupportConversationVisibility,
104
110
  TrafficSource: () => TrafficSource,
105
111
  getAccountPaymentMethodStatusInfo: () => getAccountPaymentMethodStatusInfo,
112
+ getCountryDefaults: () => getCountryDefaults,
106
113
  getCurrencySymbol: () => getCurrencySymbol,
107
114
  getFulfillmentStatusInfo: () => getFulfillmentStatusInfo,
108
115
  getIntegrationCategoryName: () => getIntegrationCategoryName,
@@ -112,11 +119,57 @@ __export(index_exports, {
112
119
  getPaymentStatusInfo: () => getPaymentStatusInfo,
113
120
  getProductStatusInfo: () => getProductStatusInfo,
114
121
  isLegacyLayout: () => isLegacyLayout,
122
+ isSupportedCountry: () => isSupportedCountry,
115
123
  isZonedLayout: () => isZonedLayout,
116
124
  parsePriceFormatPattern: () => parsePriceFormatPattern
117
125
  });
118
126
  module.exports = __toCommonJS(index_exports);
119
127
 
128
+ // src/common/Country.ts
129
+ var SUPPORTED_COUNTRIES = ["UY", "AR"];
130
+ function isSupportedCountry(code) {
131
+ return SUPPORTED_COUNTRIES.includes(code);
132
+ }
133
+ var COUNTRY_DEFAULTS = {
134
+ UY: {
135
+ name: "Uruguay",
136
+ timezone: "America/Montevideo",
137
+ currency: "UYU",
138
+ phoneCountryCode: "+598",
139
+ locale: "es-UY",
140
+ defaultBranchAddress: {
141
+ country: "Uruguay",
142
+ department: "Montevideo",
143
+ locality: "Centro",
144
+ street: "Calle 123",
145
+ number: "123",
146
+ mapPosition: { lat: -34.9211269, lng: -56.161656 }
147
+ },
148
+ defaultTaxes: [{ name: "IVA", rate: 22, rateType: "PERCENTAGE" }]
149
+ },
150
+ AR: {
151
+ name: "Argentina",
152
+ timezone: "America/Argentina/Buenos_Aires",
153
+ currency: "ARS",
154
+ phoneCountryCode: "+54",
155
+ locale: "es-AR",
156
+ defaultBranchAddress: {
157
+ country: "Argentina",
158
+ department: "Buenos Aires",
159
+ locality: "CABA",
160
+ street: "Calle ejemplo",
161
+ number: "123",
162
+ mapPosition: { lat: -34.6037, lng: -58.3816 }
163
+ },
164
+ defaultTaxes: [{ name: "IVA", rate: 21, rateType: "PERCENTAGE" }]
165
+ }
166
+ };
167
+ function getCountryDefaults(code) {
168
+ if (!code || code.length !== 2) return null;
169
+ const key = code.toUpperCase();
170
+ return COUNTRY_DEFAULTS[key] ?? null;
171
+ }
172
+
120
173
  // src/common/Media.ts
121
174
  var MediaType = /* @__PURE__ */ ((MediaType2) => {
122
175
  MediaType2["IMAGE"] = "IMAGE";
@@ -1037,6 +1090,33 @@ var InternalNotificationType = /* @__PURE__ */ ((InternalNotificationType2) => {
1037
1090
  InternalNotificationType2["CONTACT_FORM_SUBMITTED"] = "CONTACT_FORM_SUBMITTED";
1038
1091
  return InternalNotificationType2;
1039
1092
  })(InternalNotificationType || {});
1093
+
1094
+ // src/serviceBilling/types.ts
1095
+ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
1096
+ BillingInterval2["MONTHLY"] = "MONTHLY";
1097
+ BillingInterval2["SEMIANNUAL"] = "SEMIANNUAL";
1098
+ BillingInterval2["ANNUAL"] = "ANNUAL";
1099
+ return BillingInterval2;
1100
+ })(BillingInterval || {});
1101
+ var AccountServicePlanStatus = /* @__PURE__ */ ((AccountServicePlanStatus2) => {
1102
+ AccountServicePlanStatus2["ACTIVE"] = "ACTIVE";
1103
+ AccountServicePlanStatus2["ENDED"] = "ENDED";
1104
+ AccountServicePlanStatus2["CANCELLED"] = "CANCELLED";
1105
+ return AccountServicePlanStatus2;
1106
+ })(AccountServicePlanStatus || {});
1107
+ var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
1108
+ ChargeType2["SUBSCRIPTION"] = "SUBSCRIPTION";
1109
+ ChargeType2["INSTALLATION"] = "INSTALLATION";
1110
+ ChargeType2["ADJUSTMENT"] = "ADJUSTMENT";
1111
+ ChargeType2["OTHER"] = "OTHER";
1112
+ return ChargeType2;
1113
+ })(ChargeType || {});
1114
+ var ChargeStatus = /* @__PURE__ */ ((ChargeStatus2) => {
1115
+ ChargeStatus2["PENDING"] = "PENDING";
1116
+ ChargeStatus2["PAID"] = "PAID";
1117
+ ChargeStatus2["CANCELLED"] = "CANCELLED";
1118
+ return ChargeStatus2;
1119
+ })(ChargeStatus || {});
1040
1120
  // Annotate the CommonJS export names for ESM import in node:
1041
1121
  0 && (module.exports = {
1042
1122
  AccountBranchScheduleDay,
@@ -1051,17 +1131,22 @@ var InternalNotificationType = /* @__PURE__ */ ((InternalNotificationType2) => {
1051
1131
  AccountIntegrationEnvironment,
1052
1132
  AccountIntegrationStatus,
1053
1133
  AccountPaymentMethodStatus,
1134
+ AccountServicePlanStatus,
1054
1135
  AccountStatus,
1055
1136
  AiCreditSource,
1056
1137
  AiCreditTransactionReason,
1057
1138
  AiCreditType,
1058
1139
  AnalyticsEventType,
1140
+ BillingInterval,
1141
+ COUNTRY_DEFAULTS,
1059
1142
  CampaignBudgetType,
1060
1143
  CampaignStatus,
1061
1144
  CartDeliveryType,
1062
1145
  CartItemErrorCode,
1063
1146
  CartSource,
1064
1147
  CartStatus,
1148
+ ChargeStatus,
1149
+ ChargeType,
1065
1150
  CollectionRuleField,
1066
1151
  CollectionRuleFieldLabels,
1067
1152
  CollectionRuleOperator,
@@ -1107,6 +1192,7 @@ var InternalNotificationType = /* @__PURE__ */ ((InternalNotificationType2) => {
1107
1192
  PubSubTopics,
1108
1193
  RoundingMethod,
1109
1194
  RoundingRule,
1195
+ SUPPORTED_COUNTRIES,
1110
1196
  StandardCategoryStatus,
1111
1197
  StoreBannerStatus,
1112
1198
  StorePageStatus,
@@ -1121,6 +1207,7 @@ var InternalNotificationType = /* @__PURE__ */ ((InternalNotificationType2) => {
1121
1207
  SupportConversationVisibility,
1122
1208
  TrafficSource,
1123
1209
  getAccountPaymentMethodStatusInfo,
1210
+ getCountryDefaults,
1124
1211
  getCurrencySymbol,
1125
1212
  getFulfillmentStatusInfo,
1126
1213
  getIntegrationCategoryName,
@@ -1130,6 +1217,7 @@ var InternalNotificationType = /* @__PURE__ */ ((InternalNotificationType2) => {
1130
1217
  getPaymentStatusInfo,
1131
1218
  getProductStatusInfo,
1132
1219
  isLegacyLayout,
1220
+ isSupportedCountry,
1133
1221
  isZonedLayout,
1134
1222
  parsePriceFormatPattern
1135
1223
  });