idosell 0.3.11 → 0.3.13
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 +17 -1
- package/dist/app.d.ts +1 -1
- package/dist/enums.d.ts +227 -11
- package/dist/enums.js +228 -10
- package/dist/gateways.d.ts +56 -10
- package/dist/helpers.js +55 -11
- package/dist/methods/getProductsDescriptions.js +3 -0
- package/dist/methods/getReturns.js +1 -0
- package/dist/methods/getVouchers.js +1 -0
- package/dist/methods/postOrders.js +1 -1
- package/dist/methods/postOrdersDocuments.js +1 -1
- package/dist/methods/postOrdersImages.js +1 -1
- package/dist/methods/postProducts.js +0 -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/putProductsQuestions.js +4 -0
- package/dist/params.js +2 -1
- package/dist/request.js +23 -0
- 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 +2 -2
- package/tests/getClientsPricelists.test.js +2 -2
- package/tests/getClientsPricelistsClients.test.js +1 -1
- package/tests/getClientsPricelistsProducts.test.js +2 -2
- 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 +2 -2
- package/tests/getCouriersPickupPoints.test.js +3 -3
- 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 +1 -1
- package/tests/getMenuFilter.test.js +1 -1
- package/tests/getOrders.test.js +1 -1
- package/tests/getOrdersAnalytics.test.js +1 -1
- package/tests/getOrdersAuctionDetails.test.js +1 -1
- package/tests/getOrdersDocuments.test.js +1 -1
- package/tests/getOrdersExportdocumentsEPP.test.js +4 -4
- package/tests/getOrdersExportdocumentsJPK.test.js +3 -3
- 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 +1 -1
- package/tests/getOrdersPackages.test.js +3 -3
- 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 +2 -2
- 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 +2 -2
- package/tests/getProductsBrands.test.js +1 -1
- package/tests/getProductsBrandsFilter.test.js +1 -1
- 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 +1 -1
- package/tests/getProductsProductsToFacebookCatalog.test.js +1 -1
- 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 +1 -1
- 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 +5 -5
- 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 +2 -2
- package/tests/getWmsStocksdocumentsDocuments.test.js +4 -4
- package/tests/getWmsStocksdocumentsOpenedDocuments.test.js +4 -4
- package/tests/getWmsStocksdocumentsProducts.test.js +2 -2
- 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 +2 -2
- package/tests/postMenu.test.js +1 -1
- package/tests/postOrders.test.js +2 -2
- package/tests/postOrdersDocuments.test.js +1 -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 +4 -4
- 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 +1 -1
- 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 +1 -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 +1 -1
- 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 +2 -2
- 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
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsDeliveryAddressClientDeliveryAddressZipCode", () => {
|
|
5
|
-
const params = idosell().putClientsDeliveryAddress.clientLogin("iai_demo").clientDeliveryAddressId(11).shopsIds([1]).clientDeliveryAddressZipCode("11-111").
|
|
5
|
+
const params = idosell().putClientsDeliveryAddress.clientLogin("iai_demo").clientDeliveryAddressId(11).shopsIds([1]).clientDeliveryAddressZipCode("11-111").checkParams();
|
|
6
6
|
expect(params).toEqual({"clients":[{"clientLogin":"iai_demo","clientDeliveryAddressId":11,"shopsIds":[1],"clientDeliveryAddressZipCode":"11-111"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsExternalCodeCode_extern", () => {
|
|
5
|
-
const params = idosell().putClientsExternalCode.client_login("iai_demo").code_extern("abc").
|
|
5
|
+
const params = idosell().putClientsExternalCode.client_login("iai_demo").code_extern("abc").checkParams();
|
|
6
6
|
expect(params).toEqual({"client_login":"iai_demo","code_extern":"abc"});
|
|
7
7
|
})
|
|
@@ -2,16 +2,16 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsGiftcardsName", () => {
|
|
5
|
-
const params = idosell().putClientsGiftcards.id(23).name("My Card").
|
|
5
|
+
const params = idosell().putClientsGiftcards.id(23).name("My Card").checkParams();
|
|
6
6
|
expect(params).toEqual({"giftCards":[{"id":23,"name":"My Card"}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("putClientsGiftcardsAdd", () => {
|
|
10
|
-
const params = idosell().putClientsGiftcards.id(23).add(10, "PLN").
|
|
10
|
+
const params = idosell().putClientsGiftcards.id(23).add(10, "PLN").checkParams();
|
|
11
11
|
expect(params).toEqual({"giftCards":[{"id":23,"balance":{"amount":10,"currency":"PLN"},"balanceOperationType":"add"}]});
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
test("putClientsGiftcardsMultiple", () => {
|
|
15
|
-
const params = idosell().putClientsGiftcards.id(23).set(100, "PLN").append().id(24).subtract(20).
|
|
15
|
+
const params = idosell().putClientsGiftcards.id(23).set(100, "PLN").append().id(24).subtract(20).checkParams();
|
|
16
16
|
expect(params).toEqual({"giftCards":[{"id":23,"balance":{"amount":100,"currency":"PLN"},"balanceOperationType":"set"},{"id":24,"balance":{"amount":20,"currency":"PLN"},"balanceOperationType":"subtract"}]});
|
|
17
17
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsGiftcardsBlockNumber", () => {
|
|
5
|
-
const params = idosell().putClientsGiftcardsBlock.id(23).number("Card23").
|
|
5
|
+
const params = idosell().putClientsGiftcardsBlock.id(23).number("Card23").checkParams();
|
|
6
6
|
expect(params).toEqual({"giftCards":[{"id":23,"number":"Card23"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsGiftcardsUnblockNumber", () => {
|
|
5
|
-
const params = idosell().putClientsGiftcardsUnblock.id(23).number("Card23").
|
|
5
|
+
const params = idosell().putClientsGiftcardsUnblock.id(23).number("Card23").checkParams();
|
|
6
6
|
expect(params).toEqual({"giftCards":[{"id":23,"number":"Card23"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsMembershipCardsPin", () => {
|
|
5
|
-
const params = idosell().putClientsMembershipCards.login("iai_demo").card_type(1).pin(9999).
|
|
5
|
+
const params = idosell().putClientsMembershipCards.login("iai_demo").card_type(1).pin(9999).checkParams();
|
|
6
6
|
expect(params).toEqual({"login":"iai_demo","membership_cards":[{"card_type":1,"pin":9999}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsPayerAddressPayerAddressZipCode", () => {
|
|
5
|
-
const params = idosell().putClientsPayerAddress.clientId("3").payerAddressId("1").payerAddressZipCode("11-111").
|
|
5
|
+
const params = idosell().putClientsPayerAddress.clientId("3").payerAddressId("1").payerAddressZipCode("11-111").checkParams();
|
|
6
6
|
expect(params).toEqual({"payers":[{"clientId":"3","payerAddressId":"1","payerAddressZipCode":"11-111"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsPricelistsPriceListName", () => {
|
|
5
|
-
const params = idosell().putClientsPricelists.priceListId(200).priceListName("customprice").
|
|
5
|
+
const params = idosell().putClientsPricelists.priceListId(200).priceListName("customprice").checkParams();
|
|
6
6
|
expect(params).toEqual({"priceListId":200,"priceListName":"customprice"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsPricelistsClientsClientsIds", () => {
|
|
5
|
-
const params = idosell().putClientsPricelistsClients.priceListId(200).clientsIds([9,10]).
|
|
5
|
+
const params = idosell().putClientsPricelistsClients.priceListId(200).clientsIds([9,10]).checkParams();
|
|
6
6
|
expect(params).toEqual({"priceListId":200,"clientsIds":[9,10]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsPricelistsProductsProducts", () => {
|
|
5
|
-
const params = idosell().putClientsPricelistsProducts.priceListId(200).products({"productId": 9,"price": 10,"currencyId": "PLN"}).
|
|
5
|
+
const params = idosell().putClientsPricelistsProducts.priceListId(200).products({"productId": 9,"price": 10,"currencyId": "PLN"}).checkParams();
|
|
6
6
|
expect(params).toEqual({"priceListId":200,"products":[{"productId":9,"price":10,"currencyId":"PLN"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsPricelistsRenamePriceListName", () => {
|
|
5
|
-
const params = idosell().putClientsPricelistsRename.priceListId(200).priceListName("pricing2").
|
|
5
|
+
const params = idosell().putClientsPricelistsRename.priceListId(200).priceListName("pricing2").checkParams();
|
|
6
6
|
expect(params).toEqual({"priceListId":200,"priceListName":"pricing2"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsPricesDiscountsDiscount_value", () => {
|
|
5
|
-
const params = idosell().putClientsPricesDiscounts.discount_type("simple").customers({"customers_numbers": [9]}).discount_operating("sum_with_other_discounts_to_orders").discount_value(10).
|
|
5
|
+
const params = idosell().putClientsPricesDiscounts.discount_type("simple").customers({"customers_numbers": [9]}).discount_operating("sum_with_other_discounts_to_orders").discount_value(10).checkParams();
|
|
6
6
|
expect(params).toEqual({"discount_type":"simple","customers":{"customers_numbers":[9]},"discount_operating":"sum_with_other_discounts_to_orders","discount_parameters":[{"discount_value":10}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsTagsTagValue", () => {
|
|
5
|
-
const params = idosell().putClientsTags.clientId(3).tagId(1).operation("set").tagValue(123).
|
|
5
|
+
const params = idosell().putClientsTags.clientId(3).tagId(1).operation("set").tagValue(123).checkParams();
|
|
6
6
|
expect(params).toEqual({"clientId":3,"clientTags":[{"tagId":1,"operation":"set","tagValue":123}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putConfigVariablesItemId", () => {
|
|
5
|
-
const params = idosell().putConfigVariables.type("snippets_campaign").key("cpax").value("abcdefg").itemId(1).
|
|
5
|
+
const params = idosell().putConfigVariables.type("snippets_campaign").key("cpax").value("abcdefg").itemId(1).checkParams();
|
|
6
6
|
expect(params).toEqual({"variables":[{"type":"snippets_campaign","key":"cpax","value":"abcdefg","itemId":1}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putCouriersPickupPointsServiceStatus", () => {
|
|
5
|
-
const params = idosell().putCouriersPickupPoints.pickupPointId(1).courierId(100105).serviceStatus("out_of_service").
|
|
5
|
+
const params = idosell().putCouriersPickupPoints.pickupPointId(1).courierId(100105).serviceStatus("out_of_service").checkParams();
|
|
6
6
|
expect(params).toEqual({"pickupPoints":[{"pickupPointId":1,"courierId":100105,"serviceStatus":"out_of_service"}]});
|
|
7
7
|
})
|
package/tests/putCpa.test.js
CHANGED
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putCpaName", () => {
|
|
5
|
-
const params = idosell().putCpa.id(2).name("maincps").
|
|
5
|
+
const params = idosell().putCpa.id(2).name("maincps").checkParams();
|
|
6
6
|
expect(params).toEqual({"cpa":[{"id":2,"name":"maincps"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putCpaCampaignName", () => {
|
|
5
|
-
const params = idosell().putCpaCampaign.id(2).name("cps").
|
|
5
|
+
const params = idosell().putCpaCampaign.id(2).name("cps").checkParams();
|
|
6
6
|
expect(params).toEqual({"campaigns":[{"id":2,"name":"cps"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putDeliveriesDefaultProfilesRetailProfileId", () => {
|
|
5
|
-
const params = idosell().putDeliveriesDefaultProfiles.shopId(1).regionId(1143020169).retailProfileId(1118398155).
|
|
5
|
+
const params = idosell().putDeliveriesDefaultProfiles.shopId(1).regionId(1143020169).retailProfileId(1118398155).checkParams();
|
|
6
6
|
expect(params).toEqual({"shopId":1,"regionId":1143020169,"retailProfileId":1118398155});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putDiscountsGroupsDiscountGroupName", () => {
|
|
5
|
-
const params = idosell().putDiscountsGroups.discountGroupId(201).discountGroupName("abcdefg").
|
|
5
|
+
const params = idosell().putDiscountsGroups.discountGroupId(201).discountGroupName("abcdefg").checkParams();
|
|
6
6
|
expect(params).toEqual({"discountGroupId":201,"discountGroupName":"abcdefg"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putDiscountsGroupsProductsProducts", () => {
|
|
5
|
-
const params = idosell().putDiscountsGroupsProducts.discountGroupId(206).products([{"id": 9,"price": 12,"currency": "PLN"}]).
|
|
5
|
+
const params = idosell().putDiscountsGroupsProducts.discountGroupId(206).products([{"id": 9,"price": 12,"currency": "PLN"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"discountGroupId":206,"products":[{"id":9,"price":12,"currency":"PLN"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putDiscountsRebatesBlockCardCard_number", () => {
|
|
5
|
-
const params = idosell().putDiscountsRebatesBlockCard.card_number("20171227-45").
|
|
5
|
+
const params = idosell().putDiscountsRebatesBlockCard.card_number("20171227-45").checkParams();
|
|
6
6
|
expect(params).toEqual({"card_number":"20171227-45"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putDiscountsRebatesUnblockCardCard_number", () => {
|
|
5
|
-
const params = idosell().putDiscountsRebatesUnblockCard.card_number("20171227-45").
|
|
5
|
+
const params = idosell().putDiscountsRebatesUnblockCard.card_number("20171227-45").checkParams();
|
|
6
6
|
expect(params).toEqual({"card_number":"20171227-45"});
|
|
7
7
|
})
|
package/tests/putEntries.test.js
CHANGED
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putEntriesVisible", () => {
|
|
5
|
-
const params = idosell().putEntries.entryId(1308134189).date("2023-12-21").shopId(1).visible("n").
|
|
5
|
+
const params = idosell().putEntries.entryId(1308134189).date("2023-12-21").shopId(1).visible("n").checkParams();
|
|
6
6
|
expect(params).toEqual({"entryId":1308134189,"date":"2023-12-21","shopId":1,"visible":"n"});
|
|
7
7
|
})
|
package/tests/putMenu.test.js
CHANGED
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putMenuLang_data", () => {
|
|
5
|
-
const params = idosell().putMenu.shop_id(1).menu_id(1).item_id("251").lang_data([{"lang_id": "pol","name": "new"}]).
|
|
5
|
+
const params = idosell().putMenu.shop_id(1).menu_id(1).item_id("251").lang_data([{"lang_id": "pol","name": "new"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"menu_list":[{"shop_id":1,"menu_id":1,"item_id":"251","lang_data":[{"lang_id":"pol","name":"new"}]}]});
|
|
7
7
|
})
|
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putMenuFilterMenuFiltersActive", () => {
|
|
5
|
-
const params = idosell().putMenuFilter.shopId(1).languageId("pol").productMenuTreeId(1).productMenuNodeId(251).menuFiltersActive([{"menuFilterId": "pricerange_0","menuFilterName": "Cena"}]).
|
|
5
|
+
const params = idosell().putMenuFilter.shopId(1).languageId("pol").productMenuTreeId(1).productMenuNodeId(251).menuFiltersActive([{"menuFilterId": "pricerange_0","menuFilterName": "Cena"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"shopId":1,"languageId":"pol","productMenuTreeId":1,"productMenuNodeId":251,"menuFiltersActive":[{"menuFilterId":"pricerange_0","menuFilterName":"Cena"}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("putMenuFilterMenuFilterName", () => {
|
|
10
|
-
const params = idosell().putMenuFilter.shopId(1).languageId("pol").productMenuTreeId(1).productMenuNodeId(251).menuFilterId("pricerange_0").menuFilterName("Cena").
|
|
10
|
+
const params = idosell().putMenuFilter.shopId(1).languageId("pol").productMenuTreeId(1).productMenuNodeId(251).menuFilterId("pricerange_0").menuFilterName("Cena").checkParams();
|
|
11
11
|
expect(params).toEqual({"shopId":1,"languageId":"pol","productMenuTreeId":1,"productMenuNodeId":251,"menuFiltersActive":[{"menuFilterId":"pricerange_0","menuFilterName":"Cena"}]});
|
|
12
12
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putMenuSortParent_id", () => {
|
|
5
|
-
const params = idosell().putMenuSort.shop_id(1).menu_id(1).lang_id("pol").parent_id(1).
|
|
5
|
+
const params = idosell().putMenuSort.shop_id(1).menu_id(1).lang_id("pol").parent_id(1).checkParams();
|
|
6
6
|
expect(params).toEqual({"menu_list":[{"shop_id":1,"menu_id":1,"lang_id":"pol","parent_id":1}]});
|
|
7
7
|
})
|
package/tests/putOrders.test.js
CHANGED
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersOrderNote", () => {
|
|
5
|
-
const params = idosell().putOrders.orderSerialNumber(9).orderNote("testmessage").
|
|
5
|
+
const params = idosell().putOrders.orderSerialNumber(9).orderNote("testmessage").checkParams();
|
|
6
6
|
expect(params).toEqual({"orders":[{"orderSerialNumber":9,"orderNote":"testmessage"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersCourierPickupPointId", () => {
|
|
5
|
-
const params = idosell().putOrdersCourier.orderSerialNumber(3).courierId(100105).pickupPointId("1").
|
|
5
|
+
const params = idosell().putOrdersCourier.orderSerialNumber(3).courierId(100105).pickupPointId("1").checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumber":3,"courierId":100105,"pickupPointId":"1"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersDeliveryAddressClientDeliveryAddressId", () => {
|
|
5
|
-
const params = idosell().putOrdersDeliveryAddress.orderSerialNumber(3).clientLogin("iai_demo").clientDeliveryAddressId(11).
|
|
5
|
+
const params = idosell().putOrdersDeliveryAddress.orderSerialNumber(3).clientLogin("iai_demo").clientDeliveryAddressId(11).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumber":3,"clientLogin":"iai_demo","clientDeliveryAddressId":11});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersDevideQuantity", () => {
|
|
5
|
-
const params = idosell().putOrdersDevide.orderSerialNumber(3).basketPosition(0).quantity(1).
|
|
5
|
+
const params = idosell().putOrdersDevide.orderSerialNumber(3).basketPosition(0).quantity(1).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumber":3,"products":[{"basketPosition":0,"quantity":1}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersHandlerOrderOperatorLogin", () => {
|
|
5
|
-
const params = idosell().putOrdersHandler.orderSerialNumber(3).orderOperatorLogin("idosho503").
|
|
5
|
+
const params = idosell().putOrdersHandler.orderSerialNumber(3).orderOperatorLogin("idosho503").checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumber":3,"orderOperatorLogin":"idosho503"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersPackagesPackages", () => {
|
|
5
|
-
const params = idosell().putOrdersPackages.eventId("3").eventType("order").packages([{"deliveryPackageId": 19,"courierId": "10","deliveryPackageNumber": "123"}]).
|
|
5
|
+
const params = idosell().putOrdersPackages.eventId("3").eventType("order").packages([{"deliveryPackageId": 19,"courierId": "10","deliveryPackageNumber": "123"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderPackages":[{"eventId":"3","eventType":"order","packages":[{"deliveryPackageId":19,"courierId":"10","deliveryPackageNumber":"123"}]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersPickupPointPickupPointId", () => {
|
|
5
|
-
const params = idosell().putOrdersPickupPoint.orderSerialNumber(3).pickupPointId("1").
|
|
5
|
+
const params = idosell().putOrdersPickupPoint.orderSerialNumber(3).pickupPointId("1").checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumber":3,"pickupPointId":"1"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersProductsSerialNumbersOrderProducts", () => {
|
|
5
|
-
const params = idosell().putOrdersProductsSerialNumbers.orderSerialNumber(3).orderProducts([{"productId":33,"sizeId":"uniw","productSerialNumbers":["00123456"]}]).
|
|
5
|
+
const params = idosell().putOrdersProductsSerialNumbers.orderSerialNumber(3).orderProducts([{"productId":33,"sizeId":"uniw","productSerialNumbers":["00123456"]}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"orders":[{"orderSerialNumber":3,"orderProducts":[{"productId":33,"sizeId":"uniw","productSerialNumbers":["00123456"]}]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersProfitMarginProducts", () => {
|
|
5
|
-
const params = idosell().putOrdersProfitMargin.orderSerialNumber(3).products([{"productIdent":{"identValue":"33","productIdentType":"id"},"sizeId":"uniw","productProfitMargin":12.3,"productProfitMarginNet":10}]).
|
|
5
|
+
const params = idosell().putOrdersProfitMargin.orderSerialNumber(3).products([{"productIdent":{"identValue":"33","productIdentType":"id"},"sizeId":"uniw","productProfitMargin":12.3,"productProfitMarginNet":10}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"orders":[{"orderSerialNumber":3,"products":[{"productIdent":{"identValue":"33","productIdentType":"id"},"sizeId":"uniw","productProfitMargin":12.3,"productProfitMarginNet":10}]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersShippingCostsOrderDeliveryVat", () => {
|
|
5
|
-
const params = idosell().putOrdersShippingCosts.orderSerialNumber(3).deliveryCost(10).orderDeliveryVat(23).
|
|
5
|
+
const params = idosell().putOrdersShippingCosts.orderSerialNumber(3).deliveryCost(10).orderDeliveryVat(23).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumber":3,"deliveryCost":10,"orderDeliveryVat":23});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putOrdersWarehouseStockId", () => {
|
|
5
|
-
const params = idosell().putOrdersWarehouse.orderSerialNumber(3).stockId(2).
|
|
5
|
+
const params = idosell().putOrdersWarehouse.orderSerialNumber(3).stockId(2).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumber":3,"stockId":2});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putPackagesPackages", () => {
|
|
5
|
-
const params = idosell().putPackages.orderId("3").orderType("order").packages([{"packageId":22,"delivery":10,"packageNumber":"ABCDE"}]).
|
|
5
|
+
const params = idosell().putPackages.orderId("3").orderType("order").packages([{"packageId":22,"delivery":10,"packageNumber":"ABCDE"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderPackages":[{"orderId":"3","orderType":"order","packages":[{"packageId":22,"delivery":10,"packageNumber":"ABCDE"}]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putPaymentsValue", () => {
|
|
5
|
-
const params = idosell().putPayments.sourceType("order").paymentNumber("3-3").value(10).
|
|
5
|
+
const params = idosell().putPayments.sourceType("order").paymentNumber("3-3").value(10).checkParams();
|
|
6
6
|
expect(params).toEqual({"sourceType":"order","paymentNumber":"3-3","value":10});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putPaymentsConfirmPaymentNumber", () => {
|
|
5
|
-
const params = idosell().putPaymentsConfirm.sourceType("order").paymentNumber("3-2").
|
|
5
|
+
const params = idosell().putPaymentsConfirm.sourceType("order").paymentNumber("3-2").checkParams();
|
|
6
6
|
expect(params).toEqual({"sourceType":"order","paymentNumber":"3-2"});
|
|
7
7
|
})
|
|
@@ -2,36 +2,36 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsCountryOfOrigin", () => {
|
|
5
|
-
const params = idosell().putProducts.productId(33).countryOfOrigin("PL").
|
|
5
|
+
const params = idosell().putProducts.productId(33).countryOfOrigin("PL").checkParams();
|
|
6
6
|
expect(params).toEqual({"products":[{"productId":33,"countryOfOrigin":"PL"}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("putProductsSetText", () => {
|
|
10
|
-
const params = idosell().putProducts.productId(33).setText("Krzesło Pavon", "name").
|
|
10
|
+
const params = idosell().putProducts.productId(33).setText("Krzesło Pavon", "name").checkParams();
|
|
11
11
|
expect(params).toEqual({"products":[{"productId":33,"productNames":{"productNamesLangData":[{"langId":"pol","productName":"Krzesło Pavon"}]}}]});
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
test("putProductsEditMode", () => {
|
|
15
|
-
const params = idosell().putProducts.editMode().productId(33).productDisplayedCode("PD01").
|
|
15
|
+
const params = idosell().putProducts.editMode().productId(33).productDisplayedCode("PD01").checkParams();
|
|
16
16
|
expect(params).toEqual({"settings":{"settingModificationType":"edit"},"products":[{"productId":33,"productDisplayedCode":"PD01"}]});
|
|
17
17
|
})
|
|
18
18
|
|
|
19
19
|
test("putProductsSetRetailPrice", () => {
|
|
20
|
-
const params = idosell().putProducts.productId(33).setPrice(219).
|
|
20
|
+
const params = idosell().putProducts.productId(33).setPrice(219).checkParams();
|
|
21
21
|
expect(params).toEqual({"products":[{"productId":33,"priceChangeMode":"amount_set","productRetailPrice":219}]});
|
|
22
22
|
})
|
|
23
23
|
|
|
24
24
|
test("putProductsSetWholesaleNetPrice", () => {
|
|
25
|
-
const params = idosell().putProducts.productId(33).setPrice(169, "wholesale", true).
|
|
25
|
+
const params = idosell().putProducts.productId(33).setPrice(169, "wholesale", true).checkParams();
|
|
26
26
|
expect(params).toEqual({"products":[{"productId":33,"priceChangeMode":"amount_set","productWholesalePriceNet":169}]});
|
|
27
27
|
})
|
|
28
28
|
|
|
29
29
|
test("putProductsSetMenu", () => {
|
|
30
|
-
const params = idosell().putProducts.productId(33).setMenu(1,252).
|
|
30
|
+
const params = idosell().putProducts.productId(33).setMenu(1,252).checkParams();
|
|
31
31
|
expect(params).toEqual({"products":[{"productId":33,"productMenuItems":[{"productMenuOperation":"add_product","shopId":1,"menuItemId":252}]}]});
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
test("putProductsPictures", () => {
|
|
35
|
-
const params = idosell().putProducts.productId(77).pictures(["https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png"]).
|
|
35
|
+
const params = idosell().putProducts.productId(77).pictures(["https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png"]).checkParams();
|
|
36
36
|
expect(params).toEqual({"products":[{"productId":77,"productPictures":[{"productPictureSource":"https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png"}]}],"picturesSettings":{"picturesSettingInputType":"url"}});
|
|
37
37
|
})
|
|
@@ -2,6 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsAttachmentsAttachments", () => {
|
|
5
|
-
const params = idosell().putProductsAttachments.productIdent({"identValue":"33","productIdentType":"id"}).attachments([{"attachmentUrl":"https://el.macropart.com/_app/immutable/assets/Macropart-logo.be38339c.svg","attachmentName":"mpt","langId":"pol","attachmentFileType":"image","attachmentEnable":"all","attachmentDownloadLog":"y"}]).
|
|
5
|
+
const params = idosell().putProductsAttachments.productIdent({"identValue":"33","productIdentType":"id"}).attachments([{"attachmentUrl":"https://el.macropart.com/_app/immutable/assets/Macropart-logo.be38339c.svg","attachmentName":"mpt","langId":"pol","attachmentFileType":"image","attachmentEnable":"all","attachmentDownloadLog":"y"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"productsAttachments":[{"productIdent":{"identValue":"33","productIdentType":"id"},"attachments":[{"attachmentUrl":"https://el.macropart.com/_app/immutable/assets/Macropart-logo.be38339c.svg","attachmentName":"mpt","langId":"pol","attachmentFileType":"image","attachmentEnable":"all","attachmentDownloadLog":"y"}]}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("putProductsAttachmentsProductId", () => {
|
|
10
|
+
const params = idosell().putProductsAttachments.productId(30).checkParams();
|
|
11
|
+
expect(params).toEqual({"productsAttachments":[{"productIdent":{"productIdentType":"id","identValue":30}}]});
|
|
7
12
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsBrandsNameInPanel", () => {
|
|
5
|
-
const params = idosell().putProductsBrands.id(1513170627).nameInPanel("Brand").
|
|
5
|
+
const params = idosell().putProductsBrands.id(1513170627).nameInPanel("Brand").checkParams();
|
|
6
6
|
expect(params).toEqual({"producers":[{"id":1513170627,"nameInPanel":"Brand"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsBrandsFilterFilterForNodeIsDefault", () => {
|
|
5
|
-
const params = idosell().putProductsBrandsFilter.shopId(1).languageId("pol").producerId(1513170627).filterForNodeIsDefault("n").
|
|
5
|
+
const params = idosell().putProductsBrandsFilter.shopId(1).languageId("pol").producerId(1513170627).filterForNodeIsDefault("n").checkParams();
|
|
6
6
|
expect(params).toEqual({"shopId":1,"languageId":"pol","producerId":1513170627,"filterForNodeIsDefault":"n"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsCategoriesOperation", () => {
|
|
5
|
-
const params = idosell().putProductsCategories.id(1157971976).lang_data([{"lang_id":"pol","singular_name":"Kategoria","plural_name":"Kategorie"}]).operation("edit").
|
|
5
|
+
const params = idosell().putProductsCategories.id(1157971976).lang_data([{"lang_id":"pol","singular_name":"Kategoria","plural_name":"Kategorie"}]).operation("edit").checkParams();
|
|
6
6
|
expect(params).toEqual({"categories":[{"id":1157971976,"lang_data":[{"lang_id":"pol","singular_name":"Kategoria","plural_name":"Kategorie"}],"operation":"edit"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsCollectionsProductsProducts", () => {
|
|
5
|
-
const params = idosell().putProductsCollectionsProducts.collectionId(69).products([{"productId":49,"quantity":2}]).
|
|
5
|
+
const params = idosell().putProductsCollectionsProducts.collectionId(69).products([{"productId":49,"quantity":2}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"params":[{"collectionId":69,"products":[{"productId":49,"quantity":2}]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsCollectionsRenewProducts", () => {
|
|
5
|
-
const params = idosell().putProductsCollectionsRenew.collectionIdent({"collectionIdentType":"id","collectionId":"69"}).products([{"productIdent":{"productId":"13","productIdentType":"id"},"addType":"allSizes","quantity":1}]).
|
|
5
|
+
const params = idosell().putProductsCollectionsRenew.collectionIdent({"collectionIdentType":"id","collectionId":"69"}).products([{"productIdent":{"productId":"13","productIdentType":"id"},"addType":"allSizes","quantity":1}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"params":[{"collectionIdent":{"collectionIdentType":"id","collectionId":"69"},"products":[{"productIdent":{"productId":"13","productIdentType":"id"},"addType":"allSizes","quantity":1}]}]});
|
|
7
7
|
})
|
|
@@ -2,11 +2,16 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsDescriptionsProductIdent", () => {
|
|
5
|
-
const params = idosell().putProductsDescriptions.productIdent({"productIdentType":"id","identValue":"33"}).productDescriptionsLangData([{"langId":"pol","productName":"Krzesło Pavon"}]).
|
|
5
|
+
const params = idosell().putProductsDescriptions.productIdent({"productIdentType":"id","identValue":"33"}).productDescriptionsLangData([{"langId":"pol","productName":"Krzesło Pavon"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"products":[{"productIdent":{"productIdentType":"id","identValue":"33"},"productDescriptionsLangData":[{"langId":"pol","productName":"Krzesło Pavon"}]}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("putProductsDescriptionsProductId", () => {
|
|
10
|
-
const params = idosell().putProductsDescriptions.productId(33).productDescriptionsLangData([{"langId": "pol","productName": "Krzesło Pavon"}]).
|
|
10
|
+
const params = idosell().putProductsDescriptions.productId(33).productDescriptionsLangData([{"langId": "pol","productName": "Krzesło Pavon"}]).checkParams();
|
|
11
11
|
expect(params).toEqual({"products":[{"productIdent":{"productIdentType":"id","identValue":33},"productDescriptionsLangData":[{"langId":"pol","productName":"Krzesło Pavon"}]}]});
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
test("putProductsDescriptionsSetText", () => {
|
|
15
|
+
const params = idosell().putProductsDescriptions.productId(30).setText("Produkt A","productName").setText("Opis produktu", "productDescription").checkParams();
|
|
16
|
+
expect(params).toEqual({"products":[{"productIdent":{"productIdentType":"id","identValue":30},"productDescriptionsLangData":[{"langId":"pol","productName":"Produkt A","productDescription":"Opis produktu"}]}]});
|
|
12
17
|
})
|
|
@@ -2,6 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsGroupsMainProductProductIdent", () => {
|
|
5
|
-
const params = idosell().putProductsGroupsMainProduct.productIdent({"productIdentType":"id","identValue":"33"}).
|
|
5
|
+
const params = idosell().putProductsGroupsMainProduct.productIdent({"productIdentType":"id","identValue":"33"}).checkParams();
|
|
6
6
|
expect(params).toEqual({"groups":[{"productIdent":{"productIdentType":"id","identValue":"33"}}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("putProductsGroupsMainProductProductId", () => {
|
|
10
|
+
const params = idosell().putProductsGroupsMainProduct.productId(59).checkParams();
|
|
11
|
+
expect(params).toEqual({"groups":[{"productIdent":{"productIdentType":"id","identValue":59}}]});
|
|
7
12
|
})
|
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsGroupsOrderProductsInOrder", () => {
|
|
5
|
-
const params = idosell().putProductsGroupsOrder.productsInOrder([{"productIdent":{"productIdentType":"id","identValue":"33"},"priority":1},{"productIdent":{"productIdentType":"id","identValue":"44"},"priority":2},{"productIdent":{"productIdentType":"id","identValue":"48"},"priority":3}]).
|
|
5
|
+
const params = idosell().putProductsGroupsOrder.productsInOrder([{"productIdent":{"productIdentType":"id","identValue":"33"},"priority":1},{"productIdent":{"productIdentType":"id","identValue":"44"},"priority":2},{"productIdent":{"productIdentType":"id","identValue":"48"},"priority":3}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"groups":[{"productsInOrder":[{"productIdent":{"productIdentType":"id","identValue":"33"},"priority":1},{"productIdent":{"productIdentType":"id","identValue":"44"},"priority":2},{"productIdent":{"productIdentType":"id","identValue":"48"},"priority":3}]}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("putProductsGroupsOrderProductIdsInOrder", () => {
|
|
10
|
-
const params = idosell().putProductsGroupsOrder.productIdsInOrder([44,33]).
|
|
10
|
+
const params = idosell().putProductsGroupsOrder.productIdsInOrder([44,33]).checkParams();
|
|
11
11
|
expect(params).toEqual({"groups":[{"productsInOrder":[{"productIdent":{"productIdentType":"id","identValue":44},"priority":1},{"productIdent":{"productIdentType":"id","identValue":33},"priority":2}]}]});
|
|
12
12
|
})
|
|
@@ -2,6 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putProductsGroupsSettingsDisplayInPanel", () => {
|
|
5
|
-
const params = idosell().putProductsGroupsSettings.productIdent({"productIdentType":"id","identValue":"33"}).displayInPanel("all").
|
|
5
|
+
const params = idosell().putProductsGroupsSettings.productIdent({"productIdentType":"id","identValue":"33"}).displayInPanel("all").checkParams();
|
|
6
6
|
expect(params).toEqual({"groups":[{"productIdent":{"productIdentType":"id","identValue":"33"},"displayInPanel":"all"}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("putProductsGroupsSettingsProductId", () => {
|
|
10
|
+
const params = idosell().putProductsGroupsSettings.productId(59).displayOnPage("all").displayInPanel("all").checkParams();
|
|
11
|
+
expect(params).toEqual({"groups":[{"productIdent":{"productIdentType":"id","identValue":59},"displayOnPage":"all","displayInPanel":"all"}]});
|
|
7
12
|
})
|