@plentymarkets/shop-api 0.134.2 → 0.136.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.
Files changed (41) hide show
  1. package/lib/api/doRegisterUser/index.d.ts +19 -13
  2. package/lib/api/doRegisterUser/index.d.ts.map +1 -1
  3. package/lib/api/doSaveAddress/index.d.ts.map +1 -1
  4. package/lib/api/getInit/index.d.ts.map +1 -1
  5. package/lib/getters/productGetters.d.ts +4 -0
  6. package/lib/getters/productGetters.d.ts.map +1 -1
  7. package/lib/getters/productPriceGetters.d.ts.map +1 -1
  8. package/lib/helpers/address.helper.d.ts +1 -0
  9. package/lib/helpers/address.helper.d.ts.map +1 -1
  10. package/lib/index.cjs.js +74 -58
  11. package/lib/index.cjs.js.map +1 -1
  12. package/lib/index.es.js +74 -58
  13. package/lib/index.es.js.map +1 -1
  14. package/lib/types/api/index.d.ts +1 -0
  15. package/lib/types/api/index.d.ts.map +1 -1
  16. package/lib/types/api/init.d.ts +2 -0
  17. package/lib/types/api/init.d.ts.map +1 -1
  18. package/lib/types/api/register.d.ts +16 -2
  19. package/lib/types/api/register.d.ts.map +1 -1
  20. package/lib/types/api/settings.d.ts +6 -0
  21. package/lib/types/api/settings.d.ts.map +1 -0
  22. package/package.json +4 -4
  23. package/server/api/doRegisterUser/index.d.ts +19 -13
  24. package/server/api/doRegisterUser/index.d.ts.map +1 -1
  25. package/server/api/doSaveAddress/index.d.ts.map +1 -1
  26. package/server/api/getInit/index.d.ts.map +1 -1
  27. package/server/getters/productGetters.d.ts +4 -0
  28. package/server/getters/productGetters.d.ts.map +1 -1
  29. package/server/getters/productPriceGetters.d.ts.map +1 -1
  30. package/server/helpers/address.helper.d.ts +1 -0
  31. package/server/helpers/address.helper.d.ts.map +1 -1
  32. package/server/index.js +62 -52
  33. package/server/index.js.map +1 -1
  34. package/server/types/api/index.d.ts +1 -0
  35. package/server/types/api/index.d.ts.map +1 -1
  36. package/server/types/api/init.d.ts +2 -0
  37. package/server/types/api/init.d.ts.map +1 -1
  38. package/server/types/api/register.d.ts +16 -2
  39. package/server/types/api/register.d.ts.map +1 -1
  40. package/server/types/api/settings.d.ts +6 -0
  41. package/server/types/api/settings.d.ts.map +1 -0
@@ -4,22 +4,28 @@ import { PlentysystemsIntegrationContext } from '../../types/context';
4
4
  * Method doRegisterUser - Creates a new user account.
5
5
  *
6
6
  * @remarks
7
- * * Calls /rest/io/customer/
8
- * * This method is used to register a new user account.
7
+ * Calls /rest/storefront/customer/
8
+ * This method is used to register a new user account.
9
9
  *
10
- * @param { RegisterParams } params
11
- * email: string - User email address.
12
- * password: string - User password.
13
- *
14
- * @returns
10
+ * @param params - Registration parameters including contact email, password, and optional address details.
11
+ * @returns A promise resolving to the user change response data.
15
12
  *
16
13
  * @example
17
- * ``` ts
18
- * const { data } = await useSdk().plentysystems.doRegisterUser({
19
- * email: email,
20
- * password: 'Testuser1234'
21
- * });
22
- * ```
14
+ * const response = await doRegisterUser(context, {
15
+ * 'cf-turnstile-response': '03Ag24...',
16
+ * contact: {
17
+ * password: 'Testuser1234',
18
+ * typeId: 1,
19
+ * referrerId: 123,
20
+ * options: {
21
+ * typeId: {
22
+ * value: 'user@test.com',
23
+ * subTypeId: 2,
24
+ * priority: 1,
25
+ * typeId: 1
26
+ * }
27
+ * }
28
+ * },
23
29
  */
24
30
  export declare const doRegisterUser: (context: PlentysystemsIntegrationContext, params: RegisterParams) => Promise<Data<UserChangeResponse>>;
25
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doRegisterUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,+BAA+B,EACxC,QAAQ,cAAc,KACrB,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAoBlC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doRegisterUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,+BAA+B,EACxC,QAAQ,cAAc,KACrB,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAoBlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doSaveAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,IAAI,EACJ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,+BAA+B,EACxC,QAAQ,mBAAmB,KAC1B,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAyBzB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doSaveAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,IAAI,EACJ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAMtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,+BAA+B,EACxC,QAAQ,mBAAmB,KAC1B,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAyBzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getInit/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,GAClB,SAAS,+BAA+B,KACvC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CA2B1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getInit/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,GAClB,SAAS,+BAA+B,KACvC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CA8B1B,CAAC"}
@@ -9,6 +9,7 @@ declare function getImageWidth(product: Product): number;
9
9
  declare function getImageHeight(product: Product): number;
10
10
  declare function getCategoryUrlPath(product: Product, categories: CategoryTreeItem[]): string;
11
11
  declare function getCoverImage(product: Product): string;
12
+ declare function getSecondCoverImage(product: Product): string;
12
13
  declare function getCoverImagePreview(product: Product): string;
13
14
  declare function getFullImage(product: Product): string;
14
15
  declare function getMiddleImage(product: Product): string;
@@ -41,6 +42,7 @@ declare function getPropertyGroups(product: Product): VariationPropertyGroup[];
41
42
  declare function getPropertyGroupById(id: number, product: Product): VariationPropertyGroup;
42
43
  declare function getPropertyById(id: number, product: Product): VariationProperty;
43
44
  declare function getVariationId(product: Product): number;
45
+ declare function getVariationNumber(product: Product): string;
44
46
  declare function getSalableVariationCount(product: Product): number;
45
47
  declare function getVariationAvailableUntil(product: Product): unknown;
46
48
  declare function getWidthMM(product: Product): number;
@@ -73,6 +75,7 @@ export declare const productGetters: {
73
75
  getImageWidth: typeof getImageWidth;
74
76
  getImageHeight: typeof getImageHeight;
75
77
  getCoverImage: typeof getCoverImage;
78
+ getSecondCoverImage: typeof getSecondCoverImage;
76
79
  getCoverImagePreview: typeof getCoverImagePreview;
77
80
  getAttributes: typeof getAttributes;
78
81
  getTitle: typeof getTitle;
@@ -99,6 +102,7 @@ export declare const productGetters: {
99
102
  getLengthMM: typeof getLengthMM;
100
103
  getVariationAvailableUntil: typeof getVariationAvailableUntil;
101
104
  getVariationId: typeof getVariationId;
105
+ getVariationNumber: typeof getVariationNumber;
102
106
  getSalableVariationCount: typeof getSalableVariationCount;
103
107
  getCrossedPrice: (product: Product) => number | null;
104
108
  getSpecialOffer: (product: Product) => number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"productGetters.d.ts","sourceRoot":"","sources":["../../src/getters/productGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAKb,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EAEP,4BAA4B,EAC5B,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,YAAY,EACZ,OAAO,EACR,MAAM,UAAU,CAAC;AAWlB,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AACD,iBAAS,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE5C;AAED,iBAAS,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzD;AAED,iBAAS,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,EAAE,CAOvD;AAED,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,iBAAS,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEhD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,MAAM;CAsBzD,CAAC"}
1
+ {"version":3,"file":"productPriceGetters.d.ts","sourceRoot":"","sources":["../../src/getters/productPriceGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6GjE,eAAO,MAAM,mBAAmB;wBA3GL,OAAO,KAAG,MAAM,GAAG,IAAI;+BAIhB,OAAO,KAAG,MAAM,GAAG,IAAI;+BAIvB,OAAO,KAAG,MAAM,GAAG,IAAI;8BAIxB,OAAO,KAAG,MAAM,GAAG,IAAI;kCAInB,OAAO,KAAG,OAAO,EAAE;2CAS7C,OAAO,YACN,MAAM,KACf,OAAO,GAAG,IAAI;gCAakB,OAAO,KAAG,kBAAkB,EAAE;yCAiBrB,OAAO,KAAG,MAAM;kDAQP,OAAO,KAAG,MAAM;wCAgB1B,OAAO,KAAG,MAAM;iCAJvB,OAAO,KAAG,MAAM;wCAJT,OAAO,KAAG,MAAM;gCAYxB,OAAO,KAAG,OAAO;yCAMR,OAAO,KAAG,MAAM;mCAItB,OAAO,KAAG,MAAM;uCAIZ,OAAO,KAAG,MAAM;uCAIhB,OAAO,KAAG,MAAM;CAsBzD,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { type Address, type AddressData } from '../types/api';
2
+ export declare const mapAddressForServer: (address: Address) => object;
2
3
  export declare const mapAddressForClient: (addressData: AddressData) => Address;
3
4
  //# sourceMappingURL=address.helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"address.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/address.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,OAuC9D,CAAC"}
1
+ {"version":3,"file":"address.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/address.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAWtB,eAAO,MAAM,mBAAmB,GAAI,SAAS,OAAO,KAAG,MAuBtD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,OAuC9D,CAAC"}
package/lib/index.cjs.js CHANGED
@@ -208,6 +208,36 @@ class ApiError {
208
208
  }
209
209
  }
210
210
 
211
+ const convertToNumberOrNull = (value) => {
212
+ if (value === null || value === undefined || value === '')
213
+ return null;
214
+ const parsedNumber = Number(value);
215
+ return isNaN(parsedNumber) ? null : parsedNumber;
216
+ };
217
+ const mapAddressForServer = (address) => {
218
+ return {
219
+ ...(address.id && { id: address.id }),
220
+ gender: '',
221
+ countryId: Number(address?.country ?? 0),
222
+ email: address.email,
223
+ name1: address.companyName,
224
+ name2: address.firstName,
225
+ name3: address.lastName,
226
+ vatNumber: address.vatNumber,
227
+ contactPerson: '',
228
+ address1: address.streetName,
229
+ address2: address.apartment,
230
+ address3: address.additionalAddressInformation,
231
+ postalCode: address.zipCode,
232
+ postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
233
+ town: address.city,
234
+ telephone: address.phoneNumber,
235
+ stateId: convertToNumberOrNull(address.state),
236
+ birthday: address.birthday,
237
+ ...(address.primary && { isPrimary: true }),
238
+ ...(address.id && { pivot: { isPrimary: true } }),
239
+ };
240
+ };
211
241
  const mapAddressForClient = (addressData) => {
212
242
  const address = {
213
243
  id: addressData.id,
@@ -344,30 +374,6 @@ const doSaveAddress = async (context, params) => {
344
374
  mappedResponse.sort((a, b) => b.primary > a.primary ? 1 : -1);
345
375
  return { data: mappedResponse };
346
376
  };
347
- function mapAddressForServer(address) {
348
- return {
349
- ...(address.id && { id: address.id }),
350
- gender: '',
351
- countryId: Number(address?.country ?? 0),
352
- email: address.email,
353
- name1: address.companyName,
354
- name2: address.firstName,
355
- name3: address.lastName,
356
- vatNumber: address.vatNumber,
357
- contactPerson: '',
358
- address1: address.streetName,
359
- address2: address.apartment,
360
- address3: address.additionalAddressInformation,
361
- postalCode: address.zipCode,
362
- postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
363
- town: address.city,
364
- telephone: address.phoneNumber,
365
- stateId: address.state,
366
- birthday: address.birthday,
367
- ...(address.primary && { isPrimary: true }),
368
- ...(address.id && { pivot: { isPrimary: true } }),
369
- };
370
- }
371
377
 
372
378
  /**
373
379
  * Method setCheckoutAddress - sets a billing or shipping address as default.
@@ -1352,41 +1358,42 @@ const doLoginAsGuest = async (context, params) => {
1352
1358
  * Method doRegisterUser - Creates a new user account.
1353
1359
  *
1354
1360
  * @remarks
1355
- * * Calls /rest/io/customer/
1356
- * * This method is used to register a new user account.
1361
+ * Calls /rest/storefront/customer/
1362
+ * This method is used to register a new user account.
1357
1363
  *
1358
- * @param { RegisterParams } params
1359
- * email: string - User email address.
1360
- * password: string - User password.
1361
- *
1362
- * @returns
1364
+ * @param params - Registration parameters including contact email, password, and optional address details.
1365
+ * @returns A promise resolving to the user change response data.
1363
1366
  *
1364
1367
  * @example
1365
- * ``` ts
1366
- * const { data } = await useSdk().plentysystems.doRegisterUser({
1367
- * email: email,
1368
- * password: 'Testuser1234'
1369
- * });
1370
- * ```
1368
+ * const response = await doRegisterUser(context, {
1369
+ * 'cf-turnstile-response': '03Ag24...',
1370
+ * contact: {
1371
+ * password: 'Testuser1234',
1372
+ * typeId: 1,
1373
+ * referrerId: 123,
1374
+ * options: {
1375
+ * typeId: {
1376
+ * value: 'user@test.com',
1377
+ * subTypeId: 2,
1378
+ * priority: 1,
1379
+ * typeId: 1
1380
+ * }
1381
+ * }
1382
+ * },
1371
1383
  */
1372
1384
  const doRegisterUser = async (context, params) => {
1373
1385
  const url = new URL('/rest/storefront/customer/', context.config.api.url);
1374
- const { data } = await context.client.post(url.href, {
1386
+ const payload = {
1387
+ contact: params.contact,
1388
+ ...(params.billingAddress && {
1389
+ billingAddress: mapAddressForServer(params.billingAddress),
1390
+ }),
1391
+ ...(params.deliveryAddress && {
1392
+ deliveryAddress: mapAddressForServer(params.deliveryAddress),
1393
+ }),
1375
1394
  'cf-turnstile-response': params['cf-turnstile-response'],
1376
- contact: {
1377
- password: params.password,
1378
- typeId: 1,
1379
- referrerId: 1,
1380
- options: {
1381
- typeId: {
1382
- value: params.email,
1383
- subTypeId: 4,
1384
- priority: 0,
1385
- typeId: 2,
1386
- },
1387
- },
1388
- },
1389
- });
1395
+ };
1396
+ const { data } = await context.client.post(url.href, payload);
1390
1397
  return { data: data };
1391
1398
  };
1392
1399
 
@@ -1916,10 +1923,12 @@ const deleteCoupon = async (context, params) => {
1916
1923
  const getInit = async (context) => {
1917
1924
  const url = new URL('/rest/storefront/init', context.config.api.url);
1918
1925
  url.searchParams.set('level', '5');
1926
+ url.searchParams.set('format', 'flat');
1919
1927
  const { data: response } = await context.client.get(url.href);
1920
1928
  const session = response.data.session;
1921
1929
  const categories = response.data.categories;
1922
1930
  const robots = response.data.robots;
1931
+ const settings = response.data.settings;
1923
1932
  const cartItems = session.cartItems;
1924
1933
  const cart = { ...session.cart, items: getMappedCartItems(cartItems) };
1925
1934
  return {
@@ -1933,6 +1942,7 @@ const getInit = async (context) => {
1933
1942
  },
1934
1943
  categories,
1935
1944
  robots,
1945
+ settings,
1936
1946
  },
1937
1947
  };
1938
1948
  };
@@ -3932,13 +3942,11 @@ const getGraduatedList = (product) => {
3932
3942
  const graduatedPrices = getGraduatedPrices(product);
3933
3943
  return graduatedPrices
3934
3944
  .filter((price) => price.minimumOrderQuantity > 1)
3935
- .map((price, index, array) => {
3945
+ .map((price) => {
3936
3946
  const preparedPrice = ((price.price.value ?? 0) / startPrice) * 100;
3937
3947
  return {
3938
3948
  price: price.price.value || 0,
3939
- quantity: `${price.minimumOrderQuantity}${index === array.length - 1
3940
- ? '+'
3941
- : '-' + (array[index + 1].minimumOrderQuantity - 1)}`,
3949
+ quantity: String(price.minimumOrderQuantity),
3942
3950
  discount: (100 - preparedPrice).toFixed(1),
3943
3951
  };
3944
3952
  });
@@ -4031,10 +4039,13 @@ function getCategoryUrlPath(product, categories) {
4031
4039
  return categoryTreeGetters.generateCategoryLink(categories, category, '');
4032
4040
  }
4033
4041
  function getCoverImage(product) {
4034
- return productImageFilter(product)[0].normal ?? '';
4042
+ return productImageFilter(product)?.[0]?.normal ?? '';
4043
+ }
4044
+ function getSecondCoverImage(product) {
4045
+ return productImageFilter(product)?.[1]?.normal ?? '';
4035
4046
  }
4036
4047
  function getCoverImagePreview(product) {
4037
- return productImageFilter(product)[0].small ?? '';
4048
+ return productImageFilter(product)?.[0]?.small ?? '';
4038
4049
  }
4039
4050
  function getFullImage(product) {
4040
4051
  return product.images?.variation?.[0]?.url || product.images.all[0].url || '';
@@ -4192,6 +4203,9 @@ function getPropertyById(id, product) {
4192
4203
  function getVariationId$1(product) {
4193
4204
  return product?.variation?.id || 0;
4194
4205
  }
4206
+ function getVariationNumber(product) {
4207
+ return product?.variation?.number || '';
4208
+ }
4195
4209
  function getSalableVariationCount(product) {
4196
4210
  return product?.item?.salableVariationCount || 0;
4197
4211
  }
@@ -4255,6 +4269,7 @@ const productGetters = {
4255
4269
  getImageWidth: getImageWidth$1,
4256
4270
  getImageHeight: getImageHeight$1,
4257
4271
  getCoverImage,
4272
+ getSecondCoverImage,
4258
4273
  getCoverImagePreview,
4259
4274
  // getFiltered,
4260
4275
  getAttributes: getAttributes$1,
@@ -4282,6 +4297,7 @@ const productGetters = {
4282
4297
  getLengthMM,
4283
4298
  getVariationAvailableUntil,
4284
4299
  getVariationId: getVariationId$1,
4300
+ getVariationNumber,
4285
4301
  getSalableVariationCount,
4286
4302
  getCrossedPrice: productPriceGetters.getCrossedPrice,
4287
4303
  getSpecialOffer: productPriceGetters.getSpecialOffer,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.es.js CHANGED
@@ -184,6 +184,36 @@ class ApiError {
184
184
  }
185
185
  }
186
186
 
187
+ const convertToNumberOrNull = (value) => {
188
+ if (value === null || value === undefined || value === '')
189
+ return null;
190
+ const parsedNumber = Number(value);
191
+ return isNaN(parsedNumber) ? null : parsedNumber;
192
+ };
193
+ const mapAddressForServer = (address) => {
194
+ return {
195
+ ...(address.id && { id: address.id }),
196
+ gender: '',
197
+ countryId: Number(address?.country ?? 0),
198
+ email: address.email,
199
+ name1: address.companyName,
200
+ name2: address.firstName,
201
+ name3: address.lastName,
202
+ vatNumber: address.vatNumber,
203
+ contactPerson: '',
204
+ address1: address.streetName,
205
+ address2: address.apartment,
206
+ address3: address.additionalAddressInformation,
207
+ postalCode: address.zipCode,
208
+ postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
209
+ town: address.city,
210
+ telephone: address.phoneNumber,
211
+ stateId: convertToNumberOrNull(address.state),
212
+ birthday: address.birthday,
213
+ ...(address.primary && { isPrimary: true }),
214
+ ...(address.id && { pivot: { isPrimary: true } }),
215
+ };
216
+ };
187
217
  const mapAddressForClient = (addressData) => {
188
218
  const address = {
189
219
  id: addressData.id,
@@ -320,30 +350,6 @@ const doSaveAddress = async (context, params) => {
320
350
  mappedResponse.sort((a, b) => b.primary > a.primary ? 1 : -1);
321
351
  return { data: mappedResponse };
322
352
  };
323
- function mapAddressForServer(address) {
324
- return {
325
- ...(address.id && { id: address.id }),
326
- gender: '',
327
- countryId: Number(address?.country ?? 0),
328
- email: address.email,
329
- name1: address.companyName,
330
- name2: address.firstName,
331
- name3: address.lastName,
332
- vatNumber: address.vatNumber,
333
- contactPerson: '',
334
- address1: address.streetName,
335
- address2: address.apartment,
336
- address3: address.additionalAddressInformation,
337
- postalCode: address.zipCode,
338
- postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
339
- town: address.city,
340
- telephone: address.phoneNumber,
341
- stateId: address.state,
342
- birthday: address.birthday,
343
- ...(address.primary && { isPrimary: true }),
344
- ...(address.id && { pivot: { isPrimary: true } }),
345
- };
346
- }
347
353
 
348
354
  /**
349
355
  * Method setCheckoutAddress - sets a billing or shipping address as default.
@@ -1328,41 +1334,42 @@ const doLoginAsGuest = async (context, params) => {
1328
1334
  * Method doRegisterUser - Creates a new user account.
1329
1335
  *
1330
1336
  * @remarks
1331
- * * Calls /rest/io/customer/
1332
- * * This method is used to register a new user account.
1337
+ * Calls /rest/storefront/customer/
1338
+ * This method is used to register a new user account.
1333
1339
  *
1334
- * @param { RegisterParams } params
1335
- * email: string - User email address.
1336
- * password: string - User password.
1337
- *
1338
- * @returns
1340
+ * @param params - Registration parameters including contact email, password, and optional address details.
1341
+ * @returns A promise resolving to the user change response data.
1339
1342
  *
1340
1343
  * @example
1341
- * ``` ts
1342
- * const { data } = await useSdk().plentysystems.doRegisterUser({
1343
- * email: email,
1344
- * password: 'Testuser1234'
1345
- * });
1346
- * ```
1344
+ * const response = await doRegisterUser(context, {
1345
+ * 'cf-turnstile-response': '03Ag24...',
1346
+ * contact: {
1347
+ * password: 'Testuser1234',
1348
+ * typeId: 1,
1349
+ * referrerId: 123,
1350
+ * options: {
1351
+ * typeId: {
1352
+ * value: 'user@test.com',
1353
+ * subTypeId: 2,
1354
+ * priority: 1,
1355
+ * typeId: 1
1356
+ * }
1357
+ * }
1358
+ * },
1347
1359
  */
1348
1360
  const doRegisterUser = async (context, params) => {
1349
1361
  const url = new URL('/rest/storefront/customer/', context.config.api.url);
1350
- const { data } = await context.client.post(url.href, {
1362
+ const payload = {
1363
+ contact: params.contact,
1364
+ ...(params.billingAddress && {
1365
+ billingAddress: mapAddressForServer(params.billingAddress),
1366
+ }),
1367
+ ...(params.deliveryAddress && {
1368
+ deliveryAddress: mapAddressForServer(params.deliveryAddress),
1369
+ }),
1351
1370
  'cf-turnstile-response': params['cf-turnstile-response'],
1352
- contact: {
1353
- password: params.password,
1354
- typeId: 1,
1355
- referrerId: 1,
1356
- options: {
1357
- typeId: {
1358
- value: params.email,
1359
- subTypeId: 4,
1360
- priority: 0,
1361
- typeId: 2,
1362
- },
1363
- },
1364
- },
1365
- });
1371
+ };
1372
+ const { data } = await context.client.post(url.href, payload);
1366
1373
  return { data: data };
1367
1374
  };
1368
1375
 
@@ -1892,10 +1899,12 @@ const deleteCoupon = async (context, params) => {
1892
1899
  const getInit = async (context) => {
1893
1900
  const url = new URL('/rest/storefront/init', context.config.api.url);
1894
1901
  url.searchParams.set('level', '5');
1902
+ url.searchParams.set('format', 'flat');
1895
1903
  const { data: response } = await context.client.get(url.href);
1896
1904
  const session = response.data.session;
1897
1905
  const categories = response.data.categories;
1898
1906
  const robots = response.data.robots;
1907
+ const settings = response.data.settings;
1899
1908
  const cartItems = session.cartItems;
1900
1909
  const cart = { ...session.cart, items: getMappedCartItems(cartItems) };
1901
1910
  return {
@@ -1909,6 +1918,7 @@ const getInit = async (context) => {
1909
1918
  },
1910
1919
  categories,
1911
1920
  robots,
1921
+ settings,
1912
1922
  },
1913
1923
  };
1914
1924
  };
@@ -3908,13 +3918,11 @@ const getGraduatedList = (product) => {
3908
3918
  const graduatedPrices = getGraduatedPrices(product);
3909
3919
  return graduatedPrices
3910
3920
  .filter((price) => price.minimumOrderQuantity > 1)
3911
- .map((price, index, array) => {
3921
+ .map((price) => {
3912
3922
  const preparedPrice = ((price.price.value ?? 0) / startPrice) * 100;
3913
3923
  return {
3914
3924
  price: price.price.value || 0,
3915
- quantity: `${price.minimumOrderQuantity}${index === array.length - 1
3916
- ? '+'
3917
- : '-' + (array[index + 1].minimumOrderQuantity - 1)}`,
3925
+ quantity: String(price.minimumOrderQuantity),
3918
3926
  discount: (100 - preparedPrice).toFixed(1),
3919
3927
  };
3920
3928
  });
@@ -4007,10 +4015,13 @@ function getCategoryUrlPath(product, categories) {
4007
4015
  return categoryTreeGetters.generateCategoryLink(categories, category, '');
4008
4016
  }
4009
4017
  function getCoverImage(product) {
4010
- return productImageFilter(product)[0].normal ?? '';
4018
+ return productImageFilter(product)?.[0]?.normal ?? '';
4019
+ }
4020
+ function getSecondCoverImage(product) {
4021
+ return productImageFilter(product)?.[1]?.normal ?? '';
4011
4022
  }
4012
4023
  function getCoverImagePreview(product) {
4013
- return productImageFilter(product)[0].small ?? '';
4024
+ return productImageFilter(product)?.[0]?.small ?? '';
4014
4025
  }
4015
4026
  function getFullImage(product) {
4016
4027
  return product.images?.variation?.[0]?.url || product.images.all[0].url || '';
@@ -4168,6 +4179,9 @@ function getPropertyById(id, product) {
4168
4179
  function getVariationId$1(product) {
4169
4180
  return product?.variation?.id || 0;
4170
4181
  }
4182
+ function getVariationNumber(product) {
4183
+ return product?.variation?.number || '';
4184
+ }
4171
4185
  function getSalableVariationCount(product) {
4172
4186
  return product?.item?.salableVariationCount || 0;
4173
4187
  }
@@ -4231,6 +4245,7 @@ const productGetters = {
4231
4245
  getImageWidth: getImageWidth$1,
4232
4246
  getImageHeight: getImageHeight$1,
4233
4247
  getCoverImage,
4248
+ getSecondCoverImage,
4234
4249
  getCoverImagePreview,
4235
4250
  // getFiltered,
4236
4251
  getAttributes: getAttributes$1,
@@ -4258,6 +4273,7 @@ const productGetters = {
4258
4273
  getLengthMM,
4259
4274
  getVariationAvailableUntil,
4260
4275
  getVariationId: getVariationId$1,
4276
+ getVariationNumber,
4261
4277
  getSalableVariationCount,
4262
4278
  getCrossedPrice: productPriceGetters.getCrossedPrice,
4263
4279
  getSpecialOffer: productPriceGetters.getSpecialOffer,
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -43,4 +43,5 @@ export * from './endpoints';
43
43
  export * from './translations';
44
44
  export * from './storage';
45
45
  export * from './customerClass';
46
+ export * from './settings';
46
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CA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C;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { SessionResult } from './session';
2
2
  import { CategoryTreeItem } from './categoryTree';
3
3
  import { RobotsStaticPages } from './robot';
4
+ import { Setting } from './settings';
4
5
  export type InitResult = {
5
6
  session: SessionResult;
6
7
  categories: CategoryTreeItem[];
7
8
  robots: RobotsStaticPages;
9
+ settings: Setting[];
8
10
  };
9
11
  //# sourceMappingURL=init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/types/api/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/types/api/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
@@ -1,7 +1,21 @@
1
1
  import { RecaptchaPayload } from './recaptcha';
2
+ import { Address } from './address';
2
3
  export interface RegisterParams extends RecaptchaPayload {
3
- email: string;
4
- password: string;
4
+ contact: {
5
+ password: string;
6
+ typeId: number;
7
+ referrerId: number;
8
+ options: {
9
+ typeId: {
10
+ value: string;
11
+ subTypeId: number;
12
+ priority: number;
13
+ typeId: number;
14
+ };
15
+ };
16
+ };
17
+ deliveryAddress?: Address;
18
+ billingAddress?: Address;
5
19
  }
6
20
  export interface RequestPasswordResetParams {
7
21
  email: string;
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/types/api/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/types/api/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,KAAK,EAAE,MAAM,CAAC;gBACd,SAAS,EAAE,MAAM,CAAC;gBAClB,QAAQ,EAAE,MAAM,CAAC;gBACjB,MAAM,EAAE,MAAM,CAAC;aAChB,CAAC;SACH,CAAC;KACH,CAAC;IACF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,6 @@
1
+ export type Setting = {
2
+ key: string;
3
+ originalKey: string;
4
+ value: string | string[] | null;
5
+ };
6
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/types/api/settings.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;CACjC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plentymarkets/shop-api",
3
- "version": "0.134.2",
3
+ "version": "0.136.0",
4
4
  "sideEffects": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@vue-storefront/middleware": "5.4.1",
32
- "axios": "1.12.0",
32
+ "axios": "1.12.2",
33
33
  "consola": "3.4.2",
34
34
  "validator": "13.15.15"
35
35
  },
@@ -39,7 +39,7 @@
39
39
  "@types/validator": "^13.15.2",
40
40
  "@vue-storefront/sdk": "1.5.0",
41
41
  "jsdom": "17.0.0",
42
- "typedoc": "0.28.12",
42
+ "typedoc": "0.28.13",
43
43
  "typedoc-plugin-markdown": "4.8.1",
44
44
  "typedoc-vitepress-theme": "1.1.2"
45
45
  },
@@ -47,5 +47,5 @@
47
47
  "lib/**/*",
48
48
  "server/**/*"
49
49
  ],
50
- "gitHead": "fa214c492bd9e1b1aae84249149c5df77184da49"
50
+ "gitHead": "440380fd37413976e1b40279b6d698c4f994751d"
51
51
  }
@@ -4,22 +4,28 @@ import { PlentysystemsIntegrationContext } from '../../types/context';
4
4
  * Method doRegisterUser - Creates a new user account.
5
5
  *
6
6
  * @remarks
7
- * * Calls /rest/io/customer/
8
- * * This method is used to register a new user account.
7
+ * Calls /rest/storefront/customer/
8
+ * This method is used to register a new user account.
9
9
  *
10
- * @param { RegisterParams } params
11
- * email: string - User email address.
12
- * password: string - User password.
13
- *
14
- * @returns
10
+ * @param params - Registration parameters including contact email, password, and optional address details.
11
+ * @returns A promise resolving to the user change response data.
15
12
  *
16
13
  * @example
17
- * ``` ts
18
- * const { data } = await useSdk().plentysystems.doRegisterUser({
19
- * email: email,
20
- * password: 'Testuser1234'
21
- * });
22
- * ```
14
+ * const response = await doRegisterUser(context, {
15
+ * 'cf-turnstile-response': '03Ag24...',
16
+ * contact: {
17
+ * password: 'Testuser1234',
18
+ * typeId: 1,
19
+ * referrerId: 123,
20
+ * options: {
21
+ * typeId: {
22
+ * value: 'user@test.com',
23
+ * subTypeId: 2,
24
+ * priority: 1,
25
+ * typeId: 1
26
+ * }
27
+ * }
28
+ * },
23
29
  */
24
30
  export declare const doRegisterUser: (context: PlentysystemsIntegrationContext, params: RegisterParams) => Promise<Data<UserChangeResponse>>;
25
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doRegisterUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,+BAA+B,EACxC,QAAQ,cAAc,KACrB,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAoBlC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doRegisterUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,+BAA+B,EACxC,QAAQ,cAAc,KACrB,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAoBlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doSaveAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,IAAI,EACJ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,+BAA+B,EACxC,QAAQ,mBAAmB,KAC1B,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAyBzB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doSaveAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,IAAI,EACJ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAMtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,+BAA+B,EACxC,QAAQ,mBAAmB,KAC1B,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAyBzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getInit/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,GAClB,SAAS,+BAA+B,KACvC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CA2B1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getInit/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,GAClB,SAAS,+BAA+B,KACvC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CA8B1B,CAAC"}
@@ -9,6 +9,7 @@ declare function getImageWidth(product: Product): number;
9
9
  declare function getImageHeight(product: Product): number;
10
10
  declare function getCategoryUrlPath(product: Product, categories: CategoryTreeItem[]): string;
11
11
  declare function getCoverImage(product: Product): string;
12
+ declare function getSecondCoverImage(product: Product): string;
12
13
  declare function getCoverImagePreview(product: Product): string;
13
14
  declare function getFullImage(product: Product): string;
14
15
  declare function getMiddleImage(product: Product): string;
@@ -41,6 +42,7 @@ declare function getPropertyGroups(product: Product): VariationPropertyGroup[];
41
42
  declare function getPropertyGroupById(id: number, product: Product): VariationPropertyGroup;
42
43
  declare function getPropertyById(id: number, product: Product): VariationProperty;
43
44
  declare function getVariationId(product: Product): number;
45
+ declare function getVariationNumber(product: Product): string;
44
46
  declare function getSalableVariationCount(product: Product): number;
45
47
  declare function getVariationAvailableUntil(product: Product): unknown;
46
48
  declare function getWidthMM(product: Product): number;
@@ -73,6 +75,7 @@ export declare const productGetters: {
73
75
  getImageWidth: typeof getImageWidth;
74
76
  getImageHeight: typeof getImageHeight;
75
77
  getCoverImage: typeof getCoverImage;
78
+ getSecondCoverImage: typeof getSecondCoverImage;
76
79
  getCoverImagePreview: typeof getCoverImagePreview;
77
80
  getAttributes: typeof getAttributes;
78
81
  getTitle: typeof getTitle;
@@ -99,6 +102,7 @@ export declare const productGetters: {
99
102
  getLengthMM: typeof getLengthMM;
100
103
  getVariationAvailableUntil: typeof getVariationAvailableUntil;
101
104
  getVariationId: typeof getVariationId;
105
+ getVariationNumber: typeof getVariationNumber;
102
106
  getSalableVariationCount: typeof getSalableVariationCount;
103
107
  getCrossedPrice: (product: Product) => number | null;
104
108
  getSpecialOffer: (product: Product) => number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"productGetters.d.ts","sourceRoot":"","sources":["../../src/getters/productGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAKb,qBAAq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AM;gCAYxB,OAAO,KAAG,OAAO;yCAMR,OAAO,KAAG,MAAM;mCAItB,OAAO,KAAG,MAAM;uCAIZ,OAAO,KAAG,MAAM;uCAIhB,OAAO,KAAG,MAAM;CAsBzD,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { type Address, type AddressData } from '../types/api';
2
+ export declare const mapAddressForServer: (address: Address) => object;
2
3
  export declare const mapAddressForClient: (addressData: AddressData) => Address;
3
4
  //# sourceMappingURL=address.helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"address.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/address.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,OAuC9D,CAAC"}
1
+ {"version":3,"file":"address.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/address.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAWtB,eAAO,MAAM,mBAAmB,GAAI,SAAS,OAAO,KAAG,MAuBtD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,OAuC9D,CAAC"}
package/server/index.js CHANGED
@@ -185,6 +185,36 @@ class ApiError {
185
185
  }
186
186
  }
187
187
 
188
+ const convertToNumberOrNull = (value) => {
189
+ if (value === null || value === undefined || value === '')
190
+ return null;
191
+ const parsedNumber = Number(value);
192
+ return isNaN(parsedNumber) ? null : parsedNumber;
193
+ };
194
+ const mapAddressForServer = (address) => {
195
+ return {
196
+ ...(address.id && { id: address.id }),
197
+ gender: '',
198
+ countryId: Number(address?.country ?? 0),
199
+ email: address.email,
200
+ name1: address.companyName,
201
+ name2: address.firstName,
202
+ name3: address.lastName,
203
+ vatNumber: address.vatNumber,
204
+ contactPerson: '',
205
+ address1: address.streetName,
206
+ address2: address.apartment,
207
+ address3: address.additionalAddressInformation,
208
+ postalCode: address.zipCode,
209
+ postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
210
+ town: address.city,
211
+ telephone: address.phoneNumber,
212
+ stateId: convertToNumberOrNull(address.state),
213
+ birthday: address.birthday,
214
+ ...(address.primary && { isPrimary: true }),
215
+ ...(address.id && { pivot: { isPrimary: true } }),
216
+ };
217
+ };
188
218
  const mapAddressForClient = (addressData) => {
189
219
  const address = {
190
220
  id: addressData.id,
@@ -332,30 +362,6 @@ const doSaveAddress = async (context, params) => {
332
362
  mappedResponse.sort((a, b) => b.primary > a.primary ? 1 : -1);
333
363
  return { data: mappedResponse };
334
364
  };
335
- function mapAddressForServer(address) {
336
- return {
337
- ...(address.id && { id: address.id }),
338
- gender: '',
339
- countryId: Number(address?.country ?? 0),
340
- email: address.email,
341
- name1: address.companyName,
342
- name2: address.firstName,
343
- name3: address.lastName,
344
- vatNumber: address.vatNumber,
345
- contactPerson: '',
346
- address1: address.streetName,
347
- address2: address.apartment,
348
- address3: address.additionalAddressInformation,
349
- postalCode: address.zipCode,
350
- postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
351
- town: address.city,
352
- telephone: address.phoneNumber,
353
- stateId: address.state,
354
- birthday: address.birthday,
355
- ...(address.primary && { isPrimary: true }),
356
- ...(address.id && { pivot: { isPrimary: true } }),
357
- };
358
- }
359
365
 
360
366
  /**
361
367
  * Method setCheckoutAddress - sets a billing or shipping address as default.
@@ -1340,41 +1346,42 @@ const doLoginAsGuest = async (context, params) => {
1340
1346
  * Method doRegisterUser - Creates a new user account.
1341
1347
  *
1342
1348
  * @remarks
1343
- * * Calls /rest/io/customer/
1344
- * * This method is used to register a new user account.
1349
+ * Calls /rest/storefront/customer/
1350
+ * This method is used to register a new user account.
1345
1351
  *
1346
- * @param { RegisterParams } params
1347
- * email: string - User email address.
1348
- * password: string - User password.
1349
- *
1350
- * @returns
1352
+ * @param params - Registration parameters including contact email, password, and optional address details.
1353
+ * @returns A promise resolving to the user change response data.
1351
1354
  *
1352
1355
  * @example
1353
- * ``` ts
1354
- * const { data } = await useSdk().plentysystems.doRegisterUser({
1355
- * email: email,
1356
- * password: 'Testuser1234'
1357
- * });
1358
- * ```
1356
+ * const response = await doRegisterUser(context, {
1357
+ * 'cf-turnstile-response': '03Ag24...',
1358
+ * contact: {
1359
+ * password: 'Testuser1234',
1360
+ * typeId: 1,
1361
+ * referrerId: 123,
1362
+ * options: {
1363
+ * typeId: {
1364
+ * value: 'user@test.com',
1365
+ * subTypeId: 2,
1366
+ * priority: 1,
1367
+ * typeId: 1
1368
+ * }
1369
+ * }
1370
+ * },
1359
1371
  */
1360
1372
  const doRegisterUser = async (context, params) => {
1361
1373
  const url = new URL('/rest/storefront/customer/', context.config.api.url);
1362
- const { data } = await context.client.post(url.href, {
1374
+ const payload = {
1375
+ contact: params.contact,
1376
+ ...(params.billingAddress && {
1377
+ billingAddress: mapAddressForServer(params.billingAddress),
1378
+ }),
1379
+ ...(params.deliveryAddress && {
1380
+ deliveryAddress: mapAddressForServer(params.deliveryAddress),
1381
+ }),
1363
1382
  'cf-turnstile-response': params['cf-turnstile-response'],
1364
- contact: {
1365
- password: params.password,
1366
- typeId: 1,
1367
- referrerId: 1,
1368
- options: {
1369
- typeId: {
1370
- value: params.email,
1371
- subTypeId: 4,
1372
- priority: 0,
1373
- typeId: 2,
1374
- },
1375
- },
1376
- },
1377
- });
1383
+ };
1384
+ const { data } = await context.client.post(url.href, payload);
1378
1385
  return { data: data };
1379
1386
  };
1380
1387
 
@@ -1904,10 +1911,12 @@ const deleteCoupon = async (context, params) => {
1904
1911
  const getInit = async (context) => {
1905
1912
  const url = new URL('/rest/storefront/init', context.config.api.url);
1906
1913
  url.searchParams.set('level', '5');
1914
+ url.searchParams.set('format', 'flat');
1907
1915
  const { data: response } = await context.client.get(url.href);
1908
1916
  const session = response.data.session;
1909
1917
  const categories = response.data.categories;
1910
1918
  const robots = response.data.robots;
1919
+ const settings = response.data.settings;
1911
1920
  const cartItems = session.cartItems;
1912
1921
  const cart = { ...session.cart, items: getMappedCartItems(cartItems) };
1913
1922
  return {
@@ -1921,6 +1930,7 @@ const getInit = async (context) => {
1921
1930
  },
1922
1931
  categories,
1923
1932
  robots,
1933
+ settings,
1924
1934
  },
1925
1935
  };
1926
1936
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -43,4 +43,5 @@ export * from './endpoints';
43
43
  export * from './translations';
44
44
  export * from './storage';
45
45
  export * from './customerClass';
46
+ export * from './settings';
46
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW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CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { SessionResult } from './session';
2
2
  import { CategoryTreeItem } from './categoryTree';
3
3
  import { RobotsStaticPages } from './robot';
4
+ import { Setting } from './settings';
4
5
  export type InitResult = {
5
6
  session: SessionResult;
6
7
  categories: CategoryTreeItem[];
7
8
  robots: RobotsStaticPages;
9
+ settings: Setting[];
8
10
  };
9
11
  //# sourceMappingURL=init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/types/api/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/types/api/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
@@ -1,7 +1,21 @@
1
1
  import { RecaptchaPayload } from './recaptcha';
2
+ import { Address } from './address';
2
3
  export interface RegisterParams extends RecaptchaPayload {
3
- email: string;
4
- password: string;
4
+ contact: {
5
+ password: string;
6
+ typeId: number;
7
+ referrerId: number;
8
+ options: {
9
+ typeId: {
10
+ value: string;
11
+ subTypeId: number;
12
+ priority: number;
13
+ typeId: number;
14
+ };
15
+ };
16
+ };
17
+ deliveryAddress?: Address;
18
+ billingAddress?: Address;
5
19
  }
6
20
  export interface RequestPasswordResetParams {
7
21
  email: string;
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/types/api/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/types/api/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,KAAK,EAAE,MAAM,CAAC;gBACd,SAAS,EAAE,MAAM,CAAC;gBAClB,QAAQ,EAAE,MAAM,CAAC;gBACjB,MAAM,EAAE,MAAM,CAAC;aAChB,CAAC;SACH,CAAC;KACH,CAAC;IACF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,6 @@
1
+ export type Setting = {
2
+ key: string;
3
+ originalKey: string;
4
+ value: string | string[] | null;
5
+ };
6
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/types/api/settings.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;CACjC,CAAC"}