@djust-b2b/djust-front-sdk 1.21.2 → 1.21.3

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.
@@ -6,13 +6,13 @@ import { CreateObjectCustomerAccountRequest, CustomerAccountDto, LegalUserDto }
6
6
  import { CustomerOrganisationDto, CustomerOrganisationStatus } from "../../interfaces/models/customer-organisation";
7
7
  import { CivilityType, CreateCustomerUserRequest, PageCustomerUser, PageCustomerUserDto } from "../../interfaces/models/customer-user";
8
8
  export interface CreateCustomerAccountParameters {
9
- createAddressRequests: CreateAddressRequest[];
10
- createCustomerUserRequest: CreateCustomerUserRequest;
11
- createObjectCustomerAccountRequest: CreateObjectCustomerAccountRequest;
12
- customFieldValues: CustomFieldValueRequest[];
13
- customerTagList: string[];
14
- fromFO: boolean;
15
- legalUser: LegalUserDto;
9
+ createAddressRequests?: CreateAddressRequest[];
10
+ createCustomerUserRequest?: CreateCustomerUserRequest;
11
+ createObjectCustomerAccountRequest?: CreateObjectCustomerAccountRequest;
12
+ customFieldValues?: CustomFieldValueRequest[];
13
+ customerTagList?: string[];
14
+ fromFO?: boolean;
15
+ legalUser?: LegalUserDto;
16
16
  }
17
17
  export interface UpdateCustomerAccountParameters {
18
18
  organisationId: string;
@@ -411,10 +411,16 @@ async function updateCustomerAccountAddress({ addressId, additionalAddress, addr
411
411
  * @returns {Promise<GetCustomerAccountOrdersResponse>} - The response containing the customer account orders.
412
412
  */
413
413
  async function getCustomerAccountOrders(params) {
414
+ var _a, _b, _c;
414
415
  const { data } = await (0, fetch_instance_1.enhancedFetch)({
415
416
  method: "GET",
416
417
  path: `/v1/shop/customer-accounts/orders`,
417
- params,
418
+ params: {
419
+ page: (_a = params.pageable) === null || _a === void 0 ? void 0 : _a.page,
420
+ size: (_b = params.pageable) === null || _b === void 0 ? void 0 : _b.size,
421
+ sort: (_c = params.pageable) === null || _c === void 0 ? void 0 : _c.sort,
422
+ locale: params.locale,
423
+ },
418
424
  });
419
425
  return data;
420
426
  }
@@ -444,11 +450,16 @@ async function getCustomerAccountOrders(params) {
444
450
  * ```
445
451
  */
446
452
  async function getCustomerAccountUsers(params) {
453
+ var _a, _b, _c;
447
454
  (0, parameters_validation_1.required)({ pageable: params.pageable });
448
455
  const { data } = await (0, fetch_instance_1.enhancedFetch)({
449
456
  method: "GET",
450
457
  path: `/v1/shop/customer-accounts/users`,
451
- params,
458
+ params: {
459
+ page: (_a = params.pageable) === null || _a === void 0 ? void 0 : _a.page,
460
+ size: (_b = params.pageable) === null || _b === void 0 ? void 0 : _b.size,
461
+ sort: (_c = params.pageable) === null || _c === void 0 ? void 0 : _c.sort,
462
+ },
452
463
  });
453
464
  return data;
454
465
  }
@@ -719,6 +730,7 @@ async function updateCustomerAccountOrganisationAddress(params) {
719
730
  * ```
720
731
  */
721
732
  async function getCustomerAccountOrganisationOrders(params) {
733
+ var _a, _b, _c;
722
734
  (0, parameters_validation_1.required)({
723
735
  organisationId: params.organisationId,
724
736
  pageable: params.pageable,
@@ -727,7 +739,12 @@ async function getCustomerAccountOrganisationOrders(params) {
727
739
  const { data } = await (0, fetch_instance_1.enhancedFetch)({
728
740
  method: "GET",
729
741
  path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/orders`,
730
- params,
742
+ params: {
743
+ page: (_a = params.pageable) === null || _a === void 0 ? void 0 : _a.page,
744
+ size: (_b = params.pageable) === null || _b === void 0 ? void 0 : _b.size,
745
+ sort: (_c = params.pageable) === null || _c === void 0 ? void 0 : _c.sort,
746
+ locale: params.locale,
747
+ },
731
748
  });
732
749
  return data;
733
750
  }
@@ -759,6 +776,7 @@ async function getCustomerAccountOrganisationOrders(params) {
759
776
  * ```
760
777
  */
761
778
  async function getCustomerAccountOrganisationUsers(params) {
779
+ var _a, _b, _c;
762
780
  (0, parameters_validation_1.required)({
763
781
  organisationId: params.organisationId,
764
782
  pageable: params.pageable,
@@ -766,7 +784,11 @@ async function getCustomerAccountOrganisationUsers(params) {
766
784
  const { data } = await (0, fetch_instance_1.enhancedFetch)({
767
785
  method: "GET",
768
786
  path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/users`,
769
- params,
787
+ params: {
788
+ page: (_a = params.pageable) === null || _a === void 0 ? void 0 : _a.page,
789
+ size: (_b = params.pageable) === null || _b === void 0 ? void 0 : _b.size,
790
+ sort: (_c = params.pageable) === null || _c === void 0 ? void 0 : _c.sort,
791
+ },
770
792
  });
771
793
  return data;
772
794
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djust-b2b/djust-front-sdk",
3
- "version": "1.21.2",
3
+ "version": "1.21.3",
4
4
  "description": "DJUST Front SDK is a versatile JavaScript Software Development Kit (SDK) ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",