@wix/stores 1.0.4 → 1.0.6

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.
Files changed (89) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js +2 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
  5. package/build/cjs/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +47 -44
  6. package/build/cjs/src/stores-catalog-v1-collection.http.js.map +1 -0
  7. package/build/cjs/src/stores-catalog-v1-collection.public.d.ts +5 -0
  8. package/build/cjs/src/stores-catalog-v1-collection.public.js +20 -0
  9. package/build/cjs/src/stores-catalog-v1-collection.public.js.map +1 -0
  10. package/build/cjs/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
  11. package/build/cjs/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
  12. package/build/cjs/src/stores-catalog-v1-collection.types.js.map +1 -0
  13. package/build/cjs/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
  14. package/build/cjs/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +55 -55
  15. package/build/cjs/src/stores-catalog-v1-collection.universal.js.map +1 -0
  16. package/build/cjs/src/stores-catalog-v1-product.http.d.ts +62 -0
  17. package/build/cjs/src/stores-catalog-v1-product.http.js +775 -0
  18. package/build/cjs/src/stores-catalog-v1-product.http.js.map +1 -0
  19. package/build/cjs/src/stores-catalog-v1-product.public.d.ts +25 -0
  20. package/build/cjs/src/stores-catalog-v1-product.public.js +139 -0
  21. package/build/cjs/src/stores-catalog-v1-product.public.js.map +1 -0
  22. package/build/cjs/src/stores-catalog-v1-product.types.d.ts +1371 -0
  23. package/build/cjs/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
  24. package/build/cjs/src/stores-catalog-v1-product.types.js.map +1 -0
  25. package/build/cjs/src/stores-catalog-v1-product.universal.d.ts +1744 -0
  26. package/build/cjs/src/stores-catalog-v1-product.universal.js +1155 -0
  27. package/build/cjs/src/stores-catalog-v1-product.universal.js.map +1 -0
  28. package/build/es/index.d.ts +2 -2
  29. package/build/es/index.js +2 -2
  30. package/build/es/index.js.map +1 -1
  31. package/build/es/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
  32. package/build/es/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +44 -41
  33. package/build/es/src/stores-catalog-v1-collection.http.js.map +1 -0
  34. package/build/es/src/stores-catalog-v1-collection.public.d.ts +5 -0
  35. package/build/es/src/stores-catalog-v1-collection.public.js +13 -0
  36. package/build/es/src/stores-catalog-v1-collection.public.js.map +1 -0
  37. package/build/es/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
  38. package/build/es/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
  39. package/build/es/src/stores-catalog-v1-collection.types.js.map +1 -0
  40. package/build/es/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
  41. package/build/es/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +53 -53
  42. package/build/es/src/stores-catalog-v1-collection.universal.js.map +1 -0
  43. package/build/es/src/stores-catalog-v1-product.http.d.ts +62 -0
  44. package/build/es/src/stores-catalog-v1-product.http.js +751 -0
  45. package/build/es/src/stores-catalog-v1-product.http.js.map +1 -0
  46. package/build/es/src/stores-catalog-v1-product.public.d.ts +25 -0
  47. package/build/es/src/stores-catalog-v1-product.public.js +108 -0
  48. package/build/es/src/stores-catalog-v1-product.public.js.map +1 -0
  49. package/build/es/src/stores-catalog-v1-product.types.d.ts +1371 -0
  50. package/build/es/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
  51. package/build/es/src/stores-catalog-v1-product.types.js.map +1 -0
  52. package/build/es/src/stores-catalog-v1-product.universal.d.ts +1744 -0
  53. package/build/es/src/stores-catalog-v1-product.universal.js +1112 -0
  54. package/build/es/src/stores-catalog-v1-product.universal.js.map +1 -0
  55. package/package.json +2 -2
  56. package/build/cjs/src/stores-poc-v1-collection.http.js.map +0 -1
  57. package/build/cjs/src/stores-poc-v1-collection.public.d.ts +0 -6
  58. package/build/cjs/src/stores-poc-v1-collection.public.js +0 -20
  59. package/build/cjs/src/stores-poc-v1-collection.public.js.map +0 -1
  60. package/build/cjs/src/stores-poc-v1-collection.types.js.map +0 -1
  61. package/build/cjs/src/stores-poc-v1-collection.universal.js.map +0 -1
  62. package/build/cjs/src/stores-poc-v1-product.http.d.ts +0 -4
  63. package/build/cjs/src/stores-poc-v1-product.http.js +0 -143
  64. package/build/cjs/src/stores-poc-v1-product.http.js.map +0 -1
  65. package/build/cjs/src/stores-poc-v1-product.public.d.ts +0 -6
  66. package/build/cjs/src/stores-poc-v1-product.public.js +0 -25
  67. package/build/cjs/src/stores-poc-v1-product.public.js.map +0 -1
  68. package/build/cjs/src/stores-poc-v1-product.types.d.ts +0 -470
  69. package/build/cjs/src/stores-poc-v1-product.types.js.map +0 -1
  70. package/build/cjs/src/stores-poc-v1-product.universal.d.ts +0 -549
  71. package/build/cjs/src/stores-poc-v1-product.universal.js +0 -212
  72. package/build/cjs/src/stores-poc-v1-product.universal.js.map +0 -1
  73. package/build/es/src/stores-poc-v1-collection.http.js.map +0 -1
  74. package/build/es/src/stores-poc-v1-collection.public.d.ts +0 -6
  75. package/build/es/src/stores-poc-v1-collection.public.js +0 -13
  76. package/build/es/src/stores-poc-v1-collection.public.js.map +0 -1
  77. package/build/es/src/stores-poc-v1-collection.types.js.map +0 -1
  78. package/build/es/src/stores-poc-v1-collection.universal.js.map +0 -1
  79. package/build/es/src/stores-poc-v1-product.http.d.ts +0 -4
  80. package/build/es/src/stores-poc-v1-product.http.js +0 -138
  81. package/build/es/src/stores-poc-v1-product.http.js.map +0 -1
  82. package/build/es/src/stores-poc-v1-product.public.d.ts +0 -6
  83. package/build/es/src/stores-poc-v1-product.public.js +0 -13
  84. package/build/es/src/stores-poc-v1-product.public.js.map +0 -1
  85. package/build/es/src/stores-poc-v1-product.types.d.ts +0 -470
  86. package/build/es/src/stores-poc-v1-product.types.js.map +0 -1
  87. package/build/es/src/stores-poc-v1-product.universal.d.ts +0 -549
  88. package/build/es/src/stores-poc-v1-product.universal.js +0 -188
  89. package/build/es/src/stores-poc-v1-product.universal.js.map +0 -1
@@ -1,549 +0,0 @@
1
- export declare const __debug: {
2
- verboseLogging: {
3
- on: () => boolean;
4
- off: () => boolean;
5
- };
6
- };
7
- export interface Product {
8
- /**
9
- * Product ID (generated automatically by the catalog).
10
- * @readonly
11
- */
12
- _id?: string;
13
- /** Product name. */
14
- name?: string | null;
15
- /** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
16
- slug?: string;
17
- /** Whether the product is visible to site visitors. */
18
- visible?: boolean | null;
19
- /** Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. */
20
- productType?: ProductType;
21
- /** Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). */
22
- description?: string | null;
23
- /** Stock keeping unit (if variant management is enabled, SKUs will be set per variant, and this field will be empty). */
24
- sku?: string | null;
25
- /** Product weight (if variant management is enabled, weight will be set per variant, and this field will be empty). */
26
- weight?: number | null;
27
- /**
28
- * Product weight range. The minimum and maximum weights of all the variants.
29
- * com.wix.ecommerce.catalog_spi.api.v1.NumericPropertyRange weight_range = 32 [(wix.api.readOnly) = true];
30
- * Product inventory status (in future this will be writable via Inventory API).
31
- * @readonly
32
- */
33
- stock?: Stock;
34
- /**
35
- * Deprecated (use `priceData` instead).
36
- * @readonly
37
- */
38
- price?: PriceData;
39
- /** Price data. */
40
- priceData?: PriceData;
41
- /**
42
- * Price data, converted to the currency specified in request header.
43
- * @readonly
44
- */
45
- convertedPriceData?: PriceData;
46
- /**
47
- * Product price range. The minimum and maximum prices of all the variants.
48
- * com.wix.ecommerce.catalog_spi.api.v1.NumericPropertyRange price_range = 31 [(wix.api.readOnly) = true];
49
- * Cost and profit data.
50
- */
51
- costAndProfitData?: CostAndProfitData;
52
- /**
53
- * Product cost range. The minimum and maximum costs of all the variants.
54
- * com.wix.ecommerce.catalog_spi.api.v1.NumericPropertyRange cost_range = 33 [(wix.api.readOnly) = true];
55
- * Price per unit data.
56
- */
57
- pricePerUnitData?: PricePerUnitData;
58
- /**
59
- * Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). Currently writable only from the UI.
60
- * @readonly
61
- */
62
- additionalInfoSections?: AdditionalInfoSection[];
63
- /**
64
- * Deprecated (use `ribbon` instead).
65
- * @readonly
66
- */
67
- ribbons?: Ribbon[];
68
- /**
69
- * Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint).
70
- * @readonly
71
- */
72
- media?: Media;
73
- /**
74
- * Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
75
- * @readonly
76
- */
77
- customTextFields?: CustomTextField[];
78
- /** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. */
79
- manageVariants?: boolean | null;
80
- /** Options (color, size, etc) for this product. */
81
- productOptions?: ProductOption[];
82
- /**
83
- * Product page URL for this product (generated automatically by the server).
84
- * @readonly
85
- */
86
- productPageUrl?: PageUrl;
87
- /**
88
- * Product’s unique numeric ID (assigned in ascending order).
89
- * Primarily used for sorting and filtering when crawling all products.
90
- * @readonly
91
- */
92
- numericId?: string;
93
- /**
94
- * Inventory item ID - ID referencing the inventory system.
95
- * @readonly
96
- */
97
- inventoryItemId?: string;
98
- /** Discount deducted from the product's original price. */
99
- discount?: Discount;
100
- /**
101
- * A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
102
- * @readonly
103
- */
104
- collectionIds?: string[];
105
- /**
106
- * Product variants, will be provided if the the request was sent with the includeVariants flag.
107
- * @readonly
108
- */
109
- variants?: Variant[];
110
- /**
111
- * Date and time the product was last updated.
112
- * google.protobuf.Timestamp last_updated = 24 [(wix.api.readOnly) = true];
113
- * Date and time the product was created.
114
- * google.protobuf.Timestamp created_date = 34 [(wix.api.readOnly) = true];
115
- * Custom SEO data for the product.
116
- * com.wixpress.advanced.seo.SeoSchema seo_data = 27;
117
- * Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out".
118
- */
119
- ribbon?: string | null;
120
- /** Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). */
121
- brand?: string | null;
122
- }
123
- export declare enum ProductType {
124
- unspecified_product_type = "unspecified_product_type",
125
- physical = "physical",
126
- digital = "digital"
127
- }
128
- export interface Stock {
129
- /** Whether inventory is being tracked */
130
- trackInventory?: boolean;
131
- /** Quantity currently left in inventory */
132
- quantity?: number | null;
133
- /**
134
- * Whether the product is currently in stock (relevant only when tracking manually)
135
- * Deprecated (use `inventoryStatus` instead)
136
- */
137
- inStock?: boolean;
138
- /**
139
- * The current status of the inventory
140
- * + `IN_STOCK` - In stock
141
- * + `OUT_OF_STOCK` - Not in stock
142
- * + `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock
143
- */
144
- inventoryStatus?: InventoryStatus;
145
- }
146
- export declare enum InventoryStatus {
147
- IN_STOCK = "IN_STOCK",
148
- OUT_OF_STOCK = "OUT_OF_STOCK",
149
- PARTIALLY_OUT_OF_STOCK = "PARTIALLY_OUT_OF_STOCK"
150
- }
151
- export interface PriceData {
152
- /**
153
- * Product price currency
154
- * @readonly
155
- */
156
- currency?: string;
157
- /** Product price */
158
- price?: number | null;
159
- /**
160
- * Discounted product price (if no discounted price is set, the product price is returned)
161
- * @readonly
162
- */
163
- discountedPrice?: number;
164
- /**
165
- * The product price and discounted price, formatted with the currency
166
- * @readonly
167
- */
168
- formatted?: FormattedPrice;
169
- /**
170
- * Price per unit
171
- * @readonly
172
- */
173
- pricePerUnit?: number | null;
174
- }
175
- export interface FormattedPrice {
176
- /** Product price formatted with the currency */
177
- price?: string;
178
- /** Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned) */
179
- discountedPrice?: string;
180
- /**
181
- * Price per unit
182
- * @readonly
183
- */
184
- pricePerUnit?: string | null;
185
- }
186
- export interface CostAndProfitData {
187
- /** Item cost. */
188
- itemCost?: number | null;
189
- /**
190
- * Item cost formatted with currency symbol.
191
- * @readonly
192
- */
193
- formattedItemCost?: string;
194
- /**
195
- * Profit. Calculated by reducing `cost` from `discounted_price`.
196
- * @readonly
197
- */
198
- profit?: number;
199
- /**
200
- * Profit formatted with currency symbol.
201
- * @readonly
202
- */
203
- formattedProfit?: string;
204
- /**
205
- * Profit Margin. Calculated by dividing `profit` by `discounted_price`.
206
- * The result is rounded to 4 decimal places.
207
- * @readonly
208
- */
209
- profitMargin?: number;
210
- }
211
- export interface PricePerUnitData {
212
- /** Total quantity */
213
- totalQuantity?: number;
214
- /** Total measurement unit */
215
- totalMeasurementUnit?: MeasurementUnit;
216
- /** Base quantity */
217
- baseQuantity?: number;
218
- /** Base measurement unit */
219
- baseMeasurementUnit?: MeasurementUnit;
220
- }
221
- export declare enum MeasurementUnit {
222
- UNSPECIFIED = "UNSPECIFIED",
223
- ML = "ML",
224
- CL = "CL",
225
- L = "L",
226
- CBM = "CBM",
227
- MG = "MG",
228
- G = "G",
229
- KG = "KG",
230
- MM = "MM",
231
- CM = "CM",
232
- M = "M",
233
- SQM = "SQM",
234
- OZ = "OZ",
235
- LB = "LB",
236
- FLOZ = "FLOZ",
237
- PT = "PT",
238
- QT = "QT",
239
- GAL = "GAL",
240
- IN = "IN",
241
- FT = "FT",
242
- YD = "YD",
243
- SQFT = "SQFT"
244
- }
245
- export interface AdditionalInfoSection {
246
- /** Product info section title */
247
- title?: string;
248
- /** Product info section description */
249
- description?: string;
250
- }
251
- export interface Ribbon {
252
- /** Ribbon text */
253
- text?: string;
254
- }
255
- export interface Media {
256
- /** Primary media (image, video etc) associated with this product. */
257
- mainMedia?: MediaItem;
258
- /** Media (images, videos etc) associated with this product. */
259
- items?: MediaItem[];
260
- }
261
- export interface MediaItem extends MediaItemItemOneOf {
262
- /** Media item thumbnail details. */
263
- thumbnail?: MediaItemUrlAndSize;
264
- /** Media item type (image, video, etc.). */
265
- mediaType?: MediaItemType;
266
- /** Media item title. */
267
- title?: string;
268
- /** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
269
- _id?: string;
270
- /** Image data (URL, size). */
271
- image?: MediaItemUrlAndSize;
272
- /** Video data (URL, size). */
273
- video?: MediaItemVideo;
274
- }
275
- /** @oneof */
276
- export interface MediaItemItemOneOf {
277
- /** Image data (URL, size). */
278
- image?: MediaItemUrlAndSize;
279
- /** Video data (URL, size). */
280
- video?: MediaItemVideo;
281
- }
282
- export interface MediaItemUrlAndSize {
283
- /** Media item URL. */
284
- url?: string;
285
- /** Media item width. */
286
- width?: number;
287
- /** Media item height. */
288
- height?: number;
289
- /** Media format (mp4, png, etc.). */
290
- format?: string | null;
291
- /** Alt text. This text will be shown in case the image is not available. */
292
- altText?: string | null;
293
- }
294
- export declare enum MediaItemType {
295
- unspecified_media_item_type = "unspecified_media_item_type",
296
- image = "image",
297
- video = "video",
298
- audio = "audio",
299
- document = "document",
300
- zip = "zip"
301
- }
302
- export interface MediaItemVideo {
303
- /** Data (URL, size) about each resolution for which this video is available. */
304
- files?: MediaItemUrlAndSize[];
305
- /** ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. */
306
- stillFrameMediaId?: string;
307
- }
308
- export interface CustomTextField {
309
- /** Text box title */
310
- title?: string;
311
- /** Text box input max length */
312
- maxLength?: number;
313
- /** Whether this text box is mandatory */
314
- mandatory?: boolean;
315
- }
316
- export interface ProductOption {
317
- /**
318
- * Option type - color or other(drop down)
319
- * @readonly
320
- */
321
- optionType?: OptionType;
322
- /** Option name (e.g., color, size) */
323
- name?: string;
324
- /** Choices available for this option */
325
- choices?: Choice[];
326
- }
327
- export declare enum OptionType {
328
- unspecified_option_type = "unspecified_option_type",
329
- drop_down = "drop_down",
330
- color = "color"
331
- }
332
- export interface Choice {
333
- /** Color hex value or choice name */
334
- value?: string;
335
- /** Choice name */
336
- description?: string;
337
- /**
338
- * Media items (images, videos) associated with this choice
339
- * @readonly
340
- */
341
- media?: Media;
342
- /**
343
- * Based on the customer’s choices, which (if any) variants that include the selected choices are in stock
344
- * @readonly
345
- */
346
- inStock?: boolean;
347
- /**
348
- * Based on the customer’s choices, which (if any) variants that include the selected choices are visible
349
- * @readonly
350
- */
351
- visible?: boolean;
352
- }
353
- export interface PageUrl {
354
- /** Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite). */
355
- base?: string;
356
- /** Path to the product page - e.g /product-page/a-product. */
357
- path?: string;
358
- }
359
- export interface Discount {
360
- /** Discount type: amount / percent */
361
- type?: DiscountType;
362
- /** Discount value */
363
- value?: number;
364
- }
365
- export declare enum DiscountType {
366
- UNDEFINED = "UNDEFINED",
367
- /** No discount */
368
- NONE = "NONE",
369
- AMOUNT = "AMOUNT",
370
- PERCENT = "PERCENT"
371
- }
372
- export interface Variant {
373
- /** Requested Variant ID */
374
- _id?: string;
375
- /** Specific choices within a selection, as option-choice key-value pairs */
376
- choices?: Record<string, string>;
377
- variant?: VariantDataWithNoStock;
378
- /**
379
- * Variant inventory status.
380
- * @readonly
381
- */
382
- stock?: VariantStock;
383
- }
384
- export interface VariantDataWithNoStock {
385
- /** Variant price. */
386
- priceData?: PriceData;
387
- /**
388
- * Variant price data, converted to currency requested in header.
389
- * @readonly
390
- */
391
- convertedPriceData?: PriceData;
392
- /** Cost and profit data. */
393
- costAndProfitData?: CostAndProfitData;
394
- /** Variant weight. */
395
- weight?: number;
396
- /** Variant SKU (stock keeping unit). */
397
- sku?: string;
398
- /** Whether the variant is visible to customers. */
399
- visible?: boolean;
400
- }
401
- export interface VariantStock {
402
- /** Whether inventory is being tracked. */
403
- trackQuantity?: boolean;
404
- /** Quantity currently left in inventory. */
405
- quantity?: number | null;
406
- /** Whether the product is currently in stock (relevant only when tracking manually). */
407
- inStock?: boolean;
408
- }
409
- export interface GetProductRequest {
410
- /** Requested product ID. */
411
- productId: string;
412
- /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
413
- includeMerchantSpecificData?: boolean;
414
- }
415
- export interface GetProductResponse {
416
- /** Requested product data. */
417
- product?: Product;
418
- }
419
- export interface QueryProductsRequest {
420
- query?: PlatformQuery;
421
- /** Whether variants should be included in the response. */
422
- includeVariants?: boolean;
423
- /** Whether hidden products should be included in the response. Requires permissions to manage products. */
424
- includeHiddenProducts?: boolean;
425
- /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
426
- includeMerchantSpecificData?: boolean;
427
- }
428
- export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
429
- /** Filter object. */
430
- filter?: Record<string, any> | null;
431
- /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
432
- sort?: Sorting[];
433
- /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
434
- paging?: PlatformPaging;
435
- }
436
- /** @oneof */
437
- export interface PlatformQueryPagingMethodOneOf {
438
- /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
439
- paging?: PlatformPaging;
440
- }
441
- export interface Sorting {
442
- /** Name of the field to sort by. */
443
- fieldName?: string;
444
- /** Sort order. */
445
- order?: SortOrder;
446
- }
447
- export declare enum SortOrder {
448
- ASC = "ASC",
449
- DESC = "DESC"
450
- }
451
- export interface PlatformPaging {
452
- /** Number of items to load. */
453
- limit?: number | null;
454
- /** Number of items to skip in the current sort order. */
455
- offset?: number | null;
456
- }
457
- export interface QueryProductsResponse {
458
- products?: Product[];
459
- metadata?: PlatformPagingMetadata;
460
- }
461
- export interface PlatformPagingMetadata {
462
- /** The number of items returned in this response. */
463
- count?: number | null;
464
- /** The offset which was requested. Returned if offset paging was used. */
465
- offset?: number | null;
466
- /** The total number of items that match the query. Returned if offset paging was used. */
467
- total?: number | null;
468
- /** Cursors to navigate through result pages. Returned if cursor paging was used. */
469
- cursors?: Cursors;
470
- }
471
- export interface Cursors {
472
- /** Cursor pointing to next page in the list of results. */
473
- next?: string | null;
474
- /** Cursor pointing to previous page in the list of results. */
475
- prev?: string | null;
476
- }
477
- /** @param productId - Requested product ID.
478
- * @public
479
- * @requiredField productId
480
- * @returns Requested product data.
481
- */
482
- export declare function getProduct(productId: string, options?: GetProductOptions): Promise<Product>;
483
- export interface GetProductOptions {
484
- /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
485
- includeMerchantSpecificData?: boolean;
486
- }
487
- /** @public */
488
- export declare function queryProducts(): ProductsQueryBuilder;
489
- interface QueryOffsetResult {
490
- currentPage: number;
491
- totalPages: number;
492
- totalCount: number;
493
- hasNext: () => boolean;
494
- hasPrev: () => boolean;
495
- length: number;
496
- pageSize: number;
497
- }
498
- export interface ProductsQueryResult extends QueryOffsetResult {
499
- items: Product[];
500
- query: ProductsQueryBuilder;
501
- next: () => Promise<ProductsQueryResult>;
502
- prev: () => Promise<ProductsQueryResult>;
503
- }
504
- export interface ProductsQueryBuilder {
505
- /** @param propertyName - Property whose value is compared with `value`.
506
- * @param value - Value to compare against.
507
- */
508
- eq: (propertyName: string, value: any) => ProductsQueryBuilder;
509
- /** @param propertyName - Property whose value is compared with `value`.
510
- * @param value - Value to compare against.
511
- */
512
- ne: (propertyName: string, value: any) => ProductsQueryBuilder;
513
- /** @param propertyName - Property whose value is compared with `value`.
514
- * @param value - Value to compare against.
515
- */
516
- ge: (propertyName: string, value: any) => ProductsQueryBuilder;
517
- /** @param propertyName - Property whose value is compared with `value`.
518
- * @param value - Value to compare against.
519
- */
520
- gt: (propertyName: string, value: any) => ProductsQueryBuilder;
521
- /** @param propertyName - Property whose value is compared with `value`.
522
- * @param value - Value to compare against.
523
- */
524
- le: (propertyName: string, value: any) => ProductsQueryBuilder;
525
- /** @param propertyName - Property whose value is compared with `value`.
526
- * @param value - Value to compare against.
527
- */
528
- lt: (propertyName: string, value: any) => ProductsQueryBuilder;
529
- /** @param propertyName - Property whose value is compared with `string`.
530
- * @param string - String to compare against. Case-insensitive.
531
- */
532
- startsWith: (propertyName: string, value: string) => ProductsQueryBuilder;
533
- /** @param propertyName - Property whose value is compared with `values`.
534
- * @param values - List of values to compare against.
535
- */
536
- hasSome: (propertyName: string, value: any[]) => ProductsQueryBuilder;
537
- in: (propertyName: string, value: any) => ProductsQueryBuilder;
538
- exists: (propertyName: string, value: boolean) => ProductsQueryBuilder;
539
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
540
- ascending: (...propertyNames: string[]) => ProductsQueryBuilder;
541
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
542
- descending: (...propertyNames: string[]) => ProductsQueryBuilder;
543
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
544
- limit: (limit: number) => ProductsQueryBuilder;
545
- /** @param skip - Number of items to skip in the query results before returning the results. */
546
- skip: (skip: number) => ProductsQueryBuilder;
547
- find: () => Promise<ProductsQueryResult>;
548
- }
549
- export {};