@djust-b2b/djust-front-sdk 2.1.0 → 2.1.1

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 (45) hide show
  1. package/lib/index.d.ts +21 -15
  2. package/lib/interfaces/models/attribute.d.ts +12 -2
  3. package/lib/interfaces/models/custom-field.d.ts +4 -0
  4. package/lib/interfaces/models/customer-account.d.ts +1 -0
  5. package/lib/interfaces/models/offer.d.ts +9 -0
  6. package/lib/interfaces/models/payment.d.ts +1 -0
  7. package/lib/services/attributes/definitions.d.ts +27 -0
  8. package/lib/services/attributes/definitions.js +2 -0
  9. package/lib/services/attributes/index.d.ts +32 -0
  10. package/lib/services/attributes/index.js +49 -0
  11. package/lib/services/auth/definitions.d.ts +39 -0
  12. package/lib/services/auth/definitions.requests.d.ts +4 -0
  13. package/lib/services/auth/index.d.ts +58 -3
  14. package/lib/services/auth/index.js +72 -2
  15. package/lib/services/cart/index.js +1 -0
  16. package/lib/services/custom-field/definitions.d.ts +6 -0
  17. package/lib/services/custom-field/index.d.ts +38 -1
  18. package/lib/services/custom-field/index.js +48 -2
  19. package/lib/services/customer-account/definitions.d.ts +15 -2
  20. package/lib/services/customer-account/index.d.ts +47 -5
  21. package/lib/services/customer-account/index.js +68 -5
  22. package/lib/services/customer-user/definitions.d.ts +2 -0
  23. package/lib/services/customer-user/index.d.ts +1 -1
  24. package/lib/services/customer-user/index.js +4 -1
  25. package/lib/services/incident/definitions.d.ts +14 -0
  26. package/lib/services/incident/index.d.ts +40 -1
  27. package/lib/services/incident/index.js +56 -0
  28. package/lib/services/logistic-order/definitions.d.ts +15 -4
  29. package/lib/services/logistic-order/index.d.ts +19 -10
  30. package/lib/services/logistic-order/index.js +40 -17
  31. package/lib/services/navigation-category/definitions.d.ts +7 -0
  32. package/lib/services/navigation-category/index.d.ts +33 -1
  33. package/lib/services/navigation-category/index.js +40 -0
  34. package/lib/services/offer-inventories/index.js +3 -3
  35. package/lib/services/offer-prices/definitions.d.ts +23 -0
  36. package/lib/services/offer-prices/definitions.js +2 -0
  37. package/lib/services/offer-prices/index.d.ts +35 -0
  38. package/lib/services/offer-prices/index.js +52 -0
  39. package/lib/services/product/definitions.d.ts +5 -0
  40. package/lib/services/product/index.d.ts +6 -29
  41. package/lib/services/product/index.js +8 -42
  42. package/lib/services/product-variant/definitions.d.ts +27 -0
  43. package/lib/services/product-variant/index.d.ts +30 -1
  44. package/lib/services/product-variant/index.js +40 -0
  45. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export declare const DjustSDK: {
9
9
  createOrderLogisticIncident({ logisticOrderId, idType, customField, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentResponse>;
10
10
  createOrderLogisticLineIncident({ logisticOrderId, idType, customFieldIdType, orderLines, reasonCode, }: import("./services/incident/definitions").createOrderLogisticLineIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticLineIncidentResponse>;
11
11
  createOrderLogisticIncidentThread({ logisticOrderId, incidentId, idType, customField, message, name, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentThreadParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentThreadResponse>;
12
+ createIncident({ customField, externalId, logisticOrderId, reasonCodes, idType, }: import("./services/incident/definitions").createIncidentParameters): Promise<import("./services/incident/definitions").createIncidentResponse>;
12
13
  getCommercialOrders({ locale, nbPreviewLines, page, size, sort, connectedUserOnly, customerAccountIds, isValidated, }: import("./interfaces").GetCommercialOrdersParameters): Promise<import("./interfaces").GetCommercialOrdersResponse>;
13
14
  createCommercialOrder({ nbPreviewLines, channel, customFields, locale, origin, originId, paymentInfo, }: import("./interfaces").CreateCommercialOrderParameters): Promise<import("./interfaces").CreateCommercialOrderResponse>;
14
15
  createCommercialOrderV2({ customFieldIdType, customFields, }: import("./interfaces").CreateCommercialOrderV2Parameters): Promise<import("./interfaces").CreateCommercialOrderV2Response>;
@@ -28,10 +29,10 @@ export declare const DjustSDK: {
28
29
  updateCommercialOrderLines({ commercialOrderId, customFieldIdType, lineIdType, lineType, updateOrderCommercialLines, updateOrderLineIdType, updateOrderLineType, }: import("./interfaces").UpdateCommercialOrderLinesParameters): Promise<import("./interfaces").UpdateCommercialOrderLinesResponse>;
29
30
  deleteCommercialOrderLines({ commercialOrderId, body, }: import("./interfaces").DeleteCommercialOrderLinesParameters): Promise<import("./interfaces").DeleteCommercialOrderLinesResponse>;
30
31
  punchoutOciCommercialOrder({ tenantConfigurationKey, commercialOrderId, locale, }: import("./interfaces").PunchoutOciCommercialOrderParameters): Promise<any>;
31
- getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, connectedUserOnly, nbPreviewLines, page, size, sort, }: import("./interfaces").GetLogisticOrdersParameters): Promise<import("./interfaces").GetLogisticOrdersResponse>;
32
+ getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, connectedUserOnly, nbPreviewLines, page, size, sort, suppliersIds, creationDateFrom, creationDateTo, updateDateFrom, updateDateTo, }: import("./interfaces").GetLogisticOrdersParameters): Promise<import("./interfaces").GetLogisticOrdersResponse>;
32
33
  logisticOrdersPaginatedList({ page, size, sort, nbPreviewLines, accountCustomFieldValueCriteria, approvalIds, connectedUserOnly, creationDateFrom, creationDateTo, customerAccountIds, incident, locale, logisticStatus, offerCustomFieldValueCriteria, orderLogisticCustomFieldValueCriteria, paymentOptions, supplierIds, updateDateFrom, updateDateTo, }: import("./interfaces").GetPaginatedLogisticOrdersParameters): Promise<import("./interfaces").GetPaginatedLogisticOrdersResponse>;
33
- getLogisticOrderCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderCustomFieldsResponse>;
34
- getLogisticOrderLineCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderLineCustomFieldsResponse>;
34
+ getLogisticOrderCustomFields({ customFieldIds, page, size, sort, idType, }: import("./interfaces").GetLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderCustomFieldsResponse>;
35
+ getLogisticOrderLineCustomFields({ customFieldIds, page, size, sort, idType, }: import("./interfaces").GetLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderLineCustomFieldsResponse>;
35
36
  getLogisticOrder({ orderId, locale, nbPreviewLines, }: import("./interfaces").GetLogisticOrderParameters): Promise<import("./interfaces").GetLogisticOrderResponse>;
36
37
  updateLogisticOrderCustomFields({ orderId, locale, nbPreviewLines, customFields, }: import("./interfaces").UpdateLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").UpdateLogisticOrderCustomFieldsResponse>;
37
38
  getLogisticOrderAccountingDocuments({ orderId, }: import("./interfaces").GetLogisticOrderAccountingDocumentsParameters): Promise<import("./interfaces").GetLogisticOrderAccountingDocumentsResponse>;
@@ -55,13 +56,13 @@ export declare const DjustSDK: {
55
56
  updateLogisticOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingTypeParameters): Promise<void>;
56
57
  createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParameters): Promise<import("./interfaces").CreateLogisticOrderThreadResponse>;
57
58
  createLogisticOrderThreadV2({ logisticOrderId, idType, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParametersV2): Promise<import("./interfaces").CreateLogisticOrderThreadResponseV2>;
58
- getLogisticOrderThreads({ logisticOrderId, pageable, }: import("./interfaces").GetLogisticOrderThreadsParams): Promise<import("./interfaces").GetLogisticOrderThreadsResponse>;
59
- getLogisticOrderThread({ logisticOrderId, threadId, }: import("./interfaces").GetLogisticOrderThreadParams): Promise<import("./interfaces").GetLogisticOrderThreadResponse>;
60
- createOrderLogisticThreadMessages({ logisticOrderId, threadId, body, customField, }: import("./interfaces").CreateLogisticOrderThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderThreadMessagesResponse>;
59
+ getLogisticOrderThreads({ logisticOrderId, pageable, idType, }: import("./interfaces").GetLogisticOrderThreadsParams): Promise<import("./interfaces").GetLogisticOrderThreadsResponse>;
60
+ getLogisticOrderThread({ logisticOrderId, threadId, idType, }: import("./interfaces").GetLogisticOrderThreadParams): Promise<import("./interfaces").GetLogisticOrderThreadResponse>;
61
+ createOrderLogisticThreadMessages({ logisticOrderId, threadId, body, customField, idType, }: import("./interfaces").CreateLogisticOrderThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderThreadMessagesResponse>;
61
62
  updateOrderLogisticThreadMessage({ logisticOrderId, threadId, messageId, customFieldValues, idType, }: import("./interfaces").UpdateLogisticOrderThreadMessageParams): Promise<void>;
62
- createLogisticOrderIncidentThreads({ logisticOrderId, incidentId, customField, message, name, reasonCode, }: import("./interfaces").CreateLogisticOrderIncidentThreadsParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadsResponse>;
63
- getLogisticOrderIncidentThread({ logisticOrderId, incidentId, threadId, }: import("./interfaces").GetLogisticOrderIncidentThreadParams): Promise<import("./interfaces").GetLogisticOrderIncidentThreadResponse>;
64
- createLogisticOrderIncidentThreadMessages({ logisticOrderId, incidentId, threadId, body, customField, }: import("./interfaces").CreateLogisticOrderIncidentThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadMessagesResponse>;
63
+ createLogisticOrderIncidentThreads({ logisticOrderId, incidentId, customField, message, name, reasonCode, idType, }: import("./interfaces").CreateLogisticOrderIncidentThreadsParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadsResponse>;
64
+ getLogisticOrderIncidentThread({ logisticOrderId, incidentId, threadId, idType, }: import("./interfaces").GetLogisticOrderIncidentThreadParams): Promise<import("./interfaces").GetLogisticOrderIncidentThreadResponse>;
65
+ createLogisticOrderIncidentThreadMessages({ logisticOrderId, incidentId, threadId, body, customField, idType, }: import("./interfaces").CreateLogisticOrderIncidentThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadMessagesResponse>;
65
66
  updateLogisticOrderIncidentThreadMessage({ logisticOrderId, incidentId, threadId, messageId, customFieldValues, idType, }: import("./interfaces").UpdateLogisticOrderIncidentThreadMessageParams): Promise<void>;
66
67
  getLogisticOrderReview({ orderId, }: import("./interfaces").GetLogisticOrderReviewParameters): Promise<import("./interfaces").GetLogisticOrderReviewResponse>;
67
68
  addLogisticOrderReview({ orderId, comment, grade, }: import("./interfaces").AddLogisticOrderReviewParameters): Promise<import("./interfaces").AddLogisticOrderReviewResponse>;
@@ -84,11 +85,10 @@ export declare const DjustSDK: {
84
85
  initializeOrderFromSupplierQuote({ supplierQuoteId, nbPreviewLines, quoteLineIdsAndQuantities, }: import("./interfaces").InitializeOrderFromSupplierQuoteParameters): Promise<import("./interfaces").InitializeOrderFromSupplierQuoteResponse>;
85
86
  autoCompleteSearchProducts({ input, locale, currency, pageable, aggregation, productTags, }: import("./interfaces").AutoCompleteSearchProductsParameters): Promise<import("./interfaces").SearchProductsResponse>;
86
87
  getProductsList({ locale, filters, pageable, }: import("./interfaces").GetProductsListParameters): Promise<import("./interfaces").GetProductsListResponse>;
87
- getProductVariantsList({ productSku, locale, pageable, }: import("./interfaces").GetProductVariantsListParameters): Promise<import("./interfaces").GetProductVariantsListResponse>;
88
- getProductVariantOffers({ productIdentifier, productIdType, currency, }: import("./interfaces").GetProductVariantOffersParameters): Promise<import("./interfaces").GetProductVariantOffersResponse>;
88
+ getProductVariantOffers({ productIdentifier, productIdType, currency, withoutPrice, }: import("./interfaces").GetProductVariantOffersParameters): Promise<import("./interfaces").GetProductVariantOffersResponse>;
89
89
  getProductVariantSuppliers({ productVariantId, }: import("./interfaces").GetProductVariantSuppliersParameters): Promise<import("./interfaces").GetProductVariantSuppliersResponse>;
90
90
  getProduct({ productIdentifier, productIdType, locale, }: import("./interfaces").GetProductParameters): Promise<import("./interfaces").GetProductsListResponse>;
91
- getProductOffers({ productIdentifier, productIdType, locale, currency, }: import("./interfaces").GetProductOffersParameters): Promise<import("./interfaces").GetProductOffersResponse>;
91
+ getProductOffers({ productIdentifier, productIdType, locale, currency, withoutPrice, }: import("./interfaces").GetProductOffersParameters): Promise<import("./interfaces").GetProductOffersResponse>;
92
92
  getRelatedProducts({ productIdentifier, productIdType, locale, currency, pageable, }: import("./interfaces").GetRelatedProductsParameters): Promise<import("./interfaces").GetRelatedProductsResponse>;
93
93
  getProductReviews({ productIdentifier, productIdType, }: import("./interfaces").GetProductReviewsParameters): Promise<import("./interfaces").GetProductReviewsResponse>;
94
94
  getProductStatReviews({ productIdentifier, productIdType, }: import("./interfaces").GetProductStatReviewsParameters): Promise<import("./interfaces").GetProductStatReviewsResponse>;
@@ -99,6 +99,7 @@ export declare const DjustSDK: {
99
99
  getNavigationCategories({ locale, }: import("./interfaces").GetNavigationCategoriesParameters): Promise<import("./interfaces").GetNavigationCategoriesResponse>;
100
100
  getNavigationCategory({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryParameters): Promise<import("./interfaces").GetNavigationCategoryResponse>;
101
101
  getNavigationCategoryBreadcrumbs({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryBreadcrumbsParameters): Promise<import("./interfaces").GetNavigationCategoryBreadcrumbsResponse>;
102
+ getNavigationCategoryByOptions(params?: import("./interfaces").GetNavigationCategoryByOptionsParameters): Promise<import("./interfaces").GetNavigationCategoriesResponse>;
102
103
  getAuthenticatedUser(): Promise<import("./interfaces").GetAuthenticatedUserResponse>;
103
104
  createCustomerUser(params: import("./interfaces").CreateCustomerUserParameters): Promise<import("./interfaces").CreateCustomerUserResponse>;
104
105
  updateCustomerUser({ civility, firstName, lastName, phone, customFieldValues, }: import("./interfaces").UpdateCustomerUserParameters): Promise<import("./interfaces").UpdateCustomerUserResponse>;
@@ -106,7 +107,7 @@ export declare const DjustSDK: {
106
107
  getCustomerUserAddresses({ shipping, billing, account, organisationIds, }: import("./interfaces").GetCustomerUserAddressesParameters): Promise<void>;
107
108
  getCustomerUserOrganisations(): Promise<import("./interfaces").GetCustomerUserOrganisationsResponse>;
108
109
  sendCustomerUserActivationRequest({ redirectUrl, token, }: import("./interfaces").SendCustomerUserActivationRequestParameters): Promise<void>;
109
- updateSpecificCustomerUser({ userToUpdateId, civility, firstName, lastName, phone, groups, customFieldValues, }: import("./interfaces").UpdateSpecificCustomerUserParameters): Promise<void>;
110
+ updateSpecificCustomerUser({ userToUpdateId, civility, firstName, lastName, phone, groups, customFieldValues, idType, }: import("./interfaces").UpdateSpecificCustomerUserParameters): Promise<void>;
110
111
  removeAccountsFromCustomerUser({ userToUpdateId, idType, accountIds, }: import("./interfaces").RemoveAccountsFromCustomerUserParameters): Promise<void>;
111
112
  addCustomerUserToAccounts({ userToUpdateId, idType, accountIds, }: import("./interfaces").AddCustomerUserToAccountsParameters): Promise<void>;
112
113
  getCustomerAccount(config?: import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountResponse>;
@@ -117,11 +118,14 @@ export declare const DjustSDK: {
117
118
  createCustomerAccountAddress(params: import("./interfaces").CreateCustomerAccountAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").CreateCustomerAccountAddressResponse>;
118
119
  deleteCustomerAccountAddress({ addressId, ...config }: import("./interfaces").DeleteCustomerAccountAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<void>;
119
120
  updateCustomerAccountAddress({ addressId, additionalAddress, address, billing, city, company, country, fullName, label, phone, shipping, state, zipcode, ...config }: import("./interfaces").UpdateCustomerAccountAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").UpdateCustomerAccountAddressResponse>;
121
+ getCustomerAccountCustomFields({ customFieldIds, idType, pageable, }: import("./interfaces").GetCustomerAccountCustomFieldsParameters): Promise<import("./interfaces").GetCustomerAccountCustomFieldsResponse>;
120
122
  getCustomerAccountOrders(params: import("./interfaces").GetCustomerAccountOrdersParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountOrdersResponse>;
121
123
  getCustomerAccountUsers(params: import("./interfaces").GetCustomerAccountUsersParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountUsersResponse>;
122
124
  createCustomerAccountOrganisation(params: import("./interfaces").CreateCustomerAccountOrganisationParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").CreateCustomerAccountOrganisationResponse>;
123
125
  updateCustomerAccountOrganisation(params: import("./interfaces").UpdateCustomerAccountOrganisationParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").UpdateCustomerAccountOrganisationResponse>;
124
- getCustomerAccountOrganisations(config?: import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountOrganisationResponse>;
126
+ getCustomerAccountOrganisations(params?: {
127
+ pageable?: import("./interfaces/models/common").PageableParameters;
128
+ } & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountOrganisationResponse>;
125
129
  getCustomerAccountOrganisationAddresses(params: import("./interfaces").GetCustomerAccountOrganisationAddressesParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountOrganisationAddressesResponse>;
126
130
  deleteCustomerAccountOrganisationAddress(params: import("./interfaces").DeleteCustomerAccountOrganisationAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<void>;
127
131
  updateCustomerAccountOrganisationAddress(params: import("./interfaces").UpdateCustomerAccountOrganisationAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").UpdateCustomerAccountOrganisationAddressResponse>;
@@ -151,7 +155,9 @@ export declare const DjustSDK: {
151
155
  refreshToken({ refreshToken, }: import("./services/auth/definitions.requests").RefreshTokenParameters): Promise<import("./interfaces").RefreshTokenResponse>;
152
156
  resetPassword({ newPassword, resetPasswordToken, }: import("./services/auth/definitions.requests").ResetPasswordParameters): Promise<void>;
153
157
  sendResetPasswordEmail({ email, }: import("./services/auth/definitions.requests").SendResetPasswordEmailParameters): Promise<void>;
154
- login({ username, password, }: import("./services/auth/definitions.requests").LoginParameters): Promise<import("./interfaces").LoginResponse>;
158
+ login({ username, password, withUser, }: import("./services/auth/definitions.requests").LoginParameters): Promise<import("./interfaces").LoginResponse>;
155
159
  logout(): Promise<void>;
160
+ getSettings(): Promise<import("./interfaces").SettingsResponse>;
161
+ getStore({ storeId, }: import("./services/auth/definitions.requests").GetStoreParameters): Promise<import("./interfaces").Store>;
156
162
  };
157
163
  export * from "./interfaces";
@@ -7,9 +7,19 @@ export interface AttributeValue {
7
7
  export interface Attribute {
8
8
  id: string;
9
9
  externalId: string;
10
- name: string;
11
- status: string;
10
+ externalSource: string;
11
+ names: {
12
+ additionalProp1: string;
13
+ additionalProp2: string;
14
+ additionalProp3: string;
15
+ };
16
+ }
17
+ export interface AttributeObject {
18
+ externalId: string;
19
+ id: string;
20
+ name: Record<string, string>;
12
21
  type: AttributeType;
22
+ values: string[];
13
23
  }
14
24
  export interface AttributeObject {
15
25
  externalId: string;
@@ -23,11 +23,15 @@ export interface CustomFieldTeaserSearch {
23
23
  export interface CustomFieldSearch {
24
24
  externalId: string;
25
25
  externalSource: string;
26
+ facetable?: boolean;
26
27
  id: string;
28
+ indexable?: boolean;
27
29
  mandatory: boolean;
28
30
  name: string;
29
31
  role?: string;
30
32
  sealedTarget: SealedTarget;
33
+ searchable?: boolean;
34
+ sortable?: boolean;
31
35
  status?: string;
32
36
  type: string;
33
37
  }
@@ -5,6 +5,7 @@ import { CustomerUserWithoutAccountDto } from "./customer-user";
5
5
  import { PaymentType } from "./payment";
6
6
  export type CustomerAccountStatus = "ACTIVE" | "INACTIVE" | "WAITING_APPROBATION" | "APPROBATION_REFUSED";
7
7
  export type AccountIdType = "DJUST_ID" | "EXTERNAL_ID";
8
+ export type AccountCustomFieldsIdType = "DJUST_ID" | "EXTERNAL_ID";
8
9
  interface CustomerTagNameableDto {
9
10
  id: string;
10
11
  name: string;
@@ -36,6 +36,15 @@ export interface OfferPriceResponse {
36
36
  customerTagId: string;
37
37
  priceRanges: PriceRange[];
38
38
  }
39
+ export interface OfferPrice {
40
+ customerAccountExternalId: string;
41
+ customerTagExternalId: string;
42
+ externalId: string;
43
+ id: string;
44
+ itemPerPack: number;
45
+ priceRanges: PriceRange[];
46
+ type: string;
47
+ }
39
48
  export interface PriceRange {
40
49
  discountPrice: ProductPrice;
41
50
  quantity: number;
@@ -14,5 +14,6 @@ export interface PaymentInfoRequest {
14
14
  };
15
15
  paymentOption: PaymentOption;
16
16
  paymentProvider: PaymentProvider;
17
+ referenceType?: string;
17
18
  }
18
19
  export {};
@@ -0,0 +1,27 @@
1
+ import { Attribute } from "../../interfaces/models/attribute";
2
+ import { PageableObject, PageableParameters, Order } from "../../interfaces/models/common";
3
+ /**
4
+ * Request parameters type definitions
5
+ */
6
+ export interface GetAttributesParameters {
7
+ searchCriteria?: string;
8
+ pageable?: PageableParameters;
9
+ searchable?: boolean;
10
+ sortable?: boolean;
11
+ }
12
+ /**
13
+ * Response type definitions
14
+ */
15
+ export interface GetAttributesResponse {
16
+ content: Attribute[];
17
+ empty: boolean;
18
+ first: boolean;
19
+ last: boolean;
20
+ number: number;
21
+ numberOfElements: number;
22
+ pageable: PageableObject;
23
+ size: number;
24
+ sort: Order[];
25
+ totalElements: number;
26
+ totalPages: number;
27
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { GetAttributesParameters, GetAttributesResponse } from "./definitions";
2
+ /**
3
+ * 🛒 Retrieves all attributes.
4
+ *
5
+ * This function allows fetching the list of attributes.
6
+ *
7
+ * 🛠 **Endpoint**: `GET /v1/shop/attributes [listAttribute]`
8
+ *
9
+ * | Parameter | Type | Required | Description |
10
+ * |------------------|----------------------|------------|------------------------------------------------------------| |
11
+ * | `searchCriteria` | `string` | ❌ | The search term. |
12
+ * | `searchable` | `boolean` | ❌ | If appears in search response. |
13
+ * | `sortable` | `boolean` | ❌ | If is sortable. |
14
+ * | `pageable` | `object` | ❌ | The pagination parameters. , `BUYING_LIST`). |
15
+ *
16
+ * 📤 **Returns**:
17
+ * A `Promise` resolving to a `GetAttributesResponse` object, containing the list of attributes and pagination information.
18
+ *
19
+ * 🛠 **Example usage**:
20
+ * ```ts
21
+ * const attributes = await getAttributes({ pageable: { page: 1, size: 10 } });
22
+ * ```
23
+ *
24
+ * @param {GetAttributesParameters} params - The parameters for retrieving the attributes, including:
25
+ * - `searchCriteria` - The search term.
26
+ * - `searchable` - The boolean if attributes appears in search response.
27
+ * - `sortable` - The boolean if can sort by this attribute.
28
+ * - `pageable` - The pagination parameters.
29
+ *
30
+ * @returns {Promise<GetAttributesResponse>} - An object containing the list of attributes and pagination information.
31
+ */
32
+ export declare function getAttributes({ searchCriteria, searchable, sortable, pageable, }: GetAttributesParameters): Promise<GetAttributesResponse>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAttributes = getAttributes;
4
+ const fetch_instance_1 = require("../../settings/fetch-instance");
5
+ /**
6
+ * 🛒 Retrieves all attributes.
7
+ *
8
+ * This function allows fetching the list of attributes.
9
+ *
10
+ * 🛠 **Endpoint**: `GET /v1/shop/attributes [listAttribute]`
11
+ *
12
+ * | Parameter | Type | Required | Description |
13
+ * |------------------|----------------------|------------|------------------------------------------------------------| |
14
+ * | `searchCriteria` | `string` | ❌ | The search term. |
15
+ * | `searchable` | `boolean` | ❌ | If appears in search response. |
16
+ * | `sortable` | `boolean` | ❌ | If is sortable. |
17
+ * | `pageable` | `object` | ❌ | The pagination parameters. , `BUYING_LIST`). |
18
+ *
19
+ * 📤 **Returns**:
20
+ * A `Promise` resolving to a `GetAttributesResponse` object, containing the list of attributes and pagination information.
21
+ *
22
+ * 🛠 **Example usage**:
23
+ * ```ts
24
+ * const attributes = await getAttributes({ pageable: { page: 1, size: 10 } });
25
+ * ```
26
+ *
27
+ * @param {GetAttributesParameters} params - The parameters for retrieving the attributes, including:
28
+ * - `searchCriteria` - The search term.
29
+ * - `searchable` - The boolean if attributes appears in search response.
30
+ * - `sortable` - The boolean if can sort by this attribute.
31
+ * - `pageable` - The pagination parameters.
32
+ *
33
+ * @returns {Promise<GetAttributesResponse>} - An object containing the list of attributes and pagination information.
34
+ */
35
+ async function getAttributes({ searchCriteria, searchable, sortable, pageable, }) {
36
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
37
+ method: "GET",
38
+ path: `/v1/shop/attributes`,
39
+ params: {
40
+ searchCriteria,
41
+ searchable,
42
+ sortable,
43
+ page: pageable === null || pageable === void 0 ? void 0 : pageable.page,
44
+ size: pageable === null || pageable === void 0 ? void 0 : pageable.size,
45
+ sort: pageable === null || pageable === void 0 ? void 0 : pageable.sort,
46
+ },
47
+ });
48
+ return data;
49
+ }
@@ -20,6 +20,9 @@ export interface LoginParameters {
20
20
  username: string;
21
21
  password: string;
22
22
  }
23
+ export interface SettingsResponse {
24
+ manualAccountCheck: boolean;
25
+ }
23
26
  /**
24
27
  * Response type definitions
25
28
  */
@@ -27,3 +30,39 @@ export interface RefreshTokenResponse extends AuthenticationResponseDto {
27
30
  }
28
31
  export interface LoginResponse extends AuthenticationResponseDto {
29
32
  }
33
+ export interface StoreLocale {
34
+ active: boolean;
35
+ code: string;
36
+ id: string;
37
+ label: string;
38
+ main: boolean;
39
+ }
40
+ export interface CustomField {
41
+ externalId: string;
42
+ externalSource: string;
43
+ faceted: boolean;
44
+ id: string;
45
+ indexable: boolean;
46
+ mandatory: boolean;
47
+ name: {
48
+ [key: string]: string;
49
+ };
50
+ role: string;
51
+ sealedTarget: string;
52
+ searchable: boolean;
53
+ sortable: boolean;
54
+ status: string;
55
+ }
56
+ export interface CustomFieldValue {
57
+ customField: CustomField;
58
+ value: Record<string, unknown>;
59
+ }
60
+ export interface Store {
61
+ active: boolean;
62
+ customFieldValues: CustomFieldValue[];
63
+ description: string;
64
+ externalId: string;
65
+ id: string;
66
+ name: string;
67
+ storeLocales: StoreLocale[];
68
+ }
@@ -17,4 +17,8 @@ export interface SendResetPasswordEmailParameters {
17
17
  export interface LoginParameters {
18
18
  username: string;
19
19
  password: string;
20
+ withUser?: boolean;
21
+ }
22
+ export interface GetStoreParameters {
23
+ storeId: string;
20
24
  }
@@ -12,8 +12,8 @@
12
12
  *
13
13
  * Each function is described with its input parameters, output responses, and example usages.
14
14
  */
15
- import { LoginResponse, RefreshTokenResponse } from "./definitions";
16
- import { IsTokenValidParameters, LoginParameters, RefreshTokenParameters, ResetPasswordParameters, SendResetPasswordEmailParameters } from "./definitions.requests";
15
+ import { LoginResponse, RefreshTokenResponse, SettingsResponse, Store } from "./definitions";
16
+ import { IsTokenValidParameters, LoginParameters, RefreshTokenParameters, ResetPasswordParameters, SendResetPasswordEmailParameters, GetStoreParameters } from "./definitions.requests";
17
17
  /**
18
18
  * 🔐 Validates if a token is still active and unexpired.
19
19
  *
@@ -132,6 +132,7 @@ export declare function sendResetPasswordEmail({ email, }: SendResetPasswordEmai
132
132
  * |-------------|----------|----------|--------------------------------------|
133
133
  * | `username` | `string` | ✅ | The username of the user to log in. |
134
134
  * | `password` | `string` | ✅ | The password of the user to log in. |
135
+ * | `withUser` | `boolean`| ❌ | Whether to include user details in the response. Default: `true` |
135
136
  *
136
137
  * 📤 **Returns**:
137
138
  * A `Promise<LoginResponse>` that resolves to the user's login information, including:
@@ -150,7 +151,7 @@ export declare function sendResetPasswordEmail({ email, }: SendResetPasswordEmai
150
151
  * @throws {Error} If the required parameters `username` or `password` are missing.
151
152
  * @returns {Promise<LoginResponse>} Resolves to an object containing the user's login information.
152
153
  */
153
- export declare function login({ username, password, }: LoginParameters): Promise<LoginResponse>;
154
+ export declare function login({ username, password, withUser, }: LoginParameters): Promise<LoginResponse>;
154
155
  /**
155
156
  * 🚪 Logs out the user.
156
157
  *
@@ -174,3 +175,57 @@ export declare function login({ username, password, }: LoginParameters): Promise
174
175
  * @returns {Promise<void>} Resolves when the logout is successful.
175
176
  */
176
177
  export declare function logout(): Promise<void>;
178
+ /**
179
+ * ⚙️ Récupère les paramètres globaux du shop.
180
+ *
181
+ * Cette fonction permet d'obtenir les paramètres de configuration du shop.
182
+ *
183
+ * 🛠 **Endpoint**: `GET /v1/shop/settings`
184
+ *
185
+ * 📤 **Returns**:
186
+ * A `Promise<SettingsResponse>` contenant les paramètres du shop, notamment:
187
+ * - `manualAccountCheck` (boolean): Indique si la vérification manuelle des comptes est activée.
188
+ *
189
+ * 🛠 **Example usage**:
190
+ * ```ts
191
+ * const settings = await getSettings();
192
+ * console.log(settings.manualAccountCheck); // true
193
+ * ```
194
+ *
195
+ * @returns {Promise<SettingsResponse>} Une promesse qui résout avec les paramètres du shop.
196
+ */
197
+ export declare function getSettings(): Promise<SettingsResponse>;
198
+ /**
199
+ * 🏪 Récupère les informations d'un magasin spécifique.
200
+ *
201
+ * Cette fonction permet d'obtenir les détails d'un magasin à partir de son identifiant.
202
+ *
203
+ * 🛠 **Endpoint**: `GET /v1/shop/stores/{storeId}`
204
+ *
205
+ * | Parameter | Type | Required | Description |
206
+ * |------------|----------|----------|--------------------------------------|
207
+ * | `storeId` | `string` | ✅ | L'identifiant unique du magasin. |
208
+ *
209
+ * 📤 **Returns**:
210
+ * A `Promise<Store>` contenant les informations détaillées du magasin, notamment:
211
+ * - `active`: État d'activation du magasin
212
+ * - `customFieldValues`: Valeurs des champs personnalisés
213
+ * - `description`: Description du magasin
214
+ * - `externalId`: Identifiant externe
215
+ * - `id`: Identifiant interne
216
+ * - `name`: Nom du magasin
217
+ * - `storeLocales`: Informations de localisation
218
+ *
219
+ * 🛠 **Example usage**:
220
+ * ```ts
221
+ * const store = await getStore({
222
+ * storeId: "123e4567-e89b-12d3-a456-426614174000"
223
+ * });
224
+ * console.log(store.name); // "Mon Magasin"
225
+ * ```
226
+ *
227
+ * @param {GetStoreParameters} params - Les paramètres pour récupérer le magasin.
228
+ * @throws {Error} Si le paramètre `storeId` est manquant.
229
+ * @returns {Promise<Store>} Une promesse qui résout avec les informations du magasin.
230
+ */
231
+ export declare function getStore({ storeId, }: GetStoreParameters): Promise<Store>;
@@ -20,6 +20,8 @@ exports.resetPassword = resetPassword;
20
20
  exports.sendResetPasswordEmail = sendResetPasswordEmail;
21
21
  exports.login = login;
22
22
  exports.logout = logout;
23
+ exports.getSettings = getSettings;
24
+ exports.getStore = getStore;
23
25
  const parameters_validation_1 = require("../../helpers/parameters-validation");
24
26
  const fetch_instance_1 = require("../../settings/fetch-instance");
25
27
  /**
@@ -179,6 +181,7 @@ async function sendResetPasswordEmail({ email, }) {
179
181
  * |-------------|----------|----------|--------------------------------------|
180
182
  * | `username` | `string` | ✅ | The username of the user to log in. |
181
183
  * | `password` | `string` | ✅ | The password of the user to log in. |
184
+ * | `withUser` | `boolean`| ❌ | Whether to include user details in the response. Default: `true` |
182
185
  *
183
186
  * 📤 **Returns**:
184
187
  * A `Promise<LoginResponse>` that resolves to the user's login information, including:
@@ -197,11 +200,11 @@ async function sendResetPasswordEmail({ email, }) {
197
200
  * @throws {Error} If the required parameters `username` or `password` are missing.
198
201
  * @returns {Promise<LoginResponse>} Resolves to an object containing the user's login information.
199
202
  */
200
- async function login({ username, password, }) {
203
+ async function login({ username, password, withUser = true, }) {
201
204
  (0, parameters_validation_1.required)({ username, password });
202
205
  const { data } = await (0, fetch_instance_1.enhancedFetch)({
203
206
  method: "POST",
204
- path: `/auth/token?withUser=true`,
207
+ path: `/auth/token?withUser=${withUser}`,
205
208
  body: JSON.stringify({
206
209
  username,
207
210
  password,
@@ -237,3 +240,70 @@ async function logout() {
237
240
  path: `/auth/revoke-token`,
238
241
  });
239
242
  }
243
+ /**
244
+ * ⚙️ Récupère les paramètres globaux du shop.
245
+ *
246
+ * Cette fonction permet d'obtenir les paramètres de configuration du shop.
247
+ *
248
+ * 🛠 **Endpoint**: `GET /v1/shop/settings`
249
+ *
250
+ * 📤 **Returns**:
251
+ * A `Promise<SettingsResponse>` contenant les paramètres du shop, notamment:
252
+ * - `manualAccountCheck` (boolean): Indique si la vérification manuelle des comptes est activée.
253
+ *
254
+ * 🛠 **Example usage**:
255
+ * ```ts
256
+ * const settings = await getSettings();
257
+ * console.log(settings.manualAccountCheck); // true
258
+ * ```
259
+ *
260
+ * @returns {Promise<SettingsResponse>} Une promesse qui résout avec les paramètres du shop.
261
+ */
262
+ async function getSettings() {
263
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
264
+ method: "GET",
265
+ path: `/v1/shop/settings`,
266
+ });
267
+ return data;
268
+ }
269
+ /**
270
+ * 🏪 Récupère les informations d'un magasin spécifique.
271
+ *
272
+ * Cette fonction permet d'obtenir les détails d'un magasin à partir de son identifiant.
273
+ *
274
+ * 🛠 **Endpoint**: `GET /v1/shop/stores/{storeId}`
275
+ *
276
+ * | Parameter | Type | Required | Description |
277
+ * |------------|----------|----------|--------------------------------------|
278
+ * | `storeId` | `string` | ✅ | L'identifiant unique du magasin. |
279
+ *
280
+ * 📤 **Returns**:
281
+ * A `Promise<Store>` contenant les informations détaillées du magasin, notamment:
282
+ * - `active`: État d'activation du magasin
283
+ * - `customFieldValues`: Valeurs des champs personnalisés
284
+ * - `description`: Description du magasin
285
+ * - `externalId`: Identifiant externe
286
+ * - `id`: Identifiant interne
287
+ * - `name`: Nom du magasin
288
+ * - `storeLocales`: Informations de localisation
289
+ *
290
+ * 🛠 **Example usage**:
291
+ * ```ts
292
+ * const store = await getStore({
293
+ * storeId: "123e4567-e89b-12d3-a456-426614174000"
294
+ * });
295
+ * console.log(store.name); // "Mon Magasin"
296
+ * ```
297
+ *
298
+ * @param {GetStoreParameters} params - Les paramètres pour récupérer le magasin.
299
+ * @throws {Error} Si le paramètre `storeId` est manquant.
300
+ * @returns {Promise<Store>} Une promesse qui résout avec les informations du magasin.
301
+ */
302
+ async function getStore({ storeId, }) {
303
+ (0, parameters_validation_1.required)({ storeId });
304
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
305
+ method: "GET",
306
+ path: `/v1/shop/stores/${storeId}`,
307
+ });
308
+ return data;
309
+ }
@@ -80,6 +80,7 @@ async function getCarts(params) {
80
80
  currency,
81
81
  page: pageable === null || pageable === void 0 ? void 0 : pageable.page,
82
82
  size: pageable === null || pageable === void 0 ? void 0 : pageable.size,
83
+ sort: pageable === null || pageable === void 0 ? void 0 : pageable.sort,
83
84
  status: Array.isArray(status) ? status.join(",") : status,
84
85
  type: Array.isArray(type) ? type.join(",") : type,
85
86
  },
@@ -97,4 +97,10 @@ export interface PostMediaCustomFieldParameters {
97
97
  fileName: string;
98
98
  fileSize: number;
99
99
  }
100
+ export interface GetMediaUrlParameters {
101
+ id: string;
102
+ customFieldIdType?: CustomFieldIdType;
103
+ sealedTarget?: SealedTarget;
104
+ fileUrl: string;
105
+ }
100
106
  export {};
@@ -1,4 +1,4 @@
1
- import type { GetCustomFieldParameters, GetCustomFieldResponse, PostMediaCustomFieldParameters } from "./definitions";
1
+ import type { GetCustomFieldParameters, GetCustomFieldResponse, PostMediaCustomFieldParameters, GetMediaUrlParameters } from "./definitions";
2
2
  /**
3
3
  * 📋 Retrieves custom fields.
4
4
  *
@@ -74,3 +74,40 @@ export declare function getCustomFields(params: GetCustomFieldParameters): Promi
74
74
  * @returns {Promise<string>} - The URL for uploading the media file.
75
75
  */
76
76
  export declare function postMediaCustomField(params: PostMediaCustomFieldParameters): Promise<string>;
77
+ /**
78
+ * 🎥 Gets the media URL for a custom field.
79
+ *
80
+ * @deprecated This endpoint is deprecated in the API and should not be used for new implementations.
81
+ *
82
+ * This function retrieves the media URL associated with a specific custom field.
83
+ *
84
+ * 🛠 **Endpoint**: `GET /v1/shop/custom-fields/{id}/media`
85
+ *
86
+ * | **Parameter** | **Type** | **Required** | **Description** |
87
+ * |-----------------------|------------|--------------|----------------------------------------------------------------------|
88
+ * | `id` | `string` | ✅ | The ID of the custom field associated with the media. |
89
+ * | `customFieldIdType` | `string` | | The type of the custom field identifier (BUSINESS_ID, EXTERNAL_ID). |
90
+ * | `sealedTarget` | `string` | | The sealed target type. |
91
+ * | `fileUrl` | `string` | ✅ | The URL of the file to retrieve. |
92
+ *
93
+ * 📤 **Returns**:
94
+ * A `Promise<string>` containing the media URL.
95
+ *
96
+ * 🛠 **Example Usage**:
97
+ * ```typescript
98
+ * const mediaUrl = await getMediaUrl({
99
+ * id: 'field1',
100
+ * customFieldIdType: 'EXTERNAL_ID',
101
+ * fileUrl: 'https://example.com/image.jpg',
102
+ * });
103
+ * ```
104
+ *
105
+ * @param {GetMediaUrlParameters} params - The parameters for retrieving a media URL:
106
+ * - `id` - The ID of the custom field.
107
+ * - `customFieldIdType` (optional) - The type of the custom field identifier.
108
+ * - `sealedTarget` (optional) - The sealed target type.
109
+ * - `fileUrl` - The URL of the file to retrieve.
110
+ *
111
+ * @returns {Promise<string>} - The media URL.
112
+ */
113
+ export declare function getMediaUrl(params: GetMediaUrlParameters): Promise<string>;