@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.d.mts +197 -1
- package/dist/index.d.ts +197 -1
- package/dist/index.js +88 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +80 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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";
|
|
@@ -920,6 +965,33 @@ var InternalNotificationType = /* @__PURE__ */ ((InternalNotificationType2) => {
|
|
|
920
965
|
InternalNotificationType2["CONTACT_FORM_SUBMITTED"] = "CONTACT_FORM_SUBMITTED";
|
|
921
966
|
return InternalNotificationType2;
|
|
922
967
|
})(InternalNotificationType || {});
|
|
968
|
+
|
|
969
|
+
// src/serviceBilling/types.ts
|
|
970
|
+
var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
|
|
971
|
+
BillingInterval2["MONTHLY"] = "MONTHLY";
|
|
972
|
+
BillingInterval2["SEMIANNUAL"] = "SEMIANNUAL";
|
|
973
|
+
BillingInterval2["ANNUAL"] = "ANNUAL";
|
|
974
|
+
return BillingInterval2;
|
|
975
|
+
})(BillingInterval || {});
|
|
976
|
+
var AccountServicePlanStatus = /* @__PURE__ */ ((AccountServicePlanStatus2) => {
|
|
977
|
+
AccountServicePlanStatus2["ACTIVE"] = "ACTIVE";
|
|
978
|
+
AccountServicePlanStatus2["ENDED"] = "ENDED";
|
|
979
|
+
AccountServicePlanStatus2["CANCELLED"] = "CANCELLED";
|
|
980
|
+
return AccountServicePlanStatus2;
|
|
981
|
+
})(AccountServicePlanStatus || {});
|
|
982
|
+
var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
|
|
983
|
+
ChargeType2["SUBSCRIPTION"] = "SUBSCRIPTION";
|
|
984
|
+
ChargeType2["INSTALLATION"] = "INSTALLATION";
|
|
985
|
+
ChargeType2["ADJUSTMENT"] = "ADJUSTMENT";
|
|
986
|
+
ChargeType2["OTHER"] = "OTHER";
|
|
987
|
+
return ChargeType2;
|
|
988
|
+
})(ChargeType || {});
|
|
989
|
+
var ChargeStatus = /* @__PURE__ */ ((ChargeStatus2) => {
|
|
990
|
+
ChargeStatus2["PENDING"] = "PENDING";
|
|
991
|
+
ChargeStatus2["PAID"] = "PAID";
|
|
992
|
+
ChargeStatus2["CANCELLED"] = "CANCELLED";
|
|
993
|
+
return ChargeStatus2;
|
|
994
|
+
})(ChargeStatus || {});
|
|
923
995
|
export {
|
|
924
996
|
AccountBranchScheduleDay,
|
|
925
997
|
AccountBranchScheduleStatus,
|
|
@@ -933,17 +1005,22 @@ export {
|
|
|
933
1005
|
AccountIntegrationEnvironment,
|
|
934
1006
|
AccountIntegrationStatus,
|
|
935
1007
|
AccountPaymentMethodStatus,
|
|
1008
|
+
AccountServicePlanStatus,
|
|
936
1009
|
AccountStatus,
|
|
937
1010
|
AiCreditSource,
|
|
938
1011
|
AiCreditTransactionReason,
|
|
939
1012
|
AiCreditType,
|
|
940
1013
|
AnalyticsEventType,
|
|
1014
|
+
BillingInterval,
|
|
1015
|
+
COUNTRY_DEFAULTS,
|
|
941
1016
|
CampaignBudgetType,
|
|
942
1017
|
CampaignStatus,
|
|
943
1018
|
CartDeliveryType,
|
|
944
1019
|
CartItemErrorCode,
|
|
945
1020
|
CartSource,
|
|
946
1021
|
CartStatus,
|
|
1022
|
+
ChargeStatus,
|
|
1023
|
+
ChargeType,
|
|
947
1024
|
CollectionRuleField,
|
|
948
1025
|
CollectionRuleFieldLabels,
|
|
949
1026
|
CollectionRuleOperator,
|
|
@@ -989,6 +1066,7 @@ export {
|
|
|
989
1066
|
PubSubTopics,
|
|
990
1067
|
RoundingMethod,
|
|
991
1068
|
RoundingRule,
|
|
1069
|
+
SUPPORTED_COUNTRIES,
|
|
992
1070
|
StandardCategoryStatus,
|
|
993
1071
|
StoreBannerStatus,
|
|
994
1072
|
StorePageStatus,
|
|
@@ -1003,6 +1081,7 @@ export {
|
|
|
1003
1081
|
SupportConversationVisibility,
|
|
1004
1082
|
TrafficSource,
|
|
1005
1083
|
getAccountPaymentMethodStatusInfo,
|
|
1084
|
+
getCountryDefaults,
|
|
1006
1085
|
getCurrencySymbol,
|
|
1007
1086
|
getFulfillmentStatusInfo,
|
|
1008
1087
|
getIntegrationCategoryName,
|
|
@@ -1012,6 +1091,7 @@ export {
|
|
|
1012
1091
|
getPaymentStatusInfo,
|
|
1013
1092
|
getProductStatusInfo,
|
|
1014
1093
|
isLegacyLayout,
|
|
1094
|
+
isSupportedCountry,
|
|
1015
1095
|
isZonedLayout,
|
|
1016
1096
|
parsePriceFormatPattern
|
|
1017
1097
|
};
|