idosell 0.4.34 → 0.4.41

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.
@@ -1,11 +1,12 @@
1
1
  /* eslint-disable @typescript-eslint/no-empty-object-type */
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, GetProductsMarketingZonesResponse, PutProductsMarketingZonesResponse, GetProductsOmnibusPricesResponse, GetProductsOpinionsResponse, PostProductsOpinionsResponse, GetProductsOpinionsRateResponse, PutProductsParametersResponse, SearchProductsParametersResponse, SearchProductsResponse, PostProductsResponse, PutProductsResponse, PutProductsMarketingPromotionResponse, GetProductsQuestionsResponse, GetProductsReservationsResponse, GetProductsSeriesResponse, PutProductsSeriesResponse, GetProductsSizesResponse, PutProductsSizesResponse, PutProductsStockQuantityResponse, GetProductsStocksResponse, PutProductsStocksResponse, GetProductsStrikethroughPricesResponse, PutProductsSupplierCodeResponse, PutProductsSupplierProductDataResponse, PromotionBoolResponse, SearchPromotionsElementsResponse, SearchPromotionsHistoryResponse, PromotionIdResponse, GetPromotionsResponse, SearchPromotionsListViewResponse, GetPromotionsArchiveResponse, SearchPromotionsArchiveResponse, GetPromotionsSettingsResponse, GetRegulationsHistoryResponse, 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, GetProductsMarketingPromotionResponse, PostProductsMarketingPromotionResponse } from "./responses.d.ts"
2
+ import type { PagableGateway, AppendableGateway, Gateway, DateLike, JSObject, IdosellErrorFaultStructure, Webhooks, IaiWebhookHeaders } 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, GetProductsAttachmentsGetContentResponse, PutProductsAttachmentsResponse, GetProductsAuctionsResponse, GetProductsBrandsResponse, PutProductsBrandsResponse, GetProductsCategoriesResponse, PutProductsCategoriesResponse, SearchProductsCategoriesIdosellResponse, GetProductsCodeExistenceResponse, SearchProductsDeliveryTimeResponse, GetProductsDescriptionsResponse, ProductIdentResponse, PutProductsGroupsSettingsResponse, GetProductsIdBySizecodeResponse, PutProductsImagesResponse, GetProductsMarketingZonesResponse, PutProductsMarketingZonesResponse, GetProductsOmnibusPricesResponse, GetProductsOpinionsResponse, PostProductsOpinionsResponse, GetProductsOpinionsRateResponse, PutProductsParametersResponse, SearchProductsParametersResponse, SearchProductsResponse, PostProductsResponse, PutProductsResponse, PutProductsMarketingPromotionResponse, GetProductsQuestionsResponse, GetProductsReservationsResponse, GetProductsSeriesResponse, PutProductsSeriesResponse, GetProductsSizesResponse, PutProductsSizesResponse, PutProductsStockQuantityResponse, GetProductsStocksResponse, PutProductsStocksResponse, GetProductsStrikethroughPricesResponse, PutProductsSupplierCodeResponse, PutProductsSupplierProductDataResponse, PromotionBoolResponse, SearchPromotionsElementsResponse, SearchPromotionsHistoryResponse, PromotionIdResponse, GetPromotionsResponse, SearchPromotionsListViewResponse, GetPromotionsArchiveResponse, SearchPromotionsArchiveResponse, GetPromotionsSettingsResponse, GetRegulationsHistoryResponse, 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, GetProductsMarketingPromotionResponse, PostProductsMarketingPromotionResponse } from "./responses.d.ts"
4
4
  import type * as RequestParams from "./reqparams.d.ts";
5
5
  import { ENUMS } from "./enums";
6
6
  import utils from "./utils";
7
7
 
8
8
  type ProductReturnElement = `${ENUMS.PRODUCTS_RETURN_ELEMENTS}`;
9
+ type LangId = `${ENUMS.LANG_IDS}`;
9
10
 
10
11
  export class IdosellFaultStringError extends Error {
11
12
  cause: IdosellFaultStringError;
@@ -123,7 +124,7 @@ export interface PostClientsRequest extends AppendableGateway<PostClientsRequest
123
124
  /** Customer type, possible values: - person - if client sex is not determined, - person_male - when client is a male, - person_female - when a customer is a woman, - firm - when client is company. */
124
125
  client_type: (client_type: 'person'|'person_male'|'person_female'|'firm') => this
125
126
  /** Customer language ID. */
126
- language: (language: string) => this
127
+ language: (language: LangId) => this
127
128
  /** Determines, in which store account should be active. */
128
129
  shops: (shops: number|string|number[]|string[]) => this
129
130
  /** Defines availability of log in to other pages than the ones given in the element: shops . */
@@ -189,7 +190,7 @@ export interface PutClientsRequest extends AppendableGateway<PutClientsRequest,
189
190
  /** Customer type, possible values: - person - if client sex is not determined, - person_male - when client is a male, - person_female - when a customer is a woman, - firm - when client is company. */
190
191
  clientType: (clientType: 'person'|'person_male'|'person_female'|'firm') => this
191
192
  /** Language ID */
192
- langId: (langId: string) => this
193
+ langId: (langId: LangId) => this
193
194
  /** Defines availability of log in to other pages than the ones given in the element: shops . */
194
195
  blockLoginToOtherShops: (blockLoginToOtherShops: boolean) => this
195
196
  /** List of stores IDs When mask is determined, this parameter is omitted. */
@@ -236,7 +237,7 @@ export interface SearchClientsCrmRequest extends PagableGateway<SearchClientsCrm
236
237
  /** Country ID in accordance with ISO-3166. */
237
238
  clientCountryId: (value: string) => this;
238
239
  /** Language ID */
239
- langId: (value: string) => this;
240
+ langId: (value: LangId) => this;
240
241
  /** Customer service representative. */
241
242
  clientCustomerServiceRepresentativeLogin: (value: string) => this;
242
243
  /** Customer group number */
@@ -522,7 +523,7 @@ export interface PutClientsMembershipCardsRequest extends AppendableGateway<PutC
522
523
  export interface SearchClientsNewsletterEmailRequest extends PagableGateway<SearchClientsNewsletterEmailRequest, SearchClientsNewsletterEmailResponse, RequestParams.SearchClientsNewsletterEmailParams> {
523
524
  shops: (value: RequestParams.SearchClientsNewsletterEmailParams["shops"]) => this;
524
525
  /** Customer language ID. */
525
- language: (value: string) => this;
526
+ language: (value: LangId) => this;
526
527
  date: (value: RequestParams.SearchClientsNewsletterEmailParams["date"]) => this;
527
528
  /** Elements to be returned by the endpoint. By default all elements are returned */
528
529
  return_elements: (value: string|string[]) => this;
@@ -537,7 +538,7 @@ export interface SearchClientsNewsletterEmailRequest extends PagableGateway<Sear
537
538
  export interface SearchClientsNewsletterSmsRequest extends PagableGateway<SearchClientsNewsletterSmsRequest, SearchClientsNewsletterSmsResponse, RequestParams.SearchClientsNewsletterSmsParams> {
538
539
  shops: (value: RequestParams.SearchClientsNewsletterSmsParams["shops"]) => this;
539
540
  /** Customer language ID. */
540
- language: (value: string) => this;
541
+ language: (value: LangId) => this;
541
542
  date: (value: RequestParams.SearchClientsNewsletterSmsParams["date"]) => this;
542
543
  /** Elements to be returned by the endpoint. By default all elements are returned */
543
544
  return_elements: (value: string|string[]) => this;
@@ -1174,7 +1175,7 @@ export interface GetEntriesRequest extends Gateway<GetEntriesResponse> {
1174
1175
  /** Entry ID */
1175
1176
  entryId: (value: number|string) => this;
1176
1177
  /** Language ID */
1177
- langId: (value: string) => this;
1178
+ langId: (value: LangId) => this;
1178
1179
  }
1179
1180
 
1180
1181
  export interface PostEntriesRequest extends AppendableGateway<PostEntriesRequest, PostEntriesResponse, RequestParams.PostEntriesParams> {
@@ -1197,7 +1198,7 @@ export interface PostEntriesRequest extends AppendableGateway<PostEntriesRequest
1197
1198
  /** Provided URL (for link to specified URL option) */
1198
1199
  link: (value: string) => this;
1199
1200
  /** Language ID */
1200
- langId: (langId: string) => this
1201
+ langId: (langId: LangId) => this
1201
1202
  /** Name on the page */
1202
1203
  title: (title: string) => this
1203
1204
  /** short description */
@@ -1241,7 +1242,7 @@ export interface PutEntriesRequest extends Gateway {
1241
1242
 
1242
1243
  export interface GetEntriesPagesToDisplayRequest extends Gateway<GetEntriesPagesToDisplayResponse> {
1243
1244
  /** Language ID */
1244
- langId: (value: string) => this;
1245
+ langId: (value: LangId) => this;
1245
1246
  }
1246
1247
 
1247
1248
  export interface GetEntriesSourcesRequest extends Gateway<GetEntriesSourcesResponse> {
@@ -1253,7 +1254,7 @@ export interface GetMenuFilterRequest extends Gateway {
1253
1254
  /** Shop Id */
1254
1255
  shopId: (value: number|string) => this;
1255
1256
  /** Language ID (code in ISO 639-2). */
1256
- languageId: (value: string) => this;
1257
+ languageId: (value: LangId) => this;
1257
1258
  /** Tree menu ID. */
1258
1259
  productMenuTreeId: (value: number|string) => this;
1259
1260
  /** Menu element ID. */
@@ -1264,7 +1265,7 @@ export interface PutMenuFilterRequest extends AppendableGateway<PutMenuFilterReq
1264
1265
  /** Shop Id */
1265
1266
  shopId: (value: number|string) => this;
1266
1267
  /** Language ID (code in ISO 639-2). */
1267
- languageId: (value: string) => this;
1268
+ languageId: (value: LangId) => this;
1268
1269
  /** Tree menu ID. */
1269
1270
  productMenuTreeId: (value: number|string) => this;
1270
1271
  /** Menu element ID. */
@@ -1305,7 +1306,7 @@ export interface GetMenuRequest extends Gateway<GetMenuResponse> {
1305
1306
  /** Tree menu ID. */
1306
1307
  menu_id: (value: number|string) => this;
1307
1308
  /** Language ID. */
1308
- lang_id: (value: string) => this;
1309
+ lang_id: (value: LangId) => this;
1309
1310
  /** Menu node ID. */
1310
1311
  node_id: (value: number|string) => this;
1311
1312
  /** Number of levels. */
@@ -1353,7 +1354,7 @@ export interface PutMenuSortRequest extends AppendableGateway<PutMenuSortRequest
1353
1354
  /** Menu ID. */
1354
1355
  menu_id: (menu_id: number|string) => this
1355
1356
  /** Language ID. */
1356
- lang_id: (lang_id: string) => this
1357
+ lang_id: (lang_id: LangId) => this
1357
1358
  /** Menu element text identifier. */
1358
1359
  parent_id: (parent_id: number|string) => this
1359
1360
  /** Menu element text identifier. Example: "item1\item2\item3". */
@@ -1605,7 +1606,7 @@ export interface PostOrdersRequest extends AppendableGateway<PostOrdersRequest,
1605
1606
  /** Orders. */
1606
1607
  orders: (value: RequestParams.PostOrdersParams["orders"]) => this;
1607
1608
  /** Order type. Allowed values. "retail" - retail order, "wholesale" - wholesale order (can be added only by customer with wholesale account registered). Default value:: "retail" */
1608
- orderType: (orderType: string) => this
1609
+ orderType: (orderType: "retail" | "wholesale") => this
1609
1610
  /** Shop Id */
1610
1611
  shopId: (shopId: number|string) => this
1611
1612
  /** Stock ID */
@@ -1615,7 +1616,7 @@ export interface PostOrdersRequest extends AppendableGateway<PostOrdersRequest,
1615
1616
  /** Currency ID */
1616
1617
  currencyId: (currencyId: string) => this
1617
1618
  /** Determines if customer unregistered. Allowed values. "y" - casual client, "n" - registered customer. Default value:: "y". If customer is unregistered, enter customer details in element: "clientWithoutAccountData". For client with account - existing login should be stored in: "clientLogin". */
1618
- clientWithoutAccount: (clientWithoutAccount: string) => this
1619
+ clientWithoutAccount: (clientWithoutAccount: "y" | "n") => this
1619
1620
  /** Balance data for casual client. Object is necessary for casual clients (in case of client_once has y value). */
1620
1621
  clientWithoutAccountData: (clientWithoutAccountData: RequestParams.PostOrdersParams["orders"][number]["clientWithoutAccountData"]) => this
1621
1622
  /** Customer's login. */
@@ -1726,7 +1727,7 @@ export interface SearchOrdersRequest extends PagableGateway<SearchOrdersRequest,
1726
1727
  /** Courier service identifiers */
1727
1728
  couriersId: (value: number|string|number[]|string[]) => this;
1728
1729
  /** Order payment method. Allowed values. "cash_on_delivery" - cash on delivery, "prepaid" - prepayment, "tradecredit" - Trade credit. */
1729
- orderPaymentType: (value: string) => this;
1730
+ orderPaymentType: (value: "cash_on_delivery" | "prepaid" | "tradecredit") => this;
1730
1731
  withMissingSalesDocuments: (value: string|string[]) => this;
1731
1732
  /** Order type. Allowed values. "retail" - retail order, "wholesale" - wholesale order (can be added only by customer with wholesale account registered). Default value:: "retail" */
1732
1733
  orderType: (value: 'wholesale'|'retail'|'dropshipping'|'deliverer') => this;
@@ -1908,7 +1909,7 @@ export interface SearchOrdersUnfinishedRequest extends PagableGateway<SearchOrde
1908
1909
  /** Shipping companies (packages deliverers). */
1909
1910
  couriersName: (value: string|string[]) => this;
1910
1911
  /** Order payment method. Allowed values. "cash_on_delivery" - cash on delivery, "prepaid" - prepayment, "tradecredit" - Trade credit. */
1911
- orderPaymentType: (value: string) => this;
1912
+ orderPaymentType: (value: "cash_on_delivery" | "prepaid" | "tradecredit") => this;
1912
1913
  /** Order type. Allowed values: "retail" - retail order, "wholesale" - whiolesale order , "dropshipping" - order to be handled, "deliverer" - order sent to the supplier. */
1913
1914
  orderType: (value: 'wholesale'|'retail'|'dropshipping'|'deliverer') => this;
1914
1915
  /** Dropshipping order status in the supplier's system. Allowed values: "all" - all, "finished" - sent, "canceled" - canceled, "notCanceled" - failed to cancel. */
@@ -2173,7 +2174,7 @@ export interface GetProductsSKUbyBarcodeRequest extends Gateway<GetProductsSKUby
2173
2174
  searchOnlyInCodeIai: (value: boolean) => this;
2174
2175
  }
2175
2176
 
2176
- export interface GetProductsAttachmentsGetContentRequest extends Gateway {
2177
+ export interface GetProductsAttachmentsGetContentRequest extends Gateway<GetProductsAttachmentsGetContentResponse, RequestParams.GetProductsAttachmentsGetContentParams> {
2177
2178
  /** - product identifier value */
2178
2179
  productIdentValue: (value: string) => this;
2179
2180
  /** - product identifier type */
@@ -2223,7 +2224,7 @@ export interface GetProductsBrandsFilterRequest extends Gateway {
2223
2224
  /** Shop Id */
2224
2225
  shopId: (value: number|string) => this;
2225
2226
  /** Language ID (code in ISO 639-2). */
2226
- languageId: (value: string) => this;
2227
+ languageId: (value: LangId) => this;
2227
2228
  /** Brand ID */
2228
2229
  producerId: (value: number|string) => this;
2229
2230
  }
@@ -2232,7 +2233,7 @@ export interface PutProductsBrandsFilterRequest extends AppendableGateway<PutPro
2232
2233
  /** Shop Id */
2233
2234
  shopId: (value: number|string) => this;
2234
2235
  /** Language ID (code in ISO 639-2). */
2235
- languageId: (value: string) => this;
2236
+ languageId: (value: LangId) => this;
2236
2237
  /** Brand ID */
2237
2238
  producerId: (value: number|string) => this;
2238
2239
  filterForNodeIsDefault: (value: 'y'|'n') => this;
@@ -2256,7 +2257,7 @@ export interface GetProductsBrandsRequest extends PagableGateway<GetProductsBran
2256
2257
  /** Number of results on page. */
2257
2258
  results_limit: (value: number|string) => this;
2258
2259
  /** List of languages */
2259
- languagesIds: (value: string|string[]) => this;
2260
+ languagesIds: (value: LangId|(LangId)[]) => this;
2260
2261
  }
2261
2262
 
2262
2263
  export interface PostProductsBrandsRequest extends AppendableGateway<PostProductsBrandsRequest, PutProductsBrandsResponse, RequestParams.PostProductsBrandsParams> {
@@ -2323,7 +2324,7 @@ export interface GetProductsCategoriesRequest extends PagableGateway<GetProducts
2323
2324
  /** List of product category identifiers in the panel */
2324
2325
  ids: (value: number|string|number[]|string[]) => this;
2325
2326
  /** Array of languages categories names should be returned in. "Defaults" value returns categories names in store default language. Not using languages parameter causes a situation, that categories names are returned in all available languages. */
2326
- languages: (value: string|string[]) => this;
2327
+ languages: (value: LangId|(LangId)[]) => this;
2327
2328
  /** Result page number. */
2328
2329
  results_page: (value: number|string) => this;
2329
2330
  /** Number of results on page. */
@@ -2342,13 +2343,13 @@ export interface PutProductsCategoriesRequest extends AppendableGateway<PutProdu
2342
2343
  /** Category priority. Value from 1 to 19. */
2343
2344
  priority: (priority: number|string) => this
2344
2345
  /** Operation code. Allowed values. "add" - adds new category, "edit" - edits existing category, "del" - deletes existing category. */
2345
- operation: (operation: string) => this
2346
+ operation: (operation: "add" | "edit" | "del") => this
2346
2347
  lang_data: (lang_data: RequestParams.PutProductsCategoriesParams["categories"][number]["lang_data"]) => this
2347
2348
  }
2348
2349
 
2349
2350
  export interface SearchProductsCategoriesIdosellRequest extends PagableGateway<SearchProductsCategoriesIdosellRequest, SearchProductsCategoriesIdosellResponse, RequestParams.SearchProductsCategoriesIdosellParams> {
2350
2351
  /** List of languages */
2351
- languagesIds: (value: string|string[]) => this;
2352
+ languagesIds: (value: LangId|(LangId)[]) => this;
2352
2353
  /** Number of IdoSell Categories identifiers */
2353
2354
  categoriesIdoSellIds: (value: string|string[]) => this;
2354
2355
  /** IdoSell Categories name list */
@@ -2359,8 +2360,6 @@ export interface SearchProductsCategoriesIdosellRequest extends PagableGateway<S
2359
2360
  resultsPage: (value: number|string) => this;
2360
2361
  /** Number of results on page. Value from 1 to 100 */
2361
2362
  resultsLimit: (value: number|string) => this;
2362
- /** Define languagesIds values by passing them as an array */
2363
- languages: (values: number|string|number[]|string[]) => this;
2364
2363
  }
2365
2364
 
2366
2365
  export interface GetProductsCodeExistenceRequest extends Gateway<GetProductsCodeExistenceResponse> {
@@ -2454,7 +2453,7 @@ export interface PutProductsDescriptionsRequest extends AppendableGateway<PutPro
2454
2453
  productAuctionDescriptionsData: (productAuctionDescriptionsData: RequestParams.PutProductsDescriptionsParams["products"][number]["productAuctionDescriptionsData"]) => this
2455
2454
  productId: (value: number|string) => this;
2456
2455
  /** Set various types of names or descriptions to the product */
2457
- setText: (text: string, type?: "productName"|"productAuctionName"|"productPriceComparerName"|"productDescription"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeywords", language?: string, shopId?: number|string) => this;
2456
+ setText: (text: string, type?: "productName"|"productAuctionName"|"productPriceComparerName"|"productDescription"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeywords", language?: LangId, shopId?: number|string) => this;
2458
2457
  }
2459
2458
 
2460
2459
  export interface PutProductsGroupsMainProductRequest extends AppendableGateway<PutProductsGroupsMainProductRequest, ProductIdentResponse, RequestParams.PutProductsGroupsMainProductParams> {
@@ -2611,7 +2610,7 @@ export interface PostProductsOpinionsRequest extends AppendableGateway<PostProdu
2611
2610
  rating: (rating: string) => this
2612
2611
  content: (content: string) => this
2613
2612
  /** Customer language ID. */
2614
- language: (language: string) => this
2613
+ language: (language: LangId) => this
2615
2614
  picture: (picture: string) => this
2616
2615
  /** Shop Id */
2617
2616
  shopId: (shopId: number|string) => this
@@ -2636,7 +2635,7 @@ export interface PutProductsOpinionsRequest extends Gateway {
2636
2635
  rating: (value: '1'|'2'|'3'|'4'|'5') => this;
2637
2636
  content: (value: string) => this;
2638
2637
  /** Customer language ID. */
2639
- language: (value: string) => this;
2638
+ language: (value: LangId) => this;
2640
2639
  /** Reply to an opinion */
2641
2640
  shopAnswer: (value: string) => this;
2642
2641
  picture: (value: string) => this;
@@ -2685,7 +2684,7 @@ export interface SearchProductsParametersRequest extends PagableGateway<SearchPr
2685
2684
  /** Element text ID - can be entered instead of "id". */
2686
2685
  textIds: (value: RequestParams.SearchProductsParametersParams["textIds"]) => this;
2687
2686
  /** List of languages */
2688
- languagesIds: (value: string|string[]) => this;
2687
+ languagesIds: (value: LangId|(LangId)[]) => this;
2689
2688
  /** Whether to return a list of parameter value IDs */
2690
2689
  parameterValueIds: (value: boolean) => this;
2691
2690
  /** Page with results number. Numeration starts from 0 */
@@ -2871,7 +2870,7 @@ export interface PostProductsRequest extends AppendableGateway<PostProductsReque
2871
2870
  /** Product deposit count */
2872
2871
  depositCount: (depositCount: number|string) => this
2873
2872
  /** Set various types of names or descriptions to the product */
2874
- setText: (text: string, type?: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer", language?: string, shopId?: number|string) => this;
2873
+ setText: (text: string, type?: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer", language?: LangId, shopId?: number|string) => this;
2875
2874
  /** Sets product price by amount */
2876
2875
  setPrice: (value: number, type?: 'retail'|'wholesale'|'pos'|'minimal'|'strikethroughRetail'|'strikethroughWholesale'|'suggested'|'automaticCalculation') => this;
2877
2876
  }
@@ -3144,7 +3143,7 @@ export interface PutProductsRequest extends AppendableGateway<PutProductsRequest
3144
3143
  /** Product deposit count */
3145
3144
  depositCount: (depositCount: number|string) => this
3146
3145
  /** Set various types of names or descriptions to the product */
3147
- setText: (text: string, type?: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer", language?: string, shopId?: number|string) => this;
3146
+ setText: (text: string, type?: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer", language?: LangId, shopId?: number|string) => this;
3148
3147
  /** Set edit mode - disables adding new product */
3149
3148
  editMode: () => this;
3150
3149
  /** Set add mode - Api is allowed to create new products */
@@ -3226,7 +3225,7 @@ export interface SearchProductsRequest extends PagableGateway<SearchProductsRequ
3226
3225
  /** Possibility of sorting returned list */
3227
3226
  ordersBy: (value: RequestParams.SearchProductsParams["ordersBy"]) => this;
3228
3227
  /** Language ID that allows to search and return data in chosen language. This parameter is optional. If it's lacking, she search process unfolds in all available languages. */
3229
- productSearchingLangId: (value: string) => this;
3228
+ productSearchingLangId: (value: LangId) => this;
3230
3229
  /** Currency ID allowing to search and browse products in given currency. This parameter is optional, when it's lacking, the search process unfolds in all available currencies. */
3231
3230
  productSearchingCurrencyId: (value: string) => this;
3232
3231
  /** Currency ID allowing for returning all product prices in an indicated currency */
@@ -3256,7 +3255,7 @@ export interface SearchProductsRequest extends PagableGateway<SearchProductsRequ
3256
3255
  /** Product visible even though out of stock Available values: "y" - visible even though out of stock, "n" - not visible when out of stock. */
3257
3256
  productInPersistent: (value: "y" | "n") => this;
3258
3257
  /** Settings of products returned with variants All products with variants are returned by default Available values: version_all - returns all variants, version_main - returns only main variant. */
3259
- returnProductsVersions: (value: string) => this;
3258
+ returnProductsVersions: (value: "version_all" | "version_main") => this;
3260
3259
  /** Do You wish to sum up the products in the basket as a one order? Available values: "y" - yes, "n" - no. */
3261
3260
  productInSumInBasket: (value: "y" | "n") => this;
3262
3261
  /** Product type. Allowed values: "product_item" - Goods, "product_packaging" - packaging, "product_bundle" - set. "product_collection" - collection. "product_service" - service. "product_virtual" - virtual product. "product_configurable" - configurable product. */
@@ -3359,7 +3358,7 @@ export interface PutProductsQuestionsRequest extends AppendableGateway<PutProduc
3359
3358
  /** Question ID. */
3360
3359
  id: (id: number|string) => this
3361
3360
  /** Language of the question e.g. 'pol', 'eng'. */
3362
- lang: (lang: string) => this
3361
+ lang: (lang: LangId) => this
3363
3362
  /** Your question(base64). */
3364
3363
  question: (question: string) => this
3365
3364
  /** Content of the answer(base64). */
@@ -3409,7 +3408,7 @@ export interface GetProductsSeriesFilterRequest extends Gateway {
3409
3408
  /** Shop Id */
3410
3409
  shopId: (value: number|string) => this;
3411
3410
  /** Language ID (code in ISO 639-2). */
3412
- languageId: (value: string) => this;
3411
+ languageId: (value: LangId) => this;
3413
3412
  /** Series Id */
3414
3413
  serieId: (value: number|string) => this;
3415
3414
  }
@@ -3418,7 +3417,7 @@ export interface PutProductsSeriesFilterRequest extends AppendableGateway<PutPro
3418
3417
  /** Shop Id */
3419
3418
  shopId: (value: number|string) => this;
3420
3419
  /** Language ID (code in ISO 639-2). */
3421
- languageId: (value: string) => this;
3420
+ languageId: (value: LangId) => this;
3422
3421
  /** Series Id */
3423
3422
  serieId: (value: number|string) => this;
3424
3423
  filterForNodeIsDefault: (value: 'y'|'n') => this;
@@ -3444,7 +3443,7 @@ export interface GetProductsSeriesRequest extends PagableGateway<GetProductsSeri
3444
3443
  /** Names */
3445
3444
  names: (value: string|string[]) => this;
3446
3445
  /** List of languages */
3447
- languagesIds: (value: string|string[]) => this;
3446
+ languagesIds: (value: LangId|(LangId)[]) => this;
3448
3447
  /** Page with results number. Numeration starts from 0 */
3449
3448
  resultsPage: (value: number|string) => this;
3450
3449
  /** Number of results on page. Value from 1 to 100 */
@@ -3925,7 +3924,7 @@ export interface GetRegulationsHistoryRequest extends PagableGateway<GetRegulati
3925
3924
  /** Country ISO code */
3926
3925
  country: (value: string) => this;
3927
3926
  /** Language ISO code */
3928
- langId: (value: string) => this;
3927
+ langId: (value: LangId) => this;
3929
3928
  /** Page with results number. Numeration starts from 0 */
3930
3929
  resultsPage: (value: number|string) => this;
3931
3930
  /** Number of results on page. Value from 1 to 100 */
@@ -4146,7 +4145,7 @@ export interface GetSizechartsRequest extends PagableGateway<GetSizechartsReques
4146
4145
  /** Names of size charts */
4147
4146
  names: (value: string|string[]) => this;
4148
4147
  /** List of languages */
4149
- languages: (value: string|string[]) => this;
4148
+ languages: (value: LangId|(LangId)[]) => this;
4150
4149
  /** Page with results number. Numeration starts from 0 */
4151
4150
  resultsPage: (value: number|string) => this;
4152
4151
  /** Number of results on page. Value from 1 to 100 */
@@ -4527,7 +4526,7 @@ export interface GetSystemShopsDataRequest extends Gateway<GetSystemShopsDataRes
4527
4526
 
4528
4527
  export interface GetSystemUnitsRequest extends Gateway<GetSystemUnitsResponse> {
4529
4528
  /** List of languages */
4530
- languagesIds: (value: string|string[]) => this;
4529
+ languagesIds: (value: LangId|(LangId)[]) => this;
4531
4530
  }
4532
4531
 
4533
4532
  export interface PutSystemUnitsRequest extends AppendableGateway<PutSystemUnitsRequest, PutSystemUnitsResponse, RequestParams.PutSystemUnitsParams> {
@@ -4712,7 +4711,7 @@ export interface PutWarrantiesRequest extends AppendableGateway<PutWarrantiesReq
4712
4711
  period: (period: number|string) => this
4713
4712
  }
4714
4713
 
4715
- export interface GetWmsLocationsRequest extends PagableGateway<GetWmsLocationsRequest, GetWmsLocationsResponse> {
4714
+ export interface GetWmsLocationsRequest extends PagableGateway<GetWmsLocationsRequest, GetWmsLocationsResponse, RequestParams.GetWmsLocationsParams> {
4716
4715
  /** Warehouse location ID */
4717
4716
  locationId: (value: number|string) => this;
4718
4717
  /** Storage location code */
@@ -4720,7 +4719,7 @@ export interface GetWmsLocationsRequest extends PagableGateway<GetWmsLocationsRe
4720
4719
  /** Stock ID */
4721
4720
  stockId: (value: number|string) => this;
4722
4721
  /** Elements to be returned by the endpoint. By default all elements are returned. Available values: locationName, locationPath, locationCode, stockId, products */
4723
- returnElements: (value: string|string[]) => this;
4722
+ returnElements: (value: "locationName" | "locationPath" | "locationCode" | "stockId" | "products" | ("locationName" | "locationPath" | "locationCode" | "stockId" | "products")[]) => this;
4724
4723
  /** Page with results number. Numeration starts from 0 */
4725
4724
  resultsPage: (value: number|string) => this;
4726
4725
  /** Number of results on page. Value from 1 to 100 */
@@ -5420,6 +5419,7 @@ export interface Gateways {
5420
5419
  deleteProductsProductsToPromotion: DeleteProductsToPromotionRequest,
5421
5420
  }
5422
5421
 
5422
+ declare const webhooks: Webhooks;
5423
5423
  declare const defaultExport: (url: string, apiKey: string, version?: number | string) => Gateways;
5424
5424
  export default defaultExport;
5425
- export { ENUMS, RequestParams, utils }
5425
+ export { ENUMS, RequestParams, utils, webhooks, IaiWebhookHeaders }
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import ENUMS from "./enums.js";
2
2
  import utils from "./utils.js";
3
+ import webhooks from "./webhooks.js";
3
4
  import { gateProxy } from "./gates.js";
4
5
  import { IdosellFaultStringError, catchEmptyList } from "./errors.js";
5
6
  export const DEFAULT_VERSION = 8;
@@ -27,4 +28,4 @@ const idosell = (url, apiKey, version = DEFAULT_VERSION) => {
27
28
  return new Proxy(element, gateProxy);
28
29
  };
29
30
  export default idosell;
30
- export { ENUMS, utils, IdosellFaultStringError, catchEmptyList };
31
+ export { ENUMS, utils, webhooks, IdosellFaultStringError, catchEmptyList };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/attachments/getContent' };
4
+ object.req = ["productIdentValue", "productIdentType", "attachmentId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,9 +1,8 @@
1
1
  import { paramsProxy } from "../params.js";
2
- import { arrayOfObjects, page } from "../helpers.js";
2
+ import { page } from "../helpers.js";
3
3
  export default (object) => {
4
4
  object.gate = { method: 'post', node: '/products/categoriesIdosell/search' };
5
5
  object.custom = {
6
- languages: arrayOfObjects("languagesIds", "languageId"),
7
6
  page
8
7
  };
9
8
  object.arrays = ["languagesIds", "categoriesIdoSellIds", "categoriesIdoSellNames", "categoriesIdoSellPaths"];