@djust-b2b/djust-front-sdk 2.1.0 → 2.2.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 +25 -23
- package/lib/index.js +2 -2
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/interfaces/index.js +0 -1
- package/lib/interfaces/models/attribute.d.ts +12 -2
- package/lib/interfaces/models/custom-field.d.ts +4 -0
- package/lib/interfaces/models/customer-account.d.ts +1 -0
- package/lib/interfaces/models/offer.d.ts +9 -0
- package/lib/interfaces/models/payment.d.ts +1 -0
- package/lib/services/attributes/definitions.d.ts +27 -0
- package/lib/services/attributes/index.d.ts +32 -0
- package/lib/services/attributes/index.js +49 -0
- package/lib/services/auth/__mocks__/auth.mocks.d.ts +248 -0
- package/lib/services/auth/__mocks__/auth.mocks.js +220 -0
- package/lib/services/auth/definitions.d.ts +39 -0
- package/lib/services/auth/definitions.requests.d.ts +4 -0
- package/lib/services/auth/index.d.ts +58 -3
- package/lib/services/auth/index.js +72 -2
- package/lib/services/cart/index.js +1 -0
- package/lib/services/custom-field/definitions.d.ts +6 -0
- package/lib/services/custom-field/index.d.ts +40 -2
- package/lib/services/custom-field/index.js +50 -3
- package/lib/services/customer-account/definitions.d.ts +15 -2
- package/lib/services/customer-account/index.d.ts +47 -5
- package/lib/services/customer-account/index.js +68 -5
- package/lib/services/customer-user/definitions.d.ts +2 -0
- package/lib/services/customer-user/index.d.ts +1 -1
- package/lib/services/customer-user/index.js +4 -1
- package/lib/services/incident/definitions.d.ts +15 -0
- package/lib/services/incident/index.d.ts +81 -2
- package/lib/services/incident/index.js +116 -1
- package/lib/services/logistic-order/definitions.d.ts +15 -4
- package/lib/services/logistic-order/index.d.ts +19 -10
- package/lib/services/logistic-order/index.js +40 -17
- package/lib/services/navigation-category/definitions.d.ts +7 -0
- package/lib/services/navigation-category/index.d.ts +33 -1
- package/lib/services/navigation-category/index.js +40 -0
- package/lib/services/offer-inventories/index.js +3 -3
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts +108 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js +200 -0
- package/lib/services/offer-prices/definitions.d.ts +23 -0
- package/lib/services/offer-prices/index.d.ts +35 -0
- package/lib/services/offer-prices/index.js +52 -0
- package/lib/services/payment/index.js +1 -1
- package/lib/services/product/definitions.d.ts +5 -0
- package/lib/services/product/index.d.ts +6 -29
- package/lib/services/product/index.js +8 -42
- package/lib/services/product-variant/definitions.d.ts +27 -0
- package/lib/services/product-variant/index.d.ts +30 -1
- package/lib/services/product-variant/index.js +40 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.d.ts +48 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.js +167 -0
- package/lib/services/supplier/definitions.d.ts +3 -3
- package/lib/services/supplier/index.js +0 -2
- package/package.json +4 -3
- package/lib/interfaces/models/buying-list.d.ts +0 -16
- package/lib/services/buying-list/definitions.d.ts +0 -43
- package/lib/services/buying-list/index.d.ts +0 -33
- package/lib/services/buying-list/index.js +0 -104
- /package/lib/services/{buying-list → attributes}/definitions.js +0 -0
- /package/lib/{interfaces/models/buying-list.js → services/offer-prices/definitions.js} +0 -0
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const DjustSDK: {
|
|
2
2
|
initialize: (initConfig: import("./settings/fetch-instance").ClientConfig) => void;
|
|
3
3
|
updateConfiguration: (newConfig: Partial<import("./settings/fetch-instance").ClientConfig>) => void;
|
|
4
|
+
getCustomFields(params: import("./services/custom-field/definitions").GetCustomFieldParameters): Promise<import("./services/custom-field/definitions").GetCustomFieldResponse>;
|
|
5
|
+
postMediaCustomField(params: import("./services/custom-field/definitions").PostMediaCustomFieldParameters): Promise<string>;
|
|
6
|
+
getMediaUrl(params: import("./services/custom-field/definitions").GetMediaUrlParameters): Promise<string>;
|
|
4
7
|
getPaginatedOfferInventories({ page, size, sort, productStatus, offerInventoryStatus, variantStatus, offerPriceStatus, supplierId, offersIds, offerPriceIds, currency, hasStock, idType, }: import("./services/offer-inventories/definitions").GetPaginatedOfferInventoriesParameters): Promise<import("./services/offer-inventories/definitions").GetOfferInventoriesResponse>;
|
|
5
8
|
getPaginatedOfferInventoriesV2({ page, size, sort, variantExternalId, }: import("./services/offer-inventories/definitions").GetPaginatedOfferInventoriesV2Parameters): Promise<import("./services/offer-inventories/definitions").GetOfferInventoriesV2Response>;
|
|
6
9
|
getOfferInventoryCustomFields({ externalId, page, size, sort, locale, }: import("./services/offer-inventories/definitions").GetOfferInventoryCustomFieldsParameters): Promise<import("./services/offer-inventories/definitions").GetOfferInventoryCustomFieldsResponse>;
|
|
@@ -9,6 +12,8 @@ export declare const DjustSDK: {
|
|
|
9
12
|
createOrderLogisticIncident({ logisticOrderId, idType, customField, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentResponse>;
|
|
10
13
|
createOrderLogisticLineIncident({ logisticOrderId, idType, customFieldIdType, orderLines, reasonCode, }: import("./services/incident/definitions").createOrderLogisticLineIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticLineIncidentResponse>;
|
|
11
14
|
createOrderLogisticIncidentThread({ logisticOrderId, incidentId, idType, customField, message, name, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentThreadParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentThreadResponse>;
|
|
15
|
+
createIncident({ customField, externalId, logisticOrderId, reasonCodes, idType, }: import("./services/incident/definitions").createIncidentParameters): Promise<import("./services/incident/definitions").createIncidentResponse>;
|
|
16
|
+
getIncidentsV2({ customerAccountIds, linkedType, ids, status, idType, page, size, sort, supplierIds, }: import("./services/incident/definitions").getIncidentsParameters): Promise<import("./services/incident/definitions").getIncidentsResponse>;
|
|
12
17
|
getCommercialOrders({ locale, nbPreviewLines, page, size, sort, connectedUserOnly, customerAccountIds, isValidated, }: import("./interfaces").GetCommercialOrdersParameters): Promise<import("./interfaces").GetCommercialOrdersResponse>;
|
|
13
18
|
createCommercialOrder({ nbPreviewLines, channel, customFields, locale, origin, originId, paymentInfo, }: import("./interfaces").CreateCommercialOrderParameters): Promise<import("./interfaces").CreateCommercialOrderResponse>;
|
|
14
19
|
createCommercialOrderV2({ customFieldIdType, customFields, }: import("./interfaces").CreateCommercialOrderV2Parameters): Promise<import("./interfaces").CreateCommercialOrderV2Response>;
|
|
@@ -28,10 +33,10 @@ export declare const DjustSDK: {
|
|
|
28
33
|
updateCommercialOrderLines({ commercialOrderId, customFieldIdType, lineIdType, lineType, updateOrderCommercialLines, updateOrderLineIdType, updateOrderLineType, }: import("./interfaces").UpdateCommercialOrderLinesParameters): Promise<import("./interfaces").UpdateCommercialOrderLinesResponse>;
|
|
29
34
|
deleteCommercialOrderLines({ commercialOrderId, body, }: import("./interfaces").DeleteCommercialOrderLinesParameters): Promise<import("./interfaces").DeleteCommercialOrderLinesResponse>;
|
|
30
35
|
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>;
|
|
36
|
+
getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, connectedUserOnly, nbPreviewLines, page, size, sort, suppliersIds, creationDateFrom, creationDateTo, updateDateFrom, updateDateTo, }: import("./interfaces").GetLogisticOrdersParameters): Promise<import("./interfaces").GetLogisticOrdersResponse>;
|
|
32
37
|
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>;
|
|
38
|
+
getLogisticOrderCustomFields({ customFieldIds, page, size, sort, idType, }: import("./interfaces").GetLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderCustomFieldsResponse>;
|
|
39
|
+
getLogisticOrderLineCustomFields({ customFieldIds, page, size, sort, idType, }: import("./interfaces").GetLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderLineCustomFieldsResponse>;
|
|
35
40
|
getLogisticOrder({ orderId, locale, nbPreviewLines, }: import("./interfaces").GetLogisticOrderParameters): Promise<import("./interfaces").GetLogisticOrderResponse>;
|
|
36
41
|
updateLogisticOrderCustomFields({ orderId, locale, nbPreviewLines, customFields, }: import("./interfaces").UpdateLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").UpdateLogisticOrderCustomFieldsResponse>;
|
|
37
42
|
getLogisticOrderAccountingDocuments({ orderId, }: import("./interfaces").GetLogisticOrderAccountingDocumentsParameters): Promise<import("./interfaces").GetLogisticOrderAccountingDocumentsResponse>;
|
|
@@ -55,13 +60,13 @@ export declare const DjustSDK: {
|
|
|
55
60
|
updateLogisticOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingTypeParameters): Promise<void>;
|
|
56
61
|
createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParameters): Promise<import("./interfaces").CreateLogisticOrderThreadResponse>;
|
|
57
62
|
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>;
|
|
63
|
+
getLogisticOrderThreads({ logisticOrderId, pageable, idType, }: import("./interfaces").GetLogisticOrderThreadsParams): Promise<import("./interfaces").GetLogisticOrderThreadsResponse>;
|
|
64
|
+
getLogisticOrderThread({ logisticOrderId, threadId, idType, }: import("./interfaces").GetLogisticOrderThreadParams): Promise<import("./interfaces").GetLogisticOrderThreadResponse>;
|
|
65
|
+
createOrderLogisticThreadMessages({ logisticOrderId, threadId, body, customField, idType, }: import("./interfaces").CreateLogisticOrderThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderThreadMessagesResponse>;
|
|
61
66
|
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>;
|
|
67
|
+
createLogisticOrderIncidentThreads({ logisticOrderId, incidentId, customField, message, name, reasonCode, idType, }: import("./interfaces").CreateLogisticOrderIncidentThreadsParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadsResponse>;
|
|
68
|
+
getLogisticOrderIncidentThread({ logisticOrderId, incidentId, threadId, idType, }: import("./interfaces").GetLogisticOrderIncidentThreadParams): Promise<import("./interfaces").GetLogisticOrderIncidentThreadResponse>;
|
|
69
|
+
createLogisticOrderIncidentThreadMessages({ logisticOrderId, incidentId, threadId, body, customField, idType, }: import("./interfaces").CreateLogisticOrderIncidentThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadMessagesResponse>;
|
|
65
70
|
updateLogisticOrderIncidentThreadMessage({ logisticOrderId, incidentId, threadId, messageId, customFieldValues, idType, }: import("./interfaces").UpdateLogisticOrderIncidentThreadMessageParams): Promise<void>;
|
|
66
71
|
getLogisticOrderReview({ orderId, }: import("./interfaces").GetLogisticOrderReviewParameters): Promise<import("./interfaces").GetLogisticOrderReviewResponse>;
|
|
67
72
|
addLogisticOrderReview({ orderId, comment, grade, }: import("./interfaces").AddLogisticOrderReviewParameters): Promise<import("./interfaces").AddLogisticOrderReviewResponse>;
|
|
@@ -84,11 +89,10 @@ export declare const DjustSDK: {
|
|
|
84
89
|
initializeOrderFromSupplierQuote({ supplierQuoteId, nbPreviewLines, quoteLineIdsAndQuantities, }: import("./interfaces").InitializeOrderFromSupplierQuoteParameters): Promise<import("./interfaces").InitializeOrderFromSupplierQuoteResponse>;
|
|
85
90
|
autoCompleteSearchProducts({ input, locale, currency, pageable, aggregation, productTags, }: import("./interfaces").AutoCompleteSearchProductsParameters): Promise<import("./interfaces").SearchProductsResponse>;
|
|
86
91
|
getProductsList({ locale, filters, pageable, }: import("./interfaces").GetProductsListParameters): Promise<import("./interfaces").GetProductsListResponse>;
|
|
87
|
-
|
|
88
|
-
getProductVariantOffers({ productIdentifier, productIdType, currency, }: import("./interfaces").GetProductVariantOffersParameters): Promise<import("./interfaces").GetProductVariantOffersResponse>;
|
|
92
|
+
getProductVariantOffers({ productIdentifier, productIdType, currency, withoutPrice, }: import("./interfaces").GetProductVariantOffersParameters): Promise<import("./interfaces").GetProductVariantOffersResponse>;
|
|
89
93
|
getProductVariantSuppliers({ productVariantId, }: import("./interfaces").GetProductVariantSuppliersParameters): Promise<import("./interfaces").GetProductVariantSuppliersResponse>;
|
|
90
94
|
getProduct({ productIdentifier, productIdType, locale, }: import("./interfaces").GetProductParameters): Promise<import("./interfaces").GetProductsListResponse>;
|
|
91
|
-
getProductOffers({ productIdentifier, productIdType, locale, currency, }: import("./interfaces").GetProductOffersParameters): Promise<import("./interfaces").GetProductOffersResponse>;
|
|
95
|
+
getProductOffers({ productIdentifier, productIdType, locale, currency, withoutPrice, }: import("./interfaces").GetProductOffersParameters): Promise<import("./interfaces").GetProductOffersResponse>;
|
|
92
96
|
getRelatedProducts({ productIdentifier, productIdType, locale, currency, pageable, }: import("./interfaces").GetRelatedProductsParameters): Promise<import("./interfaces").GetRelatedProductsResponse>;
|
|
93
97
|
getProductReviews({ productIdentifier, productIdType, }: import("./interfaces").GetProductReviewsParameters): Promise<import("./interfaces").GetProductReviewsResponse>;
|
|
94
98
|
getProductStatReviews({ productIdentifier, productIdType, }: import("./interfaces").GetProductStatReviewsParameters): Promise<import("./interfaces").GetProductStatReviewsResponse>;
|
|
@@ -99,6 +103,7 @@ export declare const DjustSDK: {
|
|
|
99
103
|
getNavigationCategories({ locale, }: import("./interfaces").GetNavigationCategoriesParameters): Promise<import("./interfaces").GetNavigationCategoriesResponse>;
|
|
100
104
|
getNavigationCategory({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryParameters): Promise<import("./interfaces").GetNavigationCategoryResponse>;
|
|
101
105
|
getNavigationCategoryBreadcrumbs({ locale, idType, navigationCategoryId, }: import("./interfaces").GetNavigationCategoryBreadcrumbsParameters): Promise<import("./interfaces").GetNavigationCategoryBreadcrumbsResponse>;
|
|
106
|
+
getNavigationCategoryByOptions(params?: import("./interfaces").GetNavigationCategoryByOptionsParameters): Promise<import("./interfaces").GetNavigationCategoriesResponse>;
|
|
102
107
|
getAuthenticatedUser(): Promise<import("./interfaces").GetAuthenticatedUserResponse>;
|
|
103
108
|
createCustomerUser(params: import("./interfaces").CreateCustomerUserParameters): Promise<import("./interfaces").CreateCustomerUserResponse>;
|
|
104
109
|
updateCustomerUser({ civility, firstName, lastName, phone, customFieldValues, }: import("./interfaces").UpdateCustomerUserParameters): Promise<import("./interfaces").UpdateCustomerUserResponse>;
|
|
@@ -106,7 +111,7 @@ export declare const DjustSDK: {
|
|
|
106
111
|
getCustomerUserAddresses({ shipping, billing, account, organisationIds, }: import("./interfaces").GetCustomerUserAddressesParameters): Promise<void>;
|
|
107
112
|
getCustomerUserOrganisations(): Promise<import("./interfaces").GetCustomerUserOrganisationsResponse>;
|
|
108
113
|
sendCustomerUserActivationRequest({ redirectUrl, token, }: import("./interfaces").SendCustomerUserActivationRequestParameters): Promise<void>;
|
|
109
|
-
updateSpecificCustomerUser({ userToUpdateId, civility, firstName, lastName, phone, groups, customFieldValues, }: import("./interfaces").UpdateSpecificCustomerUserParameters): Promise<void>;
|
|
114
|
+
updateSpecificCustomerUser({ userToUpdateId, civility, firstName, lastName, phone, groups, customFieldValues, idType, }: import("./interfaces").UpdateSpecificCustomerUserParameters): Promise<void>;
|
|
110
115
|
removeAccountsFromCustomerUser({ userToUpdateId, idType, accountIds, }: import("./interfaces").RemoveAccountsFromCustomerUserParameters): Promise<void>;
|
|
111
116
|
addCustomerUserToAccounts({ userToUpdateId, idType, accountIds, }: import("./interfaces").AddCustomerUserToAccountsParameters): Promise<void>;
|
|
112
117
|
getCustomerAccount(config?: import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountResponse>;
|
|
@@ -117,11 +122,14 @@ export declare const DjustSDK: {
|
|
|
117
122
|
createCustomerAccountAddress(params: import("./interfaces").CreateCustomerAccountAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").CreateCustomerAccountAddressResponse>;
|
|
118
123
|
deleteCustomerAccountAddress({ addressId, ...config }: import("./interfaces").DeleteCustomerAccountAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<void>;
|
|
119
124
|
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>;
|
|
125
|
+
getCustomerAccountCustomFields({ customFieldIds, idType, pageable, }: import("./interfaces").GetCustomerAccountCustomFieldsParameters): Promise<import("./interfaces").GetCustomerAccountCustomFieldsResponse>;
|
|
120
126
|
getCustomerAccountOrders(params: import("./interfaces").GetCustomerAccountOrdersParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountOrdersResponse>;
|
|
121
127
|
getCustomerAccountUsers(params: import("./interfaces").GetCustomerAccountUsersParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountUsersResponse>;
|
|
122
128
|
createCustomerAccountOrganisation(params: import("./interfaces").CreateCustomerAccountOrganisationParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").CreateCustomerAccountOrganisationResponse>;
|
|
123
129
|
updateCustomerAccountOrganisation(params: import("./interfaces").UpdateCustomerAccountOrganisationParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").UpdateCustomerAccountOrganisationResponse>;
|
|
124
|
-
getCustomerAccountOrganisations(
|
|
130
|
+
getCustomerAccountOrganisations(params?: {
|
|
131
|
+
pageable?: import("./interfaces/models/common").PageableParameters;
|
|
132
|
+
} & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountOrganisationResponse>;
|
|
125
133
|
getCustomerAccountOrganisationAddresses(params: import("./interfaces").GetCustomerAccountOrganisationAddressesParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountOrganisationAddressesResponse>;
|
|
126
134
|
deleteCustomerAccountOrganisationAddress(params: import("./interfaces").DeleteCustomerAccountOrganisationAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<void>;
|
|
127
135
|
updateCustomerAccountOrganisationAddress(params: import("./interfaces").UpdateCustomerAccountOrganisationAddressParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").UpdateCustomerAccountOrganisationAddressResponse>;
|
|
@@ -139,19 +147,13 @@ export declare const DjustSDK: {
|
|
|
139
147
|
getCartLines(params: import("./interfaces").GetCartLinesParameters): Promise<import("./interfaces").GetCartLinesResponse>;
|
|
140
148
|
updateCartLines(params: import("./interfaces").UpdateCartLinesParameters): Promise<import("./interfaces").UpdateCartLinesResponse>;
|
|
141
149
|
updateCartLinesByVariant(params: import("./interfaces").UpdateCartLinesByVariantParameters): Promise<import("./interfaces").UpdateCartLinesByVariantResponse>;
|
|
142
|
-
getBuyingList({ buyingListId, locale, }: import("./interfaces").GetBuyingListParameters): Promise<import("./interfaces").GetBuyingListResponse>;
|
|
143
|
-
getBuyingLists(): Promise<import("./interfaces").GetBuyingListsResponse>;
|
|
144
|
-
createBuyingList({ name, }: import("./interfaces").CreateBuyingListParameters): Promise<import("./interfaces").CreateBuyingListResponse>;
|
|
145
|
-
updateBuyingList({ buyingListId, name, }: import("./interfaces").UpdateBuyingListParameters): Promise<import("./interfaces").UpdateBuyingListResponse>;
|
|
146
|
-
updateBuyingListItems({ buyingListId, products, }: import("./interfaces").UpdateBuyingListItemsParameters): Promise<import("./interfaces").UpdateBuyingListItemsResponse>;
|
|
147
|
-
deleteBuyingList({ buyingListId, }: import("./interfaces").DeleteBuyingListParameters): Promise<void>;
|
|
148
|
-
deleteBuyingListItems({ buyingListId, itemIds, }: import("./interfaces").DeleteBuyingListItemsParameters): Promise<void>;
|
|
149
|
-
updateBuyingListOwner({ buyingListId, newOwnerEmail, }: import("./interfaces").UpdateBuyingListOwnerParameters): Promise<void>;
|
|
150
150
|
isTokenValid({ token, }: import("./services/auth/definitions.requests").IsTokenValidParameters): Promise<boolean>;
|
|
151
151
|
refreshToken({ refreshToken, }: import("./services/auth/definitions.requests").RefreshTokenParameters): Promise<import("./interfaces").RefreshTokenResponse>;
|
|
152
152
|
resetPassword({ newPassword, resetPasswordToken, }: import("./services/auth/definitions.requests").ResetPasswordParameters): Promise<void>;
|
|
153
153
|
sendResetPasswordEmail({ email, }: import("./services/auth/definitions.requests").SendResetPasswordEmailParameters): Promise<void>;
|
|
154
|
-
login({ username, password, }: import("./services/auth/definitions.requests").LoginParameters): Promise<import("./interfaces").LoginResponse>;
|
|
154
|
+
login({ username, password, withUser, }: import("./services/auth/definitions.requests").LoginParameters): Promise<import("./interfaces").LoginResponse>;
|
|
155
155
|
logout(): Promise<void>;
|
|
156
|
+
getSettings(): Promise<import("./interfaces").SettingsResponse>;
|
|
157
|
+
getStore({ storeId, }: import("./services/auth/definitions.requests").GetStoreParameters): Promise<import("./interfaces").Store>;
|
|
156
158
|
};
|
|
157
159
|
export * from "./interfaces";
|
package/lib/index.js
CHANGED
|
@@ -38,7 +38,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.DjustSDK = void 0;
|
|
40
40
|
const AuthServices = __importStar(require("./services/auth"));
|
|
41
|
-
const BuyingListServices = __importStar(require("./services/buying-list"));
|
|
42
41
|
const CartServices = __importStar(require("./services/cart"));
|
|
43
42
|
const CustomerAccountServices = __importStar(require("./services/customer-account"));
|
|
44
43
|
const CustomerUserServices = __importStar(require("./services/customer-user"));
|
|
@@ -50,10 +49,10 @@ const CommercialOrderServices = __importStar(require("./services/commercial-orde
|
|
|
50
49
|
const LogisticOrderServices = __importStar(require("./services/logistic-order"));
|
|
51
50
|
const IncidentServices = __importStar(require("./services/incident"));
|
|
52
51
|
const OfferServices = __importStar(require("./services/offer-inventories"));
|
|
52
|
+
const CustomFieldServices = __importStar(require("./services/custom-field"));
|
|
53
53
|
const fetch_instance_1 = require("./settings/fetch-instance");
|
|
54
54
|
exports.DjustSDK = {
|
|
55
55
|
...AuthServices,
|
|
56
|
-
...BuyingListServices,
|
|
57
56
|
...CartServices,
|
|
58
57
|
...CustomerAccountServices,
|
|
59
58
|
...CustomerUserServices,
|
|
@@ -65,6 +64,7 @@ exports.DjustSDK = {
|
|
|
65
64
|
...CommercialOrderServices,
|
|
66
65
|
...IncidentServices,
|
|
67
66
|
...OfferServices,
|
|
67
|
+
...CustomFieldServices,
|
|
68
68
|
initialize: fetch_instance_1.initialize,
|
|
69
69
|
updateConfiguration: fetch_instance_1.updateConfiguration,
|
|
70
70
|
};
|
package/lib/interfaces/index.js
CHANGED
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("../services/auth/definitions"), exports);
|
|
18
|
-
__exportStar(require("../services/buying-list/definitions"), exports);
|
|
19
18
|
__exportStar(require("../services/cart/definitions"), exports);
|
|
20
19
|
__exportStar(require("../services/customer-account/definitions"), exports);
|
|
21
20
|
__exportStar(require("../services/customer-user/definitions"), exports);
|
|
@@ -7,9 +7,19 @@ export interface AttributeValue {
|
|
|
7
7
|
export interface Attribute {
|
|
8
8
|
id: string;
|
|
9
9
|
externalId: string;
|
|
10
|
-
|
|
11
|
-
|
|
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;
|
|
@@ -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,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
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mocks centralisés pour les tests du module auth
|
|
3
|
+
*/
|
|
4
|
+
export declare const mockTokens: {
|
|
5
|
+
validToken: string;
|
|
6
|
+
invalidToken: string;
|
|
7
|
+
refreshToken: string;
|
|
8
|
+
resetPasswordToken: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const mockUsers: {
|
|
11
|
+
validUser: {
|
|
12
|
+
username: string;
|
|
13
|
+
password: string;
|
|
14
|
+
};
|
|
15
|
+
invalidUser: {
|
|
16
|
+
username: string;
|
|
17
|
+
password: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const mockAuthResponses: {
|
|
21
|
+
loginSuccess: {
|
|
22
|
+
token: {
|
|
23
|
+
accessToken: string;
|
|
24
|
+
expireAt: number;
|
|
25
|
+
refreshToken: string;
|
|
26
|
+
};
|
|
27
|
+
user: {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
refreshTokenSuccess: {
|
|
32
|
+
token: {
|
|
33
|
+
accessToken: string;
|
|
34
|
+
expireAt: number;
|
|
35
|
+
refreshToken: string;
|
|
36
|
+
};
|
|
37
|
+
user: {
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare const mockParameters: {
|
|
43
|
+
isTokenValid: {
|
|
44
|
+
valid: {
|
|
45
|
+
token: string;
|
|
46
|
+
};
|
|
47
|
+
invalid: {
|
|
48
|
+
token: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
refreshToken: {
|
|
52
|
+
valid: {
|
|
53
|
+
refreshToken: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
resetPassword: {
|
|
57
|
+
valid: {
|
|
58
|
+
newPassword: string;
|
|
59
|
+
resetPasswordToken: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
sendResetPasswordEmail: {
|
|
63
|
+
valid: {
|
|
64
|
+
email: string;
|
|
65
|
+
};
|
|
66
|
+
invalid: {
|
|
67
|
+
email: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
login: {
|
|
71
|
+
valid: {
|
|
72
|
+
username: string;
|
|
73
|
+
password: string;
|
|
74
|
+
};
|
|
75
|
+
withUserFalse: {
|
|
76
|
+
username: string;
|
|
77
|
+
password: string;
|
|
78
|
+
withUser: boolean;
|
|
79
|
+
};
|
|
80
|
+
invalid: {
|
|
81
|
+
username: string;
|
|
82
|
+
password: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
getStore: {
|
|
86
|
+
valid: {
|
|
87
|
+
storeId: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export declare const mockResponses: {
|
|
92
|
+
isTokenValid: {
|
|
93
|
+
success: {
|
|
94
|
+
data: boolean;
|
|
95
|
+
headers: Headers;
|
|
96
|
+
status: number;
|
|
97
|
+
};
|
|
98
|
+
failure: {
|
|
99
|
+
data: boolean;
|
|
100
|
+
headers: Headers;
|
|
101
|
+
status: number;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
refreshToken: {
|
|
105
|
+
success: {
|
|
106
|
+
data: {
|
|
107
|
+
token: {
|
|
108
|
+
accessToken: string;
|
|
109
|
+
expireAt: number;
|
|
110
|
+
refreshToken: string;
|
|
111
|
+
};
|
|
112
|
+
user: {
|
|
113
|
+
id: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
headers: Headers;
|
|
117
|
+
status: number;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
resetPassword: {
|
|
121
|
+
success: {
|
|
122
|
+
data: undefined;
|
|
123
|
+
headers: Headers;
|
|
124
|
+
status: number;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
sendResetPasswordEmail: {
|
|
128
|
+
success: {
|
|
129
|
+
data: undefined;
|
|
130
|
+
headers: Headers;
|
|
131
|
+
status: number;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
login: {
|
|
135
|
+
success: {
|
|
136
|
+
data: {
|
|
137
|
+
token: {
|
|
138
|
+
accessToken: string;
|
|
139
|
+
expireAt: number;
|
|
140
|
+
refreshToken: string;
|
|
141
|
+
};
|
|
142
|
+
user: {
|
|
143
|
+
id: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
headers: Headers;
|
|
147
|
+
status: number;
|
|
148
|
+
};
|
|
149
|
+
withUserFalse: {
|
|
150
|
+
data: {
|
|
151
|
+
token: {
|
|
152
|
+
accessToken: string;
|
|
153
|
+
expireAt: number;
|
|
154
|
+
refreshToken: string;
|
|
155
|
+
};
|
|
156
|
+
user: {
|
|
157
|
+
id: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
headers: Headers;
|
|
161
|
+
status: number;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
logout: {
|
|
165
|
+
success: {
|
|
166
|
+
data: undefined;
|
|
167
|
+
headers: Headers;
|
|
168
|
+
status: number;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
getSettings: {
|
|
172
|
+
success: {
|
|
173
|
+
data: {
|
|
174
|
+
manualAccountCheck: boolean;
|
|
175
|
+
};
|
|
176
|
+
headers: Headers;
|
|
177
|
+
status: number;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
getStore: {
|
|
181
|
+
success: {
|
|
182
|
+
data: {
|
|
183
|
+
active: boolean;
|
|
184
|
+
customFieldValues: {
|
|
185
|
+
customField: {
|
|
186
|
+
externalId: string;
|
|
187
|
+
externalSource: string;
|
|
188
|
+
faceted: boolean;
|
|
189
|
+
id: string;
|
|
190
|
+
indexable: boolean;
|
|
191
|
+
mandatory: boolean;
|
|
192
|
+
name: {
|
|
193
|
+
fr: string;
|
|
194
|
+
en: string;
|
|
195
|
+
};
|
|
196
|
+
role: string;
|
|
197
|
+
sealedTarget: string;
|
|
198
|
+
searchable: boolean;
|
|
199
|
+
sortable: boolean;
|
|
200
|
+
status: string;
|
|
201
|
+
};
|
|
202
|
+
value: {
|
|
203
|
+
fr: string;
|
|
204
|
+
en: string;
|
|
205
|
+
};
|
|
206
|
+
}[];
|
|
207
|
+
description: string;
|
|
208
|
+
externalId: string;
|
|
209
|
+
id: string;
|
|
210
|
+
name: string;
|
|
211
|
+
storeLocales: {
|
|
212
|
+
active: boolean;
|
|
213
|
+
code: string;
|
|
214
|
+
id: string;
|
|
215
|
+
label: string;
|
|
216
|
+
main: boolean;
|
|
217
|
+
}[];
|
|
218
|
+
};
|
|
219
|
+
headers: Headers;
|
|
220
|
+
status: number;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
export declare const mockErrors: {
|
|
225
|
+
networkError: Error;
|
|
226
|
+
unauthorized: Error;
|
|
227
|
+
badRequest: Error;
|
|
228
|
+
notFound: Error;
|
|
229
|
+
serverError: Error;
|
|
230
|
+
};
|
|
231
|
+
export declare const mockHttpErrors: {
|
|
232
|
+
400: {
|
|
233
|
+
status: number;
|
|
234
|
+
message: string;
|
|
235
|
+
};
|
|
236
|
+
401: {
|
|
237
|
+
status: number;
|
|
238
|
+
message: string;
|
|
239
|
+
};
|
|
240
|
+
404: {
|
|
241
|
+
status: number;
|
|
242
|
+
message: string;
|
|
243
|
+
};
|
|
244
|
+
500: {
|
|
245
|
+
status: number;
|
|
246
|
+
message: string;
|
|
247
|
+
};
|
|
248
|
+
};
|