idosell 0.4.13 → 0.4.17

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 CHANGED
@@ -5,6 +5,12 @@ 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.17] - 2025-12-18
9
+ - Updated to v7.10
10
+ - Updated utils
11
+ - Fixed dates helper default value
12
+ - Improved typing on empty PHP objects conversion
13
+
8
14
  ## [0.4.13] - 2025-10-15
9
15
  ### Changed
10
16
  - Updated to v7.2
package/dist/enums.d.ts CHANGED
@@ -373,3 +373,31 @@ export enum PAYMENT_FORMS {
373
373
  /** @description 74 - Straal */
374
374
  STRAAL = 74,
375
375
  }
376
+
377
+ export enum PRODUCT_SIZE_COUNTABLE {
378
+ QUANTITY = 'productSizeQuantity',
379
+ QUANTITY_OWN = 'productSizeQuantityOwnStock',
380
+ QUANTITY_OUTSIDE = 'productSizeQuantityOutsideStock',
381
+ QUANTITY_ALL = 'productSizeQuantityAllStocks',
382
+ QUANTITY_ORDERS_UNFINISHED = 'productOrdersUnfinishedQuantities',
383
+ DELIVERIES = 'productSizesDeliveries',
384
+ AUCTIONS = 'productSizesDispositionsInAuctions',
385
+ }
386
+
387
+ export enum PRODUCT_SIZE_CODES {
388
+ NAME = 'sizePanelName',
389
+ CODE_PRODUCER = 'productSizeCodeProducer',
390
+ CODE_EXTERNAL = 'productSizeCodeExternal',
391
+ }
392
+
393
+ export enum PRODUCT_SIZE_LOCATIONS {
394
+ CODE = 'stockLocationCode',
395
+ NAME = 'stockLocationTextId',
396
+ ID = 'stockLocationId'
397
+ }
398
+
399
+ export enum PRODUCE_SIZE_INDEX {
400
+ NAME = 'sizePanelName',
401
+ ID = 'sizeId',
402
+ IAI_CODE = 'iaiCode'
403
+ }
package/dist/enums.js CHANGED
@@ -374,11 +374,43 @@ var PAYMENT_FORMS;
374
374
  /** @description 74 - Straal */
375
375
  PAYMENT_FORMS[PAYMENT_FORMS["STRAAL"] = 74] = "STRAAL";
376
376
  })(PAYMENT_FORMS || (PAYMENT_FORMS = {}));
377
+ var PRODUCT_SIZE_COUNTABLE;
378
+ (function (PRODUCT_SIZE_COUNTABLE) {
379
+ PRODUCT_SIZE_COUNTABLE["QUANTITY"] = "productSizeQuantity";
380
+ PRODUCT_SIZE_COUNTABLE["QUANTITY_OWN"] = "productSizeQuantityOwnStock";
381
+ PRODUCT_SIZE_COUNTABLE["QUANTITY_OUTSIDE"] = "productSizeQuantityOutsideStock";
382
+ PRODUCT_SIZE_COUNTABLE["QUANTITY_ALL"] = "productSizeQuantityAllStocks";
383
+ PRODUCT_SIZE_COUNTABLE["QUANTITY_ORDERS_UNFINISHED"] = "productOrdersUnfinishedQuantities";
384
+ PRODUCT_SIZE_COUNTABLE["DELIVERIES"] = "productSizesDeliveries";
385
+ PRODUCT_SIZE_COUNTABLE["AUCTIONS"] = "productSizesDispositionsInAuctions";
386
+ })(PRODUCT_SIZE_COUNTABLE || (PRODUCT_SIZE_COUNTABLE = {}));
387
+ var PRODUCT_SIZE_CODES;
388
+ (function (PRODUCT_SIZE_CODES) {
389
+ PRODUCT_SIZE_CODES["NAME"] = "sizePanelName";
390
+ PRODUCT_SIZE_CODES["CODE_PRODUCER"] = "productSizeCodeProducer";
391
+ PRODUCT_SIZE_CODES["CODE_EXTERNAL"] = "productSizeCodeExternal";
392
+ })(PRODUCT_SIZE_CODES || (PRODUCT_SIZE_CODES = {}));
393
+ var PRODUCT_SIZE_LOCATIONS;
394
+ (function (PRODUCT_SIZE_LOCATIONS) {
395
+ PRODUCT_SIZE_LOCATIONS["CODE"] = "stockLocationCode";
396
+ PRODUCT_SIZE_LOCATIONS["NAME"] = "stockLocationTextId";
397
+ PRODUCT_SIZE_LOCATIONS["ID"] = "stockLocationId";
398
+ })(PRODUCT_SIZE_LOCATIONS || (PRODUCT_SIZE_LOCATIONS = {}));
399
+ var PRODUCE_SIZE_INDEX;
400
+ (function (PRODUCE_SIZE_INDEX) {
401
+ PRODUCE_SIZE_INDEX["NAME"] = "sizePanelName";
402
+ PRODUCE_SIZE_INDEX["ID"] = "sizeId";
403
+ PRODUCE_SIZE_INDEX["IAI_CODE"] = "iaiCode";
404
+ })(PRODUCE_SIZE_INDEX || (PRODUCE_SIZE_INDEX = {}));
377
405
  export default {
378
406
  PRODUCTS_RETURN_ELEMENTS,
379
407
  ORDER_STATUS,
380
408
  STOCK_DOCUMENT_TYPE,
381
409
  RETURN_STATUS,
382
410
  RMA_STATUS,
383
- PAYMENT_FORMS
411
+ PAYMENT_FORMS,
412
+ PRODUCT_SIZE_COUNTABLE,
413
+ PRODUCT_SIZE_CODES,
414
+ PRODUCT_SIZE_LOCATIONS,
415
+ PRODUCE_SIZE_INDEX
384
416
  };
@@ -1,8 +1,7 @@
1
1
  import type { PagableGateway, AppendableGateway, Gateway, DateLike, JSObject } from "./app.d.ts"
2
2
  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
3
  import type * as RequestParams from "./reqparams.d.ts";
4
- import utils from "./utils.d";
5
- import * as ENUMS from "./enums.d";
4
+ import * as ENUMS from "./enums";
6
5
 
7
6
  export interface GetClientsBalanceRequest extends PagableGateway<GetClientsBalanceRequest, GetClientsBalanceResponse> {
8
7
  /** Customer Id */
@@ -106,6 +105,8 @@ export interface PostClientsRequest extends AppendableGateway<PostClientsRequest
106
105
  company: (company: string) => this
107
106
  /** Customer Tax no. */
108
107
  vat_number: (vat_number: string) => this
108
+ /** Customer NIP UE declaration */
109
+ nip_ue_declaration: (nip_ue_declaration: 'yes'|'no') => this
109
110
  /** Determines, whether client is a wholesaler. */
110
111
  wholesaler: (wholesaler: boolean) => this
111
112
  /** 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. */
@@ -171,6 +172,8 @@ export interface PutClientsRequest extends AppendableGateway<PutClientsRequest,
171
172
  clientFirm: (clientFirm: string) => this
172
173
  /** Customer Tax no. */
173
174
  clientNip: (clientNip: string) => this
175
+ /** Customer NIP UE declaration */
176
+ clientNipUeDeclaration: (clientNipUeDeclaration: 'yes'|'no') => this
174
177
  /** Determines, whether client is a wholesaler. */
175
178
  clientIsWholesaler: (clientIsWholesaler: boolean) => this
176
179
  /** 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. */
@@ -1414,8 +1417,6 @@ export interface PostOrdersDocumentsCreateRequest extends Gateway<PostOrdersDocu
1414
1417
  actualize: (value: boolean) => this;
1415
1418
  /** Document type */
1416
1419
  documentType: (value: 'vat_invoice'|'fiscal_invoice'|'corrective_vat_invoice'|'fiscal_receipt'|'sales_confirmation') => this;
1417
- /** Document issued date */
1418
- documentIssuedDate: (value: string) => this;
1419
1420
  /** Document purchase date */
1420
1421
  documentPurchaseDate: (value: string) => this;
1421
1422
  /** Printer id */
@@ -5203,4 +5204,4 @@ export interface Gateways {
5203
5204
 
5204
5205
  declare const defaultExport: (url: string, apiKey: string, version?: number | string) => Gateways;
5205
5206
  export default defaultExport;
5206
- export { ENUMS, RequestParams, utils }
5207
+ export { ENUMS, RequestParams }
package/dist/helpers.js CHANGED
@@ -95,7 +95,7 @@ export const dateRangeType = ({ nodeName, fromName, toName, typeName, defaultTyp
95
95
  const param = {};
96
96
  ;
97
97
  const node = getDateRangeNode(fromName, toName, dateFrom, dateTo, format);
98
- if (dateType === null && defaultType)
98
+ if (!dateType && defaultType)
99
99
  dateType = defaultType;
100
100
  node[typeName] = dateType;
101
101
  if (nested) {
@@ -731,7 +731,7 @@ export type PostProductsParams = {
731
731
  };
732
732
  /** @description Standard unit settings */
733
733
  standardUnit?: {
734
- /** @description Possible special contexts corresponding to standard units. Available values: "CONTEXT_STD_UNIT_WEIGHT" - #!WagaTowaruWGramach!#, "CONTEXT_STD_UNIT_WEIGHT_SI" - Product weight in kilograms, "CONTEXT_STD_UNIT_VOLUME" - A product's value in milliliters "CONTEXT_STD_UNIT_VOLUME_SI" - A product's value in liters "CONTEXT_STD_UNIT_LENGTH" - Length of product in meters "CONTEXT_STD_UNIT_AREA_M2" - Area of ​​product in square meters "CONTEXT_STD_UNIT_VOLUME_M3" - The volume of products in cubic meters "CONTEXT_STD_UNIT_QUANTITY_PACKAGE" - Number of pieces per pack for standard unit */
734
+ /** @description Possible special contexts corresponding to standard units. Available values: "CONTEXT_STD_UNIT_WEIGHT" - #!WagaTowaruWGramach!#, "CONTEXT_STD_UNIT_WEIGHT_SI" - Product weight in kilograms, "CONTEXT_STD_UNIT_VOLUME" - A product's value in milliliters "CONTEXT_STD_UNIT_VOLUME_SI" - A product's value in liters "CONTEXT_STD_UNIT_LENGTH" - Length of product in meters "CONTEXT_STD_UNIT_AREA_M2" - Area of product in square meters "CONTEXT_STD_UNIT_VOLUME_M3" - The volume of products in cubic meters "CONTEXT_STD_UNIT_QUANTITY_PACKAGE" - Number of pieces per pack for standard unit */
735
735
  contextValue?: "CONTEXT_STD_UNIT_WEIGHT" | "CONTEXT_STD_UNIT_WEIGHT_SI" | "CONTEXT_STD_UNIT_VOLUME" | "CONTEXT_STD_UNIT_VOLUME_SI" | "CONTEXT_STD_UNIT_LENGTH" | "CONTEXT_STD_UNIT_AREA_M2" | "CONTEXT_STD_UNIT_VOLUME_M3" | "CONTEXT_STD_UNIT_QUANTITY_PACKAGE";
736
736
  /** @description Total length/volume/area/weight of product */
737
737
  standardUnitValue?: number;
@@ -1974,7 +1974,7 @@ export type PutProductsParams = {
1974
1974
  };
1975
1975
  /** @description Standard unit settings */
1976
1976
  standardUnit?: {
1977
- /** @description Possible special contexts corresponding to standard units. Available values: "CONTEXT_STD_UNIT_WEIGHT" - Product weight in grams, "CONTEXT_STD_UNIT_WEIGHT_SI" - Product weight in kilograms, "CONTEXT_STD_UNIT_VOLUME" - A product's value in milliliters "CONTEXT_STD_UNIT_VOLUME_SI" - A product's value in liters "CONTEXT_STD_UNIT_LENGTH" - Length of product in meters "CONTEXT_STD_UNIT_AREA_M2" - Area of ​​product in square meters "CONTEXT_STD_UNIT_VOLUME_M3" - The volume of products in cubic meters "CONTEXT_STD_UNIT_QUANTITY_PACKAGE" - Number of pieces per pack for standard unit */
1977
+ /** @description Possible special contexts corresponding to standard units. Available values: "CONTEXT_STD_UNIT_WEIGHT" - Product weight in grams, "CONTEXT_STD_UNIT_WEIGHT_SI" - Product weight in kilograms, "CONTEXT_STD_UNIT_VOLUME" - A product's value in milliliters "CONTEXT_STD_UNIT_VOLUME_SI" - A product's value in liters "CONTEXT_STD_UNIT_LENGTH" - Length of product in meters "CONTEXT_STD_UNIT_AREA_M2" - Area of product in square meters "CONTEXT_STD_UNIT_VOLUME_M3" - The volume of products in cubic meters "CONTEXT_STD_UNIT_QUANTITY_PACKAGE" - Number of pieces per pack for standard unit */
1978
1978
  contextValue?: "CONTEXT_STD_UNIT_WEIGHT" | "CONTEXT_STD_UNIT_WEIGHT_SI" | "CONTEXT_STD_UNIT_VOLUME" | "CONTEXT_STD_UNIT_VOLUME_SI" | "CONTEXT_STD_UNIT_LENGTH" | "CONTEXT_STD_UNIT_AREA_M2" | "CONTEXT_STD_UNIT_VOLUME_M3" | "CONTEXT_STD_UNIT_QUANTITY_PACKAGE";
1979
1979
  /** @description Total length/volume/area/weight of product */
1980
1980
  standardUnitValue?: number;
@@ -2257,12 +2257,10 @@ export type PostPackagesLabelsParams = {
2257
2257
  export type PostOrdersDocumentsCreateParams = {
2258
2258
  /** @example [ 1, 2 ] */
2259
2259
  orderSerialNumbers: number[];
2260
- /** @example false */
2260
+ /** @deprecated */
2261
2261
  actualize?: boolean;
2262
2262
  /** @description Document type */
2263
2263
  documentType: "vat_invoice" | "fiscal_invoice" | "corrective_vat_invoice" | "fiscal_receipt" | "sales_confirmation";
2264
- /** @description Document issued date */
2265
- documentIssuedDate?: string;
2266
2264
  /** @description Document purchase date */
2267
2265
  documentPurchaseDate?: string;
2268
2266
  /** @description Printer id */
@@ -2302,6 +2300,8 @@ export type PostClientsParams = {
2302
2300
  company?: string;
2303
2301
  /** @description Customer Tax no. */
2304
2302
  vat_number?: string;
2303
+ /** @description Customer NIP UE declaration */
2304
+ nip_ue_declaration?: "yes" | "no";
2305
2305
  /** @description Determines, whether client is a wholesaler. */
2306
2306
  wholesaler?: boolean;
2307
2307
  /** @description 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. */
@@ -4664,6 +4664,8 @@ export type PutClientsParams = {
4664
4664
  clientFirm?: string;
4665
4665
  /** @description Customer Tax no. */
4666
4666
  clientNip?: string;
4667
+ /** @description Customer NIP UE declaration */
4668
+ clientNipUeDeclaration?: "yes" | "no";
4667
4669
  /** @description Determines, whether client is a wholesaler. */
4668
4670
  clientIsWholesaler?: boolean;
4669
4671
  /** @description 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. */
@@ -5709,6 +5711,8 @@ export type PutProductsSeriesParams = {
5709
5711
  headerName?: string;
5710
5712
  /** @description Description */
5711
5713
  description?: string;
5714
+ /** @description Description bottom */
5715
+ descriptionBottom?: string;
5712
5716
  /** @description Products display settings */
5713
5717
  view?: "default" | "own";
5714
5718
  /** @description Enable customers to change sorting */