idosell 0.4.24 → 0.4.27
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 +9 -0
- package/dist/app.d.ts +2 -1
- package/dist/gates.js +51 -15
- package/dist/gateways.d.ts +278 -21
- package/dist/helpers.js +18 -0
- package/dist/index.js +3 -1
- package/dist/methods/deletePromotions.js +6 -0
- package/dist/methods/deletePromotionsArchive.js +6 -0
- package/dist/methods/deletePromotionsElements.js +13 -0
- package/dist/methods/getPromotions.js +6 -0
- package/dist/methods/getPromotionsArchive.js +6 -0
- package/dist/methods/getPromotionsSettings.js +5 -0
- package/dist/methods/postPromotions.js +8 -0
- package/dist/methods/postPromotionsElements.js +13 -0
- package/dist/methods/postPromotionsEnd.js +7 -0
- package/dist/methods/postPromotionsStart.js +7 -0
- package/dist/methods/putPromotions.js +8 -0
- package/dist/methods/putPromotionsSettings.js +6 -0
- package/dist/methods/searchPromotionsArchive.js +14 -0
- package/dist/methods/searchPromotionsElements.js +15 -0
- package/dist/methods/searchPromotionsHistory.js +13 -0
- package/dist/methods/searchPromotionsListView.js +21 -0
- package/dist/params.js +15 -1
- package/dist/reqparams.d.ts +165 -2
- package/dist/request.js +36 -10
- package/dist/responses.d.ts +111 -0
- package/package.json +1 -1
- package/tests/deleteProductsToFacebookCatalog.test.js +7 -0
- package/tests/deleteProductsToPromotion.test.js +7 -0
- package/tests/deletePromotions.test.js +7 -0
- package/tests/deletePromotionsArchive.test.js +7 -0
- package/tests/deletePromotionsElements.test.js +7 -0
- package/tests/getProductsToFacebookCatalog.test.js +8 -0
- package/tests/getPromotions.test.js +7 -0
- package/tests/getPromotionsArchive.test.js +7 -0
- package/tests/postProductsToFacebookCatalog.test.js +7 -0
- package/tests/postProductsToPromotion.test.js +7 -0
- package/tests/postPromotions.test.js +7 -0
- package/tests/postPromotionsElements.test.js +7 -0
- package/tests/postPromotionsEnd.test.js +7 -0
- package/tests/postPromotionsStart.test.js +7 -0
- package/tests/putPromotions.test.js +7 -0
- package/tests/putPromotionsSettings.test.js +7 -0
- package/tests/searchPromotionsArchive.test.js +12 -0
- package/tests/searchPromotionsElements.test.js +12 -0
- package/tests/searchPromotionsHistory.test.js +7 -0
- package/tests/searchPromotionsListView.test.js +7 -0
- package/tests/deleteProductsProductsToFacebookCatalog.test.js +0 -7
- package/tests/deleteProductsProductsToPromotion.test.js +0 -7
- /package/dist/methods/{deleteProductsProductsToFacebookCatalog.js → deleteProductsToFacebookCatalog.js} +0 -0
- /package/dist/methods/{deleteProductsProductsToPromotion.js → deleteProductsToPromotion.js} +0 -0
- /package/dist/methods/{getProductsProductsToFacebookCatalog.js → getProductsToFacebookCatalog.js} +0 -0
- /package/dist/methods/{postProductsProductsToFacebookCatalog.js → postProductsToFacebookCatalog.js} +0 -0
- /package/dist/methods/{postProductsProductsToPromotion.js → postProductsToPromotion.js} +0 -0
- /package/dist/methods/{postSubscriptionsItemsList.js → searchSubscriptionsItems.js} +0 -0
- /package/dist/methods/{postSubscriptionsListViewList.js → searchSubscriptionsListView.js} +0 -0
package/changelog.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.27] - 2025-04-06
|
|
9
|
+
- Addded missing promotions types
|
|
10
|
+
- Fixed paging for promotions
|
|
11
|
+
|
|
12
|
+
## [0.4.25] - 2025-04-04
|
|
13
|
+
- Updated to v7.19
|
|
14
|
+
- Added promotion routes
|
|
15
|
+
- Changed routes that have ProductsProducts to Products like getProductsToFacebookCatalog (before: getProductsProductsToFacebookCatalog)
|
|
16
|
+
|
|
8
17
|
## [0.4.24] - 2025-03-21
|
|
9
18
|
### Changed
|
|
10
19
|
- Updated to v7.13
|
package/dist/app.d.ts
CHANGED
|
@@ -40,11 +40,12 @@ export type GatewayRequestProxyObject = {
|
|
|
40
40
|
},
|
|
41
41
|
custom?: Record<string,(..._: any) => false|Record<string,any>>,
|
|
42
42
|
snakeCase?: boolean,
|
|
43
|
+
paginationObject?: boolean,
|
|
43
44
|
next?: boolean,
|
|
44
45
|
rootparams?: string|boolean,
|
|
45
46
|
arrays?: string[],
|
|
46
47
|
req?: RequirementType[],
|
|
47
|
-
n?: Record<string,number
|
|
48
|
+
n?: Record<string,number>
|
|
48
49
|
} & RequestProxyObject;
|
|
49
50
|
|
|
50
51
|
export interface Gateway<R = JSObject, P = JSObject> {
|
package/dist/gates.js
CHANGED
|
@@ -198,11 +198,11 @@ import getProducts from "./methods/getProducts.js";
|
|
|
198
198
|
import postProducts from "./methods/postProducts.js";
|
|
199
199
|
import putProducts from "./methods/putProducts.js";
|
|
200
200
|
import searchProducts from "./methods/searchProducts.js";
|
|
201
|
-
import
|
|
202
|
-
import
|
|
203
|
-
import
|
|
204
|
-
import
|
|
205
|
-
import
|
|
201
|
+
import deleteProductsToFacebookCatalog from "./methods/deleteProductsToFacebookCatalog.js";
|
|
202
|
+
import getProductsToFacebookCatalog from "./methods/getProductsToFacebookCatalog.js";
|
|
203
|
+
import postProductsToFacebookCatalog from "./methods/postProductsToFacebookCatalog.js";
|
|
204
|
+
import deleteProductsToPromotion from "./methods/deleteProductsToPromotion.js";
|
|
205
|
+
import postProductsToPromotion from "./methods/postProductsToPromotion.js";
|
|
206
206
|
import getProductsQuestions from "./methods/getProductsQuestions.js";
|
|
207
207
|
import putProductsQuestions from "./methods/putProductsQuestions.js";
|
|
208
208
|
import getProductsReservations from "./methods/getProductsReservations.js";
|
|
@@ -224,6 +224,22 @@ import putProductsSupplierCode from "./methods/putProductsSupplierCode.js";
|
|
|
224
224
|
import putProductsSupplierProductData from "./methods/putProductsSupplierProductData.js";
|
|
225
225
|
import postProductsSynchronizationFile from "./methods/postProductsSynchronizationFile.js";
|
|
226
226
|
import putProductsSynchronizationFinishUpload from "./methods/putProductsSynchronizationFinishUpload.js";
|
|
227
|
+
import postPromotionsElements from "./methods/postPromotionsElements.js";
|
|
228
|
+
import searchPromotionsElements from "./methods/searchPromotionsElements.js";
|
|
229
|
+
import deletePromotionsElements from "./methods/deletePromotionsElements.js";
|
|
230
|
+
import searchPromotionsHistory from "./methods/searchPromotionsHistory.js";
|
|
231
|
+
import postPromotions from "./methods/postPromotions.js";
|
|
232
|
+
import deletePromotions from "./methods/deletePromotions.js";
|
|
233
|
+
import putPromotions from "./methods/putPromotions.js";
|
|
234
|
+
import postPromotionsEnd from "./methods/postPromotionsEnd.js";
|
|
235
|
+
import getPromotions from "./methods/getPromotions.js";
|
|
236
|
+
import searchPromotionsListView from "./methods/searchPromotionsListView.js";
|
|
237
|
+
import postPromotionsStart from "./methods/postPromotionsStart.js";
|
|
238
|
+
import deletePromotionsArchive from "./methods/deletePromotionsArchive.js";
|
|
239
|
+
import getPromotionsArchive from "./methods/getPromotionsArchive.js";
|
|
240
|
+
import searchPromotionsArchive from "./methods/searchPromotionsArchive.js";
|
|
241
|
+
import getPromotionsSettings from "./methods/getPromotionsSettings.js";
|
|
242
|
+
import putPromotionsSettings from "./methods/putPromotionsSettings.js";
|
|
227
243
|
import postRefundsAddAutomaticRefund from "./methods/postRefundsAddAutomaticRefund.js";
|
|
228
244
|
import postRefundsAddAutomaticRefundForOrder from "./methods/postRefundsAddAutomaticRefundForOrder.js";
|
|
229
245
|
import postRefundsAddManualRefund from "./methods/postRefundsAddManualRefund.js";
|
|
@@ -271,9 +287,9 @@ import postSubscriptionsChangeStatus from "./methods/postSubscriptionsChangeStat
|
|
|
271
287
|
import postSubscriptionsDeleteProduct from "./methods/postSubscriptionsDeleteProduct.js";
|
|
272
288
|
import postSubscriptionsEdit from "./methods/postSubscriptionsEdit.js";
|
|
273
289
|
import postSubscriptionsEditProduct from "./methods/postSubscriptionsEditProduct.js";
|
|
274
|
-
import
|
|
290
|
+
import searchSubscriptionsItems from "./methods/searchSubscriptionsItems.js";
|
|
275
291
|
import postSubscriptionsListViewFetchIds from "./methods/postSubscriptionsListViewFetchIds.js";
|
|
276
|
-
import
|
|
292
|
+
import searchSubscriptionsListView from "./methods/searchSubscriptionsListView.js";
|
|
277
293
|
import postSubscriptionsSetRebateCode from "./methods/postSubscriptionsSetRebateCode.js";
|
|
278
294
|
import postSubscriptionsUnsetRebateCode from "./methods/postSubscriptionsUnsetRebateCode.js";
|
|
279
295
|
import getSystemConfig from "./methods/getSystemConfig.js";
|
|
@@ -518,11 +534,11 @@ const gates = {
|
|
|
518
534
|
postProducts,
|
|
519
535
|
putProducts,
|
|
520
536
|
searchProducts,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
537
|
+
deleteProductsToFacebookCatalog,
|
|
538
|
+
getProductsToFacebookCatalog,
|
|
539
|
+
postProductsToFacebookCatalog,
|
|
540
|
+
deleteProductsToPromotion,
|
|
541
|
+
postProductsToPromotion,
|
|
526
542
|
getProductsQuestions,
|
|
527
543
|
putProductsQuestions,
|
|
528
544
|
getProductsReservations,
|
|
@@ -544,6 +560,22 @@ const gates = {
|
|
|
544
560
|
putProductsSupplierProductData,
|
|
545
561
|
postProductsSynchronizationFile,
|
|
546
562
|
putProductsSynchronizationFinishUpload,
|
|
563
|
+
postPromotionsElements,
|
|
564
|
+
searchPromotionsElements,
|
|
565
|
+
deletePromotionsElements,
|
|
566
|
+
searchPromotionsHistory,
|
|
567
|
+
postPromotions,
|
|
568
|
+
deletePromotions,
|
|
569
|
+
putPromotions,
|
|
570
|
+
postPromotionsEnd,
|
|
571
|
+
getPromotions,
|
|
572
|
+
searchPromotionsListView,
|
|
573
|
+
postPromotionsStart,
|
|
574
|
+
deletePromotionsArchive,
|
|
575
|
+
getPromotionsArchive,
|
|
576
|
+
searchPromotionsArchive,
|
|
577
|
+
getPromotionsSettings,
|
|
578
|
+
putPromotionsSettings,
|
|
547
579
|
postRefundsAddAutomaticRefund,
|
|
548
580
|
postRefundsAddAutomaticRefundForOrder,
|
|
549
581
|
postRefundsAddManualRefund,
|
|
@@ -591,9 +623,9 @@ const gates = {
|
|
|
591
623
|
postSubscriptionsDeleteProduct,
|
|
592
624
|
postSubscriptionsEdit,
|
|
593
625
|
postSubscriptionsEditProduct,
|
|
594
|
-
|
|
626
|
+
searchSubscriptionsItems,
|
|
595
627
|
postSubscriptionsListViewFetchIds,
|
|
596
|
-
|
|
628
|
+
searchSubscriptionsListView,
|
|
597
629
|
postSubscriptionsSetRebateCode,
|
|
598
630
|
postSubscriptionsUnsetRebateCode,
|
|
599
631
|
getSystemConfig,
|
|
@@ -648,7 +680,11 @@ const gates = {
|
|
|
648
680
|
getPackages: searchPackages,
|
|
649
681
|
getProductsCategoriesIdosell: searchProductsCategoriesIdosell,
|
|
650
682
|
getProductsDeliveryTime: searchProductsDeliveryTime,
|
|
651
|
-
|
|
683
|
+
getProductsProductsProductsToFacebookCatalog: getProductsToFacebookCatalog,
|
|
684
|
+
postProductsProductsToPromotion: postProductsToPromotion,
|
|
685
|
+
postProductsProductsToFacebookCatalog: postProductsToFacebookCatalog,
|
|
686
|
+
deleteProductsProductsToFacebookCatalog: deleteProductsToFacebookCatalog,
|
|
687
|
+
deleteProductsProductsToPromotion: deleteProductsToPromotion,
|
|
652
688
|
};
|
|
653
689
|
export const gateProxy = {
|
|
654
690
|
get: (object, property) => {
|
package/dist/gateways.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
2
2
|
import type { PagableGateway, AppendableGateway, Gateway, DateLike, JSObject, IdosellErrorFaultStructure } from "./app.d.ts"
|
|
3
|
-
import type { GetClientsBalanceResponse, BooleanStatusResponse, GetClientsResponse, PostClientsResponse, PutClientsResponse, SearchClientsCrmResponse, GetClientsDeliveryAddressResponse, PostClientsDeliveryAddressResponse, PutClientsDeliveryAddressResponse, VouchersResponse, PutVouchersResponse, SearchClientsGiftcardsResponse, GetClientsGiftcardsTypesResponse, GetClientsMembershipCardsResponse, PutClientsMembershipCardsResponse, SearchClientsNewsletterEmailResponse, SearchClientsNewsletterSmsResponse, GetClientsPayerAddressResponse, PostClientsPayerAddressResponse, PutClientsPayerAddressResponse, GetClientsPricelistsClientsResponse, PutClientsPricelistsClientsResponse, GetClientsPricelistsResponse, PostClientsPricelistsResponse, GetClientsPricelistsProductsResponse, PutClientsPricelistsProductsResponse, GetClientsPricesActiveCardResponse, GetClientsPricesDiscountGroupsResponse, GetClientsPricesDiscountsResponse, PutClientsPricesDiscountsResponse, GetClientsProfitPointsResponse, GetClientsProvinceListResponse, GetClientsTagsResponse, PostClientsTagsResponse, PutClientsTagsResponse, GetConfigVariablesResponse, PutConfigVariablesResponse, GetCouriersAssignedToShippingProfilesResponse, GetCouriersResponse, GetCouriersPickupPointsResponse, PutCouriersPickupPointsResponse, GetCpaCampaignResponse, CmsCampaignResponse, CmsResponse, GetCpaResponse, GetDeliveriesProfilesResponse, GetDeliveriesRegionsResponse, PostDeliveriesRegionsResponse, GetDiscountsGroupsClientsResponse, GetDiscountsGroupsResponse, PostDiscountsGroupsResponse, GetEntriesResponse, PostEntriesResponse, GetEntriesPagesToDisplayResponse, GetEntriesSourcesResponse, GetMenuResponse, PostMenuResponse, PutMenuResponse, PutMenuSortResponse, GetOrdersAnalyticsResponse, GetOrdersAuctionDetailsResponse, PutOrdersCourierResponse, PostOrdersDocumentsCreateResponse, GetOrdersDocumentsResponse, PostOrdersDocumentsResponse, GetOrdersHandlerResponse, GetOrdersHistoryResponse, GetOrdersImagesResponse, PostOrdersImagesResponse, GetOrdersLabelsResponse, SearchOrdersOpinionsResponse, GetOrdersOpinionsRateResponse, SearchOrdersResponse, PostOrdersResponse, PutOrdersResponse, GetOrdersPackagesResponse, PutOrdersPackagesResponse, PutOrdersProductsSerialNumbersResponse, PutOrdersProfitMarginResponse, GetOrdersProfitabilityResponse, GetOrdersStatusesResponse, GetOrdersWarehouseResponse, PostPackagesLabelsResponse, PutPackagesResponse, SearchPackagesResponse, GetPaymentsFormsResponse, GetPaymentsResponse, PostPaymentsResponse, GetPaymentsProfilesResponse, PostPaymentsRepaymentResponse, GetProductsSKUbyBarcodeResponse, PutProductsAttachmentsResponse, GetProductsAuctionsResponse, GetProductsBrandsResponse, PutProductsBrandsResponse, GetProductsCategoriesResponse, PutProductsCategoriesResponse, SearchProductsCategoriesIdosellResponse, GetProductsCodeExistenceResponse, SearchProductsDeliveryTimeResponse, GetProductsDescriptionsResponse, ProductIdentResponse, PutProductsGroupsSettingsResponse, GetProductsIdBySizecodeResponse, PutProductsImagesResponse, GetProductsMarketingPromotionResponse, PostProductsMarketingPromotionResponse, PutProductsMarketingPromotionResponse, GetProductsMarketingZonesResponse, PutProductsMarketingZonesResponse, GetProductsOmnibusPricesResponse, GetProductsOpinionsResponse, PostProductsOpinionsResponse, GetProductsOpinionsRateResponse, PutProductsParametersResponse, SearchProductsParametersResponse, SearchProductsResponse, PostProductsResponse, PutProductsResponse, GetProductsQuestionsResponse, GetProductsReservationsResponse, GetProductsSeriesResponse, PutProductsSeriesResponse, GetProductsSizesResponse, PutProductsSizesResponse, PutProductsStockQuantityResponse, GetProductsStocksResponse, PutProductsStocksResponse, GetProductsStrikethroughPricesResponse, PutProductsSupplierCodeResponse, PutProductsSupplierProductDataResponse, GetResponsibilityEntitiesResponse, PutResponsibilityEntitiesResponse, GetReturnsResponse, PostReturnsResponse, PutReturnsResponse, PutReturnsSerialNumberResponse, GetRmaResponse, PutRmaResponse, GetRmaStatusesResponse, GetShopsCurrenciesResponse, GetShopsLanguagesResponse, GetSizechartsResponse, PutSizechartsResponse, GetSizesResponse, PutSizesResponse, GetSnippetsCampaignResponse, GetSnippetsCookiesResponse, GetSnippetsResponse, GetSystemConfigResponse, GetSystemCurrenciesResponse, PutSystemCurrenciesResponse, GetSystemProcessesAutomationResponse, GetSystemServerLoadResponse, GetSystemServerTimeResponse, GetSystemShopsDataResponse, GetSystemUnitsResponse, PutSystemUnitsResponse, GetSystemUsersResponse, GetVouchersTypesResponse, GetVouchersResponse, GetWarrantiesCountTotalResponse, PutWarrantiesLanguageDataResponse, GetWarrantiesResponse, PutWarrantiesResponse, GetWmsLocationsResponse, GetWmsStocksdocumentsDocumentsResponse, PostWmsStocksdocumentsDocumentsResponse, PutWmsStocksdocumentsDocumentsResponse, GetWmsStocksdocumentsOpenedDocumentsResponse, GetWmsStocksdocumentsProductsResponse, PutWmsStocksdocumentsProductsResponse, GetWmsSuppliersResponse, PutWmsSuppliersResponse } from "./responses.d.ts"
|
|
3
|
+
import type { GetClientsBalanceResponse, BooleanStatusResponse, GetClientsResponse, PostClientsResponse, PutClientsResponse, SearchClientsCrmResponse, GetClientsDeliveryAddressResponse, PostClientsDeliveryAddressResponse, PutClientsDeliveryAddressResponse, VouchersResponse, PutVouchersResponse, SearchClientsGiftcardsResponse, GetClientsGiftcardsTypesResponse, GetClientsMembershipCardsResponse, PutClientsMembershipCardsResponse, SearchClientsNewsletterEmailResponse, SearchClientsNewsletterSmsResponse, GetClientsPayerAddressResponse, PostClientsPayerAddressResponse, PutClientsPayerAddressResponse, GetClientsPricelistsClientsResponse, PutClientsPricelistsClientsResponse, GetClientsPricelistsResponse, PostClientsPricelistsResponse, GetClientsPricelistsProductsResponse, PutClientsPricelistsProductsResponse, GetClientsPricesActiveCardResponse, GetClientsPricesDiscountGroupsResponse, GetClientsPricesDiscountsResponse, PutClientsPricesDiscountsResponse, GetClientsProfitPointsResponse, GetClientsProvinceListResponse, GetClientsTagsResponse, PostClientsTagsResponse, PutClientsTagsResponse, GetConfigVariablesResponse, PutConfigVariablesResponse, GetCouriersAssignedToShippingProfilesResponse, GetCouriersResponse, GetCouriersPickupPointsResponse, PutCouriersPickupPointsResponse, GetCpaCampaignResponse, CmsCampaignResponse, CmsResponse, GetCpaResponse, GetDeliveriesProfilesResponse, GetDeliveriesRegionsResponse, PostDeliveriesRegionsResponse, GetDiscountsGroupsClientsResponse, GetDiscountsGroupsResponse, PostDiscountsGroupsResponse, GetEntriesResponse, PostEntriesResponse, GetEntriesPagesToDisplayResponse, GetEntriesSourcesResponse, GetMenuResponse, PostMenuResponse, PutMenuResponse, PutMenuSortResponse, GetOrdersAnalyticsResponse, GetOrdersAuctionDetailsResponse, PutOrdersCourierResponse, PostOrdersDocumentsCreateResponse, GetOrdersDocumentsResponse, PostOrdersDocumentsResponse, GetOrdersHandlerResponse, GetOrdersHistoryResponse, GetOrdersImagesResponse, PostOrdersImagesResponse, GetOrdersLabelsResponse, SearchOrdersOpinionsResponse, GetOrdersOpinionsRateResponse, SearchOrdersResponse, PostOrdersResponse, PutOrdersResponse, GetOrdersPackagesResponse, PutOrdersPackagesResponse, PutOrdersProductsSerialNumbersResponse, PutOrdersProfitMarginResponse, GetOrdersProfitabilityResponse, GetOrdersStatusesResponse, GetOrdersWarehouseResponse, PostPackagesLabelsResponse, PutPackagesResponse, SearchPackagesResponse, GetPaymentsFormsResponse, GetPaymentsResponse, PostPaymentsResponse, GetPaymentsProfilesResponse, PostPaymentsRepaymentResponse, GetProductsSKUbyBarcodeResponse, PutProductsAttachmentsResponse, GetProductsAuctionsResponse, GetProductsBrandsResponse, PutProductsBrandsResponse, GetProductsCategoriesResponse, PutProductsCategoriesResponse, SearchProductsCategoriesIdosellResponse, GetProductsCodeExistenceResponse, SearchProductsDeliveryTimeResponse, GetProductsDescriptionsResponse, ProductIdentResponse, PutProductsGroupsSettingsResponse, GetProductsIdBySizecodeResponse, PutProductsImagesResponse, GetProductsMarketingPromotionResponse, PostProductsMarketingPromotionResponse, PutProductsMarketingPromotionResponse, GetProductsMarketingZonesResponse, PutProductsMarketingZonesResponse, GetProductsOmnibusPricesResponse, GetProductsOpinionsResponse, PostProductsOpinionsResponse, GetProductsOpinionsRateResponse, PutProductsParametersResponse, SearchProductsParametersResponse, SearchProductsResponse, PostProductsResponse, PutProductsResponse, GetProductsQuestionsResponse, GetProductsReservationsResponse, GetProductsSeriesResponse, PutProductsSeriesResponse, GetProductsSizesResponse, PutProductsSizesResponse, PutProductsStockQuantityResponse, GetProductsStocksResponse, PutProductsStocksResponse, GetProductsStrikethroughPricesResponse, PutProductsSupplierCodeResponse, PutProductsSupplierProductDataResponse, PromotionBoolResponse, SearchPromotionsElementsResponse, SearchPromotionsHistoryResponse, PromotionIdResponse, GetPromotionsResponse, SearchPromotionsListViewResponse, GetPromotionsArchiveResponse, SearchPromotionsArchiveResponse, GetPromotionsSettingsResponse, GetResponsibilityEntitiesResponse, PutResponsibilityEntitiesResponse, GetReturnsResponse, PostReturnsResponse, PutReturnsResponse, PutReturnsSerialNumberResponse, GetRmaResponse, PutRmaResponse, GetRmaStatusesResponse, GetShopsCurrenciesResponse, GetShopsLanguagesResponse, GetSizechartsResponse, PutSizechartsResponse, GetSizesResponse, PutSizesResponse, GetSnippetsCampaignResponse, GetSnippetsCookiesResponse, GetSnippetsResponse, GetSystemConfigResponse, GetSystemCurrenciesResponse, PutSystemCurrenciesResponse, GetSystemProcessesAutomationResponse, GetSystemServerLoadResponse, GetSystemServerTimeResponse, GetSystemShopsDataResponse, GetSystemUnitsResponse, PutSystemUnitsResponse, GetSystemUsersResponse, GetVouchersTypesResponse, GetVouchersResponse, GetWarrantiesCountTotalResponse, PutWarrantiesLanguageDataResponse, GetWarrantiesResponse, PutWarrantiesResponse, GetWmsLocationsResponse, GetWmsStocksdocumentsDocumentsResponse, PostWmsStocksdocumentsDocumentsResponse, PutWmsStocksdocumentsDocumentsResponse, GetWmsStocksdocumentsOpenedDocumentsResponse, GetWmsStocksdocumentsProductsResponse, PutWmsStocksdocumentsProductsResponse, GetWmsSuppliersResponse, PutWmsSuppliersResponse } from "./responses.d.ts"
|
|
4
4
|
import type * as RequestParams from "./reqparams.d.ts";
|
|
5
5
|
import * as ENUMS from "./enums";
|
|
6
6
|
import utils from "./utils";
|
|
@@ -1664,10 +1664,8 @@ export interface PostOrdersRequest extends AppendableGateway<PostOrdersRequest,
|
|
|
1664
1664
|
billingCurrencyRate: (billingCurrencyRate: number) => this
|
|
1665
1665
|
/** Sale date. ISO 8602 format. */
|
|
1666
1666
|
purchaseDate: (purchaseDate: string) => this
|
|
1667
|
-
/**
|
|
1668
|
-
|
|
1669
|
-
/** Planned date of shipment */
|
|
1670
|
-
estimatedDeliveryDate: (estimatedDeliveryDate: string) => this
|
|
1667
|
+
/** Split payment MPP marking */
|
|
1668
|
+
splitPayment: (splitPayment: boolean) => this
|
|
1671
1669
|
}
|
|
1672
1670
|
|
|
1673
1671
|
export interface PutOrdersRequest extends AppendableGateway<PutOrdersRequest, PutOrdersResponse, RequestParams.PutOrdersParams> {
|
|
@@ -1681,6 +1679,8 @@ export interface PutOrdersRequest extends AppendableGateway<PutOrdersRequest, Pu
|
|
|
1681
1679
|
orderStatus: (orderStatus: string) => this
|
|
1682
1680
|
/** Order status id . */
|
|
1683
1681
|
orderStatusId: (orderStatusId: number|string) => this
|
|
1682
|
+
/** Transaction type. */
|
|
1683
|
+
transactionType: (transactionType: 'national'|'oss'|'export'|'intra') => this
|
|
1684
1684
|
/** Flag informing on order registration or completion in external program through API. Allowed values. "none" - order was not registered in external program, "registered" - order was registered in external program, "realized" - order was completed in external program, "registered_pos" - order was registered in external program, "realized_pos" - order was completed in external program. */
|
|
1685
1685
|
apiFlag: (apiFlag: 'none'|'registered'|'realized'|'registered_pos'|'realized_pos'|'registration_fault') => this
|
|
1686
1686
|
/** API note added to order. */
|
|
@@ -1713,6 +1713,8 @@ export interface PutOrdersRequest extends AppendableGateway<PutOrdersRequest, Pu
|
|
|
1713
1713
|
purchaseDate: (purchaseDate: string) => this
|
|
1714
1714
|
/** Estimated date of shipment of the order in format Y-m-d H:i */
|
|
1715
1715
|
estimatedDeliveryDate: (estimatedDeliveryDate: string) => this
|
|
1716
|
+
/** Split payment MPP marking */
|
|
1717
|
+
splitPayment: (splitPayment: boolean) => this
|
|
1716
1718
|
/** Planned date of packing */
|
|
1717
1719
|
plannedDateOfPacking: (plannedDateOfPacking: string) => this
|
|
1718
1720
|
}
|
|
@@ -1724,6 +1726,8 @@ export interface SearchOrdersRequest extends PagableGateway<SearchOrdersRequest,
|
|
|
1724
1726
|
ordersStatuses: (value: string|string[]) => this;
|
|
1725
1727
|
/** Order statusses ids. */
|
|
1726
1728
|
ordersStatusesIds: (value: number|string|number[]|string[]) => this;
|
|
1729
|
+
/** Transaction type. */
|
|
1730
|
+
transactionType: (value: 'national'|'oss'|'export'|'intra') => this;
|
|
1727
1731
|
shippmentStatus: (value: 'all'|'received'|'non-received') => this;
|
|
1728
1732
|
/** Shipping companies (packages deliverers). */
|
|
1729
1733
|
couriersName: (value: string|string[]) => this;
|
|
@@ -3272,7 +3276,7 @@ export interface SearchProductsRequest extends PagableGateway<SearchProductsRequ
|
|
|
3272
3276
|
dispatchSettings: (value: RequestParams.SearchProductsParams["dispatchSettings"]) => this;
|
|
3273
3277
|
/** Element determines which products should be returned by the gate. Undeleted products are returned by default. Available values: "active" - undeleted products, "deleted" - deleted products. "in_trash" - products in the trash. */
|
|
3274
3278
|
returnProducts: (value: "active" | "deleted" | "in_trash") => this;
|
|
3275
|
-
/** Elements to be returned by the endpoint. By default all elements are returned Available values: * lang_data * adding_time, * deleted, * code, * note, * taxcode, * inwrapper, * sellby_retail, * sellby_wholesale, * producer_id, * producer_name, * iaiCategoryId, * iaiCategoryName, * iaiCategoryPath, * category_id, * category_name, * size_group_id, * modification_time, * currency, * currency_shop, * bestseller, * new_product, * retail_price, * wholesale_price, * minimal_price, * automatic_calculation_price, * pos_price, * strikethrough_retail_price, * strikethrough_wholesale_price, * last_purchase_price, * purchase_price_net_average, * purchase_price_net_last, * purchase_price_gross_average, * purchase_price_gross_last, * vat, * vat_free, * rebate, * hotspots_zones, * profit_points, * points, * weight, * export_to_pricecomparers, * export_to_amazon_marketplace, * enable_in_pos, * complex_notes, * available_profile, * traits, * parameters, * version_data, * advance, * promotion, * discount, * distinguished, * special, * visible, * persistent, * priority, * shops_mask, * icon, * icon_for_auctions, * icon_for_group, * pictures, * unit, * warranty, * series, * products_associated, * shops, * quantities, * sizes_attributes, * shops_attributes, * auction_prices, * price_comparers_prices, * deliverer, * sizes, * size_group_name, * pictures_count, * product_type, * price_changed_time, * quantity_changed_time, * deliverer_name, * available_profile_name, * availability_management_type, * sum_in_basket, * menu, * auction_settings, * bundle, * sizeschart_id, * sizeschart_name, * serialnumbers, * producer_codes_standard, * javaScriptInTheItemCard, * productAuctionDescriptionsData, * priceFormula, * productIndividualDescriptionsData, * productIndividualUrlsData, * productServicesDescriptionsData, * cnTaricCode, * productIsGratis, * dimensions, * responsibleProducerCode, * responsiblePersonCode */
|
|
3279
|
+
/** Elements to be returned by the endpoint. By default all elements are returned Available values: * lang_data * adding_time, * deleted, * code, * note, * taxcode, * inwrapper, * sellby_retail, * sellby_wholesale, * producer_id, * producer_name, * iaiCategoryId, * iaiCategoryName, * iaiCategoryPath, * category_id, * category_name, * size_group_id, * modification_time, * currency, * currency_shop, * bestseller, * new_product, * retail_price, * wholesale_price, * minimal_price, * automatic_calculation_price, * pos_price, * strikethrough_retail_price, * strikethrough_wholesale_price, * last_purchase_price, * purchase_price_net_average, * purchase_price_net_last, * purchase_price_gross_average, * purchase_price_gross_last, * vat, * vat_free, * rebate, * hotspots_zones, * profit_points, * points, * weight, * export_to_pricecomparers, * export_to_amazon_marketplace, * enable_in_pos, * complex_notes, * available_profile, * traits, * parameters, * version_data, * advance, * promotion, * discount, * distinguished, * special, * visible, * persistent, * priority, * shops_mask, * icon, * icon_for_auctions, * icon_for_group, * pictures, * unit, * warranty, * series, * products_associated, * shops, * quantities, * sizes_attributes, * shops_attributes, * auction_prices, * price_comparers_prices, * deliverer, * sizes, * size_group_name, * pictures_count, * product_type, * price_changed_time, * quantity_changed_time, * deliverer_name, * available_profile_name, * availability_management_type, * sum_in_basket, * menu, * auction_settings, * bundle, * sizeschart_id, * sizeschart_name, * serialnumbers, * producer_codes_standard, * javaScriptInTheItemCard, * productAuctionDescriptionsData, * priceFormula, * productIndividualDescriptionsData, * productIndividualUrlsData, * productServicesDescriptionsData, * cnTaricCode, * productIsGratis, * dimensions, * responsibleProducerCode, * responsiblePersonCode, * dimensions, * depositProductId, * depositType, * depositCount, * minStockLevel, * productAttachments */
|
|
3276
3280
|
returnElements: (value: string|string[]) => this;
|
|
3277
3281
|
/** Product availability. Available values: "y" - available, "n" - unavailable. */
|
|
3278
3282
|
productIsAvailable: (value: "y" | "n") => this;
|
|
@@ -3416,7 +3420,7 @@ export interface SearchProductsRequest extends PagableGateway<SearchProductsRequ
|
|
|
3416
3420
|
inStock: (stockIds?: boolean|number|string|number[]|string[]) => this;
|
|
3417
3421
|
}
|
|
3418
3422
|
|
|
3419
|
-
export interface
|
|
3423
|
+
export interface DeleteProductsToFacebookCatalogRequest extends Gateway {
|
|
3420
3424
|
/** You can read the Facebook Catalog ID in the Marketing & Integrations/Facebook/Facebook Product Catalog admin panel */
|
|
3421
3425
|
facebookCatalogId: (value: number|string) => this;
|
|
3422
3426
|
/** Shop Id */
|
|
@@ -3425,14 +3429,14 @@ export interface DeleteProductsProductsToFacebookCatalogRequest extends Gateway
|
|
|
3425
3429
|
products: (value: number|string|number[]|string[]) => this;
|
|
3426
3430
|
}
|
|
3427
3431
|
|
|
3428
|
-
export interface
|
|
3432
|
+
export interface GetProductsToFacebookCatalogRequest extends Gateway {
|
|
3429
3433
|
/** You can read the Facebook Catalog ID in the Marketing & Integrations/Facebook/Facebook Product Catalog admin panel */
|
|
3430
3434
|
facebookCatalogId: (value: number|string) => this;
|
|
3431
3435
|
/** Shop Id */
|
|
3432
3436
|
shopId: (value: number|string) => this;
|
|
3433
3437
|
}
|
|
3434
3438
|
|
|
3435
|
-
export interface
|
|
3439
|
+
export interface PostProductsToFacebookCatalogRequest extends Gateway {
|
|
3436
3440
|
/** You can read the Facebook Catalog ID in the Marketing & Integrations/Facebook/Facebook Product Catalog admin panel */
|
|
3437
3441
|
facebookCatalogId: (value: number|string) => this;
|
|
3438
3442
|
/** Shop Id */
|
|
@@ -3441,14 +3445,14 @@ export interface PostProductsProductsToFacebookCatalogRequest extends Gateway {
|
|
|
3441
3445
|
products: (value: number|string|number[]|string[]) => this;
|
|
3442
3446
|
}
|
|
3443
3447
|
|
|
3444
|
-
export interface
|
|
3448
|
+
export interface DeleteProductsToPromotionRequest extends Gateway {
|
|
3445
3449
|
/** Special offer ID */
|
|
3446
3450
|
promotionId: (value: number|string) => this;
|
|
3447
3451
|
/** Products list. */
|
|
3448
3452
|
products: (value: number|string|number[]|string[]) => this;
|
|
3449
3453
|
}
|
|
3450
3454
|
|
|
3451
|
-
export interface
|
|
3455
|
+
export interface PostProductsToPromotionRequest extends Gateway<PutProductsMarketingPromotionResponse, RequestParams.PostProductsToPromotionParams> {
|
|
3452
3456
|
/** Special offer ID */
|
|
3453
3457
|
promotionId: (value: number|string) => this;
|
|
3454
3458
|
/** Products list. */
|
|
@@ -3715,6 +3719,235 @@ export interface PutProductsSynchronizationFinishUploadRequest extends Gateway {
|
|
|
3715
3719
|
verifyFiles: (value: boolean) => this;
|
|
3716
3720
|
}
|
|
3717
3721
|
|
|
3722
|
+
export interface PostPromotionsElementsRequest extends AppendableGateway<PostPromotionsElementsRequest, PromotionBoolResponse, RequestParams.PostPromotionsElementsParams> {
|
|
3723
|
+
/** Array of PromotionElement objects */
|
|
3724
|
+
elements: (value: RequestParams.PostPromotionsElementsParams["elements"]) => this;
|
|
3725
|
+
/** ID */
|
|
3726
|
+
id: (id: string) => this
|
|
3727
|
+
/** Promotion element type */
|
|
3728
|
+
type: (type: 'product'|'series'|'producer'|'category'|'menu') => this
|
|
3729
|
+
/** Promotion element name */
|
|
3730
|
+
name: (name: string) => this
|
|
3731
|
+
/** Promotion ID */
|
|
3732
|
+
promotionId: (promotionId: number|string) => this
|
|
3733
|
+
/** Correlated elements id eg. product versions id */
|
|
3734
|
+
correlatedElementsId: (correlatedElementsId: number|string|number[]|string[]) => this
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
export interface SearchPromotionsElementsRequest extends PagableGateway<SearchPromotionsElementsRequest, SearchPromotionsElementsResponse, RequestParams.SearchPromotionsElementsParams> {
|
|
3738
|
+
filter: (value: RequestParams.SearchPromotionsElementsParams["filter"]) => this;
|
|
3739
|
+
/** Pagination settings. */
|
|
3740
|
+
pagination: (value: RequestParams.SearchPromotionsElementsParams["pagination"]) => this;
|
|
3741
|
+
/** Order by settings. */
|
|
3742
|
+
orderBy: (value: RequestParams.SearchPromotionsElementsParams["orderBy"]) => this;
|
|
3743
|
+
/** Elements IDs */
|
|
3744
|
+
ids: (value: string|string[]) => this;
|
|
3745
|
+
/** Element types */
|
|
3746
|
+
types: (value: 'product'|'series'|'producer'|'category'|'menu'|Array<'product'|'series'|'producer'|'category'|'menu'>) => this;
|
|
3747
|
+
/** Promotion IDs */
|
|
3748
|
+
promotionIds: (value: number|string|number[]|string[]) => this;
|
|
3749
|
+
/** Define ordering of records */
|
|
3750
|
+
orderByProperty: (elementName: "promotion_id"|"type"|"element_id", descending?: boolean) => this;
|
|
3751
|
+
}
|
|
3752
|
+
|
|
3753
|
+
export interface DeletePromotionsElementsRequest extends AppendableGateway<DeletePromotionsElementsRequest, PromotionBoolResponse, RequestParams.DeletePromotionsElementsParams> {
|
|
3754
|
+
/** Array of PromotionElement objects */
|
|
3755
|
+
elements: (value: RequestParams.DeletePromotionsElementsParams["elements"]) => this;
|
|
3756
|
+
/** ID */
|
|
3757
|
+
id: (id: string) => this
|
|
3758
|
+
/** Promotion element type */
|
|
3759
|
+
type: (type: 'product'|'series'|'producer'|'category'|'menu') => this
|
|
3760
|
+
/** Promotion element name */
|
|
3761
|
+
name: (name: string) => this
|
|
3762
|
+
/** Promotion ID */
|
|
3763
|
+
promotionId: (promotionId: number|string) => this
|
|
3764
|
+
/** Correlated elements id eg. product versions id */
|
|
3765
|
+
correlatedElementsId: (correlatedElementsId: number|string|number[]|string[]) => this
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
export interface SearchPromotionsHistoryRequest extends PagableGateway<SearchPromotionsHistoryRequest, SearchPromotionsHistoryResponse, RequestParams.SearchPromotionsHistoryParams> {
|
|
3769
|
+
/** Filters that limit the result of a customer query. */
|
|
3770
|
+
filter: (value: RequestParams.SearchPromotionsHistoryParams["filter"]) => this;
|
|
3771
|
+
/** Pagination settings. */
|
|
3772
|
+
pagination: (value: RequestParams.SearchPromotionsHistoryParams["pagination"]) => this;
|
|
3773
|
+
/** Promotion ID */
|
|
3774
|
+
promotionId: (value: number|string) => this;
|
|
3775
|
+
}
|
|
3776
|
+
|
|
3777
|
+
export interface PostPromotionsRequest extends Gateway<PromotionIdResponse, RequestParams.PostPromotionsParams> {
|
|
3778
|
+
/** Promotion name */
|
|
3779
|
+
name: (value: string) => this;
|
|
3780
|
+
/** Array of shop ids */
|
|
3781
|
+
activeInShops: (value: number|string|number[]|string[]) => this;
|
|
3782
|
+
/** Promotion zones */
|
|
3783
|
+
types: (value: string|string[]) => this;
|
|
3784
|
+
/** Promotion start datetime */
|
|
3785
|
+
startTime: (value: string) => this;
|
|
3786
|
+
/** Promotion end datetime */
|
|
3787
|
+
endTime: (value: string) => this;
|
|
3788
|
+
/** Change visibility */
|
|
3789
|
+
changeVisibility: (value: boolean) => this;
|
|
3790
|
+
/** Auto unpin */
|
|
3791
|
+
autoUnpin: (value: boolean) => this;
|
|
3792
|
+
/** Auto unpin own stocks */
|
|
3793
|
+
autoUnpinOwnStocks: (value: boolean) => this;
|
|
3794
|
+
/** Price type */
|
|
3795
|
+
priceType: (value: 'retail'|'wholesale'|'pos') => this;
|
|
3796
|
+
/** A representation of a floating-point number with precise accuracy. */
|
|
3797
|
+
newPriceValue: (value: RequestParams.PostPromotionsParams["newPriceValue"]) => this;
|
|
3798
|
+
/** Currency */
|
|
3799
|
+
currency: (value: string) => this;
|
|
3800
|
+
/** Discount type */
|
|
3801
|
+
newPriceDiscountType: (value: 'percent'|'minus'|'set') => this;
|
|
3802
|
+
/** New price round */
|
|
3803
|
+
newPriceRound: (value: 'whole'|'first'|'second') => this;
|
|
3804
|
+
/** New price end */
|
|
3805
|
+
newPriceEnd: (value: number|string) => this;
|
|
3806
|
+
/** Net or gross */
|
|
3807
|
+
netGross: (value: 'gross'|'net') => this;
|
|
3808
|
+
/** Charge type */
|
|
3809
|
+
chargeType: (value: 'lowest'|'sum') => this;
|
|
3810
|
+
/** Enable in marketplaces */
|
|
3811
|
+
enableInMarketplaces: (value: 'y'|'n'|'yes_for_dynamic_pricing_products') => this;
|
|
3812
|
+
/** Status */
|
|
3813
|
+
status: (value: 'waiting'|'active'|'closed') => this;
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
export interface DeletePromotionsRequest extends Gateway<PromotionBoolResponse, RequestParams.PromotionIdParams> {
|
|
3817
|
+
promotionId: (value: number|string) => this;
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
export interface PutPromotionsRequest extends Gateway<PromotionIdResponse, RequestParams.PutPromotionsParams> {
|
|
3821
|
+
/** Promotion name */
|
|
3822
|
+
name: (value: string) => this;
|
|
3823
|
+
/** Array of shop ids */
|
|
3824
|
+
activeInShops: (value: number|string|number[]|string[]) => this;
|
|
3825
|
+
/** Promotion zones */
|
|
3826
|
+
types: (value: string|string[]) => this;
|
|
3827
|
+
/** Promotion start datetime */
|
|
3828
|
+
startTime: (value: string) => this;
|
|
3829
|
+
/** Promotion end datetime */
|
|
3830
|
+
endTime: (value: string) => this;
|
|
3831
|
+
/** Change visibility */
|
|
3832
|
+
changeVisibility: (value: boolean) => this;
|
|
3833
|
+
/** Auto unpin */
|
|
3834
|
+
autoUnpin: (value: boolean) => this;
|
|
3835
|
+
/** Auto unpin own stocks */
|
|
3836
|
+
autoUnpinOwnStocks: (value: boolean) => this;
|
|
3837
|
+
/** Price type */
|
|
3838
|
+
priceType: (value: 'retail'|'wholesale'|'pos') => this;
|
|
3839
|
+
/** A representation of a floating-point number with precise accuracy. */
|
|
3840
|
+
newPriceValue: (value: RequestParams.PutPromotionsParams["newPriceValue"]) => this;
|
|
3841
|
+
/** Currency */
|
|
3842
|
+
currency: (value: string) => this;
|
|
3843
|
+
/** Discount type */
|
|
3844
|
+
newPriceDiscountType: (value: 'percent'|'minus'|'set') => this;
|
|
3845
|
+
/** New price round */
|
|
3846
|
+
newPriceRound: (value: 'whole'|'first'|'second') => this;
|
|
3847
|
+
/** New price end */
|
|
3848
|
+
newPriceEnd: (value: number|string) => this;
|
|
3849
|
+
/** Net or gross */
|
|
3850
|
+
netGross: (value: 'gross'|'net') => this;
|
|
3851
|
+
/** Charge type */
|
|
3852
|
+
chargeType: (value: 'lowest'|'sum') => this;
|
|
3853
|
+
/** Enable in marketplaces */
|
|
3854
|
+
enableInMarketplaces: (value: 'y'|'n'|'yes_for_dynamic_pricing_products') => this;
|
|
3855
|
+
/** Status */
|
|
3856
|
+
status: (value: 'waiting'|'active'|'closed') => this;
|
|
3857
|
+
/** Promotion ID */
|
|
3858
|
+
promotionId: (promotionId: number) => this;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
export interface PostPromotionsEndRequest extends Gateway<PromotionIdResponse, RequestParams.PromotionIdParams> {
|
|
3862
|
+
/** ID of promotion */
|
|
3863
|
+
promotionId: (value: number|string) => this;
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3866
|
+
export interface GetPromotionsRequest extends Gateway<GetPromotionsResponse, RequestParams.PromotionIdParams> {
|
|
3867
|
+
promotionId: (value: number|string) => this;
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
export interface SearchPromotionsListViewRequest extends PagableGateway<SearchPromotionsListViewRequest, SearchPromotionsListViewResponse, RequestParams.SearchPromotionsListViewParams> {
|
|
3871
|
+
/** Filters that limit the result of a customer query. */
|
|
3872
|
+
filter: (value: RequestParams.SearchPromotionsListViewParams["filter"]) => this;
|
|
3873
|
+
/** Pagination settings. */
|
|
3874
|
+
pagination: (value: RequestParams.SearchPromotionsListViewParams["pagination"]) => this;
|
|
3875
|
+
/** Order by settings. */
|
|
3876
|
+
orderBy: (value: RequestParams.SearchPromotionsListViewParams["orderBy"]) => this;
|
|
3877
|
+
/** Promotion ID */
|
|
3878
|
+
ids: (value: number|string|number[]|string[]) => this;
|
|
3879
|
+
/** Promotion name */
|
|
3880
|
+
name: (value: string) => this;
|
|
3881
|
+
/** Change visibility */
|
|
3882
|
+
changeVisibility: (value: boolean) => this;
|
|
3883
|
+
/** Array of shop ids */
|
|
3884
|
+
activeInShops: (value: number|string|number[]|string[]) => this;
|
|
3885
|
+
/** Promotion zones */
|
|
3886
|
+
types: (value: 'promotion'|'special'|'discount'|'distinguished'|'bestseller'|'new'|Array<'promotion'|'special'|'discount'|'distinguished'|'bestseller'|'new'>) => this;
|
|
3887
|
+
/** Price types */
|
|
3888
|
+
priceTypes: (value: 'retail'|'wholesale'|'pos'|Array<'retail'|'wholesale'|'pos'>) => this;
|
|
3889
|
+
/** Promotion statuses */
|
|
3890
|
+
statuses: (value: 'waiting'|'active'|'closed'|Array<'waiting'|'active'|'closed'>) => this;
|
|
3891
|
+
/** Date range */
|
|
3892
|
+
dateRange: (value: RequestParams.SearchPromotionsListViewParams["dateRange"]) => this;
|
|
3893
|
+
/** Array of products in promotion */
|
|
3894
|
+
productsNotInPromotion: (value: number|string|number[]|string[]) => this;
|
|
3895
|
+
/** Define ordering of records */
|
|
3896
|
+
orderByProperty: (elementName: "id"|"name"|"start_time"|"end_time"|"new_price_value"|"new_price_end"|"elements_modification_date", descending?: boolean) => this;
|
|
3897
|
+
}
|
|
3898
|
+
|
|
3899
|
+
export interface PostPromotionsStartRequest extends Gateway<PromotionIdResponse, RequestParams.PromotionIdParams> {
|
|
3900
|
+
/** ID of promotion */
|
|
3901
|
+
promotionId: (value: number|string) => this;
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
export interface DeletePromotionsArchiveRequest extends Gateway {
|
|
3905
|
+
promotionId: (value: number|string) => this;
|
|
3906
|
+
}
|
|
3907
|
+
|
|
3908
|
+
export interface GetPromotionsArchiveRequest extends Gateway<GetPromotionsArchiveResponse, RequestParams.PromotionIdParams> {
|
|
3909
|
+
promotionId: (value: number|string) => this;
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
export interface SearchPromotionsArchiveRequest extends PagableGateway<SearchPromotionsArchiveRequest, SearchPromotionsArchiveResponse, RequestParams.SearchPromotionsArchiveParams> {
|
|
3913
|
+
/** Filters that limit the result of a customer query. */
|
|
3914
|
+
filter: (value: RequestParams.SearchPromotionsArchiveParams["filter"]) => this;
|
|
3915
|
+
/** Pagination settings. */
|
|
3916
|
+
pagination: (value: RequestParams.SearchPromotionsArchiveParams["pagination"]) => this;
|
|
3917
|
+
/** Order by settings. */
|
|
3918
|
+
orderBy: (value: RequestParams.SearchPromotionsArchiveParams["orderBy"]) => this;
|
|
3919
|
+
/** Shops IDs */
|
|
3920
|
+
shops: (value: number|string|number[]|string[]) => this;
|
|
3921
|
+
archivedDate: (value: RequestParams.SearchPromotionsArchiveParams["archivedDate"]) => this;
|
|
3922
|
+
/** Define ordering of records */
|
|
3923
|
+
orderByProperty: (elementName: "id"|"shop_mask"|"archived_date", descending?: boolean) => this;
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
export interface GetPromotionsSettingsRequest extends Gateway<GetPromotionsSettingsResponse> {}
|
|
3927
|
+
|
|
3928
|
+
export interface PutPromotionsSettingsRequest extends Gateway<PromotionBoolResponse, RequestParams.PutPromotionsSettingsParams> {
|
|
3929
|
+
/** Days to archive */
|
|
3930
|
+
daysLeftToArchive: (value: number|string) => this;
|
|
3931
|
+
/** Days to remove from archive */
|
|
3932
|
+
daysLeftToRemove: (value: number|string) => this;
|
|
3933
|
+
/** Show promo price on products list */
|
|
3934
|
+
showPriceOnProductsList: (value: number|string) => this;
|
|
3935
|
+
/** Automatically suggest default start date */
|
|
3936
|
+
automaticallySuggestDefaultStartDate: (value: 'on'|'off') => this;
|
|
3937
|
+
/** Automatically suggest default end date */
|
|
3938
|
+
automaticallySuggestDefaultEndDate: (value: 'on'|'off') => this;
|
|
3939
|
+
/** Default start date */
|
|
3940
|
+
defaultStartDate: (value: number|string) => this;
|
|
3941
|
+
/** Default end date */
|
|
3942
|
+
defaultEndDate: (value: number|string) => this;
|
|
3943
|
+
/** Default start time */
|
|
3944
|
+
defaultStartTime: (value: number|string) => this;
|
|
3945
|
+
/** Default end time */
|
|
3946
|
+
defaultEndTime: (value: number|string) => this;
|
|
3947
|
+
/** Days to automatically close empty promotions */
|
|
3948
|
+
daysLeftToClose: (value: number|string) => this;
|
|
3949
|
+
}
|
|
3950
|
+
|
|
3718
3951
|
export interface PostRefundsAddAutomaticRefundRequest extends Gateway {
|
|
3719
3952
|
/** Source type.: "return" "rma". */
|
|
3720
3953
|
sourceType: (value: 'return'|'rma') => this;
|
|
@@ -4324,7 +4557,7 @@ export interface PostSubscriptionsEditProductRequest extends Gateway {
|
|
|
4324
4557
|
products: (value: Array<JSObject>) => this;
|
|
4325
4558
|
}
|
|
4326
4559
|
|
|
4327
|
-
export interface
|
|
4560
|
+
export interface SearchSubscriptionsItemsRequest extends Gateway {
|
|
4328
4561
|
filter: (value: JSObject) => this;
|
|
4329
4562
|
orderBy: (value: JSObject) => this;
|
|
4330
4563
|
/** Pagination settings. */
|
|
@@ -4354,7 +4587,7 @@ export interface PostSubscriptionsListViewFetchIdsRequest extends Gateway {
|
|
|
4354
4587
|
textSearch: (value: string) => this;
|
|
4355
4588
|
}
|
|
4356
4589
|
|
|
4357
|
-
export interface
|
|
4590
|
+
export interface SearchSubscriptionsListViewRequest extends Gateway {
|
|
4358
4591
|
select: (value: JSObject) => this;
|
|
4359
4592
|
/** Filters that limit the result of a customer query. */
|
|
4360
4593
|
filter: (value: JSObject) => this;
|
|
@@ -5073,11 +5306,11 @@ export interface Gateways {
|
|
|
5073
5306
|
postProducts: PostProductsRequest,
|
|
5074
5307
|
putProducts: PutProductsRequest,
|
|
5075
5308
|
searchProducts: SearchProductsRequest,
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5309
|
+
deleteProductsToFacebookCatalog: DeleteProductsToFacebookCatalogRequest,
|
|
5310
|
+
getProductsToFacebookCatalog: GetProductsToFacebookCatalogRequest,
|
|
5311
|
+
postProductsToFacebookCatalog: PostProductsToFacebookCatalogRequest,
|
|
5312
|
+
deleteProductsToPromotion: DeleteProductsToPromotionRequest,
|
|
5313
|
+
postProductsToPromotion: PostProductsToPromotionRequest,
|
|
5081
5314
|
getProductsQuestions: GetProductsQuestionsRequest,
|
|
5082
5315
|
putProductsQuestions: PutProductsQuestionsRequest,
|
|
5083
5316
|
getProductsReservations: GetProductsReservationsRequest,
|
|
@@ -5099,6 +5332,22 @@ export interface Gateways {
|
|
|
5099
5332
|
putProductsSupplierProductData: PutProductsSupplierProductDataRequest,
|
|
5100
5333
|
postProductsSynchronizationFile: PostProductsSynchronizationFileRequest,
|
|
5101
5334
|
putProductsSynchronizationFinishUpload: PutProductsSynchronizationFinishUploadRequest,
|
|
5335
|
+
postPromotionsElements: PostPromotionsElementsRequest,
|
|
5336
|
+
searchPromotionsElements: SearchPromotionsElementsRequest,
|
|
5337
|
+
deletePromotionsElements: DeletePromotionsElementsRequest,
|
|
5338
|
+
searchPromotionsHistory: SearchPromotionsHistoryRequest,
|
|
5339
|
+
postPromotions: PostPromotionsRequest,
|
|
5340
|
+
deletePromotions: DeletePromotionsRequest,
|
|
5341
|
+
putPromotions: PutPromotionsRequest,
|
|
5342
|
+
postPromotionsEnd: PostPromotionsEndRequest,
|
|
5343
|
+
getPromotions: GetPromotionsRequest,
|
|
5344
|
+
searchPromotionsListView: SearchPromotionsListViewRequest,
|
|
5345
|
+
postPromotionsStart: PostPromotionsStartRequest,
|
|
5346
|
+
deletePromotionsArchive: DeletePromotionsArchiveRequest,
|
|
5347
|
+
getPromotionsArchive: GetPromotionsArchiveRequest,
|
|
5348
|
+
searchPromotionsArchive: SearchPromotionsArchiveRequest,
|
|
5349
|
+
getPromotionsSettings: GetPromotionsSettingsRequest,
|
|
5350
|
+
putPromotionsSettings: PutPromotionsSettingsRequest,
|
|
5102
5351
|
postRefundsAddAutomaticRefund: PostRefundsAddAutomaticRefundRequest,
|
|
5103
5352
|
postRefundsAddAutomaticRefundForOrder: PostRefundsAddAutomaticRefundForOrderRequest,
|
|
5104
5353
|
postRefundsAddManualRefund: PostRefundsAddManualRefundRequest,
|
|
@@ -5146,9 +5395,9 @@ export interface Gateways {
|
|
|
5146
5395
|
postSubscriptionsDeleteProduct: PostSubscriptionsDeleteProductRequest,
|
|
5147
5396
|
postSubscriptionsEdit: PostSubscriptionsEditRequest,
|
|
5148
5397
|
postSubscriptionsEditProduct: PostSubscriptionsEditProductRequest,
|
|
5149
|
-
|
|
5398
|
+
searchSubscriptionsItems: SearchSubscriptionsItemsRequest,
|
|
5150
5399
|
postSubscriptionsListViewFetchIds: PostSubscriptionsListViewFetchIdsRequest,
|
|
5151
|
-
|
|
5400
|
+
searchSubscriptionsListView: SearchSubscriptionsListViewRequest,
|
|
5152
5401
|
postSubscriptionsSetRebateCode: PostSubscriptionsSetRebateCodeRequest,
|
|
5153
5402
|
postSubscriptionsUnsetRebateCode: PostSubscriptionsUnsetRebateCodeRequest,
|
|
5154
5403
|
getSystemConfig: GetSystemConfigRequest,
|
|
@@ -5215,7 +5464,15 @@ export interface Gateways {
|
|
|
5215
5464
|
/** @deprecated */
|
|
5216
5465
|
getProductsDeliveryTime: SearchProductsDeliveryTimeRequest
|
|
5217
5466
|
/** @deprecated */
|
|
5218
|
-
|
|
5467
|
+
getProductsProductsProductsToFacebookCatalog: GetProductsToFacebookCatalogRequest
|
|
5468
|
+
/** @deprecated */
|
|
5469
|
+
postProductsProductsToPromotion: PostProductsToPromotionRequest
|
|
5470
|
+
/** @deprecated */
|
|
5471
|
+
postProductsProductsToFacebookCatalog: PostProductsToFacebookCatalogRequest
|
|
5472
|
+
/** @deprecated */
|
|
5473
|
+
deleteProductsProductsToFacebookCatalog: DeleteProductsToFacebookCatalogRequest
|
|
5474
|
+
/** @deprecated */
|
|
5475
|
+
deleteProductsProductsToPromotion: DeleteProductsToPromotionRequest
|
|
5219
5476
|
}
|
|
5220
5477
|
|
|
5221
5478
|
declare const defaultExport: (url: string, apiKey: string, version?: number | string) => Gateways;
|
package/dist/helpers.js
CHANGED
|
@@ -53,6 +53,16 @@ export const page = (page = 0, limit, snakeCase = false) => {
|
|
|
53
53
|
resultsLimit: limit
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
+
export const paginationObject = (page = 0, limit) => {
|
|
57
|
+
if (!limit)
|
|
58
|
+
limit = 100;
|
|
59
|
+
return {
|
|
60
|
+
pagination: {
|
|
61
|
+
page,
|
|
62
|
+
perPage: limit
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
};
|
|
56
66
|
export const orderBy = (elementName, descending = true) => {
|
|
57
67
|
return {
|
|
58
68
|
ordersBy: [{
|
|
@@ -61,6 +71,14 @@ export const orderBy = (elementName, descending = true) => {
|
|
|
61
71
|
}]
|
|
62
72
|
};
|
|
63
73
|
};
|
|
74
|
+
export const orderByProperty = (property, descending = true) => {
|
|
75
|
+
return {
|
|
76
|
+
orderBy: {
|
|
77
|
+
property,
|
|
78
|
+
orderByDirection: descending ? 'desc' : 'asc'
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
};
|
|
64
82
|
export const date = ({ nodeName, format }) => (dateValue) => {
|
|
65
83
|
const param = {};
|
|
66
84
|
;
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,9 @@ import utils from "./utils.js";
|
|
|
3
3
|
import { gateProxy } from "./gates.js";
|
|
4
4
|
import { IdosellFaultStringError, catchEmptyList } from "./errors.js";
|
|
5
5
|
export const DEFAULT_VERSION = 7;
|
|
6
|
-
function normalizeUrl(input) {
|
|
6
|
+
function normalizeUrl(input = "") {
|
|
7
|
+
if (!input.length)
|
|
8
|
+
return "";
|
|
7
9
|
const trimmed = input.trim();
|
|
8
10
|
const withProtocol = trimmed
|
|
9
11
|
.replace(/^https?:\/\//i, "") // strip existing protocol
|