@djust-b2b/djust-front-sdk 1.13.0 → 1.15.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 (29) hide show
  1. package/lib/index.d.ts +11 -10
  2. package/lib/interfaces/models/customer-user.d.ts +6 -0
  3. package/lib/interfaces/models/incident.d.ts +1 -0
  4. package/lib/interfaces/models/order.d.ts +96 -0
  5. package/lib/services/auth/index.d.ts +12 -13
  6. package/lib/services/auth/index.js +12 -13
  7. package/lib/services/commercial-order/definitions.d.ts +20 -3
  8. package/lib/services/commercial-order/index.d.ts +361 -15
  9. package/lib/services/commercial-order/index.js +397 -33
  10. package/lib/services/custom-field/definitions.d.ts +100 -0
  11. package/lib/services/custom-field/definitions.js +60 -0
  12. package/lib/services/custom-field/index.d.ts +121 -0
  13. package/lib/services/custom-field/index.js +145 -0
  14. package/lib/services/customer-account/index.d.ts +1781 -23
  15. package/lib/services/customer-account/index.js +1780 -45
  16. package/lib/services/customer-user/definitions.d.ts +3 -1
  17. package/lib/services/customer-user/index.d.ts +2 -2
  18. package/lib/services/incident/definitions.d.ts +9 -27
  19. package/lib/services/incident/index.d.ts +38 -119
  20. package/lib/services/incident/index.js +46 -153
  21. package/lib/services/logistic-order/definitions.d.ts +16 -1
  22. package/lib/services/logistic-order/index.d.ts +799 -28
  23. package/lib/services/logistic-order/index.js +823 -28
  24. package/lib/services/navigation-category/index.d.ts +122 -3
  25. package/lib/services/navigation-category/index.js +122 -3
  26. package/lib/services/product/definitions.d.ts +1 -1
  27. package/lib/services/product/index.d.ts +1762 -19
  28. package/lib/services/product/index.js +1777 -34
  29. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -21,23 +21,22 @@ export declare const DjustSDK: {
21
21
  storeId?: string;
22
22
  storeViewId?: string;
23
23
  }>) => void;
24
- getOrderLogisticIncidents({ logisticOrderId, status, idType, page, size, sort, }: import("./services/incident/definitions").getOrderLogisticIncidentsParameters): Promise<import("./services/incident/definitions").getOrderLogisticIncidentsResponse>;
25
- getOrderLogisticIncident({ logisticOrderId, incidentId, idType, }: import("./services/incident/definitions").getOrderLogisticIncidentParameters): Promise<import("./services/incident/definitions").getOrderLogisticIncidentResponse>;
26
- getOrderLogisticLineIncidents({ logisticOrderId, lineId, status, idType, page, size, sort, }: import("./services/incident/definitions").getOrderLogisticLineIncidentsParameters): Promise<import("./services/incident/definitions").getOrderLogisticLineIncidentsResponse>;
24
+ getIncidents({ customerAccountIds, linkedType, ids, status, idType, page, size, sort, }: import("./services/incident/definitions").getIncidentsParameters): Promise<import("./services/incident/definitions").getIncidentsResponse>;
25
+ getIncident({ incidentId, idType, }: import("./services/incident/definitions").getIncidentParameters): Promise<import("./services/incident/definitions").getIncidentResponse>;
27
26
  createOrderLogisticIncident({ logisticOrderId, idType, customField, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentResponse>;
28
27
  createOrderLogisticLineIncident({ logisticOrderId, idType, customFieldIdType, orderLines, reasonCode, }: import("./services/incident/definitions").createOrderLogisticLineIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticLineIncidentResponse>;
29
- getCustomerAccountIncidents({ customerAccountId, status, page, size, sort, }: import("./services/incident/definitions").getCustomerAccountIncidentsParameters): Promise<import("./services/incident/definitions").getCustomerAccountIncidentsResponse>;
30
28
  getCommercialOrders({ locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrdersParameters): Promise<import("./interfaces").GetCommercialOrdersResponse>;
31
29
  createCommercialOrder({ nbPreviewLines, channel, customFields, locale, originId, paymentInfo, }: import("./interfaces").CreateCommercialOrderParameters): Promise<import("./interfaces").CreateCommercialOrderResponse>;
32
30
  getCommercialOrder({ orderId, idType, locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrderParameters): Promise<import("./interfaces").GetCommercialOrderResponse>;
31
+ createCommercialOrderCardRegistration({ orderId, paymentProvider, currency, }: import("./interfaces").CreateCommercialOrderCardRegistrationParameters): Promise<import("./interfaces").CreateCommercialOrderCardRegistrationResponse>;
33
32
  updateCommercialOrderBillingInformation({ orderId, billingAddressId, }: import("./interfaces").UpdateCommercialOrderBillingInformationParameters): Promise<void>;
34
33
  setCommercialOrderStatusAsCreated({ orderId, paymentInfo, }: import("./interfaces").SetCommercialOrderStatusAsCreatedParameters): Promise<void>;
35
34
  setCommercialOrderStatusAsOnHold({ orderId, }: import("./interfaces").SetCommercialOrderStatusAsOnHoldParameters): Promise<void>;
36
35
  getCommercialOrderPaymentPageUrl({ orderId, paymentOption, paymentProvider, }: import("./interfaces").GetCommercialOrderPaymentPageUrlParameters): Promise<string>;
36
+ createCommercialOrderPreauthorization({ orderId, paymentProvider, authorId, browserInfo, ipAddress, paymentCardInfo, }: import("./interfaces").CreateCommercialOrderPreauthorizationParameters): Promise<import("./interfaces").CreateCommercialOrderPreauthorizationResponse>;
37
37
  updateCommercialOrderShippingAddress({ orderId, shippingAddressId, }: import("./interfaces").UpdateCommercialOrderShippingAddressParameters): Promise<void>;
38
38
  updateCommercialOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: import("./interfaces").UpdateCommercialOrderShippingInformationParameters): Promise<void>;
39
39
  updateCommercialOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateCommercialOrderShippingTypeParameters): Promise<void>;
40
- updateLogisticOrderCustomFieldsValue({ orderLogisticId, customFieldsValues, }: import("./interfaces").UpdateOrderLogisticCustomFieldParameters): Promise<import("./interfaces").UpdateOrderLogisticCustomFieldResponse>;
41
40
  getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, nbPreviewLines, page, size, sort, }: import("./interfaces").GetLogisticOrdersParameters): Promise<import("./interfaces").GetLogisticOrdersResponse>;
42
41
  getLogisticOrderCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderCustomFieldsResponse>;
43
42
  getLogisticOrderLineCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderLineCustomFieldsResponse>;
@@ -50,18 +49,21 @@ export declare const DjustSDK: {
50
49
  updateLogisticOrderBillingInformation({ orderId, billingAddressId, }: import("./interfaces").UpdateLogisticOrderBillingInformationParameters): Promise<void>;
51
50
  cancelLogisticOrder({ orderId, locale, nbPreviewLines, }: import("./interfaces").CancelLogisticOrderParameters): Promise<import("./interfaces").CancelLogisticOrderResponse>;
52
51
  confirmLogisticOrderReception({ orderId, locale, nbPreviewLines, }: import("./interfaces").ConfirmLogisticOrderReceptionParameters): Promise<import("./interfaces").ConfirmLogisticOrderReceptionResponse>;
52
+ createLogisticOrder({ orderId, }: import("./interfaces").CreateLogisticOrderParameters): Promise<void>;
53
53
  disapproveLogisticOrder({ orderId, locale, nbPreviewLines, }: import("./interfaces").DisapproveLogisticOrderParameters): Promise<import("./interfaces").DisapproveLogisticOrderResponse>;
54
54
  getLogisticOrderDocuments({ orderId, idType, }: import("./interfaces").GetLogisticOrderDocumentsParameters): Promise<import("./interfaces").GetLogisticOrderDocumentsResponse>;
55
55
  getLogisticOrderDocumentUrl({ orderId, documentId, }: import("./interfaces").GetLogisticOrderDocumentUrlParameters): Promise<string[]>;
56
56
  getLogisticOrderLines({ orderId, page, size, sort, locale, }: import("./interfaces").GetLogisticOrderLinesParameters): Promise<import("./interfaces").GetLogisticOrderLinesResponse>;
57
+ updateOnHoldLogisticOrderLines({ orderId, lines, }: import("./interfaces").UpdateOnHoldLogisticOrderLinesParameters): Promise<import("./interfaces").UpdateOnHoldLogisticOrderLinesResponse>;
57
58
  updateLogisticOrderLineCustomFields({ orderId, lineId, locale, customFields, }: import("./interfaces").UpdateLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").UpdateLogisticOrderLineCustomFieldsResponse>;
59
+ updateOnHoldLogisticOrderLine({ orderId, orderLineId, quantity, }: import("./interfaces").UpdateOnHoldLogisticOrderLineParameters): Promise<void>;
58
60
  updateLogisticOrderShippingAddress({ orderId, shippingAddressId, }: import("./interfaces").UpdateLogisticOrderShippingAddressParameters): Promise<void>;
59
61
  getLogisticOrderShippingInformation({ orderId, }: import("./interfaces").GetLogisticOrderShippingAddressParameters): Promise<import("./interfaces").GetLogisticOrderShippingAddressResponse>;
60
62
  updateLogisticOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingInformationParameters): Promise<void>;
61
63
  updateLogisticOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingTypeParameters): Promise<void>;
62
64
  createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParameters): Promise<void>;
63
65
  getLogisticOrderReview({ orderId, }: import("./interfaces").GetLogisticOrderReviewParameters): Promise<import("./interfaces").GetLogisticOrderReviewResponse>;
64
- addLogisitcOrderReview({ orderId, comment, grade, }: import("./interfaces").AddLogisticOrderReviewParameters): Promise<import("./interfaces").AddLogisticOrderReviewResponse>;
66
+ addLogisticOrderReview({ orderId, comment, grade, }: import("./interfaces").AddLogisticOrderReviewParameters): Promise<import("./interfaces").AddLogisticOrderReviewResponse>;
65
67
  getThreadReasonTypes(): Promise<import("./interfaces").GetThreadReasonTypesResponse>;
66
68
  getThreadSubReasons({ reasonType, }: import("./interfaces").GetThreadSubReasonsParameters): Promise<import("./interfaces").GetThreadSubReasonsResponse>;
67
69
  getSuppliers({ pageable, supplierStatus, supplierIds, idType, }: import("./interfaces").GetSuppliersParameters): Promise<import("./interfaces").GetSuppliersResponse>;
@@ -86,17 +88,17 @@ export declare const DjustSDK: {
86
88
  getProductVariantSuppliers({ productVariantId, }: import("./interfaces").GetProductVariantSuppliersParameters): Promise<import("./interfaces").GetProductVariantSuppliersResponse>;
87
89
  getProduct({ productIdentifier, productIdType, locale, }: import("./interfaces").GetProductParameters): Promise<import("./interfaces").GetProductsListResponse>;
88
90
  getProductOffers({ productIdentifier, productIdType, locale, currency, }: import("./interfaces").GetProductOffersParameters): Promise<import("./interfaces").GetProductOffersResponse>;
89
- getRelatedProducts({ productIdentifier, productIdType, locale, currency, pageable, }: import("./interfaces").GetRelatedProductsParameters): Promise<import("./interfaces").GetRelatedProductsParameters>;
91
+ getProductPaginatedOffers({ productIdentifier, productIdType, currency, locale, withoutPrices, pageable, }: import("./interfaces").GetProductPaginatedOffersParameters): Promise<import("./interfaces").GetProductPaginatedOffersResponse>;
92
+ getRelatedProducts({ productIdentifier, productIdType, locale, currency, pageable, }: import("./interfaces").GetRelatedProductsParameters): Promise<import("./interfaces").GetRelatedProductsResponse>;
90
93
  getProductReviews({ productIdentifier, productIdType, }: import("./interfaces").GetProductReviewsParameters): Promise<import("./interfaces").GetProductReviewsResponse>;
91
94
  getProductStatReviews({ productIdentifier, productIdType, }: import("./interfaces").GetProductStatReviewsParameters): Promise<import("./interfaces").GetProductStatReviewsResponse>;
92
95
  getProductVariantAttributes({ productIdentifier, productIdType, locale, }: import("./interfaces").GetProductVariantAttributesParameters): Promise<import("./interfaces").GetProductVariantAttributesResponse>;
93
96
  createProductReview({ message, productSku, rating, }: import("./interfaces").CreateProductReviewParameters): Promise<import("./interfaces").CreateProductReviewResponse>;
94
97
  updateProductReview({ productReviewId, message, rating, }: import("./interfaces").UpdateProductReviewParameters): Promise<import("./interfaces").UpdateProductReviewResponse>;
95
- getProductPaginatedOffers({ productIdentifier, productIdType, currency, locale, withoutPrices, pageable, }: import("./interfaces").GetProductPaginatedOffersParameters): Promise<import("./interfaces").GetProductPaginatedOffersResponse>;
96
98
  getNavigationCategories({ locale, }: import("./interfaces").GetNavigationCategoriesParameters): Promise<import("./interfaces").GetNavigationCategoriesResponse>;
97
99
  getNavigationCategory({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryParameters): Promise<import("./interfaces").GetNavigationCategoryResponse>;
98
100
  getNavigationCategoryBreadcrumbs({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryBreadcrumbsParameters): Promise<import("./interfaces").GetNavigationCategoryBreadcrumbsResponse>;
99
- getAuthenticatedUser(): Promise<any>;
101
+ getAuthenticatedUser(): Promise<import("./interfaces").GetAuthenticatedUserResponse>;
100
102
  createCustomerUser(params: import("./interfaces").CreateCustomerUserParameters): Promise<import("./interfaces").CreateCustomerUserResponse>;
101
103
  updateCustomerUser({ civility, firstName, lastName, phone, customFieldValues, }: import("./interfaces").UpdateCustomerUserParameters): Promise<import("./interfaces").UpdateCustomerUserResponse>;
102
104
  activateCustomerUser(params: import("./interfaces").ActivateCustomerUserParameters): Promise<void>;
@@ -112,7 +114,6 @@ export declare const DjustSDK: {
112
114
  updateCustomerAccountAddress({ addressId, additionalAddress, address, billing, city, company, country, fullName, label, phone, shipping, state, zipcode, }: import("./interfaces").UpdateCustomerAccountAddressParameters): Promise<import("./interfaces").UpdateCustomerAccountAddressResponse>;
113
115
  getCustomerAccountOrders({ pageable, locale, }: import("./interfaces").GetCustomerAccountOrdersParameters): Promise<import("./interfaces").GetCustomerAccountOrdersResponse>;
114
116
  getCustomerAccountUsers({ pageable, }: import("./interfaces").GetCustomerAccountUsersParameters): Promise<import("./interfaces").GetCustomerAccountUsersResponse>;
115
- createCustomerAccountUser({ accountId, civility, firstName, lastName, email, password, groups, }: import("./interfaces").CreateCustomerAccountUsersParameters): Promise<void>;
116
117
  createCustomerAccountOrganisation({ externalId, name, parentId, }: import("./interfaces").CreateCustomerAccountOrganisationParameters): Promise<import("./interfaces").CreateCustomerAccountOrganisationResponse>;
117
118
  updateCustomerAccountOrganisation({ organisationId, name, parentId, status, }: import("./interfaces").UpdateCustomerAccountOrganisationParameters): Promise<import("./interfaces").UpdateCustomerAccountOrganisationResponse>;
118
119
  getCustomerAccountOrganisations(): Promise<import("./interfaces").GetCustomerAccountOrganisationResponse>;
@@ -1,5 +1,6 @@
1
1
  import { CustomFieldValueObject, CustomFieldValueRequest } from "./custom-field";
2
2
  import { Order, PageableObject } from "./common";
3
+ import { CustomerAccountDto } from "./customer-account";
3
4
  export type CivilityType = "MR" | "MRS" | "MISS";
4
5
  export type UserStatus = "ACTIVE" | "INACTIVE" | "NEW" | "WAITING_ACTIVATION" | "APPROBATION_REFUSED";
5
6
  export interface CustomerUserWithoutAccountDto {
@@ -100,4 +101,9 @@ export interface SimpleUserView {
100
101
  firstName: string;
101
102
  lastName: string;
102
103
  }
104
+ export interface UserInfoDto {
105
+ account: CustomerAccountDto;
106
+ accounts: CustomerAccountDto[];
107
+ user: CustomerUserDto;
108
+ }
103
109
  export {};
@@ -1,6 +1,7 @@
1
1
  import { CustomFieldValueObject } from "./custom-field";
2
2
  export type IncidentStatus = "OPEN" | "ON_GOING" | "CLOSED";
3
3
  export type IncidentIdType = "DJUST_ID" | "EXTERNAL_ID";
4
+ export type IncidentLinkedType = "ORDER" | "ORDER_LINES";
4
5
  export interface IncidentLogisticOrder {
5
6
  id: string;
6
7
  externalId: string;
@@ -77,6 +77,12 @@ export interface OrderLogisticLineDto {
77
77
  quantity: number;
78
78
  status: OrderLineStatus;
79
79
  }
80
+ export interface OrderLogisticLineUpdate {
81
+ customFieldValues: CustomFieldValueObject[];
82
+ id: string;
83
+ quantity: number;
84
+ updateAction: string;
85
+ }
80
86
  interface OfferCustomFieldSnapshot {
81
87
  externalId: string;
82
88
  externalSource: string;
@@ -303,4 +309,94 @@ export interface RequestGetOrderLogisticDocumentbyID {
303
309
  orderLogisticId: string;
304
310
  documentId: string;
305
311
  }
312
+ export interface CardInformationDto {
313
+ AccessKey: string;
314
+ CardId: string;
315
+ CardRegistrationURL: string;
316
+ CardType: string;
317
+ CreationDate: string;
318
+ Currency: string;
319
+ Id: string;
320
+ PreregistrationData: string;
321
+ RegistrationData: string;
322
+ ResultCode: string;
323
+ Status: string;
324
+ Tag: string;
325
+ UserId: string;
326
+ }
327
+ export interface BrowserInfo {
328
+ AcceptHeader: string;
329
+ ColorDepth: number;
330
+ JavaEnabled: boolean;
331
+ JavascriptEnabled: boolean;
332
+ Language: string;
333
+ ScreenHeight: number;
334
+ ScreenWidth: number;
335
+ TimeZoneOffset: string;
336
+ UserAgent: string;
337
+ }
338
+ export interface PaymentCardInfo {
339
+ amount: number;
340
+ cardId: string;
341
+ currency: string;
342
+ }
343
+ export interface PreauthorizationDto {
344
+ Applied3DSVersion: string;
345
+ AuthorId: string;
346
+ Billing: {
347
+ Address: {
348
+ AddressLine1: string;
349
+ AddressLine2: string;
350
+ City: string;
351
+ Country: string;
352
+ PostalCode: string;
353
+ Region: string;
354
+ };
355
+ FirstName: string;
356
+ LastName: string;
357
+ };
358
+ BrowserInfo: BrowserInfo;
359
+ CardId: string;
360
+ CreationDate: number;
361
+ Culture: string;
362
+ DebitedFunds: {
363
+ Amount: number;
364
+ Currency: Currency;
365
+ };
366
+ ExecutionType: string;
367
+ ExpirationDate: number;
368
+ Id: string;
369
+ IpAddress: string;
370
+ MultiCapture: true;
371
+ PaymentStatus: string;
372
+ RemainingFunds: {
373
+ Amount: number;
374
+ Currency: Currency;
375
+ };
376
+ Requested3DSVersion: string;
377
+ ResultCode: string;
378
+ ResultMessage: string;
379
+ SecureMode: string;
380
+ SecureModeNeeded: true;
381
+ SecureModeRedirectURL: string;
382
+ SecureModeReturnURL: string;
383
+ SecurityInfo: {
384
+ AVSResult: string;
385
+ };
386
+ Shipping: {
387
+ Address: {
388
+ AddressLine1: string;
389
+ AddressLine2: string;
390
+ City: string;
391
+ Country: string;
392
+ PostalCode: string;
393
+ Region: string;
394
+ };
395
+ FirstName: string;
396
+ LastName: string;
397
+ };
398
+ StatementDescriptor: string;
399
+ Status: string;
400
+ Tag: string;
401
+ }
306
402
  export {};
@@ -8,8 +8,8 @@ import { IsTokenValidParameters, LoginParameters, LoginResponse, RefreshTokenPar
8
8
  * CART ENDPOINT
9
9
  */
10
10
  /**
11
- * APICODE(TOK-200)
12
- * Returns true if the token is valid and not expired, false otherwise
11
+ * ##R eturns true if the token is valid and not expired, false otherwise
12
+ * ### APICODE(TOK-200)
13
13
  * @param {IsTokenValidParameters} params - The parameters for the function
14
14
  * #### token - `string` | <strong style={{ color: 'red' }}>required</strong>
15
15
  * The token to validate.
@@ -30,8 +30,8 @@ import { IsTokenValidParameters, LoginParameters, LoginResponse, RefreshTokenPar
30
30
  */
31
31
  export declare function isTokenValid({ token, }: IsTokenValidParameters): Promise<boolean>;
32
32
  /**
33
- * APICODE(AUTH-102)
34
- * Ask for a new token from a refresh token
33
+ * ## Ask for a new token from a refresh token
34
+ * ### APICODE(AUTH-102)
35
35
  * @param {RefreshTokenParameters} params - The parameters for the function, including:
36
36
  * #### refreshToken - `string` | <strong style={{ color: 'red' }}>required</strong>
37
37
  * The refresh token to request a new access token (required)
@@ -59,8 +59,8 @@ export declare function isTokenValid({ token, }: IsTokenValidParameters): Promis
59
59
  */
60
60
  export declare function refreshToken({ refreshToken, }: RefreshTokenParameters): Promise<RefreshTokenResponse>;
61
61
  /**
62
- * APICODE(PWD-102)
63
- * Reset the password of a user
62
+ * ## Reset the password of a user
63
+ * ### APICODE(PWD-102)
64
64
  * @param {ResetPasswordParameters} params - The parameters for the function
65
65
  * #### newPassword - `string` | <strong style={{ color: 'red' }}>required</strong>
66
66
  * The new password to set for the user.
@@ -81,8 +81,8 @@ export declare function refreshToken({ refreshToken, }: RefreshTokenParameters):
81
81
  */
82
82
  export declare function resetPassword({ newPassword, resetPasswordToken, }: ResetPasswordParameters): Promise<void>;
83
83
  /**
84
- * APICODE(PWD-101)
85
- * Send an email to the user with a reset password link
84
+ * ## Send an email to the user with a reset password link
85
+ * ### APICODE(PWD-101)
86
86
  * @param {SendResetPasswordEmailParameters} params - The parameters for the function, including:
87
87
  * #### email - `string` | <strong style={{ color: 'red' }}>required</strong>
88
88
  * The email address to send the reset link to.
@@ -101,8 +101,8 @@ export declare function resetPassword({ newPassword, resetPasswordToken, }: Rese
101
101
  */
102
102
  export declare function sendResetPasswordEmail({ email, }: SendResetPasswordEmailParameters): Promise<void>;
103
103
  /**
104
- * APICODE(AUTH-101)
105
- * Login a user
104
+ * ##Login a user
105
+ * ### APICODE(AUTH-101)
106
106
  * @param {LoginParameters} params - The parameters for the function, including:
107
107
  * #### username - `string` | <strong style={{ color: 'red' }}>required</strong>
108
108
  * The username of the user to log in.
@@ -132,9 +132,8 @@ export declare function sendResetPasswordEmail({ email, }: SendResetPasswordEmai
132
132
  */
133
133
  export declare function login({ username, password, }: LoginParameters): Promise<LoginResponse>;
134
134
  /**
135
- * APICODE(AUTH-103)
136
- *
137
- * Logout the user
135
+ * ### Logout the user
136
+ * ### APICODE(AUTH-103)
138
137
  *
139
138
  * @returns {Promise<void>} - A promise that resolves when the user is logged out
140
139
  *
@@ -17,8 +17,8 @@ const fetch_instance_1 = require("../../settings/fetch-instance");
17
17
  * CART ENDPOINT
18
18
  */
19
19
  /**
20
- * APICODE(TOK-200)
21
- * Returns true if the token is valid and not expired, false otherwise
20
+ * ##R eturns true if the token is valid and not expired, false otherwise
21
+ * ### APICODE(TOK-200)
22
22
  * @param {IsTokenValidParameters} params - The parameters for the function
23
23
  * #### token - `string` | <strong style={{ color: 'red' }}>required</strong>
24
24
  * The token to validate.
@@ -49,8 +49,8 @@ async function isTokenValid({ token, }) {
49
49
  return response === null || response === void 0 ? void 0 : response.data;
50
50
  }
51
51
  /**
52
- * APICODE(AUTH-102)
53
- * Ask for a new token from a refresh token
52
+ * ## Ask for a new token from a refresh token
53
+ * ### APICODE(AUTH-102)
54
54
  * @param {RefreshTokenParameters} params - The parameters for the function, including:
55
55
  * #### refreshToken - `string` | <strong style={{ color: 'red' }}>required</strong>
56
56
  * The refresh token to request a new access token (required)
@@ -88,8 +88,8 @@ async function refreshToken({ refreshToken, }) {
88
88
  return data;
89
89
  }
90
90
  /**
91
- * APICODE(PWD-102)
92
- * Reset the password of a user
91
+ * ## Reset the password of a user
92
+ * ### APICODE(PWD-102)
93
93
  * @param {ResetPasswordParameters} params - The parameters for the function
94
94
  * #### newPassword - `string` | <strong style={{ color: 'red' }}>required</strong>
95
95
  * The new password to set for the user.
@@ -120,8 +120,8 @@ async function resetPassword({ newPassword, resetPasswordToken, }) {
120
120
  });
121
121
  }
122
122
  /**
123
- * APICODE(PWD-101)
124
- * Send an email to the user with a reset password link
123
+ * ## Send an email to the user with a reset password link
124
+ * ### APICODE(PWD-101)
125
125
  * @param {SendResetPasswordEmailParameters} params - The parameters for the function, including:
126
126
  * #### email - `string` | <strong style={{ color: 'red' }}>required</strong>
127
127
  * The email address to send the reset link to.
@@ -149,8 +149,8 @@ async function sendResetPasswordEmail({ email, }) {
149
149
  });
150
150
  }
151
151
  /**
152
- * APICODE(AUTH-101)
153
- * Login a user
152
+ * ##Login a user
153
+ * ### APICODE(AUTH-101)
154
154
  * @param {LoginParameters} params - The parameters for the function, including:
155
155
  * #### username - `string` | <strong style={{ color: 'red' }}>required</strong>
156
156
  * The username of the user to log in.
@@ -191,9 +191,8 @@ async function login({ username, password, }) {
191
191
  return data;
192
192
  }
193
193
  /**
194
- * APICODE(AUTH-103)
195
- *
196
- * Logout the user
194
+ * ### Logout the user
195
+ * ### APICODE(AUTH-103)
197
196
  *
198
197
  * @returns {Promise<void>} - A promise that resolves when the user is logged out
199
198
  *
@@ -1,6 +1,6 @@
1
- import { Channel } from "../../interfaces/models/common";
1
+ import { Channel, Currency } from "../../interfaces/models/common";
2
2
  import { CustomFieldValueRequest } from "../../interfaces/models/custom-field";
3
- import { OrderCommercialDto, OrderIdType, OrderLogisticDto, OrderOrigin, PageOrderCommercialDto } from "../../interfaces/models/order";
3
+ import { BrowserInfo, CardInformationDto, OrderCommercialDto, OrderIdType, OrderLogisticDto, OrderOrigin, PageOrderCommercialDto, PaymentCardInfo, PreauthorizationDto } from "../../interfaces/models/order";
4
4
  import { PaymentInfoRequest, PaymentOption, PaymentProvider } from "../../interfaces/models/payment";
5
5
  /**
6
6
  * Request parameters type definitions
@@ -11,7 +11,7 @@ export interface GetCommercialOrdersParameters {
11
11
  }
12
12
  export interface CreateCommercialOrderParameters {
13
13
  nbPreviewLines?: number;
14
- channel: Channel;
14
+ channel?: Channel;
15
15
  customFields?: CustomFieldValueRequest[];
16
16
  locale: string;
17
17
  origin: OrderOrigin;
@@ -24,6 +24,11 @@ export interface GetCommercialOrderParameters {
24
24
  idType?: OrderIdType;
25
25
  nbPreviewLines?: number;
26
26
  }
27
+ export interface CreateCommercialOrderCardRegistrationParameters {
28
+ orderId: string;
29
+ paymentProvider: PaymentProvider;
30
+ currency: Currency;
31
+ }
27
32
  export interface UpdateCommercialOrderBillingInformationParameters {
28
33
  orderId: string;
29
34
  billingAddressId: string;
@@ -40,6 +45,14 @@ export interface GetCommercialOrderPaymentPageUrlParameters {
40
45
  paymentOption: PaymentOption;
41
46
  paymentProvider?: PaymentProvider;
42
47
  }
48
+ export interface CreateCommercialOrderPreauthorizationParameters {
49
+ orderId: string;
50
+ paymentProvider: PaymentProvider;
51
+ authorId: string;
52
+ browserInfo: BrowserInfo;
53
+ ipAddress: string;
54
+ paymentCardInfo: PaymentCardInfo;
55
+ }
43
56
  export interface UpdateCommercialOrderShippingAddressParameters {
44
57
  orderId: string;
45
58
  shippingAddressId: string;
@@ -66,5 +79,9 @@ export interface CreateCommercialOrderResponse extends OrderCommercialDto {
66
79
  }
67
80
  export interface GetCommercialOrderResponse extends OrderCommercialDto {
68
81
  }
82
+ export interface CreateCommercialOrderCardRegistrationResponse extends CardInformationDto {
83
+ }
84
+ export interface CreateCommercialOrderPreauthorizationResponse extends PreauthorizationDto {
85
+ }
69
86
  export interface UpdateOrderLogisticCustomFieldResponse extends OrderLogisticDto {
70
87
  }