@djust-b2b/djust-front-sdk 1.13.0 → 1.14.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 +7 -4
- package/lib/interfaces/models/customer-user.d.ts +6 -0
- package/lib/interfaces/models/order.d.ts +96 -0
- package/lib/services/auth/index.d.ts +12 -13
- package/lib/services/auth/index.js +12 -13
- package/lib/services/commercial-order/definitions.d.ts +20 -3
- package/lib/services/commercial-order/index.d.ts +361 -15
- package/lib/services/commercial-order/index.js +397 -33
- package/lib/services/customer-account/index.d.ts +1781 -23
- package/lib/services/customer-account/index.js +1780 -45
- package/lib/services/customer-user/definitions.d.ts +3 -1
- package/lib/services/customer-user/index.d.ts +2 -2
- package/lib/services/logistic-order/definitions.d.ts +16 -1
- package/lib/services/logistic-order/index.d.ts +799 -28
- package/lib/services/logistic-order/index.js +823 -28
- package/lib/services/navigation-category/index.d.ts +122 -3
- package/lib/services/navigation-category/index.js +122 -3
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -30,14 +30,15 @@ export declare const DjustSDK: {
|
|
|
30
30
|
getCommercialOrders({ locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrdersParameters): Promise<import("./interfaces").GetCommercialOrdersResponse>;
|
|
31
31
|
createCommercialOrder({ nbPreviewLines, channel, customFields, locale, originId, paymentInfo, }: import("./interfaces").CreateCommercialOrderParameters): Promise<import("./interfaces").CreateCommercialOrderResponse>;
|
|
32
32
|
getCommercialOrder({ orderId, idType, locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrderParameters): Promise<import("./interfaces").GetCommercialOrderResponse>;
|
|
33
|
+
createCommercialOrderCardRegistration({ orderId, paymentProvider, currency, }: import("./interfaces").CreateCommercialOrderCardRegistrationParameters): Promise<import("./interfaces").CreateCommercialOrderCardRegistrationResponse>;
|
|
33
34
|
updateCommercialOrderBillingInformation({ orderId, billingAddressId, }: import("./interfaces").UpdateCommercialOrderBillingInformationParameters): Promise<void>;
|
|
34
35
|
setCommercialOrderStatusAsCreated({ orderId, paymentInfo, }: import("./interfaces").SetCommercialOrderStatusAsCreatedParameters): Promise<void>;
|
|
35
36
|
setCommercialOrderStatusAsOnHold({ orderId, }: import("./interfaces").SetCommercialOrderStatusAsOnHoldParameters): Promise<void>;
|
|
36
37
|
getCommercialOrderPaymentPageUrl({ orderId, paymentOption, paymentProvider, }: import("./interfaces").GetCommercialOrderPaymentPageUrlParameters): Promise<string>;
|
|
38
|
+
createCommercialOrderPreauthorization({ orderId, paymentProvider, authorId, browserInfo, ipAddress, paymentCardInfo, }: import("./interfaces").CreateCommercialOrderPreauthorizationParameters): Promise<import("./interfaces").CreateCommercialOrderPreauthorizationResponse>;
|
|
37
39
|
updateCommercialOrderShippingAddress({ orderId, shippingAddressId, }: import("./interfaces").UpdateCommercialOrderShippingAddressParameters): Promise<void>;
|
|
38
40
|
updateCommercialOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: import("./interfaces").UpdateCommercialOrderShippingInformationParameters): Promise<void>;
|
|
39
41
|
updateCommercialOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateCommercialOrderShippingTypeParameters): Promise<void>;
|
|
40
|
-
updateLogisticOrderCustomFieldsValue({ orderLogisticId, customFieldsValues, }: import("./interfaces").UpdateOrderLogisticCustomFieldParameters): Promise<import("./interfaces").UpdateOrderLogisticCustomFieldResponse>;
|
|
41
42
|
getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, nbPreviewLines, page, size, sort, }: import("./interfaces").GetLogisticOrdersParameters): Promise<import("./interfaces").GetLogisticOrdersResponse>;
|
|
42
43
|
getLogisticOrderCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderCustomFieldsResponse>;
|
|
43
44
|
getLogisticOrderLineCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderLineCustomFieldsResponse>;
|
|
@@ -50,18 +51,21 @@ export declare const DjustSDK: {
|
|
|
50
51
|
updateLogisticOrderBillingInformation({ orderId, billingAddressId, }: import("./interfaces").UpdateLogisticOrderBillingInformationParameters): Promise<void>;
|
|
51
52
|
cancelLogisticOrder({ orderId, locale, nbPreviewLines, }: import("./interfaces").CancelLogisticOrderParameters): Promise<import("./interfaces").CancelLogisticOrderResponse>;
|
|
52
53
|
confirmLogisticOrderReception({ orderId, locale, nbPreviewLines, }: import("./interfaces").ConfirmLogisticOrderReceptionParameters): Promise<import("./interfaces").ConfirmLogisticOrderReceptionResponse>;
|
|
54
|
+
createLogisticOrder({ orderId, }: import("./interfaces").CreateLogisticOrderParameters): Promise<void>;
|
|
53
55
|
disapproveLogisticOrder({ orderId, locale, nbPreviewLines, }: import("./interfaces").DisapproveLogisticOrderParameters): Promise<import("./interfaces").DisapproveLogisticOrderResponse>;
|
|
54
56
|
getLogisticOrderDocuments({ orderId, idType, }: import("./interfaces").GetLogisticOrderDocumentsParameters): Promise<import("./interfaces").GetLogisticOrderDocumentsResponse>;
|
|
55
57
|
getLogisticOrderDocumentUrl({ orderId, documentId, }: import("./interfaces").GetLogisticOrderDocumentUrlParameters): Promise<string[]>;
|
|
56
58
|
getLogisticOrderLines({ orderId, page, size, sort, locale, }: import("./interfaces").GetLogisticOrderLinesParameters): Promise<import("./interfaces").GetLogisticOrderLinesResponse>;
|
|
59
|
+
updateOnHoldLogisticOrderLines({ orderId, lines, }: import("./interfaces").UpdateOnHoldLogisticOrderLinesParameters): Promise<import("./interfaces").UpdateOnHoldLogisticOrderLinesResponse>;
|
|
57
60
|
updateLogisticOrderLineCustomFields({ orderId, lineId, locale, customFields, }: import("./interfaces").UpdateLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").UpdateLogisticOrderLineCustomFieldsResponse>;
|
|
61
|
+
updateOnHoldLogisticOrderLine({ orderId, orderLineId, quantity, }: import("./interfaces").UpdateOnHoldLogisticOrderLineParameters): Promise<void>;
|
|
58
62
|
updateLogisticOrderShippingAddress({ orderId, shippingAddressId, }: import("./interfaces").UpdateLogisticOrderShippingAddressParameters): Promise<void>;
|
|
59
63
|
getLogisticOrderShippingInformation({ orderId, }: import("./interfaces").GetLogisticOrderShippingAddressParameters): Promise<import("./interfaces").GetLogisticOrderShippingAddressResponse>;
|
|
60
64
|
updateLogisticOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingInformationParameters): Promise<void>;
|
|
61
65
|
updateLogisticOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingTypeParameters): Promise<void>;
|
|
62
66
|
createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParameters): Promise<void>;
|
|
63
67
|
getLogisticOrderReview({ orderId, }: import("./interfaces").GetLogisticOrderReviewParameters): Promise<import("./interfaces").GetLogisticOrderReviewResponse>;
|
|
64
|
-
|
|
68
|
+
addLogisticOrderReview({ orderId, comment, grade, }: import("./interfaces").AddLogisticOrderReviewParameters): Promise<import("./interfaces").AddLogisticOrderReviewResponse>;
|
|
65
69
|
getThreadReasonTypes(): Promise<import("./interfaces").GetThreadReasonTypesResponse>;
|
|
66
70
|
getThreadSubReasons({ reasonType, }: import("./interfaces").GetThreadSubReasonsParameters): Promise<import("./interfaces").GetThreadSubReasonsResponse>;
|
|
67
71
|
getSuppliers({ pageable, supplierStatus, supplierIds, idType, }: import("./interfaces").GetSuppliersParameters): Promise<import("./interfaces").GetSuppliersResponse>;
|
|
@@ -96,7 +100,7 @@ export declare const DjustSDK: {
|
|
|
96
100
|
getNavigationCategories({ locale, }: import("./interfaces").GetNavigationCategoriesParameters): Promise<import("./interfaces").GetNavigationCategoriesResponse>;
|
|
97
101
|
getNavigationCategory({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryParameters): Promise<import("./interfaces").GetNavigationCategoryResponse>;
|
|
98
102
|
getNavigationCategoryBreadcrumbs({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryBreadcrumbsParameters): Promise<import("./interfaces").GetNavigationCategoryBreadcrumbsResponse>;
|
|
99
|
-
getAuthenticatedUser(): Promise<
|
|
103
|
+
getAuthenticatedUser(): Promise<import("./interfaces").GetAuthenticatedUserResponse>;
|
|
100
104
|
createCustomerUser(params: import("./interfaces").CreateCustomerUserParameters): Promise<import("./interfaces").CreateCustomerUserResponse>;
|
|
101
105
|
updateCustomerUser({ civility, firstName, lastName, phone, customFieldValues, }: import("./interfaces").UpdateCustomerUserParameters): Promise<import("./interfaces").UpdateCustomerUserResponse>;
|
|
102
106
|
activateCustomerUser(params: import("./interfaces").ActivateCustomerUserParameters): Promise<void>;
|
|
@@ -112,7 +116,6 @@ export declare const DjustSDK: {
|
|
|
112
116
|
updateCustomerAccountAddress({ addressId, additionalAddress, address, billing, city, company, country, fullName, label, phone, shipping, state, zipcode, }: import("./interfaces").UpdateCustomerAccountAddressParameters): Promise<import("./interfaces").UpdateCustomerAccountAddressResponse>;
|
|
113
117
|
getCustomerAccountOrders({ pageable, locale, }: import("./interfaces").GetCustomerAccountOrdersParameters): Promise<import("./interfaces").GetCustomerAccountOrdersResponse>;
|
|
114
118
|
getCustomerAccountUsers({ pageable, }: import("./interfaces").GetCustomerAccountUsersParameters): Promise<import("./interfaces").GetCustomerAccountUsersResponse>;
|
|
115
|
-
createCustomerAccountUser({ accountId, civility, firstName, lastName, email, password, groups, }: import("./interfaces").CreateCustomerAccountUsersParameters): Promise<void>;
|
|
116
119
|
createCustomerAccountOrganisation({ externalId, name, parentId, }: import("./interfaces").CreateCustomerAccountOrganisationParameters): Promise<import("./interfaces").CreateCustomerAccountOrganisationResponse>;
|
|
117
120
|
updateCustomerAccountOrganisation({ organisationId, name, parentId, status, }: import("./interfaces").UpdateCustomerAccountOrganisationParameters): Promise<import("./interfaces").UpdateCustomerAccountOrganisationResponse>;
|
|
118
121
|
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 {};
|
|
@@ -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
|
-
*
|
|
12
|
-
*
|
|
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
|
-
*
|
|
34
|
-
*
|
|
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
|
-
*
|
|
63
|
-
*
|
|
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
|
-
*
|
|
85
|
-
*
|
|
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
|
-
*
|
|
105
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
21
|
-
*
|
|
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
|
-
*
|
|
53
|
-
*
|
|
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
|
-
*
|
|
92
|
-
*
|
|
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
|
-
*
|
|
124
|
-
*
|
|
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
|
-
*
|
|
153
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
}
|