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,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("getWmsStocksdocumentsProductsType", () => {
|
|
5
|
-
const params = idosell().getWmsStocksdocumentsProducts.type("pz").
|
|
5
|
+
const params = idosell().getWmsStocksdocumentsProducts.type("pz").checkParams();
|
|
6
6
|
expect(params).toEqual({"type":"pz"});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("getWmsStocksdocumentsProductsId", () => {
|
|
10
|
-
const params = idosell().getWmsStocksdocumentsProducts.id(123).
|
|
10
|
+
const params = idosell().getWmsStocksdocumentsProducts.id(123).checkParams();
|
|
11
11
|
expect(params).toEqual({"id":123});
|
|
12
12
|
})
|
|
@@ -2,16 +2,16 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("getWmsSuppliersPage", () => {
|
|
5
|
-
const params = idosell().getWmsSuppliers.page(2,10).
|
|
5
|
+
const params = idosell().getWmsSuppliers.page(2,10).checkParams();
|
|
6
6
|
expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("getWmsSuppliersIds", () => {
|
|
10
|
-
const params = idosell().getWmsSuppliers.ids([2,4,6]).
|
|
10
|
+
const params = idosell().getWmsSuppliers.ids([2,4,6]).checkParams();
|
|
11
11
|
expect(params).toEqual({"ids":[2,4,6]});
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
test("getWmsSuppliersReturnProductsCount", () => {
|
|
15
|
-
const params = idosell().getWmsSuppliers.returnProductsCount(true).
|
|
15
|
+
const params = idosell().getWmsSuppliers.returnProductsCount(true).checkParams();
|
|
16
16
|
expect(params).toEqual({"returnProductsCount":true});
|
|
17
17
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postClientsStreet", () => {
|
|
5
|
-
const params = idosell().postClients.login("new_client").shops([1,2]).email("new@client.com").firstname("New").lastname("Client").zipcode("11-111").city("Warsaw").country_code("PL").phone("123456789").street("Grzybowska").
|
|
5
|
+
const params = idosell().postClients.login("new_client").shops([1,2]).email("new@client.com").firstname("New").lastname("Client").zipcode("11-111").city("Warsaw").country_code("PL").phone("123456789").street("Grzybowska").checkParams();
|
|
6
6
|
expect(params).toEqual({"clients":[{"login":"new_client","shops":[1,2],"email":"new@client.com","firstname":"New","lastname":"Client","zipcode":"11-111","city":"Warsaw","country_code":"PL","phone":"123456789","street":"Grzybowska"}]});
|
|
7
7
|
})
|
|
@@ -2,16 +2,16 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postClientsBalanceBalance", () => {
|
|
5
|
-
const params = idosell().postClientsBalance.clientId("3").operation("add").currency("PLN").balance(100).
|
|
5
|
+
const params = idosell().postClientsBalance.clientId("3").operation("add").currency("PLN").balance(100).checkParams();
|
|
6
6
|
expect(params).toEqual({"clientId":"3","operation":"add","currency":"PLN","balance":100});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("postClientsBalanceAdd", () => {
|
|
10
|
-
const params = idosell().postClientsBalance.clientId(3).add(100).
|
|
10
|
+
const params = idosell().postClientsBalance.clientId(3).add(100).checkParams();
|
|
11
11
|
expect(params).toEqual({"clientId":3,"operation":"add","balance":100,"currency":"PLN"});
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
test("postClientsBalanceRemove", () => {
|
|
15
|
-
const params = idosell().postClientsBalance.clientId(3).remove(100, "EUR").
|
|
15
|
+
const params = idosell().postClientsBalance.clientId(3).remove(100, "EUR").checkParams();
|
|
16
16
|
expect(params).toEqual({"clientId":3,"operation":"remove","balance":100,"currency":"EUR"});
|
|
17
17
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postClientsDeliveryAddressShopsIds", () => {
|
|
5
|
-
const params = idosell().postClientsDeliveryAddress.clientLogin("iai_demo").clientDeliveryAddressCity("Warsaw").clientDeliveryAddressStreet("Grzybowska").clientDeliveryAddressZipCode("11-111").clientDeliveryAddressCountry("PL").clientDeliveryAddressFirstName("Demo").clientDeliveryAddressLastName("Client").shopsIds([1,2]).
|
|
5
|
+
const params = idosell().postClientsDeliveryAddress.clientLogin("iai_demo").clientDeliveryAddressCity("Warsaw").clientDeliveryAddressStreet("Grzybowska").clientDeliveryAddressZipCode("11-111").clientDeliveryAddressCountry("PL").clientDeliveryAddressFirstName("Demo").clientDeliveryAddressLastName("Client").shopsIds([1,2]).checkParams();
|
|
6
6
|
expect(params).toEqual({"clients":[{"clientLogin":"iai_demo","clientDeliveryAddressCity":"Warsaw","clientDeliveryAddressStreet":"Grzybowska","clientDeliveryAddressZipCode":"11-111","clientDeliveryAddressCountry":"PL","clientDeliveryAddressFirstName":"Demo","clientDeliveryAddressLastName":"Client","shopsIds":[1,2]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postClientsGiftcardsBalance", () => {
|
|
5
|
-
const params = idosell().postClientsGiftcards.typeId(10).number("A123456789").pin("1234").name("Test card").expirationDate("2030-12-31").shops([1,2]).balance({"amount":100,"currency":"PLN"}).
|
|
5
|
+
const params = idosell().postClientsGiftcards.typeId(10).number("A123456789").pin("1234").name("Test card").expirationDate("2030-12-31").shops([1,2]).balance({"amount":100,"currency":"PLN"}).checkParams();
|
|
6
6
|
expect(params).toEqual({"giftCards":[{"typeId":10,"number":"A123456789","pin":"1234","name":"Test card","expirationDate":"2030-12-31","shops":[1,2],"balance":{"amount":100,"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("postClientsPayerAddressPayerAddressPhone", () => {
|
|
5
|
-
const params = idosell().postClientsPayerAddress.clientId(3).payerAddressFirstName("Demo").payerAddressLastName("Client").payerAddressStreet("Grzybowska").payerAddressZipCode("11-111").payerAddressCity("Warsaw").payerAddressCountryId("PL").payerAddressPhone("987654321").
|
|
5
|
+
const params = idosell().postClientsPayerAddress.clientId(3).payerAddressFirstName("Demo").payerAddressLastName("Client").payerAddressStreet("Grzybowska").payerAddressZipCode("11-111").payerAddressCity("Warsaw").payerAddressCountryId("PL").payerAddressPhone("987654321").checkParams();
|
|
6
6
|
expect(params).toEqual({"payers":[{"clientId":3,"payerAddressFirstName":"Demo","payerAddressLastName":"Client","payerAddressStreet":"Grzybowska","payerAddressZipCode":"11-111","payerAddressCity":"Warsaw","payerAddressCountryId":"PL","payerAddressPhone":"987654321"}]});
|
|
7
7
|
})
|
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postClientsPricelistsPriceListName", () => {
|
|
5
|
-
const params = idosell().postClientsPricelists.priceListName("pricing1").
|
|
5
|
+
const params = idosell().postClientsPricelists.priceListName("pricing1").checkParams();
|
|
6
6
|
expect(params).toEqual({"priceListName":"pricing1"});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("postClientsPricelistsOnlyOrderProductsWithManuallySetPrices", () => {
|
|
10
|
-
const params = idosell().postClientsPricelists.priceListName("pricing2").onlyOrderProductsWithManuallySetPrices("yes").
|
|
10
|
+
const params = idosell().postClientsPricelists.priceListName("pricing2").onlyOrderProductsWithManuallySetPrices("yes").checkParams();
|
|
11
11
|
expect(params).toEqual({"priceListName":"pricing2","onlyOrderProductsWithManuallySetPrices":"yes"});
|
|
12
12
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postClientsProfitPointsScore", () => {
|
|
5
|
-
const params = idosell().postClientsProfitPoints.client_id(3).operation("add").score(10).
|
|
5
|
+
const params = idosell().postClientsProfitPoints.client_id(3).operation("add").score(10).checkParams();
|
|
6
6
|
expect(params).toEqual({"client_id":3,"operation":"add","score":10});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postClientsTagsTagValue", () => {
|
|
5
|
-
const params = idosell().postClientsTags.clientId(3).tagName("tag1").tagValue(2).
|
|
5
|
+
const params = idosell().postClientsTags.clientId(3).tagName("tag1").tagValue(2).checkParams();
|
|
6
6
|
expect(params).toEqual({"params":[{"clientId":3,"tagName":"tag1","tagValue":2}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postCouriersPickupPointsCoordinates", () => {
|
|
5
|
-
const params = idosell().postCouriersPickupPoints.pickupPointExternalId("abc").courierId(100105).pickupPointExternalId("abcdefg").address({"street": "Grzybowska","city": "Warsaw","zipCode": "00-844"}).coordinates({"longitude": 20.12,"latitude": 20.12}).
|
|
5
|
+
const params = idosell().postCouriersPickupPoints.pickupPointExternalId("abc").courierId(100105).pickupPointExternalId("abcdefg").address({"street": "Grzybowska","city": "Warsaw","zipCode": "00-844"}).coordinates({"longitude": 20.12,"latitude": 20.12}).checkParams();
|
|
6
6
|
expect(params).toEqual({"pickupPoints":[{"pickupPointExternalId":"abcdefg","courierId":100105,"address":{"street":"Grzybowska","city":"Warsaw","zipCode":"00-844"},"coordinates":{"longitude":20.12,"latitude":20.12}}]});
|
|
7
7
|
})
|
package/tests/postCpa.test.js
CHANGED
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postCpaCampaign", () => {
|
|
5
|
-
const params = idosell().postCpa.name("my-cpa").campaign(3).
|
|
5
|
+
const params = idosell().postCpa.name("my-cpa").campaign(3).checkParams();
|
|
6
6
|
expect(params).toEqual({"cpa":[{"name":"my-cpa","campaign":3}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postCpaCampaignShop", () => {
|
|
5
|
-
const params = idosell().postCpaCampaign.name("cpa-campaign").shop([1]).
|
|
5
|
+
const params = idosell().postCpaCampaign.name("cpa-campaign").shop([1]).checkParams();
|
|
6
6
|
expect(params).toEqual({"campaigns":[{"name":"cpa-campaign","shop":[1]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postDeliveriesRegionsParentRegionId", () => {
|
|
5
|
-
const params = idosell().postDeliveriesRegions.postCodeFrom("00-000").postCodeTo("01-000").regionName("wwa1").shopId(1).parentRegionId(1).
|
|
5
|
+
const params = idosell().postDeliveriesRegions.postCodeFrom("00-000").postCodeTo("01-000").regionName("wwa1").shopId(1).parentRegionId(1).checkParams();
|
|
6
6
|
expect(params).toEqual({"postCodeFrom":"00-000","postCodeTo":"01-000","regionName":"wwa1","shopId":1,"parentRegionId":1});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postDiscountsGroupsDiscountGroupName", () => {
|
|
5
|
-
const params = idosell().postDiscountsGroups.discountGroupName("gr1").
|
|
5
|
+
const params = idosell().postDiscountsGroups.discountGroupName("gr1").checkParams();
|
|
6
6
|
expect(params).toEqual({"discountGroupName":"gr1"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postDiscountsRebatesCardCard_number", () => {
|
|
5
|
-
const params = idosell().postDiscountsRebatesCard.campaign_id(103).card_number("num1").
|
|
5
|
+
const params = idosell().postDiscountsRebatesCard.campaign_id(103).card_number("num1").checkParams();
|
|
6
6
|
expect(params).toEqual({"campaign_id":103,"card_number":"num1"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postDiscountsRebatesCodeCode_number", () => {
|
|
5
|
-
const params = idosell().postDiscountsRebatesCode.campaign_id(2).code_number("code").
|
|
5
|
+
const params = idosell().postDiscountsRebatesCode.campaign_id(2).code_number("code").checkParams();
|
|
6
6
|
expect(params).toEqual({"campaign_id":2,"code_number":"code"});
|
|
7
7
|
})
|
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postEntriesTitle", () => {
|
|
5
|
-
const params = idosell().postEntries.langId("pol").shopId(1).shortDescription("entry").longDescription("My Entry").visible("y").date("2023-12-18").titleLinkType("fullContentLink").title("title").
|
|
5
|
+
const params = idosell().postEntries.langId("pol").shopId(1).shortDescription("entry").longDescription("My Entry").visible("y").date("2023-12-18").titleLinkType("fullContentLink").title("title").checkParams();
|
|
6
6
|
expect(params).toEqual({"langs":[{"langId":"pol","shortDescription":"entry","longDescription":"My Entry","title":"title"}],"shopId":1,"visible":"y","date":"2023-12-18","titleLinkType":"fullContentLink"});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("postEntriesNews", () => {
|
|
10
|
-
const params = idosell().postEntries.blog().news().
|
|
10
|
+
const params = idosell().postEntries.blog().news().checkParams();
|
|
11
11
|
expect(params).toEqual({"langs":[{}],"visibleOnSitesList":[{"siteId":"display_on_blog"},{"sizeId":"display_on_news"}]});
|
|
12
12
|
})
|
package/tests/postMenu.test.js
CHANGED
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postMenuLang_data", () => {
|
|
5
|
-
const params = idosell().postMenu.shop_id(1).menu_id(1).parent_id("0").lang_data([{"lang_id": "pol","name": "menu2"}]).
|
|
5
|
+
const params = idosell().postMenu.shop_id(1).menu_id(1).parent_id("0").lang_data([{"lang_id": "pol","name": "menu2"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"menu_list":[{"shop_id":1,"menu_id":1,"parent_id":"0","lang_data":[{"lang_id":"pol","name":"menu2"}]}]});
|
|
7
7
|
})
|
package/tests/postOrders.test.js
CHANGED
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postOrdersExistingClient", () => {
|
|
5
|
-
const params = idosell().postOrders.shopId(1).stockId(1).orderPaymentType("cash_on_delivery").currencyId("PLN").courierId(10).orderType("retail").clientLogin("iai_demo").clientWithoutAccount("n").products([{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}]).
|
|
5
|
+
const params = idosell().postOrders.shopId(1).stockId(1).orderPaymentType("cash_on_delivery").currencyId("PLN").courierId(10).orderType("retail").clientLogin("iai_demo").clientWithoutAccount("n").products([{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"orders":[{"shopId":1,"stockId":1,"orderPaymentType":"cash_on_delivery","currencyId":"PLN","courierId":10,"orderType":"retail","clientLogin":"iai_demo","clientWithoutAccount":"n","products":[{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}]}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("postOrdersClientWithoutAccountData", () => {
|
|
10
|
-
const params = idosell().postOrders.shopId(1).stockId(1).orderPaymentType("cash_on_delivery").currencyId("PLN").courierId(10).orderType("retail").clientWithoutAccount("y").products([{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}]).clientWithoutAccountData({"clientFirstName":"TEST","clientLastName":"Client","clientCity":"Warsaw","clientCountry":"Polska"}).clientDeliveryAddress({"clientDeliveryAddressFirstName":"Test","clientDeliveryAddressLastName":"Person","clientDeliveryAddressCountry":"Polska","clientDeliveryAddressCity":"Warsaw","clientDeliveryAddressStreet":"Grzybowska","clientDeliveryAddressZipCode":"00-844"}).
|
|
10
|
+
const params = idosell().postOrders.shopId(1).stockId(1).orderPaymentType("cash_on_delivery").currencyId("PLN").courierId(10).orderType("retail").clientWithoutAccount("y").products([{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}]).clientWithoutAccountData({"clientFirstName":"TEST","clientLastName":"Client","clientCity":"Warsaw","clientCountry":"Polska"}).clientDeliveryAddress({"clientDeliveryAddressFirstName":"Test","clientDeliveryAddressLastName":"Person","clientDeliveryAddressCountry":"Polska","clientDeliveryAddressCity":"Warsaw","clientDeliveryAddressStreet":"Grzybowska","clientDeliveryAddressZipCode":"00-844"}).checkParams();
|
|
11
11
|
expect(params).toEqual({"orders":[{"shopId":1,"stockId":1,"orderPaymentType":"cash_on_delivery","currencyId":"PLN","courierId":10,"orderType":"retail","clientWithoutAccount":"y","products":[{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}],"clientWithoutAccountData":{"clientFirstName":"TEST","clientLastName":"Client","clientCity":"Warsaw","clientCountry":"Polska"},"clientDeliveryAddress":{"clientDeliveryAddressFirstName":"Test","clientDeliveryAddressLastName":"Person","clientDeliveryAddressCountry":"Polska","clientDeliveryAddressCity":"Warsaw","clientDeliveryAddressStreet":"Grzybowska","clientDeliveryAddressZipCode":"00-844"}}]});
|
|
12
12
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postOrdersDocumentsName", () => {
|
|
5
|
-
const params = idosell().postOrdersDocuments.orderSerialNumber(9).type("other").name("document").
|
|
5
|
+
const params = idosell().postOrdersDocuments.orderSerialNumber(9).type("other").name("document").checkParams();
|
|
6
6
|
expect(params).toEqual({"documents":[{"orderSerialNumber":9,"type":"other","name":"document"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postOrdersDocumentsCreateActualize", () => {
|
|
5
|
-
const params = idosell().postOrdersDocumentsCreate.orderSerialNumbers([86]).documentType("vat_invoice").actualize(false).
|
|
5
|
+
const params = idosell().postOrdersDocumentsCreate.orderSerialNumbers([86]).documentType("vat_invoice").actualize(false).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderSerialNumbers":[86],"documentType":"vat_invoice","actualize":false});
|
|
7
7
|
})
|
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postOrdersImages", () => {
|
|
5
|
-
const params = idosell().postOrdersImages.order({"orderSerialNumber": 9}).userName("me").type("product").source("https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png").name("logo").settings({"sourceType":"url"}).
|
|
5
|
+
const params = idosell().postOrdersImages.order({"orderSerialNumber": 9}).userName("me").type("product").source("https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png").name("logo").settings({"sourceType":"url"}).checkParams();
|
|
6
6
|
expect(params).toEqual({"order":{"orderSerialNumber":9},"userName":"me","images":[{"type":"product","source":"https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png","name":"logo"}],"settings":{"sourceType":"url"}});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("postOrdersImagesOrderSerialNumber", () => {
|
|
10
|
-
const params = idosell().postOrdersImages.type("package").source("https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png").name("package").orderSerialNumber(17).
|
|
10
|
+
const params = idosell().postOrdersImages.type("package").source("https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png").name("package").orderSerialNumber(17).checkParams();
|
|
11
11
|
expect(params).toEqual({"userName":"api","images":[{"type":"package","source":"https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png","name":"package"}],"settings":{"sourceType":"url"},"order":{"orderSerialNumber":17}});
|
|
12
12
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postOrdersPackagesPackages", () => {
|
|
5
|
-
const params = idosell().postOrdersPackages.eventId("9").eventType("order").packages([{"courierId": "10","deliveryPackageNumber": "123465789A"}]).
|
|
5
|
+
const params = idosell().postOrdersPackages.eventId("9").eventType("order").packages([{"courierId": "10","deliveryPackageNumber": "123465789A"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderPackages":[{"eventId":"9","eventType":"order","packages":[{"courierId":"10","deliveryPackageNumber":"123465789A"}]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postPackagesPackages", () => {
|
|
5
|
-
const params = idosell().postPackages.orderId("9").orderType("order").packages([{"delivery": 10,"packageNumber": "123465798D"}]).
|
|
5
|
+
const params = idosell().postPackages.orderId("9").orderType("order").packages([{"delivery": 10,"packageNumber": "123465798D"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"orderPackages":[{"orderId":"9","orderType":"order","packages":[{"delivery":10,"packageNumber":"123465798D"}]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postPackagesLabelsEventType", () => {
|
|
5
|
-
const params = idosell().postPackagesLabels.eventId(15).eventType("order").
|
|
5
|
+
const params = idosell().postPackagesLabels.eventId(15).eventType("order").checkParams();
|
|
6
6
|
expect(params).toEqual({"eventId":15,"eventType":"order"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postPaymentsType", () => {
|
|
5
|
-
const params = idosell().postPayments.sourceId(9).sourceType("order").value(100).paymentFormId(5).type("payment").
|
|
5
|
+
const params = idosell().postPayments.sourceId(9).sourceType("order").value(100).paymentFormId(5).type("payment").checkParams();
|
|
6
6
|
expect(params).toEqual({"sourceId":9,"sourceType":"order","value":100,"paymentFormId":5,"type":"payment"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postPaymentsCancelPaymentNumber", () => {
|
|
5
|
-
const params = idosell().postPaymentsCancel.sourceType("order").paymentNumber("9-1").
|
|
5
|
+
const params = idosell().postPaymentsCancel.sourceType("order").paymentNumber("9-1").checkParams();
|
|
6
6
|
expect(params).toEqual({"sourceType":"order","paymentNumber":"9-1"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postPaymentsCashbackPaymentNumber", () => {
|
|
5
|
-
const params = idosell().postPaymentsCashback.value(100).paymentNumber("9-2").
|
|
5
|
+
const params = idosell().postPaymentsCashback.value(100).paymentNumber("9-2").checkParams();
|
|
6
6
|
expect(params).toEqual({"value":100,"paymentNumber":"9-2"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postPaymentsRepaymentPayment_form_id", () => {
|
|
5
|
-
const params = idosell().postPaymentsRepayment.source_id(1).source_type("return").value(100).payment_form_id(27).
|
|
5
|
+
const params = idosell().postPaymentsRepayment.source_id(1).source_type("return").value(100).payment_form_id(27).checkParams();
|
|
6
6
|
expect(params).toEqual({"source_id":1,"source_type":"return","value":100,"payment_form_id":27});
|
|
7
7
|
})
|
|
@@ -2,21 +2,21 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postProductsProductSizes", () => {
|
|
5
|
-
const params = idosell().postProducts.productSizes([{"sizeId":"uniw"}]).
|
|
5
|
+
const params = idosell().postProducts.productSizes([{"sizeId":"uniw"}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"products":[{"productSizes":[{"sizeId":"uniw"}]}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("postProductsShopsMask", () => {
|
|
10
|
-
const params = idosell().postProducts.shopsMask(1).
|
|
10
|
+
const params = idosell().postProducts.shopsMask(1).checkParams();
|
|
11
11
|
expect(params).toEqual({"products":[{"shopsMask":1}]});
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
test("postProductsSetPrice", () => {
|
|
15
|
-
const params = idosell().postProducts.shopsMask(1).setPrice(199).
|
|
15
|
+
const params = idosell().postProducts.shopsMask(1).setPrice(199).checkParams();
|
|
16
16
|
expect(params).toEqual({"products":[{"shopsMask":1,"priceChangeMode":"amount_set","productRetailPrice":199}]});
|
|
17
17
|
})
|
|
18
18
|
|
|
19
19
|
test("postProductsSetText", () => {
|
|
20
|
-
const params = idosell().postProducts.shopsMask(1).setText("Awesome199","name").
|
|
20
|
+
const params = idosell().postProducts.shopsMask(1).setText("Awesome199","name").checkParams();
|
|
21
21
|
expect(params).toEqual({"products":[{"shopsMask":1,"productNames":{"productNamesLangData":[{"langId":"pol","productName":"Awesome199"}]}}]});
|
|
22
22
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postProductsBrandsNameInPanel", () => {
|
|
5
|
-
const params = idosell().postProductsBrands.nameInPanel("MyBrand").
|
|
5
|
+
const params = idosell().postProductsBrands.nameInPanel("MyBrand").checkParams();
|
|
6
6
|
expect(params).toEqual({"producers":[{"nameInPanel":"MyBrand"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postProductsCollectionsProducts", () => {
|
|
5
|
-
const params = idosell().postProductsCollections.products({"productId":55,"addType":"allSizesWithVariants","quantity":1}).
|
|
5
|
+
const params = idosell().postProductsCollections.products({"productId":55,"addType":"allSizesWithVariants","quantity":1}).checkParams();
|
|
6
6
|
expect(params).toEqual({"params":[{"products":{"productId":55,"addType":"allSizesWithVariants","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("postProductsCollectionsProductsProducts", () => {
|
|
5
|
-
const params = idosell().postProductsCollectionsProducts.collectionId(54).products([{"productId":52,"addType":"allSizesWithVariants","quantity":1}]).
|
|
5
|
+
const params = idosell().postProductsCollectionsProducts.collectionId(54).products([{"productId":52,"addType":"allSizesWithVariants","quantity":1}]).checkParams();
|
|
6
6
|
expect(params).toEqual({"params":[{"collectionId":54,"products":[{"productId":52,"addType":"allSizesWithVariants","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("postProductsMarketingPromotionMarketingZones", () => {
|
|
5
|
-
const params = idosell().postProductsMarketingPromotion.shopsIds([1]).promotionName("Promo").marketingZones({"promotion": "y"}).
|
|
5
|
+
const params = idosell().postProductsMarketingPromotion.shopsIds([1]).promotionName("Promo").marketingZones({"promotion": "y"}).checkParams();
|
|
6
6
|
expect(params).toEqual({"shopsIds":[1],"promotionName":"Promo","marketingZones":{"promotion":"y"}});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postProductsOpinionsProducts", () => {
|
|
5
|
-
const params = idosell().postProductsOpinions.shopId(1).rating("5").products({"type": "id","value": "9"}).
|
|
5
|
+
const params = idosell().postProductsOpinions.shopId(1).rating("5").products({"type": "id","value": "9"}).checkParams();
|
|
6
6
|
expect(params).toEqual({"opinions":[{"shopId":1,"rating":"5","products":{"type":"id","value":"9"}}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postProductsProductsToFacebookCatalogProducts", () => {
|
|
5
|
-
const params = idosell().postProductsProductsToFacebookCatalog.facebookCatalogId(1).shopId(1).products([9]).
|
|
5
|
+
const params = idosell().postProductsProductsToFacebookCatalog.facebookCatalogId(1).shopId(1).products([9]).checkParams();
|
|
6
6
|
expect(params).toEqual({"facebookCatalogId":1,"shopId":1,"products":[9]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postProductsProductsToPromotionProducts", () => {
|
|
5
|
-
const params = idosell().postProductsProductsToPromotion.promotionId(2).products([11]).
|
|
5
|
+
const params = idosell().postProductsProductsToPromotion.promotionId(2).products([11]).checkParams();
|
|
6
6
|
expect(params).toEqual({"promotionId":2,"products":[11]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postProductsRestoreProductId", () => {
|
|
5
|
-
const params = idosell().postProductsRestore.productId(44).
|
|
5
|
+
const params = idosell().postProductsRestore.productId(44).checkParams();
|
|
6
6
|
expect(params).toEqual({"productId":44});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postRefundsAddAutomaticRefundSourceType", () => {
|
|
5
|
-
const params = idosell().postRefundsAddAutomaticRefund.sourceId(1).sourceType("return").
|
|
5
|
+
const params = idosell().postRefundsAddAutomaticRefund.sourceId(1).sourceType("return").checkParams();
|
|
6
6
|
expect(params).toEqual({"sourceId":1,"sourceType":"return"});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postRefundsAddAutomaticRefundForOrderRefundValue", () => {
|
|
5
|
-
const params = idosell().postRefundsAddAutomaticRefundForOrder.sourceId(1).paymentId("1-1").refundCurrency("PLN").refundValue(100).
|
|
5
|
+
const params = idosell().postRefundsAddAutomaticRefundForOrder.sourceId(1).paymentId("1-1").refundCurrency("PLN").refundValue(100).checkParams();
|
|
6
6
|
expect(params).toEqual({"sourceId":1,"paymentId":"1-1","refundCurrency":"PLN","refundValue":100});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postRefundsAddManualRefundRefundDetails", () => {
|
|
5
|
-
const params = idosell().postRefundsAddManualRefund.sourceType("order").sourceId(9).refundValue(100).refundCurrency("PLN").refundDetails({"paymentFormId": 0,"paymentSystem": 27}).
|
|
5
|
+
const params = idosell().postRefundsAddManualRefund.sourceType("order").sourceId(9).refundValue(100).refundCurrency("PLN").refundDetails({"paymentFormId": 0,"paymentSystem": 27}).checkParams();
|
|
6
6
|
expect(params).toEqual({"sourceType":"order","sourceId":9,"refundValue":100,"refundCurrency":"PLN","refundDetails":{"paymentFormId":0,"paymentSystem":27}});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postResponsibilityEntitiesType", () => {
|
|
5
|
-
const params = idosell().postResponsibilityEntities.code("XO").name("XO ltd.").mail("xo@mail.com").street("XO st").number(1).subnumber(1).zipcode("00-000").city("Warszawa").country("PL").type("producer").
|
|
5
|
+
const params = idosell().postResponsibilityEntities.code("XO").name("XO ltd.").mail("xo@mail.com").street("XO st").number(1).subnumber(1).zipcode("00-000").city("Warszawa").country("PL").type("producer").checkParams();
|
|
6
6
|
expect(params).toEqual({"entities":[{"code":"XO","name":"XO ltd.","mail":"xo@mail.com","street":"XO st","number":1,"subnumber":1,"zipcode":"00-000","city":"Warszawa","country":"PL"}],"type":"producer"});
|
|
7
7
|
})
|
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postReturnsFull", () => {
|
|
5
|
-
const params = idosell().postReturns.order_sn(4).stock_id(1).
|
|
5
|
+
const params = idosell().postReturns.order_sn(4).stock_id(1).checkParams();
|
|
6
6
|
expect(params).toEqual({"order_sn":4,"stock_id":1});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("postReturnsWithProduct", () => {
|
|
10
|
-
const params = idosell().postReturns.order_sn(4).stock_id(1).id(7).size("U").quantity(1).
|
|
10
|
+
const params = idosell().postReturns.order_sn(4).stock_id(1).id(7).size("U").quantity(1).checkParams();
|
|
11
11
|
expect(params).toEqual({"order_sn":4,"stock_id":1,"products":[{"id":7,"size":"U","quantity":1}]});
|
|
12
12
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postSnippetsCampaign", () => {
|
|
5
|
-
const params = idosell().postSnippets.name("snippet").campaign(2).
|
|
5
|
+
const params = idosell().postSnippets.name("snippet").campaign(2).checkParams();
|
|
6
6
|
expect(params).toEqual({"snippets":[{"name":"snippet","campaign":2}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postSnippetsCampaignShop", () => {
|
|
5
|
-
const params = idosell().postSnippetsCampaign.name("camp").shop([1]).
|
|
5
|
+
const params = idosell().postSnippetsCampaign.name("camp").shop([1]).checkParams();
|
|
6
6
|
expect(params).toEqual({"campaigns":[{"name":"camp","shop":[1]}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postSnippetsCookiesDeliverer", () => {
|
|
5
|
-
const params = idosell().postSnippetsCookies.snippetId(2).deliverer("custom").
|
|
5
|
+
const params = idosell().postSnippetsCookies.snippetId(2).deliverer("custom").checkParams();
|
|
6
6
|
expect(params).toEqual({"cookies":[{"snippetId":2,"deliverer":"custom"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postVouchersName", () => {
|
|
5
|
-
const params = idosell().postVouchers.typeId(9).number("V123456789").shops([1]).balance({ "amount":100, "currency":"PLN"}).name("MyVoucher").
|
|
5
|
+
const params = idosell().postVouchers.typeId(9).number("V123456789").shops([1]).balance({ "amount":100, "currency":"PLN"}).name("MyVoucher").checkParams();
|
|
6
6
|
expect(params).toEqual({"vouchers":[{"typeId":9,"number":"V123456789","shops":[1],"balance":{"amount":100,"currency":"PLN"},"name":"MyVoucher"}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postWarrantiesPeriod", () => {
|
|
5
|
-
const params = idosell().postWarranties.name("Warranty").type("seller").period(123).
|
|
5
|
+
const params = idosell().postWarranties.name("Warranty").type("seller").period(123).checkParams();
|
|
6
6
|
expect(params).toEqual({"warranties":[{"name":"Warranty","type":"seller","period":123}]});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postWmsStocksdocumentsDocumentsStockId", () => {
|
|
5
|
-
const params = idosell().postWmsStocksdocumentsDocuments.type("pz").stockId(1).
|
|
5
|
+
const params = idosell().postWmsStocksdocumentsDocuments.type("pz").stockId(1).checkParams();
|
|
6
6
|
expect(params).toEqual({"type":"pz","stockId":1});
|
|
7
7
|
})
|
|
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("postWmsStocksdocumentsProductsQuantity", () => {
|
|
5
|
-
const params = idosell().postWmsStocksdocumentsProducts.type("pz").id(1).product(33).size("uniw").quantity(10).
|
|
5
|
+
const params = idosell().postWmsStocksdocumentsProducts.type("pz").id(1).product(33).size("uniw").quantity(10).checkParams();
|
|
6
6
|
expect(params).toEqual({"type":"pz","id":1,"products":[{"product":33,"size":"uniw","quantity":10}]});
|
|
7
7
|
})
|
package/tests/putClients.test.js
CHANGED
|
@@ -2,11 +2,11 @@ import idosell from "./dist/index"
|
|
|
2
2
|
import { expect, test } from "vitest"
|
|
3
3
|
|
|
4
4
|
test("putClientsClientNote", () => {
|
|
5
|
-
const params = idosell().putClients.clientLogin("iaisystem").clientNote("System").
|
|
5
|
+
const params = idosell().putClients.clientLogin("iaisystem").clientNote("System").checkParams();
|
|
6
6
|
expect(params).toEqual({"clients":[{"clientLogin":"iaisystem","clientNote":"System"}]});
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
test("putClientsClientNoteMultiple", () => {
|
|
10
|
-
const params = idosell().putClients.clientLogin("iaisystem").clientNote("System").append().clientLogin("iai_demo").clientNote("Demo").
|
|
10
|
+
const params = idosell().putClients.clientLogin("iaisystem").clientNote("System").append().clientLogin("iai_demo").clientNote("Demo").checkParams();
|
|
11
11
|
expect(params).toEqual({"clients":[{"clientLogin":"iaisystem","clientNote":"System"},{"clientLogin":"iai_demo","clientNote":"Demo"}]});
|
|
12
12
|
})
|