regions-config 1.0.5 → 1.0.7

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 CHANGED
@@ -40,225 +40,68 @@ type PaymentCardType = {
40
40
  };
41
41
  declare const RegionConfigSchema: z.ZodObject<{
42
42
  id: z.ZodNumber;
43
- gtmId: z.ZodString;
43
+ gtmId: z.ZodObject<{
44
+ staging: z.ZodString;
45
+ production: z.ZodString;
46
+ }, z.core.$strip>;
44
47
  countriesToRedirect: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
45
48
  label: z.ZodString;
46
49
  countries: z.ZodArray<z.ZodObject<{
47
50
  countryId: z.ZodString;
48
51
  name: z.ZodOptional<z.ZodString>;
49
- }, "strip", z.ZodTypeAny, {
50
- countryId: string;
51
- name?: string | undefined;
52
- }, {
53
- countryId: string;
54
- name?: string | undefined;
55
- }>, "many">;
56
- }, "strip", z.ZodTypeAny, {
57
- label: string;
58
- countries: {
59
- countryId: string;
60
- name?: string | undefined;
61
- }[];
62
- }, {
63
- label: string;
64
- countries: {
65
- countryId: string;
66
- name?: string | undefined;
67
- }[];
68
- }>>>;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>>>;
69
54
  regionUrls: z.ZodOptional<z.ZodObject<{
70
- staging: z.ZodString;
71
- production: z.ZodString;
72
- }, "strip", z.ZodTypeAny, {
73
- staging: string;
74
- production: string;
75
- }, {
76
- staging: string;
77
- production: string;
78
- }>>;
55
+ staging: z.ZodURL;
56
+ production: z.ZodURL;
57
+ }, z.core.$strip>>;
79
58
  timeZone: z.ZodString;
80
59
  regionsToGroup: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
- priority: z.ZodEnum<["high", "medium", "low"]>;
82
- countries: z.ZodArray<z.ZodNumber, "many">;
60
+ priority: z.ZodEnum<{
61
+ high: "high";
62
+ medium: "medium";
63
+ low: "low";
64
+ }>;
65
+ countries: z.ZodArray<z.ZodNumber>;
83
66
  regionId: z.ZodNumber;
84
- }, "strip", z.ZodTypeAny, {
85
- countries: number[];
86
- priority: "high" | "medium" | "low";
87
- regionId: number;
88
- }, {
89
- countries: number[];
90
- priority: "high" | "medium" | "low";
91
- regionId: number;
92
- }>, "many">>;
67
+ }, z.core.$strip>>>;
93
68
  footer: z.ZodArray<z.ZodObject<{
94
- href: z.ZodString;
69
+ href: z.ZodURL;
95
70
  label: z.ZodString;
96
- }, "strip", z.ZodTypeAny, {
97
- label: string;
98
- href: string;
99
- }, {
100
- label: string;
101
- href: string;
102
- }>, "many">;
71
+ }, z.core.$strip>>;
103
72
  documentTypeOptions: z.ZodArray<z.ZodObject<{
104
73
  label: z.ZodString;
105
74
  value: z.ZodString;
106
- }, "strip", z.ZodTypeAny, {
107
- value: string;
108
- label: string;
109
- }, {
110
- value: string;
111
- label: string;
112
- }>, "many">;
75
+ }, z.core.$strip>>;
113
76
  documentTypeOptionsByOrigin: z.ZodOptional<z.ZodObject<{
114
77
  local: z.ZodArray<z.ZodObject<{
115
78
  label: z.ZodString;
116
79
  value: z.ZodString;
117
- }, "strip", z.ZodTypeAny, {
118
- value: string;
119
- label: string;
120
- }, {
121
- value: string;
122
- label: string;
123
- }>, "many">;
80
+ }, z.core.$strip>>;
124
81
  foreign: z.ZodArray<z.ZodObject<{
125
82
  label: z.ZodString;
126
83
  value: z.ZodString;
127
- }, "strip", z.ZodTypeAny, {
128
- value: string;
129
- label: string;
130
- }, {
131
- value: string;
132
- label: string;
133
- }>, "many">;
134
- }, "strip", z.ZodTypeAny, {
135
- local: {
136
- value: string;
137
- label: string;
138
- }[];
139
- foreign: {
140
- value: string;
141
- label: string;
142
- }[];
143
- }, {
144
- local: {
145
- value: string;
146
- label: string;
147
- }[];
148
- foreign: {
149
- value: string;
150
- label: string;
151
- }[];
152
- }>>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>>;
153
86
  dateFormat: z.ZodString;
154
- regionCode: z.ZodEnum<["es-ES", "es-MX", "en-EU", "en-ROW", "it-IT", "pt-PT", "es-CO", "es-PE"]>;
87
+ postalCodeFormat: z.ZodOptional<z.ZodString>;
88
+ regionCode: z.ZodEnum<{
89
+ "es-ES": "es-ES";
90
+ "es-MX": "es-MX";
91
+ "en-EU": "en-EU";
92
+ "en-ROW": "en-ROW";
93
+ "it-IT": "it-IT";
94
+ "pt-PT": "pt-PT";
95
+ "es-CO": "es-CO";
96
+ "es-PE": "es-PE";
97
+ }>;
155
98
  paymentCardTypes: z.ZodArray<z.ZodObject<{
156
99
  id: z.ZodNumber;
157
100
  name: z.ZodString;
158
101
  imagePath: z.ZodString;
159
- }, "strip", z.ZodTypeAny, {
160
- id: number;
161
- name: string;
162
- imagePath: string;
163
- }, {
164
- id: number;
165
- name: string;
166
- imagePath: string;
167
- }>, "many">;
102
+ }, z.core.$strip>>;
168
103
  webSitePath: z.ZodOptional<z.ZodString>;
169
- }, "strict", z.ZodTypeAny, {
170
- id: number;
171
- gtmId: string;
172
- timeZone: string;
173
- footer: {
174
- label: string;
175
- href: string;
176
- }[];
177
- documentTypeOptions: {
178
- value: string;
179
- label: string;
180
- }[];
181
- dateFormat: string;
182
- regionCode: "es-ES" | "es-MX" | "en-EU" | "en-ROW" | "it-IT" | "pt-PT" | "es-CO" | "es-PE";
183
- paymentCardTypes: {
184
- id: number;
185
- name: string;
186
- imagePath: string;
187
- }[];
188
- countriesToRedirect?: Record<string, {
189
- label: string;
190
- countries: {
191
- countryId: string;
192
- name?: string | undefined;
193
- }[];
194
- }> | undefined;
195
- regionUrls?: {
196
- staging: string;
197
- production: string;
198
- } | undefined;
199
- regionsToGroup?: {
200
- countries: number[];
201
- priority: "high" | "medium" | "low";
202
- regionId: number;
203
- }[] | undefined;
204
- documentTypeOptionsByOrigin?: {
205
- local: {
206
- value: string;
207
- label: string;
208
- }[];
209
- foreign: {
210
- value: string;
211
- label: string;
212
- }[];
213
- } | undefined;
214
- webSitePath?: string | undefined;
215
- }, {
216
- id: number;
217
- gtmId: string;
218
- timeZone: string;
219
- footer: {
220
- label: string;
221
- href: string;
222
- }[];
223
- documentTypeOptions: {
224
- value: string;
225
- label: string;
226
- }[];
227
- dateFormat: string;
228
- regionCode: "es-ES" | "es-MX" | "en-EU" | "en-ROW" | "it-IT" | "pt-PT" | "es-CO" | "es-PE";
229
- paymentCardTypes: {
230
- id: number;
231
- name: string;
232
- imagePath: string;
233
- }[];
234
- countriesToRedirect?: Record<string, {
235
- label: string;
236
- countries: {
237
- countryId: string;
238
- name?: string | undefined;
239
- }[];
240
- }> | undefined;
241
- regionUrls?: {
242
- staging: string;
243
- production: string;
244
- } | undefined;
245
- regionsToGroup?: {
246
- countries: number[];
247
- priority: "high" | "medium" | "low";
248
- regionId: number;
249
- }[] | undefined;
250
- documentTypeOptionsByOrigin?: {
251
- local: {
252
- value: string;
253
- label: string;
254
- }[];
255
- foreign: {
256
- value: string;
257
- label: string;
258
- }[];
259
- } | undefined;
260
- webSitePath?: string | undefined;
261
- }>;
104
+ }, z.core.$strict>;
262
105
  type CountriesToRedirectMap = Record<string, RedirectGroup>;
263
106
  type RegionConfig = Omit<z.infer<typeof RegionConfigSchema>, 'countriesToRedirect'> & {
264
107
  countriesToRedirect?: CountriesToRedirectMap;
package/dist/index.d.ts CHANGED
@@ -40,225 +40,68 @@ type PaymentCardType = {
40
40
  };
41
41
  declare const RegionConfigSchema: z.ZodObject<{
42
42
  id: z.ZodNumber;
43
- gtmId: z.ZodString;
43
+ gtmId: z.ZodObject<{
44
+ staging: z.ZodString;
45
+ production: z.ZodString;
46
+ }, z.core.$strip>;
44
47
  countriesToRedirect: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
45
48
  label: z.ZodString;
46
49
  countries: z.ZodArray<z.ZodObject<{
47
50
  countryId: z.ZodString;
48
51
  name: z.ZodOptional<z.ZodString>;
49
- }, "strip", z.ZodTypeAny, {
50
- countryId: string;
51
- name?: string | undefined;
52
- }, {
53
- countryId: string;
54
- name?: string | undefined;
55
- }>, "many">;
56
- }, "strip", z.ZodTypeAny, {
57
- label: string;
58
- countries: {
59
- countryId: string;
60
- name?: string | undefined;
61
- }[];
62
- }, {
63
- label: string;
64
- countries: {
65
- countryId: string;
66
- name?: string | undefined;
67
- }[];
68
- }>>>;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>>>;
69
54
  regionUrls: z.ZodOptional<z.ZodObject<{
70
- staging: z.ZodString;
71
- production: z.ZodString;
72
- }, "strip", z.ZodTypeAny, {
73
- staging: string;
74
- production: string;
75
- }, {
76
- staging: string;
77
- production: string;
78
- }>>;
55
+ staging: z.ZodURL;
56
+ production: z.ZodURL;
57
+ }, z.core.$strip>>;
79
58
  timeZone: z.ZodString;
80
59
  regionsToGroup: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
- priority: z.ZodEnum<["high", "medium", "low"]>;
82
- countries: z.ZodArray<z.ZodNumber, "many">;
60
+ priority: z.ZodEnum<{
61
+ high: "high";
62
+ medium: "medium";
63
+ low: "low";
64
+ }>;
65
+ countries: z.ZodArray<z.ZodNumber>;
83
66
  regionId: z.ZodNumber;
84
- }, "strip", z.ZodTypeAny, {
85
- countries: number[];
86
- priority: "high" | "medium" | "low";
87
- regionId: number;
88
- }, {
89
- countries: number[];
90
- priority: "high" | "medium" | "low";
91
- regionId: number;
92
- }>, "many">>;
67
+ }, z.core.$strip>>>;
93
68
  footer: z.ZodArray<z.ZodObject<{
94
- href: z.ZodString;
69
+ href: z.ZodURL;
95
70
  label: z.ZodString;
96
- }, "strip", z.ZodTypeAny, {
97
- label: string;
98
- href: string;
99
- }, {
100
- label: string;
101
- href: string;
102
- }>, "many">;
71
+ }, z.core.$strip>>;
103
72
  documentTypeOptions: z.ZodArray<z.ZodObject<{
104
73
  label: z.ZodString;
105
74
  value: z.ZodString;
106
- }, "strip", z.ZodTypeAny, {
107
- value: string;
108
- label: string;
109
- }, {
110
- value: string;
111
- label: string;
112
- }>, "many">;
75
+ }, z.core.$strip>>;
113
76
  documentTypeOptionsByOrigin: z.ZodOptional<z.ZodObject<{
114
77
  local: z.ZodArray<z.ZodObject<{
115
78
  label: z.ZodString;
116
79
  value: z.ZodString;
117
- }, "strip", z.ZodTypeAny, {
118
- value: string;
119
- label: string;
120
- }, {
121
- value: string;
122
- label: string;
123
- }>, "many">;
80
+ }, z.core.$strip>>;
124
81
  foreign: z.ZodArray<z.ZodObject<{
125
82
  label: z.ZodString;
126
83
  value: z.ZodString;
127
- }, "strip", z.ZodTypeAny, {
128
- value: string;
129
- label: string;
130
- }, {
131
- value: string;
132
- label: string;
133
- }>, "many">;
134
- }, "strip", z.ZodTypeAny, {
135
- local: {
136
- value: string;
137
- label: string;
138
- }[];
139
- foreign: {
140
- value: string;
141
- label: string;
142
- }[];
143
- }, {
144
- local: {
145
- value: string;
146
- label: string;
147
- }[];
148
- foreign: {
149
- value: string;
150
- label: string;
151
- }[];
152
- }>>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>>;
153
86
  dateFormat: z.ZodString;
154
- regionCode: z.ZodEnum<["es-ES", "es-MX", "en-EU", "en-ROW", "it-IT", "pt-PT", "es-CO", "es-PE"]>;
87
+ postalCodeFormat: z.ZodOptional<z.ZodString>;
88
+ regionCode: z.ZodEnum<{
89
+ "es-ES": "es-ES";
90
+ "es-MX": "es-MX";
91
+ "en-EU": "en-EU";
92
+ "en-ROW": "en-ROW";
93
+ "it-IT": "it-IT";
94
+ "pt-PT": "pt-PT";
95
+ "es-CO": "es-CO";
96
+ "es-PE": "es-PE";
97
+ }>;
155
98
  paymentCardTypes: z.ZodArray<z.ZodObject<{
156
99
  id: z.ZodNumber;
157
100
  name: z.ZodString;
158
101
  imagePath: z.ZodString;
159
- }, "strip", z.ZodTypeAny, {
160
- id: number;
161
- name: string;
162
- imagePath: string;
163
- }, {
164
- id: number;
165
- name: string;
166
- imagePath: string;
167
- }>, "many">;
102
+ }, z.core.$strip>>;
168
103
  webSitePath: z.ZodOptional<z.ZodString>;
169
- }, "strict", z.ZodTypeAny, {
170
- id: number;
171
- gtmId: string;
172
- timeZone: string;
173
- footer: {
174
- label: string;
175
- href: string;
176
- }[];
177
- documentTypeOptions: {
178
- value: string;
179
- label: string;
180
- }[];
181
- dateFormat: string;
182
- regionCode: "es-ES" | "es-MX" | "en-EU" | "en-ROW" | "it-IT" | "pt-PT" | "es-CO" | "es-PE";
183
- paymentCardTypes: {
184
- id: number;
185
- name: string;
186
- imagePath: string;
187
- }[];
188
- countriesToRedirect?: Record<string, {
189
- label: string;
190
- countries: {
191
- countryId: string;
192
- name?: string | undefined;
193
- }[];
194
- }> | undefined;
195
- regionUrls?: {
196
- staging: string;
197
- production: string;
198
- } | undefined;
199
- regionsToGroup?: {
200
- countries: number[];
201
- priority: "high" | "medium" | "low";
202
- regionId: number;
203
- }[] | undefined;
204
- documentTypeOptionsByOrigin?: {
205
- local: {
206
- value: string;
207
- label: string;
208
- }[];
209
- foreign: {
210
- value: string;
211
- label: string;
212
- }[];
213
- } | undefined;
214
- webSitePath?: string | undefined;
215
- }, {
216
- id: number;
217
- gtmId: string;
218
- timeZone: string;
219
- footer: {
220
- label: string;
221
- href: string;
222
- }[];
223
- documentTypeOptions: {
224
- value: string;
225
- label: string;
226
- }[];
227
- dateFormat: string;
228
- regionCode: "es-ES" | "es-MX" | "en-EU" | "en-ROW" | "it-IT" | "pt-PT" | "es-CO" | "es-PE";
229
- paymentCardTypes: {
230
- id: number;
231
- name: string;
232
- imagePath: string;
233
- }[];
234
- countriesToRedirect?: Record<string, {
235
- label: string;
236
- countries: {
237
- countryId: string;
238
- name?: string | undefined;
239
- }[];
240
- }> | undefined;
241
- regionUrls?: {
242
- staging: string;
243
- production: string;
244
- } | undefined;
245
- regionsToGroup?: {
246
- countries: number[];
247
- priority: "high" | "medium" | "low";
248
- regionId: number;
249
- }[] | undefined;
250
- documentTypeOptionsByOrigin?: {
251
- local: {
252
- value: string;
253
- label: string;
254
- }[];
255
- foreign: {
256
- value: string;
257
- label: string;
258
- }[];
259
- } | undefined;
260
- webSitePath?: string | undefined;
261
- }>;
104
+ }, z.core.$strict>;
262
105
  type CountriesToRedirectMap = Record<string, RedirectGroup>;
263
106
  type RegionConfig = Omit<z.infer<typeof RegionConfigSchema>, 'countriesToRedirect'> & {
264
107
  countriesToRedirect?: CountriesToRedirectMap;