idosell 0.4.30 → 0.4.34
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 +14 -1
- package/dist/enums.d.ts +426 -404
- package/dist/enums.js +9 -1
- package/dist/gates.js +1 -1
- package/dist/gateways.d.ts +8 -6
- package/dist/helpers.js +1 -1
- package/dist/methods/getProductsBrands.js +1 -1
- package/dist/methods/getProductsCategories.js +1 -1
- package/dist/methods/getRegulationsHistory.js +5 -0
- package/dist/methods/getReturns.js +1 -1
- package/dist/methods/getWarranties.js +1 -1
- package/dist/methods/getWmsStocksdocumentsProducts.js +1 -1
- package/dist/methods/searchClientsNewsletterEmail.js +1 -1
- package/dist/methods/searchClientsNewsletterSms.js +1 -1
- package/dist/reqparams.d.ts +1 -1
- package/dist/request.js +12 -13
- package/dist/responses.d.ts +316 -28
- package/dist/utils.d.ts +34 -41
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/tests/utilMapAllProductCodes.test.js +0 -3
package/dist/responses.d.ts
CHANGED
|
@@ -2208,6 +2208,8 @@ export type SearchOrdersResponse = {
|
|
|
2208
2208
|
longitude: number;
|
|
2209
2209
|
/** @description Name. */
|
|
2210
2210
|
name: string;
|
|
2211
|
+
/** @description Country (2 letter country code). */
|
|
2212
|
+
country: string;
|
|
2211
2213
|
};
|
|
2212
2214
|
/** @description Buyer's address data. */
|
|
2213
2215
|
payerAddress?: {
|
|
@@ -2272,7 +2274,11 @@ export type SearchOrdersResponse = {
|
|
|
2272
2274
|
/** @description Order status. Allowed values: "finished_ext" - order status: completed in FA application, "finished" - completed, "new" - not handled, "payment_waiting" - awaiting payment, "delivery_waiting" - awaiting delivery, "on_order" - in progress, "packed" - being picked, "packed_fulfillment" - being picked - fulfilment, "packed_ready" - packed, "ready" - ready, "wait_for_dispatch" - awaiting dispatch date, "suspended" - on hold, "joined" - merged, "missing" - missing, "lost" - lost, "false" - false, "canceled" - Customer canceled. */
|
|
2273
2275
|
orderStatus: string;
|
|
2274
2276
|
/** @description Order status id. */
|
|
2275
|
-
orderStatusId
|
|
2277
|
+
orderStatusId?: number;
|
|
2278
|
+
/** @description Transaction type. */
|
|
2279
|
+
transactionType: null |"national" | "oss" | "export" | "intra";
|
|
2280
|
+
/** @description Split payment MPP marking */
|
|
2281
|
+
splitPayment: boolean;
|
|
2276
2282
|
/** @example dropshippingOrderStatus */
|
|
2277
2283
|
dropshippingOrderStatus: string;
|
|
2278
2284
|
/** @description Type of order confirmation. Confirmations listing: "none" - order unconfirmed , "email" - order confirmed by e-mail, "phone_client" - order confirmed by phone call made by client, "phone_service" - order confirmed by phone call made by staff, "postauction" - order confirmed by auction return page, "willingness" - confirmed by willingness to buy letter, "auctionfod" - confirmed by after-sales form Allegro. */
|
|
@@ -3492,10 +3498,10 @@ export type PutProductsMarketingZonesResponse = {
|
|
|
3492
3498
|
|
|
3493
3499
|
export type GetProductsOmnibusPricesResponse = {
|
|
3494
3500
|
/** @description Products list. */
|
|
3495
|
-
products:
|
|
3501
|
+
products: {
|
|
3496
3502
|
/** @description Product ID */
|
|
3497
3503
|
productId: number;
|
|
3498
|
-
shops:
|
|
3504
|
+
shops: {
|
|
3499
3505
|
/** @description Shop Id */
|
|
3500
3506
|
shop_id: number;
|
|
3501
3507
|
/** @description Lowest retail price before active promotion (gross). */
|
|
@@ -3505,7 +3511,7 @@ export type GetProductsOmnibusPricesResponse = {
|
|
|
3505
3511
|
/** @description How to manage the lowest price before promotion. */
|
|
3506
3512
|
omnibusPriceManagement: "automatic" | "manual";
|
|
3507
3513
|
/** @description List of sizes */
|
|
3508
|
-
sizes:
|
|
3514
|
+
sizes: {
|
|
3509
3515
|
/** @description Identifier type. */
|
|
3510
3516
|
ident: {
|
|
3511
3517
|
/** */
|
|
@@ -3518,9 +3524,12 @@ export type GetProductsOmnibusPricesResponse = {
|
|
|
3518
3524
|
/** @description Lowest wholesale price before active promotion (gross). */
|
|
3519
3525
|
omnibusPriceWholesale: number;
|
|
3520
3526
|
/** @description How to manage the lowest price before promotion. */
|
|
3521
|
-
omnibusPriceManagement: "automatic" | "manual"
|
|
3527
|
+
omnibusPriceManagement: "automatic" | "manual";
|
|
3528
|
+
}[];
|
|
3529
|
+
}[];
|
|
3522
3530
|
/** @description Error information. */
|
|
3523
|
-
error?: FaultCodeString
|
|
3531
|
+
error?: FaultCodeString;
|
|
3532
|
+
}[];
|
|
3524
3533
|
};
|
|
3525
3534
|
|
|
3526
3535
|
export type GetProductsOpinionsRateResponse = {
|
|
@@ -4412,7 +4421,7 @@ export type SearchProductsResponse = {
|
|
|
4412
4421
|
productSizeQuantity: number;
|
|
4413
4422
|
}[];
|
|
4414
4423
|
/** @description Size data */
|
|
4415
|
-
productSizesStocksLocations
|
|
4424
|
+
productSizesStocksLocations?: {
|
|
4416
4425
|
/** @description Stock ID */
|
|
4417
4426
|
stockId: number;
|
|
4418
4427
|
productSizesLocation: {
|
|
@@ -4497,11 +4506,11 @@ export type SearchProductsResponse = {
|
|
|
4497
4506
|
/** @description Gross price */
|
|
4498
4507
|
productRetailPrice: number;
|
|
4499
4508
|
/** @description Gross price after promotion. The item is returned when the 'showPromotionsPrices' parameter is specified in the request */
|
|
4500
|
-
productPromoRetailPrice
|
|
4509
|
+
productPromoRetailPrice?: number;
|
|
4501
4510
|
/** @description Wholesale price */
|
|
4502
4511
|
productWholesalePrice: number;
|
|
4503
4512
|
/** @description Wholesale price after promotion. The item is returned when the 'showPromotionsPrices' parameter is specified in the request */
|
|
4504
|
-
productPromoWholesalePrice
|
|
4513
|
+
productPromoWholesalePrice?: number;
|
|
4505
4514
|
/** @description Minimal price */
|
|
4506
4515
|
productMinimalPrice: number;
|
|
4507
4516
|
/** @description Price for automatic calculations */
|
|
@@ -4779,7 +4788,7 @@ export type SearchProductsResponse = {
|
|
|
4779
4788
|
sizePanelName: string;
|
|
4780
4789
|
}[];
|
|
4781
4790
|
/** @description Available sizes of products in a set or collection for marketplaces */
|
|
4782
|
-
bundledAvailableSizesInAuctions
|
|
4791
|
+
bundledAvailableSizesInAuctions?: {
|
|
4783
4792
|
/** @description Size identifier */
|
|
4784
4793
|
sizeId: string;
|
|
4785
4794
|
/** @description Size name */
|
|
@@ -4813,7 +4822,7 @@ export type SearchProductsResponse = {
|
|
|
4813
4822
|
}[];
|
|
4814
4823
|
}[];
|
|
4815
4824
|
/** @description Parameter values */
|
|
4816
|
-
parameterValues?: {
|
|
4825
|
+
parameterValues?: null | {
|
|
4817
4826
|
/** @description Parameter value ID */
|
|
4818
4827
|
parameterValueId: number;
|
|
4819
4828
|
/** @description Language data */
|
|
@@ -4973,6 +4982,72 @@ export type SearchProductsResponse = {
|
|
|
4973
4982
|
responsiblePersonCode?: string | null;
|
|
4974
4983
|
/** @description Minimum stock level */
|
|
4975
4984
|
minStockLevel?: number;
|
|
4985
|
+
productAttachments?: {
|
|
4986
|
+
/** @description Product attachments list. */
|
|
4987
|
+
attachments?: {
|
|
4988
|
+
/** @description Attachment ID. */
|
|
4989
|
+
attachmentId: number;
|
|
4990
|
+
/** @description Attachment name. */
|
|
4991
|
+
attachmentName: string;
|
|
4992
|
+
/** @description Attachment number. */
|
|
4993
|
+
attachmentPriority: number;
|
|
4994
|
+
/** @description Type of customer, attachment should be available for: 'all','ordered','wholesaler','wholesaler_or_ordered','wholesaler_and_ordered'. */
|
|
4995
|
+
attachmentEnable: "all" | "ordered" | "wholesaler" | "wholesaler_or_orderer" | "wholesaler_and_ordered";
|
|
4996
|
+
/** @description File type: audio, video, doc, other. */
|
|
4997
|
+
attachmentFileType: "audio" | "video" | "doc" | "other" | "image";
|
|
4998
|
+
/** @description Attachment file extension. */
|
|
4999
|
+
attachmentFileExtension: string;
|
|
5000
|
+
/** @description Attachment downloads record. */
|
|
5001
|
+
attachmentDownloadLog: "y" | "n";
|
|
5002
|
+
/** @description Language ID */
|
|
5003
|
+
langId: string;
|
|
5004
|
+
/** @description Attachment document types list. */
|
|
5005
|
+
documentTypes?: {
|
|
5006
|
+
/** @description Document type. */
|
|
5007
|
+
documentType: "energy_label" | "instruction_with_safety_information" | "user_manual" | "installation_instructions" | "product_card" | "guide" | "software_data_processing" | "hardware_data_processing" | "others";
|
|
5008
|
+
/** @description Additional description. */
|
|
5009
|
+
documentName: string;
|
|
5010
|
+
/** @description Additional description. */
|
|
5011
|
+
description: string;
|
|
5012
|
+
}[];
|
|
5013
|
+
}[];
|
|
5014
|
+
/** @description List of product's virtual attachments. */
|
|
5015
|
+
virtualAttachments?: {
|
|
5016
|
+
/** @description Attachment ID. */
|
|
5017
|
+
attachmentId: number;
|
|
5018
|
+
/** @description Full version or sample. */
|
|
5019
|
+
attachmentType: "full" | "demo";
|
|
5020
|
+
/** @description Attachment number. */
|
|
5021
|
+
attachmentPriority: number;
|
|
5022
|
+
/** @description Specifies where the attachment content comes from: 'local' for a file uploaded with the request, or 'url' for a remotely hosted file accessible via a URL. */
|
|
5023
|
+
attachmentSourceType: "local" | "url";
|
|
5024
|
+
/** @description File type: audio, video, doc, other. */
|
|
5025
|
+
attachmentFileType: "audio" | "video" | "doc" | "other" | "image";
|
|
5026
|
+
/** @description Attachment file extension. */
|
|
5027
|
+
attachmentFileExtension: string;
|
|
5028
|
+
/** @description Attachment file size in megabytes (MB). */
|
|
5029
|
+
attachmentFileSize: string;
|
|
5030
|
+
/** @description Attachment file hash. */
|
|
5031
|
+
attachmentFileHash: string;
|
|
5032
|
+
/** @description Number of attachment downloads limit. */
|
|
5033
|
+
attachmentLimits: {
|
|
5034
|
+
/** @description Number of downloads limit. */
|
|
5035
|
+
attachmentDownloadsLimit: number;
|
|
5036
|
+
/** @description Number of days file should be available. */
|
|
5037
|
+
attachmentDaysLimit: number;
|
|
5038
|
+
};
|
|
5039
|
+
/** @description Attachment name. */
|
|
5040
|
+
attachmentName: {
|
|
5041
|
+
/** @description List of languages. */
|
|
5042
|
+
attachmentLanguages: {
|
|
5043
|
+
/** @description Language ID */
|
|
5044
|
+
langId: string;
|
|
5045
|
+
/** @description Literal in selected language. */
|
|
5046
|
+
langValue: string;
|
|
5047
|
+
}[];
|
|
5048
|
+
};
|
|
5049
|
+
}[];
|
|
5050
|
+
};
|
|
4976
5051
|
}[];
|
|
4977
5052
|
} & PagedResponse;
|
|
4978
5053
|
|
|
@@ -5961,6 +6036,10 @@ export type PutReturnsSerialNumberResponse = {
|
|
|
5961
6036
|
export type GetRmaResponse = {
|
|
5962
6037
|
/** @description Complaints. */
|
|
5963
6038
|
rmas: {
|
|
6039
|
+
/** @description Corresponding order serial number */
|
|
6040
|
+
orderSn: number;
|
|
6041
|
+
/** @description Rma currency */
|
|
6042
|
+
currency: string;
|
|
5964
6043
|
/** @description Complaint id. */
|
|
5965
6044
|
rmaId: number;
|
|
5966
6045
|
/** @description Customer's login. */
|
|
@@ -6508,6 +6587,8 @@ export type GetSystemConfigResponse = {
|
|
|
6508
6587
|
/** @description Configuration of default currency rate for orders */
|
|
6509
6588
|
currencyRate: "currentDay" | "previousDay" | null;
|
|
6510
6589
|
};
|
|
6590
|
+
/** @description Whether setting different prices per size is blocked. */
|
|
6591
|
+
sizesDifferentPricesBlocked: boolean;
|
|
6511
6592
|
};
|
|
6512
6593
|
panel_literals: {
|
|
6513
6594
|
/** @description "Reduced price" - name in the panel. */
|
|
@@ -6637,7 +6718,7 @@ export type GetSystemConfigResponse = {
|
|
|
6637
6718
|
/** @description Name */
|
|
6638
6719
|
name: string;
|
|
6639
6720
|
}[];
|
|
6640
|
-
product_deliverers
|
|
6721
|
+
product_deliverers?: {
|
|
6641
6722
|
/** @description Id */
|
|
6642
6723
|
id: number;
|
|
6643
6724
|
/** @description Name */
|
|
@@ -6810,8 +6891,45 @@ export type GetSystemServerTimeResponse = {
|
|
|
6810
6891
|
time: number;
|
|
6811
6892
|
};
|
|
6812
6893
|
|
|
6813
|
-
export type GetSystemShopsDataResponse =
|
|
6814
|
-
/** @description
|
|
6894
|
+
export type GetSystemShopsDataResponse = {
|
|
6895
|
+
/** @description Customer ID. */
|
|
6896
|
+
client_id: number;
|
|
6897
|
+
/** @description Dedicated server. */
|
|
6898
|
+
dedicated_server: boolean;
|
|
6899
|
+
shop_owner_data: {
|
|
6900
|
+
/** @description Full company name. */
|
|
6901
|
+
company_name: string;
|
|
6902
|
+
/** @description Company short name. */
|
|
6903
|
+
company_short_name: string;
|
|
6904
|
+
/** @description NIP [TIN]. */
|
|
6905
|
+
nip: string;
|
|
6906
|
+
/** @description CRN. */
|
|
6907
|
+
regon: string;
|
|
6908
|
+
/** @description no of entry to NCR. */
|
|
6909
|
+
krs: string;
|
|
6910
|
+
/** @example address */
|
|
6911
|
+
address: string;
|
|
6912
|
+
/** @description ZIP / Post code. */
|
|
6913
|
+
zipcode: string;
|
|
6914
|
+
/** @description Town / City. */
|
|
6915
|
+
city: string;
|
|
6916
|
+
/** @description region. */
|
|
6917
|
+
country: string;
|
|
6918
|
+
/** @description VAT registered. */
|
|
6919
|
+
VATRegistered: boolean;
|
|
6920
|
+
};
|
|
6921
|
+
/** @description List of languages configured in the administration panel. */
|
|
6922
|
+
languages: {
|
|
6923
|
+
/** @description Language code. Codes are compliant with ISO-639-3 standard. */
|
|
6924
|
+
lang_id: string;
|
|
6925
|
+
/** @description Language name. */
|
|
6926
|
+
lang_name: string;
|
|
6927
|
+
}[];
|
|
6928
|
+
/** @description Code of default panel language in ISO-639-3 standard. */
|
|
6929
|
+
panel_lang_id_default: string;
|
|
6930
|
+
/** @description Panel base currency ID. */
|
|
6931
|
+
panel_basecurrency_id: string;
|
|
6932
|
+
/** @description Shop contact data */
|
|
6815
6933
|
shop_contact: {
|
|
6816
6934
|
/** @description shop ID */
|
|
6817
6935
|
shop_id: number;
|
|
@@ -6827,7 +6945,47 @@ export type GetSystemShopsDataResponse = Omit<GetSystemConfigResponse, 'panel_se
|
|
|
6827
6945
|
contact_phone_number: string;
|
|
6828
6946
|
}[];
|
|
6829
6947
|
}[];
|
|
6830
|
-
panel_settings:
|
|
6948
|
+
panel_settings: {
|
|
6949
|
+
/** @description Default panel language. */
|
|
6950
|
+
default_lang_id: string;
|
|
6951
|
+
/** @description Panel base currency. */
|
|
6952
|
+
basecurrency_id: string;
|
|
6953
|
+
/** @description Manual stock quantity modification restriction. */
|
|
6954
|
+
stocks_change_disabled: string;
|
|
6955
|
+
/** */
|
|
6956
|
+
stock_state_config: "uncontrolled" | "bridge" | "outside";
|
|
6957
|
+
/** */
|
|
6958
|
+
main_stock_system: "other" | "iai";
|
|
6959
|
+
/** @description Sales documents in third party application. */
|
|
6960
|
+
salesDocumentsAreCreatedByClient: boolean;
|
|
6961
|
+
search_by_code: {
|
|
6962
|
+
/** @description IAI code. */
|
|
6963
|
+
code_iai: boolean;
|
|
6964
|
+
/** @description External system code. */
|
|
6965
|
+
code_extern: boolean;
|
|
6966
|
+
/** @description Producer code. */
|
|
6967
|
+
code_producer: boolean;
|
|
6968
|
+
};
|
|
6969
|
+
/** @description Whether setting different prices per size is blocked. */
|
|
6970
|
+
sizesDifferentPricesBlocked: boolean;
|
|
6971
|
+
};
|
|
6972
|
+
panel_literals: {
|
|
6973
|
+
/** @description "Reduced price" - name in the panel. */
|
|
6974
|
+
promotion: string;
|
|
6975
|
+
/** @description "Sale" - name in panel. */
|
|
6976
|
+
discount: string;
|
|
6977
|
+
/** @description "Distinguished product" - name in panel. */
|
|
6978
|
+
distinguished: string;
|
|
6979
|
+
/** @description "Warranty" - name in shop. */
|
|
6980
|
+
warranty: string;
|
|
6981
|
+
};
|
|
6982
|
+
/** @description List of warehouses. */
|
|
6983
|
+
stocks: {
|
|
6984
|
+
/** @description Stock ID. */
|
|
6985
|
+
stock_id: number;
|
|
6986
|
+
/** @description Stock name. */
|
|
6987
|
+
stock_name: string;
|
|
6988
|
+
}[];
|
|
6831
6989
|
/** @description List of stores. */
|
|
6832
6990
|
shops: {
|
|
6833
6991
|
/** @description Shop Id. */
|
|
@@ -6841,7 +6999,7 @@ export type GetSystemShopsDataResponse = Omit<GetSystemConfigResponse, 'panel_se
|
|
|
6841
6999
|
active_price_comparers: {
|
|
6842
7000
|
/** @example 1 */
|
|
6843
7001
|
id: number;
|
|
6844
|
-
|
|
7002
|
+
/** @description Default price difference. */
|
|
6845
7003
|
default_price_percent_diff: number;
|
|
6846
7004
|
}[];
|
|
6847
7005
|
/** @description Url to default product icon. */
|
|
@@ -6892,6 +7050,146 @@ export type GetSystemShopsDataResponse = Omit<GetSystemConfigResponse, 'panel_se
|
|
|
6892
7050
|
active: boolean;
|
|
6893
7051
|
};
|
|
6894
7052
|
}[];
|
|
7053
|
+
/** @description List of size units. */
|
|
7054
|
+
units: {
|
|
7055
|
+
/** @description Unit of measure ID. */
|
|
7056
|
+
unit_id: number;
|
|
7057
|
+
/** @description Unit of measure name in panel. */
|
|
7058
|
+
unit_name: string;
|
|
7059
|
+
/** @description Accuracy (number of places after comma). */
|
|
7060
|
+
unit_precision: number;
|
|
7061
|
+
/** @description Object determines unit visibility in panel. List of values: "y" - unit visible in panel, "n" - unit invisible in panel. */
|
|
7062
|
+
unit_visible: string;
|
|
7063
|
+
lang_data: {
|
|
7064
|
+
/** @description Language code. Codes are compliant with ISO-639-3 standard. */
|
|
7065
|
+
lang_id: string;
|
|
7066
|
+
/** @description Name (singular). */
|
|
7067
|
+
singular_name: string;
|
|
7068
|
+
/** @description Name (plural). */
|
|
7069
|
+
plural_name: string;
|
|
7070
|
+
/** @description Name (by fractions). */
|
|
7071
|
+
fraction_name: string;
|
|
7072
|
+
}[];
|
|
7073
|
+
}[];
|
|
7074
|
+
/** @description List of warranties. */
|
|
7075
|
+
warranties: {
|
|
7076
|
+
/** @example 1 */
|
|
7077
|
+
id: number;
|
|
7078
|
+
/** @example name */
|
|
7079
|
+
name: string;
|
|
7080
|
+
}[];
|
|
7081
|
+
/** @description List of parcel delivery companies. */
|
|
7082
|
+
deliverers: {
|
|
7083
|
+
/** @example 1 */
|
|
7084
|
+
id: number;
|
|
7085
|
+
/** @example name */
|
|
7086
|
+
name: string;
|
|
7087
|
+
}[];
|
|
7088
|
+
product_deliverers?: {
|
|
7089
|
+
/** @example 1 */
|
|
7090
|
+
id: number;
|
|
7091
|
+
/** @example name */
|
|
7092
|
+
name: string;
|
|
7093
|
+
}[];
|
|
7094
|
+
vat_rates: {
|
|
7095
|
+
/** @example 1 */
|
|
7096
|
+
id: number;
|
|
7097
|
+
/** @description VAT rate value. */
|
|
7098
|
+
value: number;
|
|
7099
|
+
}[];
|
|
7100
|
+
auction_systems?: {
|
|
7101
|
+
/** @description Auction system ID. */
|
|
7102
|
+
auction_id: number;
|
|
7103
|
+
/** @description Auction site ID. */
|
|
7104
|
+
site_id: number;
|
|
7105
|
+
/** @description Auction site currency ID. */
|
|
7106
|
+
currency_id: string;
|
|
7107
|
+
/** @description Auction site description. */
|
|
7108
|
+
description: string;
|
|
7109
|
+
}[];
|
|
7110
|
+
availability_profiles: {
|
|
7111
|
+
/** @example 1 */
|
|
7112
|
+
id: number;
|
|
7113
|
+
/** @example name */
|
|
7114
|
+
name: string;
|
|
7115
|
+
}[];
|
|
7116
|
+
rebate_profiles: {
|
|
7117
|
+
/** @example 1 */
|
|
7118
|
+
id: number;
|
|
7119
|
+
/** @example name */
|
|
7120
|
+
name: string;
|
|
7121
|
+
}[];
|
|
7122
|
+
pictures_settings: {
|
|
7123
|
+
/** @description Object determines if the product icon should be scaled. List of values: "y" - icon is scaled, "n" - icon is unscaled. */
|
|
7124
|
+
icon_resize: string;
|
|
7125
|
+
/** @description Graphic quality in percent (0-100). . "0" - the worst quality, "100" - the best quality (no compression). */
|
|
7126
|
+
icon_quality: number;
|
|
7127
|
+
/** @description Large icon width in pixels. */
|
|
7128
|
+
icon_large_width: number;
|
|
7129
|
+
/** @description Large icon height in pixels. */
|
|
7130
|
+
icon_large_height: number;
|
|
7131
|
+
/** @description Small icon width in pixels. */
|
|
7132
|
+
icon_small_width: number;
|
|
7133
|
+
/** @description Small icon height in pixels. */
|
|
7134
|
+
icon_small_height: number;
|
|
7135
|
+
/** @description Width of an icon on the marketplaces. */
|
|
7136
|
+
auction_icon_height: number;
|
|
7137
|
+
/** @description Hight of an icon on the marketplaces. */
|
|
7138
|
+
auction_icon_width: number;
|
|
7139
|
+
/** @description Group icon width in pixels. */
|
|
7140
|
+
group_icon_height: number;
|
|
7141
|
+
/** @description Group icon height in pixels. */
|
|
7142
|
+
group_icon_width: number;
|
|
7143
|
+
/** @description Photo quality in percents (0-100). "0" - the worst quality, "100" - the best quality (no compression). */
|
|
7144
|
+
picture_quality: number;
|
|
7145
|
+
/** @description Large photo width in pixels. */
|
|
7146
|
+
picture_large_width: number;
|
|
7147
|
+
/** @description Large photo height in pixels. */
|
|
7148
|
+
picture_large_height: number;
|
|
7149
|
+
/** @description Medium photo width in pixels. */
|
|
7150
|
+
picture_medium_width: number;
|
|
7151
|
+
/** @description Medium photo height in pixels. */
|
|
7152
|
+
picture_medium_height: number;
|
|
7153
|
+
/** @description Small photo width in pixels. */
|
|
7154
|
+
picture_small_width: number;
|
|
7155
|
+
/** @description Small photo height in pixels. */
|
|
7156
|
+
picture_small_height: number;
|
|
7157
|
+
};
|
|
7158
|
+
price_comparers: never[] | Record<string, {
|
|
7159
|
+
/** @example 1 */
|
|
7160
|
+
id?: number;
|
|
7161
|
+
/** @example key */
|
|
7162
|
+
key?: string;
|
|
7163
|
+
/** @example name */
|
|
7164
|
+
name?: string;
|
|
7165
|
+
/** @description Information about whether price comparison service is active. */
|
|
7166
|
+
active?: string}>;
|
|
7167
|
+
/** @description Content of the column "Product or service name" on sales documents. */
|
|
7168
|
+
inv_prod_name_templace: string;
|
|
7169
|
+
/** @description List of document printers. */
|
|
7170
|
+
printers: {
|
|
7171
|
+
/** @example 1 */
|
|
7172
|
+
id: number;
|
|
7173
|
+
/** @example name */
|
|
7174
|
+
name: string;
|
|
7175
|
+
/** @example address */
|
|
7176
|
+
address: string;
|
|
7177
|
+
/** @example key */
|
|
7178
|
+
key: string;
|
|
7179
|
+
}[];
|
|
7180
|
+
/** @description List of fiscal printers. */
|
|
7181
|
+
fiscal_printers: {
|
|
7182
|
+
/** @example 1 */
|
|
7183
|
+
id: number;
|
|
7184
|
+
/** @example name */
|
|
7185
|
+
name: string;
|
|
7186
|
+
/** @example address */
|
|
7187
|
+
address: string;
|
|
7188
|
+
/** @example key */
|
|
7189
|
+
key: string;
|
|
7190
|
+
}[];
|
|
7191
|
+
/** @description Monitoring address protocol from the main Printer window. */
|
|
7192
|
+
typeOfPrinterProtocolAdress: string;
|
|
6895
7193
|
};
|
|
6896
7194
|
|
|
6897
7195
|
export type GetSystemUnitsResponse = {
|
|
@@ -9274,7 +9572,7 @@ export type GetRegulationsHistoryResponse = {
|
|
|
9274
9572
|
/** @description User. */
|
|
9275
9573
|
user: string;
|
|
9276
9574
|
/** @description Change type. */
|
|
9277
|
-
changeType: "auto" | "user";
|
|
9575
|
+
changeType: "" | "auto" | "user";
|
|
9278
9576
|
/** @description Change source (y - auto, m - markdown editor, n - WYSIWYG/HTML editor). */
|
|
9279
9577
|
isDefault: "y" | "m" | "n";
|
|
9280
9578
|
/** @description Setting to check if revision was published in shop. */
|
|
@@ -9282,17 +9580,7 @@ export type GetRegulationsHistoryResponse = {
|
|
|
9282
9580
|
/** @description 2-letter ISO country code. */
|
|
9283
9581
|
country: string;
|
|
9284
9582
|
}[];
|
|
9285
|
-
pagination:
|
|
9286
|
-
/** @description Pagination settings. */
|
|
9287
|
-
appliedFilter: {
|
|
9288
|
-
/** @description Page index (starting from 0)
|
|
9289
|
-
* @default 0 */
|
|
9290
|
-
page: number;
|
|
9291
|
-
/** @description Number of records per page.
|
|
9292
|
-
* @default 100 */
|
|
9293
|
-
perPage: number;
|
|
9294
|
-
};
|
|
9295
|
-
};
|
|
9583
|
+
pagination: PagedResponse;
|
|
9296
9584
|
};
|
|
9297
9585
|
|
|
9298
9586
|
export { };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { SearchProductsResponse } from "./responses.d.ts"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/** @description The method allows
|
|
24
|
-
|
|
25
|
-
/** @description
|
|
26
|
-
|
|
27
|
-
/** @description
|
|
28
|
-
|
|
29
|
-
/** @description
|
|
30
|
-
|
|
31
|
-
/** @description
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/** @description Get first item (description, series, parameter name or value) with the selected langId */
|
|
36
|
-
const getLangData: GetLangDataFunction;
|
|
37
|
-
/** @description Modifies product response by removing all parameter names nad values that are not in selected langId */
|
|
38
|
-
const clearParametersLangData: ClearParametersLangDataFunction;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default utils;
|
|
1
|
+
import { ENUMS } from "./enums";
|
|
2
|
+
import type { SearchProductsResponse, GetRmaResponse } from "./responses.d.ts";
|
|
3
|
+
type IdosellProduct = SearchProductsResponse['results'][0];
|
|
4
|
+
type GetIaICodeFunction = (_productId: number | string, _sizeId: string) => string;
|
|
5
|
+
type SumProductQuantitiesFunction = (_productStocksData: IdosellProduct['productStocksData'], _stockType?: ENUMS.PRODUCT_SIZE_COUNTABLE | `${ENUMS.PRODUCT_SIZE_COUNTABLE}`) => number;
|
|
6
|
+
type MapSizeQuantitesFunction = (_product: IdosellProduct, _stockType?: `${ENUMS.PRODUCT_SIZE_COUNTABLE}`, _indexBy?: `${ENUMS.PRODUCE_SIZE_INDEX}`) => Record<string, number>;
|
|
7
|
+
type MapProductCodesFunction = (_product: IdosellProduct, _codeType?: `${ENUMS.PRODUCT_SIZE_CODES}`, _indexBy?: `${ENUMS.PRODUCE_SIZE_INDEX}`) => Record<string, string>;
|
|
8
|
+
type MapProductAllCodesFunction = (_product: IdosellProduct, _indexBy?: `${ENUMS.PRODUCE_SIZE_INDEX}`) => Record<string, string[]>;
|
|
9
|
+
type MapProductLocationsFunction = (_product: IdosellProduct, _stockId?: number, _codeType?: `${ENUMS.PRODUCT_SIZE_LOCATIONS}`, _indexBy?: `${ENUMS.PRODUCE_SIZE_INDEX}`) => Record<string, string[]>;
|
|
10
|
+
type GetLangDataFunction = <T extends {
|
|
11
|
+
langId: string;
|
|
12
|
+
}>(_array: T[], _langId?: string) => T | undefined;
|
|
13
|
+
type ClearParametersLangDataFunction = (_products: SearchProductsResponse['results'], _langId?: string) => SearchProductsResponse['results'];
|
|
14
|
+
declare const _default: {
|
|
15
|
+
/** @description The method allows you to build an IAI code from the product ID and size ID. */
|
|
16
|
+
getIaiCode: GetIaICodeFunction;
|
|
17
|
+
/** @description The method allows you to sum up the current stock levels: warehouses, available stocks, etc. */
|
|
18
|
+
sumProductQuantities: SumProductQuantitiesFunction;
|
|
19
|
+
/** @description The method allows mapping the sum of the current stock levels (in warehouses, at disposal, etc.) divided into sizes */
|
|
20
|
+
mapSizeQuantites: MapSizeQuantitesFunction;
|
|
21
|
+
/** @description The method allows mapping the producers's or external system's codes stored in the system to SKUs */
|
|
22
|
+
mapProductCodes: MapProductCodesFunction;
|
|
23
|
+
/** @description The method allows mapping all known codes: IAI code, manufacturer code or external code as an array */
|
|
24
|
+
mapAllProductCodes: MapProductAllCodesFunction;
|
|
25
|
+
/** @description This method allows you to map product locations stored in the system, broken down by size. You can select a specific warehouse or list all of them, both primary and secondary. */
|
|
26
|
+
mapProductLocations: MapProductLocationsFunction;
|
|
27
|
+
/** @description Get first item (description, series, parameter name or value) with the selected langId */
|
|
28
|
+
getLangData: GetLangDataFunction;
|
|
29
|
+
/** @description Modifies product response by removing all parameter names nad values that are not in selected langId */
|
|
30
|
+
clearParametersLangData: ClearParametersLangDataFunction;
|
|
31
|
+
/** @description Removes attachments to RMA that are returned by default, helps to reduce data if serialized or forwarded */
|
|
32
|
+
removeRmaAttachments: (rmaResponse: GetRmaResponse) => GetRmaResponse;
|
|
33
|
+
};
|
|
34
|
+
export default _default;
|
package/dist/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -7,18 +7,15 @@ const INDEX = ENUMS.PRODUCE_SIZE_INDEX;
|
|
|
7
7
|
|
|
8
8
|
test('Utils mapAllProductCodes by ID', () => {
|
|
9
9
|
const codes = utils.mapAllProductCodes(STOCK_PRODUCT, INDEX.ID)
|
|
10
|
-
console.log(JSON.stringify(codes));
|
|
11
10
|
expect(codes).toEqual({"3":["1234-3","1234567890128","PX-ZERO-S"],"4":["1234-4","1234567890135","PX-ZERO-M"],"5":["1234-5","1234567890142","PX-ZERO-L"],"6":["1234-6","1234567890159","PX-ZERO-X"]});
|
|
12
11
|
})
|
|
13
12
|
|
|
14
13
|
test('Utils mapAllProductCodes by IAI code', () => {
|
|
15
14
|
const codes = utils.mapAllProductCodes(STOCK_PRODUCT, INDEX.IAI_CODE)
|
|
16
|
-
console.log(JSON.stringify(codes));
|
|
17
15
|
expect(codes).toEqual({"1234-3":["1234-3","1234567890128","PX-ZERO-S"],"1234-4":["1234-4","1234567890135","PX-ZERO-M"],"1234-5":["1234-5","1234567890142","PX-ZERO-L"],"1234-6":["1234-6","1234567890159","PX-ZERO-X"]});
|
|
18
16
|
})
|
|
19
17
|
|
|
20
18
|
test('Utils mapAllProductCodes by name', () => {
|
|
21
19
|
const codes = utils.mapAllProductCodes(STOCK_PRODUCT, INDEX.NAME)
|
|
22
|
-
console.log(JSON.stringify(codes));
|
|
23
20
|
expect(codes).toEqual({"S":["1234-3","1234567890128","PX-ZERO-S"],"M":["1234-4","1234567890135","PX-ZERO-M"],"L":["1234-5","1234567890142","PX-ZERO-L"],"XL":["1234-6","1234567890159","PX-ZERO-X"]});
|
|
24
21
|
})
|