@djust-b2b/djust-front-sdk 1.7.7 → 1.8.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/index.d.ts CHANGED
@@ -104,6 +104,7 @@ export declare const DjustSDK: {
104
104
  getCustomerAccountUsers({ pageable, }: import("./interfaces").GetCustomerAccountUsersParameters): Promise<import("./interfaces").GetCustomerAccountUsersResponse>;
105
105
  createCustomerAccountOrganisation({ externalId, name, parentId, }: import("./interfaces").CreateCustomerAccountOrganisationParameters): Promise<import("./interfaces").CreateCustomerAccountOrganisationResponse>;
106
106
  updateCustomerAccountOrganisation({ organisationId, name, parentId, status, }: import("./interfaces").UpdateCustomerAccountOrganisationParameters): Promise<import("./interfaces").UpdateCustomerAccountOrganisationResponse>;
107
+ getCustomerAccountOrganisations(): Promise<import("./interfaces").GetCustomerAccountOrganisationResponse>;
107
108
  getCustomerAccountOrganisationAddresses({ organisationId, }: import("./interfaces").GetCustomerAccountOrganisationAddressesParameters): Promise<import("./interfaces").GetCustomerAccountOrganisationAddressesResponse>;
108
109
  deleteCustomerAccountOrganisationAddress({ organisationId, addressId, }: import("./interfaces").DeleteCustomerAccountOrganisationAddressParameters): Promise<void>;
109
110
  updateCustomerAccountOrganisationAddress({ organisationId, addressId, additionalAddress, address, billing, city, company, country, fullName, label, phone, shipping, state, zipcode, }: import("./interfaces").UpdateCustomerAccountOrganisationAddressParameters): Promise<import("./interfaces").UpdateCustomerAccountOrganisationAddressResponse>;
@@ -109,6 +109,8 @@ export interface CreateCustomerAccountOrganisationResponse extends CustomerOrgan
109
109
  }
110
110
  export interface UpdateCustomerAccountOrganisationResponse extends CustomerOrganisationDto {
111
111
  }
112
+ export interface GetCustomerAccountOrganisationResponse extends CustomerOrganisationDto {
113
+ }
112
114
  export interface GetCustomerAccountOrganisationAddressesResponse extends Array<AddressDto> {
113
115
  }
114
116
  export interface UpdateCustomerAccountOrganisationAddressResponse extends AddressDto {
@@ -1,4 +1,4 @@
1
- import { CreateCustomerAccountAddressParameters, CreateCustomerAccountAddressResponse, CreateCustomerAccountOrganisationParameters, CreateCustomerAccountOrganisationResponse, CreateCustomerAccountParameters, CreateCustomerAccountResponse, DeleteCustomerAccountAddressParameters, DeleteCustomerAccountOrganisationAddressParameters, GetCustomerAccountAddressesParameters, GetCustomerAccountAddressesResponse, GetCustomerAccountOrdersParameters, GetCustomerAccountOrdersResponse, GetCustomerAccountOrganisationAddressesParameters, GetCustomerAccountOrganisationAddressesResponse, GetCustomerAccountOrganisationOrdersParameters, GetCustomerAccountOrganisationOrdersResponse, GetCustomerAccountOrganisationUsersParameters, GetCustomerAccountOrganisationUsersResponse, GetCustomerAccountResponse, GetCustomerAccountUsersParameters, GetCustomerAccountUsersResponse, UpdateCustomerAccountAddressParameters, UpdateCustomerAccountAddressResponse, UpdateCustomerAccountOrganisationAddressParameters, UpdateCustomerAccountOrganisationAddressResponse, UpdateCustomerAccountOrganisationParameters, UpdateCustomerAccountOrganisationResponse, UpdateCustomerAccountOrganisationUserParameters, UpdateCustomerAccountOrganisationUserResponse, UpdateCustomerAccountParameters, UpdateCustomerAccountResponse } from "./definitions";
1
+ import { CreateCustomerAccountAddressParameters, CreateCustomerAccountAddressResponse, CreateCustomerAccountOrganisationParameters, CreateCustomerAccountOrganisationResponse, CreateCustomerAccountParameters, CreateCustomerAccountResponse, DeleteCustomerAccountAddressParameters, DeleteCustomerAccountOrganisationAddressParameters, GetCustomerAccountAddressesParameters, GetCustomerAccountAddressesResponse, GetCustomerAccountOrdersParameters, GetCustomerAccountOrdersResponse, GetCustomerAccountOrganisationAddressesParameters, GetCustomerAccountOrganisationAddressesResponse, GetCustomerAccountOrganisationOrdersParameters, GetCustomerAccountOrganisationOrdersResponse, GetCustomerAccountOrganisationResponse, GetCustomerAccountOrganisationUsersParameters, GetCustomerAccountOrganisationUsersResponse, GetCustomerAccountResponse, GetCustomerAccountUsersParameters, GetCustomerAccountUsersResponse, UpdateCustomerAccountAddressParameters, UpdateCustomerAccountAddressResponse, UpdateCustomerAccountOrganisationAddressParameters, UpdateCustomerAccountOrganisationAddressResponse, UpdateCustomerAccountOrganisationParameters, UpdateCustomerAccountOrganisationResponse, UpdateCustomerAccountOrganisationUserParameters, UpdateCustomerAccountOrganisationUserResponse, UpdateCustomerAccountParameters, UpdateCustomerAccountResponse } from "./definitions";
2
2
  /**
3
3
  * Retrieve a customer account
4
4
  */
@@ -43,6 +43,10 @@ export declare function createCustomerAccountOrganisation({ externalId, name, pa
43
43
  * Update a customer account's organisation
44
44
  */
45
45
  export declare function updateCustomerAccountOrganisation({ organisationId, name, parentId, status, }: UpdateCustomerAccountOrganisationParameters): Promise<UpdateCustomerAccountOrganisationResponse>;
46
+ /**
47
+ * Get organisations from customer account
48
+ */
49
+ export declare function getCustomerAccountOrganisations(): Promise<GetCustomerAccountOrganisationResponse>;
46
50
  /**
47
51
  * Get addresses from a customer account organisation
48
52
  */
@@ -11,6 +11,7 @@ exports.getCustomerAccountOrders = getCustomerAccountOrders;
11
11
  exports.getCustomerAccountUsers = getCustomerAccountUsers;
12
12
  exports.createCustomerAccountOrganisation = createCustomerAccountOrganisation;
13
13
  exports.updateCustomerAccountOrganisation = updateCustomerAccountOrganisation;
14
+ exports.getCustomerAccountOrganisations = getCustomerAccountOrganisations;
14
15
  exports.getCustomerAccountOrganisationAddresses = getCustomerAccountOrganisationAddresses;
15
16
  exports.deleteCustomerAccountOrganisationAddress = deleteCustomerAccountOrganisationAddress;
16
17
  exports.updateCustomerAccountOrganisationAddress = updateCustomerAccountOrganisationAddress;
@@ -220,6 +221,16 @@ async function updateCustomerAccountOrganisation({ organisationId, name, parentI
220
221
  });
221
222
  return data;
222
223
  }
224
+ /**
225
+ * Get organisations from customer account
226
+ */
227
+ async function getCustomerAccountOrganisations() {
228
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
229
+ method: "GET",
230
+ path: `/v1/shop/customer-accounts/organisations`,
231
+ });
232
+ return data;
233
+ }
223
234
  /**
224
235
  * Get addresses from a customer account organisation
225
236
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djust-b2b/djust-front-sdk",
3
- "version": "1.7.7",
3
+ "version": "1.8.0",
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",