@plentymarkets/shop-api 0.110.0 → 0.112.0
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/lib/__tests__/__fixtures__/ActiveShippingCountry.d.ts.map +1 -1
- package/lib/__tests__/__fixtures__/GeoRegulatedCountry.d.ts.map +1 -1
- package/lib/api/getBlocks/index.d.ts.map +1 -1
- package/lib/getters/userAddressGetters.d.ts +2 -0
- package/lib/getters/userAddressGetters.d.ts.map +1 -1
- package/lib/index.cjs.js +21 -5
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.es.js +21 -5
- package/lib/index.es.js.map +1 -1
- package/lib/types/api/country.d.ts +2 -0
- package/lib/types/api/country.d.ts.map +1 -1
- package/lib/types/api/error.d.ts +12 -0
- package/lib/types/api/error.d.ts.map +1 -1
- package/package.json +2 -2
- package/server/__tests__/__fixtures__/ActiveShippingCountry.d.ts.map +1 -1
- package/server/__tests__/__fixtures__/GeoRegulatedCountry.d.ts.map +1 -1
- package/server/api/getBlocks/index.d.ts.map +1 -1
- package/server/getters/userAddressGetters.d.ts +2 -0
- package/server/getters/userAddressGetters.d.ts.map +1 -1
- package/server/index.js +17 -5
- package/server/index.js.map +1 -1
- package/server/types/api/country.d.ts +2 -0
- package/server/types/api/country.d.ts.map +1 -1
- package/server/types/api/error.d.ts +12 -0
- package/server/types/api/error.d.ts.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ActiveShippingCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/ActiveShippingCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,QAAA,MAAM,qBAAqB,EAAE,qBAAqB,
|
1
|
+
{"version":3,"file":"ActiveShippingCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/ActiveShippingCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,QAAA,MAAM,qBAAqB,EAAE,qBAAqB,EAglCjD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"GeoRegulatedCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/GeoRegulatedCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,QAAA,MAAM,mBAAmB,EAAE,mBAAmB,
|
1
|
+
{"version":3,"file":"GeoRegulatedCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/GeoRegulatedCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,QAAA,MAAM,mBAAmB,EAAE,mBAAmB,EA6tC7C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,IAAI,EAEJ,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,SAAS,YACX,+BAA+B,UAChC,eAAe,KACtB,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAuBvB,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { Address, UserShippingAddressSearchCriteria, Country } from '../types';
|
2
2
|
declare function getAddresses(addresses: Address[], criteria?: UserShippingAddressSearchCriteria): Address[];
|
3
|
+
declare function getBirthday(address: Address): string;
|
3
4
|
declare function getDefault(addresses: Address[]): Address | null;
|
4
5
|
declare function getTotal(addresses: Address[]): number;
|
5
6
|
declare function getPostCode(address: Address): string;
|
@@ -22,6 +23,7 @@ declare function getCountryId(address: Address): string;
|
|
22
23
|
declare function getStateId(address: Address): string;
|
23
24
|
export declare const userAddressGetters: {
|
24
25
|
getAddresses: typeof getAddresses;
|
26
|
+
getBirthday: typeof getBirthday;
|
25
27
|
getDefault: typeof getDefault;
|
26
28
|
getTotal: typeof getTotal;
|
27
29
|
getPostCode: typeof getPostCode;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userAddressGetters.d.ts","sourceRoot":"","sources":["../../src/getters/userAddressGetters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,iCAAiC,EACjC,OAAO,EACR,MAAM,UAAU,CAAC;AAGlB,iBAAS,YAAY,CACnB,SAAS,EAAE,OAAO,EAAE,EAEpB,QAAQ,CAAC,EAAE,iCAAiC,GAC3C,OAAO,EAAE,CAEX;AAED,iBAAS,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,GAAG,IAAI,CAExD;AAED,iBAAS,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,CAE9C;AAED,iBAAS,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE7C;AAED,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,iBAAS,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAE1D;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9C;AAED,iBAAS,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CA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,OAAO,EAAE,KAAG,MAAM;CAsCpE,CAAC"}
|
package/lib/index.cjs.js
CHANGED
@@ -2626,11 +2626,23 @@ const doCaptureMolliePayment = async (context, params) => {
|
|
2626
2626
|
* ```
|
2627
2627
|
*/
|
2628
2628
|
const getBlocks = async (context, params) => {
|
2629
|
-
|
2630
|
-
|
2631
|
-
|
2632
|
-
|
2633
|
-
|
2629
|
+
try {
|
2630
|
+
const identifier = params.identifier;
|
2631
|
+
const url = new URL(`/rest/storefront/blocks/${identifier}`, context.config.api.url);
|
2632
|
+
url.searchParams.set('type', params.type);
|
2633
|
+
const { data } = await context.client.get(url.href);
|
2634
|
+
return { data: data.data.blocks };
|
2635
|
+
}
|
2636
|
+
catch (error) {
|
2637
|
+
const statusCode = error?.response?.status.toString() || '500';
|
2638
|
+
const message = error?.response?.data?.error?.message || error.message;
|
2639
|
+
throw new ApiError({
|
2640
|
+
key: 'unknownError',
|
2641
|
+
code: statusCode,
|
2642
|
+
message: message,
|
2643
|
+
cause: '',
|
2644
|
+
});
|
2645
|
+
}
|
2634
2646
|
};
|
2635
2647
|
|
2636
2648
|
/**
|
@@ -5364,6 +5376,9 @@ function getAddresses(addresses,
|
|
5364
5376
|
criteria) {
|
5365
5377
|
return addresses || [];
|
5366
5378
|
}
|
5379
|
+
function getBirthday(address) {
|
5380
|
+
return address.birthday ?? '';
|
5381
|
+
}
|
5367
5382
|
function getDefault(addresses) {
|
5368
5383
|
return addresses.find((address) => address.primary) ?? null;
|
5369
5384
|
}
|
@@ -5442,6 +5457,7 @@ const getStateName = (address, countries) => {
|
|
5442
5457
|
};
|
5443
5458
|
const userAddressGetters = {
|
5444
5459
|
getAddresses,
|
5460
|
+
getBirthday,
|
5445
5461
|
getDefault,
|
5446
5462
|
getTotal,
|
5447
5463
|
getPostCode,
|
package/lib/index.cjs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.es.js
CHANGED
@@ -2618,11 +2618,23 @@ const doCaptureMolliePayment = async (context, params) => {
|
|
2618
2618
|
* ```
|
2619
2619
|
*/
|
2620
2620
|
const getBlocks = async (context, params) => {
|
2621
|
-
|
2622
|
-
|
2623
|
-
|
2624
|
-
|
2625
|
-
|
2621
|
+
try {
|
2622
|
+
const identifier = params.identifier;
|
2623
|
+
const url = new URL(`/rest/storefront/blocks/${identifier}`, context.config.api.url);
|
2624
|
+
url.searchParams.set('type', params.type);
|
2625
|
+
const { data } = await context.client.get(url.href);
|
2626
|
+
return { data: data.data.blocks };
|
2627
|
+
}
|
2628
|
+
catch (error) {
|
2629
|
+
const statusCode = error?.response?.status.toString() || '500';
|
2630
|
+
const message = error?.response?.data?.error?.message || error.message;
|
2631
|
+
throw new ApiError({
|
2632
|
+
key: 'unknownError',
|
2633
|
+
code: statusCode,
|
2634
|
+
message: message,
|
2635
|
+
cause: '',
|
2636
|
+
});
|
2637
|
+
}
|
2626
2638
|
};
|
2627
2639
|
|
2628
2640
|
/**
|
@@ -5356,6 +5368,9 @@ function getAddresses(addresses,
|
|
5356
5368
|
criteria) {
|
5357
5369
|
return addresses || [];
|
5358
5370
|
}
|
5371
|
+
function getBirthday(address) {
|
5372
|
+
return address.birthday ?? '';
|
5373
|
+
}
|
5359
5374
|
function getDefault(addresses) {
|
5360
5375
|
return addresses.find((address) => address.primary) ?? null;
|
5361
5376
|
}
|
@@ -5434,6 +5449,7 @@ const getStateName = (address, countries) => {
|
|
5434
5449
|
};
|
5435
5450
|
const userAddressGetters = {
|
5436
5451
|
getAddresses,
|
5452
|
+
getBirthday,
|
5437
5453
|
getDefault,
|
5438
5454
|
getTotal,
|
5439
5455
|
getPostCode,
|
package/lib/index.es.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sour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egulatedCountry = {
|
25
25
|
id: number;
|
26
26
|
currLangName: string;
|
27
|
+
zipCodeRegex?: string | null;
|
27
28
|
isoCode2: string;
|
28
29
|
states: ShippingCountryState[];
|
29
30
|
vatCodes: string[];
|
@@ -31,6 +32,7 @@ export type GeoRegulatedCountry = {
|
|
31
32
|
export type ActiveShippingCountry = {
|
32
33
|
active: number;
|
33
34
|
currLangName: string;
|
35
|
+
zipCodeRegex?: string | null;
|
34
36
|
isGeoRegulated: boolean;
|
35
37
|
id: number;
|
36
38
|
isCountryStateMandatory: boolean | null;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../../src/types/api/country.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,oBAAoB,EA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);
|
19
19
|
}
|
20
|
+
export type ErrorSDK = Error & {
|
21
|
+
response?: {
|
22
|
+
status?: number;
|
23
|
+
data?: {
|
24
|
+
error?: {
|
25
|
+
message?: string;
|
26
|
+
};
|
27
|
+
message?: string;
|
28
|
+
code?: number;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
};
|
20
32
|
//# sourceMappingURL=error.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/types/api/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QACP,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACxC,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,CAAC;CACL;AAED,qBAAa,QAAQ;IACZ,GAAG,SAAM;IACT,IAAI,SAAM;IACV,OAAO,SAAM;IACb,KAAK,EAAE,OAAO,CAAQ;IACtB,MAAM,MAAa;gBAEd,WAAW,EAAE,cAAc;CAOxC"}
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/types/api/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QACP,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACxC,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,CAAC;CACL;AAED,qBAAa,QAAQ;IACZ,GAAG,SAAM;IACT,IAAI,SAAM;IACV,OAAO,SAAM;IACb,KAAK,EAAE,OAAO,CAAQ;IACtB,MAAM,MAAa;gBAEd,WAAW,EAAE,cAAc;CAOxC;AAED,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG;IAC7B,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YACL,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;aAClB,CAAC;YACF,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@plentymarkets/shop-api",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.112.0",
|
4
4
|
"sideEffects": false,
|
5
5
|
"private": false,
|
6
6
|
"publishConfig": {
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"lib/**/*",
|
47
47
|
"server/**/*"
|
48
48
|
],
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "4faa6ca1b6a03343b77affcc9f07c7b355429846"
|
50
50
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ActiveShippingCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/ActiveShippingCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,QAAA,MAAM,qBAAqB,EAAE,qBAAqB,
|
1
|
+
{"version":3,"file":"ActiveShippingCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/ActiveShippingCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,QAAA,MAAM,qBAAqB,EAAE,qBAAqB,EAglCjD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"GeoRegulatedCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/GeoRegulatedCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,QAAA,MAAM,mBAAmB,EAAE,mBAAmB,
|
1
|
+
{"version":3,"file":"GeoRegulatedCountry.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/GeoRegulatedCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,QAAA,MAAM,mBAAmB,EAAE,mBAAmB,EA6tC7C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,IAAI,EAEJ,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,SAAS,YACX,+BAA+B,UAChC,eAAe,KACtB,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAuBvB,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { Address, UserShippingAddressSearchCriteria, Country } from '../types';
|
2
2
|
declare function getAddresses(addresses: Address[], criteria?: UserShippingAddressSearchCriteria): Address[];
|
3
|
+
declare function getBirthday(address: Address): string;
|
3
4
|
declare function getDefault(addresses: Address[]): Address | null;
|
4
5
|
declare function getTotal(addresses: Address[]): number;
|
5
6
|
declare function getPostCode(address: Address): string;
|
@@ -22,6 +23,7 @@ declare function getCountryId(address: Address): string;
|
|
22
23
|
declare function getStateId(address: Address): string;
|
23
24
|
export declare const userAddressGetters: {
|
24
25
|
getAddresses: typeof getAddresses;
|
26
|
+
getBirthday: typeof getBirthday;
|
25
27
|
getDefault: typeof getDefault;
|
26
28
|
getTotal: typeof getTotal;
|
27
29
|
getPostCode: typeof getPostCode;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userAddressGetters.d.ts","sourceRoot":"","sources":["../../src/getters/userAddressGetters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,iCAAiC,EACjC,OAAO,EACR,MAAM,UAAU,CAAC;AAGlB,iBAAS,YAAY,CACnB,SAAS,EAAE,OAAO,EAAE,EAEpB,QAAQ,CAAC,EAAE,iCAAiC,GAC3C,OAAO,EAAE,CAEX;AAED,iBAAS,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,GAAG,IAAI,CAExD;AAED,iBAAS,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,CAE9C;AAED,iBAAS,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE7C;AAED,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,iBAAS,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAE1D;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9C;AAED,iBAAS,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE7C;AAED,iBAAS,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE1C;AAED,iBAAS,QAAQ,CAA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MolliePayment = async (context, params) => {
|
|
2630
2630
|
* ```
|
2631
2631
|
*/
|
2632
2632
|
const getBlocks = async (context, params) => {
|
2633
|
-
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2637
|
-
|
2633
|
+
try {
|
2634
|
+
const identifier = params.identifier;
|
2635
|
+
const url = new URL(`/rest/storefront/blocks/${identifier}`, context.config.api.url);
|
2636
|
+
url.searchParams.set('type', params.type);
|
2637
|
+
const { data } = await context.client.get(url.href);
|
2638
|
+
return { data: data.data.blocks };
|
2639
|
+
}
|
2640
|
+
catch (error) {
|
2641
|
+
const statusCode = error?.response?.status.toString() || '500';
|
2642
|
+
const message = error?.response?.data?.error?.message || error.message;
|
2643
|
+
throw new ApiError({
|
2644
|
+
key: 'unknownError',
|
2645
|
+
code: statusCode,
|
2646
|
+
message: message,
|
2647
|
+
cause: '',
|
2648
|
+
});
|
2649
|
+
}
|
2638
2650
|
};
|
2639
2651
|
|
2640
2652
|
/**
|
package/server/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -24,6 +24,7 @@ export type ShippingCountryName = {
|
|
24
24
|
export type GeoRegulatedCountry = {
|
25
25
|
id: number;
|
26
26
|
currLangName: string;
|
27
|
+
zipCodeRegex?: string | null;
|
27
28
|
isoCode2: string;
|
28
29
|
states: ShippingCountryState[];
|
29
30
|
vatCodes: string[];
|
@@ -31,6 +32,7 @@ export type GeoRegulatedCountry = {
|
|
31
32
|
export type ActiveShippingCountry = {
|
32
33
|
active: number;
|
33
34
|
currLangName: string;
|
35
|
+
zipCodeRegex?: string | null;
|
34
36
|
isGeoRegulated: boolean;
|
35
37
|
id: number;
|
36
38
|
isCountryStateMandatory: boolean | null;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../../src/types/api/country.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB,EAAE,OAAO,GAA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ACX,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB,EAAE,OAAO,GAAG,IAAI,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,YAAY,EAAE,mBAAmB,EAAE,CAAC;CACrC,CAAC"}
|
@@ -17,4 +17,16 @@ export declare class ApiError {
|
|
17
17
|
events: any;
|
18
18
|
constructor(errorParams: ApiErrorParams);
|
19
19
|
}
|
20
|
+
export type ErrorSDK = Error & {
|
21
|
+
response?: {
|
22
|
+
status?: number;
|
23
|
+
data?: {
|
24
|
+
error?: {
|
25
|
+
message?: string;
|
26
|
+
};
|
27
|
+
message?: string;
|
28
|
+
code?: number;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
};
|
20
32
|
//# sourceMappingURL=error.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/types/api/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QACP,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACxC,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,CAAC;CACL;AAED,qBAAa,QAAQ;IACZ,GAAG,SAAM;IACT,IAAI,SAAM;IACV,OAAO,SAAM;IACb,KAAK,EAAE,OAAO,CAAQ;IACtB,MAAM,MAAa;gBAEd,WAAW,EAAE,cAAc;CAOxC"}
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/types/api/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QACP,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACxC,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,CAAC;CACL;AAED,qBAAa,QAAQ;IACZ,GAAG,SAAM;IACT,IAAI,SAAM;IACV,OAAO,SAAM;IACb,KAAK,EAAE,OAAO,CAAQ;IACtB,MAAM,MAAa;gBAEd,WAAW,EAAE,cAAc;CAOxC;AAED,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG;IAC7B,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YACL,KA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