idosell 0.3.11 → 0.3.15
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/changelog.md +24 -1
- package/dist/app.d.ts +2 -2
- package/dist/enums.d.ts +227 -11
- package/dist/enums.js +228 -10
- package/dist/gateways.d.ts +75 -16
- package/dist/helpers.js +76 -11
- package/dist/methods/getOrdersAuctionDetails.js +3 -3
- package/dist/methods/getProductsAuctions.js +2 -2
- package/dist/methods/getProductsDescriptions.js +3 -0
- package/dist/methods/getReturns.js +1 -0
- package/dist/methods/getVouchers.js +1 -0
- package/dist/methods/postEntries.js +1 -1
- package/dist/methods/postOrders.js +1 -1
- package/dist/methods/postOrdersDocuments.js +4 -1
- package/dist/methods/postOrdersImages.js +1 -1
- package/dist/methods/postProducts.js +0 -1
- package/dist/methods/putClients.js +1 -1
- package/dist/methods/putProductsAttachments.js +4 -0
- package/dist/methods/putProductsDescriptions.js +3 -2
- package/dist/methods/putProductsGroupsMainProduct.js +4 -0
- package/dist/methods/putProductsGroupsSettings.js +4 -0
- package/dist/methods/putProductsOmnibusPrices.js +6 -0
- package/dist/methods/putProductsQuestions.js +4 -0
- package/dist/methods/putProductsStrikethroughPrices.js +8 -1
- package/dist/methods/searchOrders.js +2 -2
- package/dist/methods/searchOrdersUnfinished.js +2 -2
- package/dist/methods/searchPackages.js +2 -1
- package/dist/methods/searchProducts.js +2 -2
- package/dist/methods/searchProductsDeliveryTime.js +1 -1
- package/dist/params.js +2 -1
- package/dist/request.js +31 -6
- package/dist/responses.d.ts +192 -10
- package/package.json +1 -1
- package/tests/deleteClients.test.js +1 -1
- package/tests/deleteClientsDeliveryAddress.test.js +1 -1
- package/tests/deleteClientsGiftcards.test.js +1 -1
- package/tests/deleteClientsPayerAddress.test.js +1 -1
- package/tests/deleteClientsPricelists.test.js +1 -1
- package/tests/deleteClientsTags.test.js +1 -1
- package/tests/deleteClientsTagsClear.test.js +1 -1
- package/tests/deleteConfigVariables.test.js +1 -1
- package/tests/deleteCouriersPickupPoints.test.js +1 -1
- package/tests/deleteCpa.test.js +1 -1
- package/tests/deleteCpaCampaign.test.js +1 -1
- package/tests/deleteDiscountsGroups.test.js +1 -1
- package/tests/deleteDiscountsGroupsProducts.test.js +1 -1
- package/tests/deleteDiscountsRebatesCard.test.js +1 -1
- package/tests/deleteDiscountsRebatesCode.test.js +1 -1
- package/tests/deleteEntries.test.js +1 -1
- package/tests/deleteMenu.test.js +1 -1
- package/tests/deleteOrdersDocuments.test.js +1 -1
- package/tests/deleteOrdersImages.test.js +1 -1
- package/tests/deleteProducts.test.js +1 -1
- package/tests/deleteProductsBrands.test.js +1 -1
- package/tests/deleteProductsCollectionsProducts.test.js +1 -1
- package/tests/deleteProductsImages.test.js +1 -1
- package/tests/deleteProductsOpinions.test.js +1 -1
- package/tests/deleteProductsParameters.test.js +1 -1
- package/tests/deleteProductsProductsToFacebookCatalog.test.js +1 -1
- package/tests/deleteProductsProductsToPromotion.test.js +1 -1
- package/tests/deleteProductsSeries.test.js +1 -1
- package/tests/deleteProductsSizes.test.js +1 -1
- package/tests/deleteResponsibilityEntities.test.js +1 -1
- package/tests/deleteSizecharts.test.js +1 -1
- package/tests/deleteSnippets.test.js +1 -1
- package/tests/deleteSnippetsCampaign.test.js +1 -1
- package/tests/deleteSnippetsCookies.test.js +1 -1
- package/tests/deleteVouchers.test.js +1 -1
- package/tests/deleteWarranties.test.js +1 -1
- package/tests/deleteWmsStocksdocumentsDocuments.test.js +1 -1
- package/tests/deleteWmsStocksdocumentsProducts.test.js +2 -2
- package/tests/deleteWmsSuppliers.test.js +1 -1
- package/tests/getClients.test.js +4 -4
- package/tests/getClientsBalance.test.js +4 -4
- package/tests/getClientsDeliveryAddress.test.js +1 -1
- package/tests/getClientsGiftcardsTypes.test.js +1 -1
- package/tests/getClientsMembershipCards.test.js +1 -1
- package/tests/getClientsPayerAddress.test.js +3 -3
- package/tests/getClientsPricelists.test.js +2 -2
- package/tests/getClientsPricelistsClients.test.js +1 -1
- package/tests/getClientsPricelistsProducts.test.js +3 -3
- package/tests/getClientsPricesDiscountGroups.test.js +2 -2
- package/tests/getClientsPricesDiscounts.test.js +5 -5
- package/tests/getClientsProfitPoints.test.js +3 -3
- package/tests/getClientsProvinceList.test.js +1 -1
- package/tests/getClientsTags.test.js +1 -1
- package/tests/getConfigVariables.test.js +1 -1
- package/tests/getCouriers.test.js +4 -3
- package/tests/getCouriersPickupPoints.test.js +5 -5
- package/tests/getCpa.test.js +2 -2
- package/tests/getCpaCampaign.test.js +2 -2
- package/tests/getDeliveriesProfiles.test.js +1 -1
- package/tests/getDeliveriesRegions.test.js +1 -1
- package/tests/getDiscountsGroups.test.js +2 -2
- package/tests/getDiscountsGroupsClients.test.js +1 -1
- package/tests/getEntries.test.js +2 -2
- package/tests/getEntriesPagesToDisplay.test.js +1 -1
- package/tests/getEntriesSources.test.js +1 -1
- package/tests/getMenu.test.js +4 -4
- package/tests/getMenuFilter.test.js +3 -3
- package/tests/getOrders.test.js +1 -1
- package/tests/getOrdersAnalytics.test.js +1 -1
- package/tests/getOrdersAuctionDetails.test.js +13 -3
- package/tests/getOrdersDocuments.test.js +1 -1
- package/tests/getOrdersExportdocumentsEPP.test.js +6 -16
- package/tests/getOrdersExportdocumentsJPK.test.js +4 -4
- package/tests/getOrdersHandler.test.js +1 -1
- package/tests/getOrdersHistory.test.js +1 -1
- package/tests/getOrdersImages.test.js +1 -1
- package/tests/getOrdersLabels.test.js +1 -1
- package/tests/getOrdersOpinionsRate.test.js +3 -3
- package/tests/getOrdersPackages.test.js +7 -7
- package/tests/getOrdersProfitability.test.js +1 -1
- package/tests/getOrdersWarehouse.test.js +1 -1
- package/tests/getPackagesLabels.test.js +1 -1
- package/tests/getPayments.test.js +4 -9
- package/tests/getPaymentsForms.test.js +1 -1
- package/tests/getPaymentsProfiles.test.js +1 -1
- package/tests/getProducts.test.js +1 -1
- package/tests/getProductsAuctions.test.js +9 -3
- package/tests/getProductsBrands.test.js +1 -1
- package/tests/getProductsBrandsFilter.test.js +4 -3
- package/tests/getProductsCategories.test.js +3 -3
- package/tests/getProductsCodeExistence.test.js +2 -2
- package/tests/getProductsDescriptions.test.js +6 -1
- package/tests/getProductsIdBySizecode.test.js +1 -1
- package/tests/getProductsMarketingAllFacebookCatalogIds.test.js +1 -1
- package/tests/getProductsMarketingPromotion.test.js +2 -2
- package/tests/getProductsMarketingZones.test.js +2 -2
- package/tests/getProductsOmnibusPrices.test.js +2 -2
- package/tests/getProductsOpinions.test.js +3 -3
- package/tests/getProductsOpinionsRate.test.js +2 -2
- package/tests/getProductsProductsToFacebookCatalog.test.js +4 -3
- package/tests/getProductsQuestions.test.js +2 -2
- package/tests/getProductsReservations.test.js +2 -2
- package/tests/getProductsSKUbyBarcode.test.js +1 -1
- package/tests/getProductsSeries.test.js +4 -4
- package/tests/getProductsSeriesFilter.test.js +3 -2
- package/tests/getProductsSizes.test.js +2 -2
- package/tests/getProductsStocks.test.js +2 -2
- package/tests/getProductsStrikethroughPrices.test.js +2 -2
- package/tests/getRefundsGetPossibleAutoRefunds.test.js +1 -1
- package/tests/getRefundsGetRefundStatus.test.js +1 -1
- package/tests/getRefundsRetrieveRefundsList.test.js +1 -1
- package/tests/getResponsibilityEntities.test.js +1 -1
- package/tests/getReturns.test.js +6 -6
- package/tests/getRma.test.js +3 -3
- package/tests/getSizecharts.test.js +3 -3
- package/tests/getSizes.test.js +1 -1
- package/tests/getSnippets.test.js +1 -1
- package/tests/getSnippetsCampaign.test.js +1 -1
- package/tests/getSnippetsCookies.test.js +1 -1
- package/tests/getSystemCurrencies.test.js +2 -2
- package/tests/getSystemProcessesAutomation.test.js +1 -1
- package/tests/getSystemUnits.test.js +1 -1
- package/tests/getSystemUsers.test.js +1 -1
- package/tests/getVouchers.test.js +5 -5
- package/tests/getVouchersTypes.test.js +1 -1
- package/tests/getWarranties.test.js +2 -2
- package/tests/getWarrantiesCountTotal.test.js +1 -1
- package/tests/getWmsLocations.test.js +3 -3
- package/tests/getWmsStocksdocumentsDocuments.test.js +10 -10
- package/tests/getWmsStocksdocumentsOpenedDocuments.test.js +4 -4
- package/tests/getWmsStocksdocumentsProducts.test.js +2 -7
- package/tests/getWmsSuppliers.test.js +3 -3
- package/tests/postClients.test.js +1 -1
- package/tests/postClientsBalance.test.js +3 -3
- package/tests/postClientsDeliveryAddress.test.js +1 -1
- package/tests/postClientsGiftcards.test.js +1 -1
- package/tests/postClientsPayerAddress.test.js +1 -1
- package/tests/postClientsPricelists.test.js +2 -2
- package/tests/postClientsProfitPoints.test.js +1 -1
- package/tests/postClientsTags.test.js +1 -1
- package/tests/postCouriersPickupPoints.test.js +1 -1
- package/tests/postCpa.test.js +1 -1
- package/tests/postCpaCampaign.test.js +1 -1
- package/tests/postDeliveriesRegions.test.js +1 -1
- package/tests/postDiscountsGroups.test.js +1 -1
- package/tests/postDiscountsRebatesCard.test.js +1 -1
- package/tests/postDiscountsRebatesCode.test.js +1 -1
- package/tests/postEntries.test.js +5 -5
- package/tests/postMenu.test.js +1 -1
- package/tests/postOrders.test.js +2 -2
- package/tests/postOrdersDocuments.test.js +6 -1
- package/tests/postOrdersDocumentsCreate.test.js +1 -1
- package/tests/postOrdersImages.test.js +2 -2
- package/tests/postOrdersPackages.test.js +1 -1
- package/tests/postPackages.test.js +1 -1
- package/tests/postPackagesLabels.test.js +1 -1
- package/tests/postPayments.test.js +1 -1
- package/tests/postPaymentsCancel.test.js +1 -1
- package/tests/postPaymentsCashback.test.js +1 -1
- package/tests/postPaymentsRepayment.test.js +1 -1
- package/tests/postProducts.test.js +5 -5
- package/tests/postProductsBrands.test.js +1 -1
- package/tests/postProductsCollections.test.js +1 -1
- package/tests/postProductsCollectionsProducts.test.js +1 -1
- package/tests/postProductsMarketingPromotion.test.js +1 -1
- package/tests/postProductsOpinions.test.js +1 -1
- package/tests/postProductsProductsToFacebookCatalog.test.js +1 -1
- package/tests/postProductsProductsToPromotion.test.js +1 -1
- package/tests/postProductsRestore.test.js +1 -1
- package/tests/postRefundsAddAutomaticRefund.test.js +1 -1
- package/tests/postRefundsAddAutomaticRefundForOrder.test.js +1 -1
- package/tests/postRefundsAddManualRefund.test.js +1 -1
- package/tests/postResponsibilityEntities.test.js +1 -1
- package/tests/postReturns.test.js +2 -2
- package/tests/postSnippets.test.js +1 -1
- package/tests/postSnippetsCampaign.test.js +1 -1
- package/tests/postSnippetsCookies.test.js +1 -1
- package/tests/postVouchers.test.js +1 -1
- package/tests/postWarranties.test.js +1 -1
- package/tests/postWmsStocksdocumentsDocuments.test.js +1 -1
- package/tests/postWmsStocksdocumentsProducts.test.js +1 -1
- package/tests/putClients.test.js +2 -2
- package/tests/putClientsDeliveryAddress.test.js +1 -1
- package/tests/putClientsExternalCode.test.js +1 -1
- package/tests/putClientsGiftcards.test.js +3 -3
- package/tests/putClientsGiftcardsBlock.test.js +1 -1
- package/tests/putClientsGiftcardsUnblock.test.js +1 -1
- package/tests/putClientsMembershipCards.test.js +1 -1
- package/tests/putClientsPayerAddress.test.js +1 -1
- package/tests/putClientsPricelists.test.js +1 -1
- package/tests/putClientsPricelistsClients.test.js +1 -1
- package/tests/putClientsPricelistsProducts.test.js +1 -1
- package/tests/putClientsPricelistsRename.test.js +1 -1
- package/tests/putClientsPricesDiscounts.test.js +1 -1
- package/tests/putClientsTags.test.js +1 -1
- package/tests/putConfigVariables.test.js +1 -1
- package/tests/putCouriersPickupPoints.test.js +1 -1
- package/tests/putCpa.test.js +1 -1
- package/tests/putCpaCampaign.test.js +1 -1
- package/tests/putDeliveriesDefaultProfiles.test.js +1 -1
- package/tests/putDiscountsGroups.test.js +1 -1
- package/tests/putDiscountsGroupsProducts.test.js +1 -1
- package/tests/putDiscountsRebatesBlockCard.test.js +1 -1
- package/tests/putDiscountsRebatesUnblockCard.test.js +1 -1
- package/tests/putEntries.test.js +1 -1
- package/tests/putMenu.test.js +1 -1
- package/tests/putMenuFilter.test.js +2 -2
- package/tests/putMenuSort.test.js +1 -1
- package/tests/putOrders.test.js +1 -1
- package/tests/putOrdersCourier.test.js +1 -1
- package/tests/putOrdersDeliveryAddress.test.js +1 -1
- package/tests/putOrdersDevide.test.js +3 -3
- package/tests/putOrdersHandler.test.js +1 -1
- package/tests/putOrdersPackages.test.js +1 -1
- package/tests/putOrdersPickupPoint.test.js +1 -1
- package/tests/putOrdersProductsSerialNumbers.test.js +1 -1
- package/tests/putOrdersProfitMargin.test.js +1 -1
- package/tests/putOrdersShippingCosts.test.js +1 -1
- package/tests/putOrdersWarehouse.test.js +1 -1
- package/tests/putPackages.test.js +1 -1
- package/tests/putPayments.test.js +1 -1
- package/tests/putPaymentsConfirm.test.js +1 -1
- package/tests/putProducts.test.js +7 -7
- package/tests/putProductsAttachments.test.js +6 -1
- package/tests/putProductsBrands.test.js +1 -1
- package/tests/putProductsBrandsFilter.test.js +1 -1
- package/tests/putProductsCategories.test.js +1 -1
- package/tests/putProductsCollectionsProducts.test.js +1 -1
- package/tests/putProductsCollectionsRenew.test.js +1 -1
- package/tests/putProductsDescriptions.test.js +7 -2
- package/tests/putProductsGroupsMainProduct.test.js +6 -1
- package/tests/putProductsGroupsOrder.test.js +2 -2
- package/tests/putProductsGroupsSettings.test.js +6 -1
- package/tests/putProductsImages.test.js +5 -5
- package/tests/putProductsMarketingPromotion.test.js +1 -1
- package/tests/putProductsMarketingZones.test.js +1 -1
- package/tests/putProductsOmnibusPrices.test.js +16 -1
- package/tests/putProductsOpinions.test.js +1 -1
- package/tests/putProductsParameters.test.js +1 -1
- package/tests/putProductsQuestions.test.js +1 -1
- package/tests/putProductsSeries.test.js +1 -1
- package/tests/putProductsSeriesFilter.test.js +2 -2
- package/tests/putProductsSizes.test.js +1 -1
- package/tests/putProductsStockQuantity.test.js +1 -1
- package/tests/putProductsStocks.test.js +1 -1
- package/tests/putProductsStrikethroughPrices.test.js +17 -2
- package/tests/putProductsSupplierCode.test.js +1 -1
- package/tests/putProductsSupplierProductData.test.js +1 -1
- package/tests/putRefundsCancelRefund.test.js +1 -1
- package/tests/putRefundsConfirmRefund.test.js +1 -1
- package/tests/putRefundsUpdateRefund.test.js +1 -1
- package/tests/putResponsibilityEntities.test.js +1 -1
- package/tests/putReturns.test.js +1 -1
- package/tests/putReturnsSerialNumber.test.js +1 -1
- package/tests/putRma.test.js +1 -1
- package/tests/putSizecharts.test.js +1 -1
- package/tests/putSizes.test.js +3 -3
- package/tests/putSnippets.test.js +1 -1
- package/tests/putSnippetsCampaign.test.js +1 -1
- package/tests/putSnippetsCookies.test.js +1 -1
- package/tests/putSystemConfig.test.js +1 -1
- package/tests/putSystemCurrencies.test.js +1 -1
- package/tests/putSystemProcessesAutomation.test.js +1 -1
- package/tests/putSystemUnits.test.js +1 -1
- package/tests/putVouchers.test.js +1 -1
- package/tests/putVouchersBlock.test.js +1 -1
- package/tests/putVouchersUnblock.test.js +1 -1
- package/tests/putWarranties.test.js +1 -1
- package/tests/putWarrantiesLanguageData.test.js +1 -1
- package/tests/putWmsStocksdocumentsAcceptMM.test.js +1 -1
- package/tests/putWmsStocksdocumentsClose.test.js +1 -1
- package/tests/putWmsStocksdocumentsDocuments.test.js +1 -1
- package/tests/putWmsStocksdocumentsProducts.test.js +1 -1
- package/tests/putWmsStocksdocumentsRejectMM.test.js +1 -1
- package/tests/putWmsSuppliers.test.js +1 -1
- package/tests/searchClientsCrm.test.js +4 -4
- package/tests/searchClientsGiftcards.test.js +1 -1
- package/tests/searchClientsNewsletterEmail.test.js +2 -2
- package/tests/searchClientsNewsletterSms.test.js +3 -3
- package/tests/searchOrders.test.js +12 -12
- package/tests/searchOrdersOpinions.test.js +6 -6
- package/tests/searchOrdersUnfinished.test.js +6 -6
- package/tests/searchPackages.test.js +4 -4
- package/tests/searchProducts.test.js +16 -16
- package/tests/searchProductsCategoriesIdosell.test.js +1 -1
- package/tests/searchProductsDeliveryTime.test.js +3 -3
- package/tests/searchProductsParameters.test.js +3 -3
- package/tests/url.test.js +2 -2
package/dist/gateways.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PagableGateway, AppendableGateway, Gateway, DateLike, JSObject } from "./app.d.ts"
|
|
2
|
-
import type { GetClientsResponse, SearchClientsCrmResponse, SearchGiftcardsResponse, SearchNewsletterEmailResponse, SearchNewsletterSmsResponse, SearchOpinionsResponse, SearchOrdersResponse, SearchPackagesResponse, SearchCategoriesIdosellResponse, SearchDeliveryTimeResponse, SearchProductsParametersResponse, SearchProductsResponse, GetReturnsResponse, GetRmaResponse, GetConfigResponse, GetStocksdocumentsDocumentsResponse, GetStocksdocumentsProductsResponse } from "./responses.d.ts"
|
|
2
|
+
import type { GetClientsResponse, SearchClientsCrmResponse, SearchGiftcardsResponse, SearchNewsletterEmailResponse, SearchNewsletterSmsResponse, SearchOpinionsResponse, SearchOrdersResponse, SearchPackagesResponse, SearchCategoriesIdosellResponse, SearchDeliveryTimeResponse, SearchProductsParametersResponse, SearchProductsResponse, GetReturnsResponse, GetRmaResponse, GetSizechartsResponse, GetConfigResponse, GetShopsDataResponse, GetWarrantiesResponse, GetLocationsResponse, GetStocksdocumentsDocumentsResponse, GetStocksdocumentsProductsResponse } from "./responses.d.ts"
|
|
3
3
|
import * as ENUMS from "./enums";
|
|
4
4
|
|
|
5
5
|
export interface GetClientsBalanceRequest extends PagableGateway<GetClientsBalanceRequest> {
|
|
@@ -17,6 +17,8 @@ export interface GetClientsBalanceRequest extends PagableGateway<GetClientsBalan
|
|
|
17
17
|
resultsPage: (value: number|string) => this;
|
|
18
18
|
/** Maximum number of results on a single page. Default is 100. */
|
|
19
19
|
resultsLimit: (value: number|string) => this;
|
|
20
|
+
/** Define range of dates */
|
|
21
|
+
lastPurchased: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export interface PostClientsBalanceRequest extends Gateway {
|
|
@@ -63,6 +65,10 @@ export interface GetClientsRequest extends PagableGateway<GetClientsRequest,GetC
|
|
|
63
65
|
clientRegistrationDate: (value: JSObject) => this;
|
|
64
66
|
/** The ID of the shop, that client is assigned to. */
|
|
65
67
|
shopId: (value: string) => this;
|
|
68
|
+
/** Define range of dates */
|
|
69
|
+
lastPurchased: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
70
|
+
/** Define range of dates */
|
|
71
|
+
lastModified: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
export interface PostClientsRequest extends AppendableGateway<PostClientsRequest> {
|
|
@@ -266,6 +272,12 @@ export interface SearchClientsCrmRequest extends PagableGateway<SearchClientsCrm
|
|
|
266
272
|
resultsLimit: (value: number|string) => this;
|
|
267
273
|
/** Determines, if data - that will be returned - will be exactly as entered values, or values should be fragment of customer data. */
|
|
268
274
|
settingsExactSearch: (value: Boolean) => this;
|
|
275
|
+
/** Define range of dates */
|
|
276
|
+
registered: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
277
|
+
/** Define range of dates */
|
|
278
|
+
lastLoggedIn: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
279
|
+
/** Define range of dates */
|
|
280
|
+
ordered: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
269
281
|
}
|
|
270
282
|
|
|
271
283
|
export interface DeleteClientsDeliveryAddressRequest extends AppendableGateway<DeleteClientsDeliveryAddressRequest> {
|
|
@@ -503,6 +515,8 @@ export interface SearchClientsNewsletterEmailRequest extends PagableGateway<Sear
|
|
|
503
515
|
results_page: (value: number|string) => this;
|
|
504
516
|
/** Maximum number of results on a single page. Default is 100. */
|
|
505
517
|
results_limit: (value: number|string) => this;
|
|
518
|
+
/** Define range of dates */
|
|
519
|
+
dates: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
506
520
|
}
|
|
507
521
|
|
|
508
522
|
export interface SearchClientsNewsletterSmsRequest extends PagableGateway<SearchClientsNewsletterSmsRequest,SearchNewsletterSmsResponse> {
|
|
@@ -516,6 +530,8 @@ export interface SearchClientsNewsletterSmsRequest extends PagableGateway<Search
|
|
|
516
530
|
results_page: (value: number|string) => this;
|
|
517
531
|
/** Maximum number of results on a single page. Default is 100. */
|
|
518
532
|
results_limit: (value: number|string) => this;
|
|
533
|
+
/** Define range of dates */
|
|
534
|
+
dates: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
519
535
|
}
|
|
520
536
|
|
|
521
537
|
export interface DeleteClientsPayerAddressRequest extends AppendableGateway<DeleteClientsPayerAddressRequest> {
|
|
@@ -693,6 +709,8 @@ export interface GetClientsPricesDiscountsRequest extends PagableGateway<GetClie
|
|
|
693
709
|
resultsPage: (value: number|string) => this;
|
|
694
710
|
/** Number of results on page. Value from 1 to 100 */
|
|
695
711
|
resultsLimit: (value: number|string) => this;
|
|
712
|
+
/** Define range of dates */
|
|
713
|
+
lastPurchased: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
696
714
|
}
|
|
697
715
|
|
|
698
716
|
export interface PutClientsPricesDiscountsRequest extends AppendableGateway<PutClientsPricesDiscountsRequest> {
|
|
@@ -729,6 +747,8 @@ export interface GetClientsProfitPointsRequest extends PagableGateway<GetClients
|
|
|
729
747
|
resultsPage: (value: number|string) => this;
|
|
730
748
|
/** Number of results on page. Value from 1 to 100 */
|
|
731
749
|
resultsLimit: (value: number|string) => this;
|
|
750
|
+
/** Define range of dates */
|
|
751
|
+
lastPurchased: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
732
752
|
}
|
|
733
753
|
|
|
734
754
|
export interface PostClientsProfitPointsRequest extends Gateway {
|
|
@@ -1345,10 +1365,8 @@ export interface GetOrdersAuctionDetailsRequest extends Gateway {
|
|
|
1345
1365
|
identType: (value: 'orders_id'|'orders_sn') => this;
|
|
1346
1366
|
/** Orders Id values. */
|
|
1347
1367
|
orders: (value: string|string[]) => this;
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
/** Define orders values by passing them as an array */
|
|
1351
|
-
serialNumbers: (values: number|string|number[]|string[]) => this;
|
|
1368
|
+
ids: (value: string|string[]) => this;
|
|
1369
|
+
serialNumbers: (value: number|string|number[]|string[]) => this;
|
|
1352
1370
|
}
|
|
1353
1371
|
|
|
1354
1372
|
export interface PutOrdersClientRequest extends Gateway {
|
|
@@ -1435,6 +1453,8 @@ export interface PostOrdersDocumentsRequest extends AppendableGateway<PostOrders
|
|
|
1435
1453
|
returnedInOrderDetails: (returnedInOrderDetails: 'y'|'n') => this
|
|
1436
1454
|
/** Additional information. */
|
|
1437
1455
|
additionalData: (additionalData: JSObject) => this
|
|
1456
|
+
/** Set Issue date */
|
|
1457
|
+
date: (date: string) => this;
|
|
1438
1458
|
}
|
|
1439
1459
|
|
|
1440
1460
|
export interface GetOrdersExportdocumentsEPPRequest extends Gateway {
|
|
@@ -1449,6 +1469,8 @@ export interface GetOrdersExportdocumentsEPPRequest extends Gateway {
|
|
|
1449
1469
|
documentType: (value: 'all'|'stocks'|'invoice'|'payments') => this;
|
|
1450
1470
|
/** Date the document was first generated. */
|
|
1451
1471
|
invoiceFirstGeneratedDate: (value: number|string) => this;
|
|
1472
|
+
/** Define range of dates */
|
|
1473
|
+
dates: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
1452
1474
|
}
|
|
1453
1475
|
|
|
1454
1476
|
export interface GetOrdersExportdocumentsJPKRequest extends Gateway {
|
|
@@ -1476,6 +1498,8 @@ export interface GetOrdersExportdocumentsJPKRequest extends Gateway {
|
|
|
1476
1498
|
stockId: (value: number|string|number[]|string[]) => this;
|
|
1477
1499
|
/** Forces the file to be generated by background tasks. The file will be generated later. Then, after it is generated, you will be able to download the given file using the returned ID. The file will be available 24h after the task is completed. */
|
|
1478
1500
|
forceBackgroundGenerate: (value: Boolean) => this;
|
|
1501
|
+
/** Define range of dates */
|
|
1502
|
+
dates: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
1479
1503
|
}
|
|
1480
1504
|
|
|
1481
1505
|
export interface GetOrdersHandlerRequest extends Gateway {
|
|
@@ -1552,6 +1576,8 @@ export interface SearchOrdersOpinionsRequest extends PagableGateway<SearchOrders
|
|
|
1552
1576
|
clientId: (value: string) => this;
|
|
1553
1577
|
clientLogin: (value: string) => this;
|
|
1554
1578
|
clientCode: (value: string) => this;
|
|
1579
|
+
/** Define range of dates */
|
|
1580
|
+
dates: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
1555
1581
|
/** Define ordering of records */
|
|
1556
1582
|
orderBy: (elementName: "date"|"rating"|"scorePositive"|"scoreNegative"|"modificationDatetime", descending: boolean) => this;
|
|
1557
1583
|
}
|
|
@@ -2128,6 +2154,7 @@ export interface PutProductsAttachmentsRequest extends AppendableGateway<PutProd
|
|
|
2128
2154
|
attachmentsErrorsOccurred: (attachmentsErrorsOccurred: boolean) => this
|
|
2129
2155
|
/** Flag indicating if there are errors in results of virtual attachments settings. */
|
|
2130
2156
|
virtualAttachmentsErrorsOccurred: (virtualAttachmentsErrorsOccurred: boolean) => this
|
|
2157
|
+
productId: (value: number|string) => this;
|
|
2131
2158
|
}
|
|
2132
2159
|
|
|
2133
2160
|
export interface GetProductsAuctionsRequest extends PagableGateway<GetProductsAuctionsRequest> {
|
|
@@ -2140,8 +2167,7 @@ export interface GetProductsAuctionsRequest extends PagableGateway<GetProductsAu
|
|
|
2140
2167
|
resultsPage: (value: number|string) => this;
|
|
2141
2168
|
/** Number of results on page. Value from 1 to 100 */
|
|
2142
2169
|
resultsLimit: (value: number|string) => this;
|
|
2143
|
-
|
|
2144
|
-
ids: (values: number|string|number[]|string[]) => this;
|
|
2170
|
+
ids: (value: number|string|number[]|string[]) => this;
|
|
2145
2171
|
/** Get auction data on products */
|
|
2146
2172
|
fromAllegro: () => this;
|
|
2147
2173
|
}
|
|
@@ -2380,6 +2406,8 @@ export interface GetProductsDescriptionsRequest extends Gateway {
|
|
|
2380
2406
|
ids: (value: number|string|number[]|string[]) => this;
|
|
2381
2407
|
/** Shop Id */
|
|
2382
2408
|
shopId: (value: number|string) => this;
|
|
2409
|
+
/** Set product identifiers */
|
|
2410
|
+
productId: (productId: number|string|number|string|number[]|string[], type: 'id'|'index'|'codeExtern'|'codeProducer') => this;
|
|
2383
2411
|
}
|
|
2384
2412
|
|
|
2385
2413
|
export interface PutProductsDescriptionsRequest extends AppendableGateway<PutProductsDescriptionsRequest> {
|
|
@@ -2392,12 +2420,15 @@ export interface PutProductsDescriptionsRequest extends AppendableGateway<PutPro
|
|
|
2392
2420
|
/** Product data for auction services */
|
|
2393
2421
|
productAuctionDescriptionsData: (productAuctionDescriptionsData: Array<JSObject>) => this
|
|
2394
2422
|
productId: (value: number|string) => this;
|
|
2423
|
+
/** Set various types of names or descriptions to the product */
|
|
2424
|
+
setText: (text: string, type: "productName"|"productAuctionName"|"productPriceComparerName"|"productDescription"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeywords" = 'productName', language?: string, shopId?: number|string) => this;
|
|
2395
2425
|
}
|
|
2396
2426
|
|
|
2397
2427
|
export interface PutProductsGroupsMainProductRequest extends AppendableGateway<PutProductsGroupsMainProductRequest> {
|
|
2398
2428
|
groups: (value: Array<JSObject>) => this;
|
|
2399
2429
|
/** */
|
|
2400
2430
|
productIdent: (productIdent: JSObject) => this
|
|
2431
|
+
productId: (value: number|string) => this;
|
|
2401
2432
|
}
|
|
2402
2433
|
|
|
2403
2434
|
export interface PutProductsGroupsOrderRequest extends AppendableGateway<PutProductsGroupsOrderRequest> {
|
|
@@ -2418,6 +2449,7 @@ export interface PutProductsGroupsSettingsRequest extends AppendableGateway<PutP
|
|
|
2418
2449
|
displayOnPage: (displayOnPage: 'firstavailable'|'all'|'specified') => this
|
|
2419
2450
|
/** Selected product in the group. */
|
|
2420
2451
|
specifiedProductIdent: (specifiedProductIdent: JSObject) => this
|
|
2452
|
+
productId: (value: number|string) => this;
|
|
2421
2453
|
}
|
|
2422
2454
|
|
|
2423
2455
|
export interface GetProductsIdBySizecodeRequest extends Gateway {
|
|
@@ -2579,6 +2611,12 @@ export interface PutProductsOmnibusPricesRequest extends AppendableGateway<PutPr
|
|
|
2579
2611
|
omnibusPrices: (omnibusPrices: JSObject) => this
|
|
2580
2612
|
/** Strikethrough price settings for the page. */
|
|
2581
2613
|
shops: (shops: Array<JSObject>) => this
|
|
2614
|
+
/** Set product identifiers */
|
|
2615
|
+
productId: (productId: number|string, type: 'id'|'index'|'codeExtern'|'codeProducer' = 'id') => this;
|
|
2616
|
+
/** Set retail or wholesale price */
|
|
2617
|
+
setPrice: (price: number, wholesale: boolean = false) => this;
|
|
2618
|
+
/** Set mode to automatic */
|
|
2619
|
+
mode: (automatic: boolean = false) => this;
|
|
2582
2620
|
}
|
|
2583
2621
|
|
|
2584
2622
|
export interface DeleteProductsOpinionsRequest extends Gateway {
|
|
@@ -2604,6 +2642,8 @@ export interface GetProductsOpinionsRequest extends PagableGateway<GetProductsOp
|
|
|
2604
2642
|
resultsLimit: (value: number|string) => this;
|
|
2605
2643
|
/** Possibility of sorting returned list */
|
|
2606
2644
|
ordersBy: (value: Array<JSObject>) => this;
|
|
2645
|
+
/** Define range of dates */
|
|
2646
|
+
dates: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
2607
2647
|
/** Define ordering of records */
|
|
2608
2648
|
orderBy: (elementName: "date"|"rating"|"scorePositive"|"scoreNegative"|"modificationDatetime", descending: boolean) => this;
|
|
2609
2649
|
}
|
|
@@ -2887,11 +2927,9 @@ export interface PostProductsRequest extends AppendableGateway<PostProductsReque
|
|
|
2887
2927
|
/** Responsible person code */
|
|
2888
2928
|
responsiblePersonCode: (responsiblePersonCode: string) => this
|
|
2889
2929
|
/** Set various types of names or descriptions to the product */
|
|
2890
|
-
setText: (text: string, type: "
|
|
2891
|
-
/** Increases product price by amount */
|
|
2892
|
-
addPrice: (value: number, type: 'retail'|'wholesale'|'pos'|'minimal'|'strikethroughRetail'|'strikethroughWholesale'|'suggested'|'automaticCalculation') => this;
|
|
2930
|
+
setText: (text: string, type: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer" = 'productName', language?: string, shopId?: number|string) => this;
|
|
2893
2931
|
/** Sets product price by amount */
|
|
2894
|
-
setPrice: (value: number, type: 'retail'|'wholesale'|'pos'|'minimal'|'strikethroughRetail'|'strikethroughWholesale'|'suggested'|'automaticCalculation') => this;
|
|
2932
|
+
setPrice: (value: number, type: 'retail'|'wholesale'|'pos'|'minimal'|'strikethroughRetail'|'strikethroughWholesale'|'suggested'|'automaticCalculation' = 'retail') => this;
|
|
2895
2933
|
}
|
|
2896
2934
|
|
|
2897
2935
|
export interface PutProductsRequest extends AppendableGateway<PutProductsRequest> {
|
|
@@ -3166,7 +3204,7 @@ export interface PutProductsRequest extends AppendableGateway<PutProductsRequest
|
|
|
3166
3204
|
/** Responsible person code */
|
|
3167
3205
|
responsiblePersonCode: (responsiblePersonCode: string) => this
|
|
3168
3206
|
/** Set various types of names or descriptions to the product */
|
|
3169
|
-
setText: (text: string, type: "
|
|
3207
|
+
setText: (text: string, type: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer" = 'productName', language?: string, shopId?: number|string) => this;
|
|
3170
3208
|
/** Set edit mode - disables adding new product */
|
|
3171
3209
|
editMode: () => this;
|
|
3172
3210
|
/** Set add mode - Api is allowed to create new products */
|
|
@@ -3406,6 +3444,7 @@ export interface PutProductsQuestionsRequest extends AppendableGateway<PutProduc
|
|
|
3406
3444
|
answerDate: (answerDate: string) => this
|
|
3407
3445
|
/** Response author. */
|
|
3408
3446
|
answerAuthor: (answerAuthor: string) => this
|
|
3447
|
+
productId: (value: number|string) => this;
|
|
3409
3448
|
}
|
|
3410
3449
|
|
|
3411
3450
|
export interface GetProductsReservationsRequest extends Gateway {
|
|
@@ -3569,6 +3608,14 @@ export interface PutProductsStrikethroughPricesRequest extends AppendableGateway
|
|
|
3569
3608
|
stp_settings: (stp_settings: JSObject) => this
|
|
3570
3609
|
/** Strikethrough price settings for the page. */
|
|
3571
3610
|
shops: (shops: Array<JSObject>) => this
|
|
3611
|
+
/** Set product identifiers */
|
|
3612
|
+
productId: (productId: number|string, type: 'id'|'index'|'codeExtern'|'codeProducer' = 'id') => this;
|
|
3613
|
+
/** Set precise price */
|
|
3614
|
+
setPrice: (price: number, wholesale: boolean = false) => this;
|
|
3615
|
+
/** Set price relative to current price */
|
|
3616
|
+
addPrice: (value: number, wholesale: boolean = false, base: 'price' | 'price_minimal' | 'price_pos' | 'price_srp' | 'price_crossed' = 'price') => this;
|
|
3617
|
+
/** Set price relative to current price by percent */
|
|
3618
|
+
addPricePercent: (value: number, wholesale: boolean = false, base: 'price' | 'price_minimal' | 'price_pos' | 'price_srp' | 'price_crossed' = 'price') => this;
|
|
3572
3619
|
}
|
|
3573
3620
|
|
|
3574
3621
|
export interface PutProductsSupplierCodeRequest extends AppendableGateway<PutProductsSupplierCodeRequest> {
|
|
@@ -3884,6 +3931,12 @@ export interface GetRmaRequest extends PagableGateway<GetRmaRequest,GetRmaRespon
|
|
|
3884
3931
|
resultsPage: (value: number|string) => this;
|
|
3885
3932
|
/** Number of results on page. Value from 1 to 100 */
|
|
3886
3933
|
resultsLimit: (value: number|string) => this;
|
|
3934
|
+
/** Define range of dates */
|
|
3935
|
+
created: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
3936
|
+
/** Define range of dates */
|
|
3937
|
+
modified: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
3938
|
+
/** Define range of dates */
|
|
3939
|
+
ended: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
3887
3940
|
}
|
|
3888
3941
|
|
|
3889
3942
|
export interface PutRmaRequest extends AppendableGateway<PutRmaRequest> {
|
|
@@ -3908,7 +3961,7 @@ export interface DeleteSizechartsRequest extends Gateway {
|
|
|
3908
3961
|
ids: (value: number|string|number[]|string[]) => this;
|
|
3909
3962
|
}
|
|
3910
3963
|
|
|
3911
|
-
export interface GetSizechartsRequest extends PagableGateway<GetSizechartsRequest> {
|
|
3964
|
+
export interface GetSizechartsRequest extends PagableGateway<GetSizechartsRequest,GetSizechartsResponse> {
|
|
3912
3965
|
/** IDs */
|
|
3913
3966
|
ids: (value: number|string|number[]|string[]) => this;
|
|
3914
3967
|
/** Names of size charts */
|
|
@@ -4306,7 +4359,7 @@ export interface GetSystemServerLoadRequest extends Gateway {}
|
|
|
4306
4359
|
|
|
4307
4360
|
export interface GetSystemServerTimeRequest extends Gateway {}
|
|
4308
4361
|
|
|
4309
|
-
export interface GetSystemShopsDataRequest extends Gateway {}
|
|
4362
|
+
export interface GetSystemShopsDataRequest extends Gateway<GetShopsDataResponse> {}
|
|
4310
4363
|
|
|
4311
4364
|
export interface GetSystemUnitsRequest extends Gateway {
|
|
4312
4365
|
/** List of languages */
|
|
@@ -4395,6 +4448,12 @@ export interface GetVouchersRequest extends PagableGateway<GetVouchersRequest> {
|
|
|
4395
4448
|
resultsPage: (value: number|string) => this;
|
|
4396
4449
|
/** Number of results on page. Value from 1 to 100 */
|
|
4397
4450
|
resultsLimit: (value: number|string) => this;
|
|
4451
|
+
/** Define range of dates */
|
|
4452
|
+
issued: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
4453
|
+
/** Define range of dates */
|
|
4454
|
+
expires: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
4455
|
+
/** Define range of dates */
|
|
4456
|
+
used: (dateFrom: DateLike, dateTo: DateLike) => this;
|
|
4398
4457
|
/** Define vouchers values by passing them as an array */
|
|
4399
4458
|
ids: (values: number|string|number[]|string[]) => this;
|
|
4400
4459
|
/** Define vouchers values by passing them as an array */
|
|
@@ -4459,7 +4518,7 @@ export interface DeleteWarrantiesRequest extends Gateway {
|
|
|
4459
4518
|
warranty_ids: (value: string|string[]) => this;
|
|
4460
4519
|
}
|
|
4461
4520
|
|
|
4462
|
-
export interface GetWarrantiesRequest extends PagableGateway<GetWarrantiesRequest> {
|
|
4521
|
+
export interface GetWarrantiesRequest extends PagableGateway<GetWarrantiesRequest,GetWarrantiesResponse> {
|
|
4463
4522
|
warranty_ids: (value: string|string[]) => this;
|
|
4464
4523
|
/** Number of results on page. */
|
|
4465
4524
|
results_limit: (value: number|string) => this;
|
|
@@ -4494,7 +4553,7 @@ export interface PutWarrantiesRequest extends AppendableGateway<PutWarrantiesReq
|
|
|
4494
4553
|
period: (period: number|string) => this
|
|
4495
4554
|
}
|
|
4496
4555
|
|
|
4497
|
-
export interface GetWmsLocationsRequest extends PagableGateway<GetWmsLocationsRequest> {
|
|
4556
|
+
export interface GetWmsLocationsRequest extends PagableGateway<GetWmsLocationsRequest,GetLocationsResponse> {
|
|
4498
4557
|
/** Warehouse location ID */
|
|
4499
4558
|
locationId: (value: number|string) => this;
|
|
4500
4559
|
/** Storage location code */
|
package/dist/helpers.js
CHANGED
|
@@ -111,6 +111,8 @@ export const nest = (valueName, nodeName, obj = {}, forceArray = false) => (valu
|
|
|
111
111
|
value = [value];
|
|
112
112
|
const node = { ...obj }, params = {};
|
|
113
113
|
node[valueName] = value;
|
|
114
|
+
if (!nodeName.length)
|
|
115
|
+
return node;
|
|
114
116
|
params[nodeName] = node;
|
|
115
117
|
return params;
|
|
116
118
|
};
|
|
@@ -176,44 +178,64 @@ export const getProductIdentList = (productIds, identType = 'id') => {
|
|
|
176
178
|
};
|
|
177
179
|
};
|
|
178
180
|
const TEXT_NODES = {
|
|
179
|
-
|
|
181
|
+
productName: {
|
|
180
182
|
main: 'productNames',
|
|
181
183
|
sub: 'productNamesLangData',
|
|
182
184
|
node: 'productName'
|
|
183
185
|
},
|
|
184
|
-
|
|
186
|
+
productParamDescriptions: {
|
|
185
187
|
main: 'productParamDescriptions',
|
|
186
188
|
sub: 'productParamDescriptionsLangData',
|
|
187
189
|
node: 'productParamDescriptions'
|
|
188
190
|
},
|
|
189
|
-
|
|
191
|
+
productLongDescription: {
|
|
190
192
|
main: 'productLongDescriptions',
|
|
191
193
|
sub: 'productLongDescriptionsLangData',
|
|
192
194
|
node: 'productLongDescription'
|
|
193
195
|
},
|
|
194
|
-
|
|
196
|
+
productMetaTitle: {
|
|
195
197
|
main: 'productMetaTitles',
|
|
196
198
|
sub: 'productMetaTitlesLangData',
|
|
197
199
|
node: 'productMetaTitle'
|
|
198
200
|
},
|
|
199
|
-
|
|
201
|
+
productMetaDescription: {
|
|
200
202
|
main: 'productMetaDescriptions',
|
|
201
203
|
sub: 'productMetaDescriptionsLangData',
|
|
202
204
|
node: 'productMetaDescription'
|
|
203
205
|
},
|
|
204
|
-
|
|
206
|
+
productMetaKeyword: {
|
|
205
207
|
main: 'productMetaKeywords',
|
|
206
208
|
sub: 'productMetaKeywordsLangData',
|
|
207
209
|
node: 'productMetaKeyword'
|
|
208
210
|
},
|
|
209
|
-
|
|
211
|
+
productAuctionName: {
|
|
210
212
|
main: 'productAuctionDescriptionsData',
|
|
211
213
|
node: 'productAuctionName'
|
|
212
214
|
},
|
|
213
|
-
|
|
215
|
+
productAuctionDescription: {
|
|
214
216
|
main: 'productAuctionDescriptionsData',
|
|
215
217
|
node: 'productAuctionDescription'
|
|
216
218
|
},
|
|
219
|
+
productAuctionAdditionalName: {
|
|
220
|
+
main: 'productAuctionDescriptionsData',
|
|
221
|
+
node: 'productAuctionAdditionalName'
|
|
222
|
+
},
|
|
223
|
+
productNameInPriceComparer: {
|
|
224
|
+
main: 'productNamesInPriceComparer',
|
|
225
|
+
sub: 'productNamesInPriceComparerLangData',
|
|
226
|
+
node: 'productNameInPriceComparer'
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
const LEGACY_TEXT_NODES = {
|
|
230
|
+
...TEXT_NODES,
|
|
231
|
+
name: TEXT_NODES.productName,
|
|
232
|
+
short: TEXT_NODES.productParamDescriptions,
|
|
233
|
+
long: TEXT_NODES.productLongDescription,
|
|
234
|
+
metatitle: TEXT_NODES.productMetaTitle,
|
|
235
|
+
metadescription: TEXT_NODES.productMetaDescription,
|
|
236
|
+
metakeywords: TEXT_NODES.productMetaKeyword,
|
|
237
|
+
acutionname: TEXT_NODES.productAuctionName,
|
|
238
|
+
auctiondescription: TEXT_NODES.productAuctionDescription
|
|
217
239
|
};
|
|
218
240
|
const getAppendedNode = (object) => {
|
|
219
241
|
if (!object.appendable)
|
|
@@ -222,12 +244,12 @@ const getAppendedNode = (object) => {
|
|
|
222
244
|
object.params[object.appendable.arrayNode] = [{}];
|
|
223
245
|
return object.params[object.appendable.arrayNode][object.appendable.index];
|
|
224
246
|
};
|
|
225
|
-
export const setProductText = (object) => (text, node = '
|
|
226
|
-
if (!
|
|
247
|
+
export const setProductText = (object) => (text, node = 'productName', langId = 'pol', shopId) => {
|
|
248
|
+
if (!LEGACY_TEXT_NODES[node]) {
|
|
227
249
|
throw new Error('Invalid node');
|
|
228
250
|
}
|
|
229
251
|
const product = getAppendedNode(object);
|
|
230
|
-
const nodeData =
|
|
252
|
+
const nodeData = LEGACY_TEXT_NODES[node];
|
|
231
253
|
if (node === 'long' && text[0] !== '<') {
|
|
232
254
|
text = `<p>${text.replaceAll("\n", '</p><p>')}</p>`;
|
|
233
255
|
}
|
|
@@ -259,3 +281,46 @@ export const setProductText = (object) => (text, node = 'short', langId = 'pol',
|
|
|
259
281
|
}
|
|
260
282
|
return product;
|
|
261
283
|
};
|
|
284
|
+
const DESCRIPTION_NODES = ['productName', 'productAuctionName', 'productPriceComparerName', 'productDescription', 'productLongDescription', 'productMetaTitle', 'productMetaDescription', 'productMetaKeywords'];
|
|
285
|
+
export const setProductDescription = (object) => (text, node = 'productName', langId = 'pol', shopId) => {
|
|
286
|
+
if (!DESCRIPTION_NODES.includes(node)) {
|
|
287
|
+
throw new Error('Invalid node');
|
|
288
|
+
}
|
|
289
|
+
const product = getAppendedNode(object);
|
|
290
|
+
let langData;
|
|
291
|
+
if (!product.productDescriptionsLangData) {
|
|
292
|
+
langData = { langId };
|
|
293
|
+
if (shopId)
|
|
294
|
+
langData.shopId = shopId.toString();
|
|
295
|
+
product.productDescriptionsLangData = [langData];
|
|
296
|
+
}
|
|
297
|
+
if (!langData)
|
|
298
|
+
langData = product.productDescriptionsLangData.find(item => item.langId === langId && (item.shopId === shopId || (shopId === null && !item.shopId)));
|
|
299
|
+
if (!langData) {
|
|
300
|
+
langData = { langId };
|
|
301
|
+
if (shopId)
|
|
302
|
+
langData.shopId = shopId.toString();
|
|
303
|
+
product.productDescriptionsLangData.push(langData);
|
|
304
|
+
}
|
|
305
|
+
langData[node] = text;
|
|
306
|
+
return product;
|
|
307
|
+
};
|
|
308
|
+
export const setStp = (object, value, wholesale = false, base = 'price', mode = 'amount_set') => {
|
|
309
|
+
const node = getAppendedNode(object);
|
|
310
|
+
const stp_settings = node.stp_settings ?? {};
|
|
311
|
+
stp_settings.price_change_mode = mode;
|
|
312
|
+
stp_settings.price_change_basevalue = base;
|
|
313
|
+
stp_settings[wholesale ? "wholesale_price_change_value" : "retail_price_change_value"] = value;
|
|
314
|
+
return { stp_settings };
|
|
315
|
+
};
|
|
316
|
+
export const setOmp = (object, value = false, wholesale = false, mode = false) => {
|
|
317
|
+
const node = getAppendedNode(object);
|
|
318
|
+
const omnibusPrices = node.omnibusPrices ?? {};
|
|
319
|
+
if (value) {
|
|
320
|
+
omnibusPrices[wholesale ? "omnibusPriceWholesale" : "omnibusPriceRetail"] = value;
|
|
321
|
+
}
|
|
322
|
+
else if (mode) {
|
|
323
|
+
omnibusPrices.omnibusPriceManagement = mode;
|
|
324
|
+
}
|
|
325
|
+
return { omnibusPrices };
|
|
326
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
-
import {
|
|
2
|
+
import { nest } from "../helpers.js";
|
|
3
3
|
export default (object) => {
|
|
4
4
|
object.gate = { method: 'get', node: '/orders/auctionDetails' };
|
|
5
5
|
object.custom = {
|
|
6
|
-
ids:
|
|
7
|
-
serialNumbers:
|
|
6
|
+
ids: nest("orders", "", { "identType": "order_id" }, true),
|
|
7
|
+
serialNumbers: nest("orders", "", { "identType": "order_sn" }, true)
|
|
8
8
|
};
|
|
9
9
|
return new Proxy(object, paramsProxy);
|
|
10
10
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
-
import {
|
|
2
|
+
import { nest, page } from "../helpers.js";
|
|
3
3
|
export default (object) => {
|
|
4
4
|
object.gate = { method: 'get', node: '/products/auctions' };
|
|
5
5
|
object.custom = {
|
|
6
|
-
ids:
|
|
6
|
+
ids: nest("products", "", { "identType": "id" }, true),
|
|
7
7
|
fromAllegro: () => { const auctionSites = ["allegro"]; return { auctionSites }; },
|
|
8
8
|
page
|
|
9
9
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
2
|
export default (object) => {
|
|
3
3
|
object.gate = { method: 'get', node: '/products/descriptions' };
|
|
4
|
+
object.custom = {
|
|
5
|
+
productId: (ids, type = "id") => ({ type, ids })
|
|
6
|
+
};
|
|
4
7
|
object.req = ["type", "ids"];
|
|
5
8
|
return new Proxy(object, paramsProxy);
|
|
6
9
|
};
|
|
@@ -3,7 +3,7 @@ export default (object) => {
|
|
|
3
3
|
object.gate = { method: 'post', node: '/entries/entries' };
|
|
4
4
|
object.custom = {
|
|
5
5
|
blog: () => { const visibleOnSitesList = object.params.visibleOnSitesList ?? []; visibleOnSitesList.push({ siteId: "display_on_blog" }); return { root: { visibleOnSitesList } }; },
|
|
6
|
-
news: () => { const visibleOnSitesList = object.params.visibleOnSitesList ?? []; visibleOnSitesList.push({
|
|
6
|
+
news: () => { const visibleOnSitesList = object.params.visibleOnSitesList ?? []; visibleOnSitesList.push({ siteId: "display_on_news" }); return { root: { visibleOnSitesList } }; }
|
|
7
7
|
};
|
|
8
8
|
object.appendable = {
|
|
9
9
|
except: ["shopId", "date", "visible", "visibleOnSitesList", "products", "pictureData", "titleLinkType", "link"],
|
|
@@ -6,7 +6,7 @@ export default (object) => {
|
|
|
6
6
|
arrayNode: "orders",
|
|
7
7
|
index: 0
|
|
8
8
|
};
|
|
9
|
-
object.req = ["stockId", "orderPaymentType", "currencyId", "courierId", "
|
|
9
|
+
object.req = ["stockId", "orderPaymentType", "currencyId", "courierId", "clientWithoutAccount", "products", { "any": ["clientWithoutAccountData", "clientLogin"] }];
|
|
10
10
|
object.arrays = ["orders"];
|
|
11
11
|
return new Proxy(object, paramsProxy);
|
|
12
12
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
2
|
export default (object) => {
|
|
3
3
|
object.gate = { method: 'post', node: '/orders/documents' };
|
|
4
|
+
object.custom = {
|
|
5
|
+
date: (date) => ({ additionalData: { documentIssuedDate: date } })
|
|
6
|
+
};
|
|
4
7
|
object.appendable = {
|
|
5
8
|
except: [],
|
|
6
9
|
arrayNode: "documents",
|
|
7
10
|
index: 0
|
|
8
11
|
};
|
|
9
|
-
object.req = ["orderSerialNumber", "name"
|
|
12
|
+
object.req = ["orderSerialNumber", "name"];
|
|
10
13
|
object.arrays = ["documents"];
|
|
11
14
|
return new Proxy(object, paramsProxy);
|
|
12
15
|
};
|
|
@@ -4,7 +4,6 @@ export default (object) => {
|
|
|
4
4
|
object.gate = { method: 'post', node: '/products/products' };
|
|
5
5
|
object.custom = {
|
|
6
6
|
setText: setProductText(object),
|
|
7
|
-
addPrice: (value, type = "retail", net = false) => modifyPrice(value, type, net, "amount_diff"),
|
|
8
7
|
setPrice: (value, type = "retail", net = false) => modifyPrice(value, type, net, "amount_set")
|
|
9
8
|
};
|
|
10
9
|
object.appendable = {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { nest } from "../helpers.js";
|
|
2
3
|
export default (object) => {
|
|
3
4
|
object.gate = { method: 'put', node: '/products/attachments' };
|
|
5
|
+
object.custom = {
|
|
6
|
+
productId: nest("identValue", "productIdent", { "productIdentType": "id" })
|
|
7
|
+
};
|
|
4
8
|
object.appendable = {
|
|
5
9
|
except: [],
|
|
6
10
|
arrayNode: "productsAttachments",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
-
import { nest } from "../helpers.js";
|
|
2
|
+
import { nest, setProductDescription } from "../helpers.js";
|
|
3
3
|
export default (object) => {
|
|
4
4
|
object.gate = { method: 'put', node: '/products/descriptions' };
|
|
5
5
|
object.custom = {
|
|
6
|
-
productId: nest("identValue", "productIdent", { "productIdentType": "id" })
|
|
6
|
+
productId: nest("identValue", "productIdent", { "productIdentType": "id" }),
|
|
7
|
+
setText: setProductDescription(object)
|
|
7
8
|
};
|
|
8
9
|
object.appendable = {
|
|
9
10
|
except: [],
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { nest } from "../helpers.js";
|
|
2
3
|
export default (object) => {
|
|
3
4
|
object.gate = { method: 'put', node: '/products/groups/mainProduct' };
|
|
5
|
+
object.custom = {
|
|
6
|
+
productId: nest("identValue", "productIdent", { "productIdentType": "id" })
|
|
7
|
+
};
|
|
4
8
|
object.appendable = {
|
|
5
9
|
except: [],
|
|
6
10
|
arrayNode: "groups",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { nest } from "../helpers.js";
|
|
2
3
|
export default (object) => {
|
|
3
4
|
object.gate = { method: 'put', node: '/products/groups/settings' };
|
|
5
|
+
object.custom = {
|
|
6
|
+
productId: nest("identValue", "productIdent", { "productIdentType": "id" })
|
|
7
|
+
};
|
|
4
8
|
object.appendable = {
|
|
5
9
|
except: [],
|
|
6
10
|
arrayNode: "groups",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { setOmp } from "../helpers.js";
|
|
2
3
|
export default (object) => {
|
|
3
4
|
object.gate = { method: 'put', node: '/products/omnibusPrices' };
|
|
5
|
+
object.custom = {
|
|
6
|
+
productId: (value, type = "id") => ({ ident: { type, value } }),
|
|
7
|
+
setPrice: (price, wholesale = false) => setOmp(object, price, wholesale),
|
|
8
|
+
mode: (manual = false) => setOmp(object, false, false, manual ? "manual" : "automatic")
|
|
9
|
+
};
|
|
4
10
|
object.appendable = {
|
|
5
11
|
except: [],
|
|
6
12
|
arrayNode: "products",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { nest } from "../helpers.js";
|
|
2
3
|
export default (object) => {
|
|
3
4
|
object.gate = { method: 'put', node: '/products/questions' };
|
|
5
|
+
object.custom = {
|
|
6
|
+
productId: nest("identValue", "productIdent", { "productIdentType": "id" })
|
|
7
|
+
};
|
|
4
8
|
object.appendable = {
|
|
5
9
|
except: [],
|
|
6
10
|
arrayNode: "questions",
|