@@ -272,132 +272,6 @@ declare global {
272
272
executionContext : ExecutionContext ;
273
273
}
274
274
275
- export interface Product {
276
- name : string ;
277
- sku : string ;
278
- addToCartAllowed : boolean ;
279
- inStock : boolean | null ;
280
- shortDescription ?: string ;
281
- metaDescription ?: string ;
282
- metaKeyword ?: string ;
283
- metaTitle ?: string ;
284
- description ?: string ;
285
- images : Image [ ] ;
286
- prices : Prices ;
287
- attributes : Attribute [ ] ;
288
- options : ProductOption [ ] ;
289
- url ?: string ;
290
- urlKey ?: string ;
291
- externalId ?: string ;
292
- variants ?: Variant [ ] ; // variants exist on products in helix commerce but not on magento
293
- specialToDate ?: string ;
294
- rating ?: Rating ;
295
- links ?: Link [ ] ;
296
-
297
- // Coming only from Catalog Service at the time of writing:
298
- lastModifiedAt ?: string ;
299
-
300
- // not handled currently:
301
- externalParentId ?: string ;
302
- variantSku ?: string ;
303
- optionUIDs ?: string [ ] ;
304
-
305
- // internal use:
306
- attributeMap : Record < string , string > ;
307
- }
308
-
309
- export interface Variant {
310
- sku : string ;
311
- name : string ;
312
- description ?: string ;
313
- url : string ;
314
- inStock : boolean ;
315
- images : Image [ ] ;
316
- prices : Pick < Prices , 'regular' | 'final' > ;
317
- selections : string [ ] ;
318
- attributes : Attribute [ ] ;
319
- externalId : string ;
320
- specialToDate ?: string ;
321
- gtin ?: string ;
322
- rating ?: Rating ;
323
-
324
- // internal use:
325
- attributeMap : Record < string , string > ;
326
- }
327
-
328
- interface Rating {
329
- // number of ratings
330
- count ?: number ;
331
- // number of reviews
332
- reviews ?: number ;
333
- // rating value
334
- value : number | string ;
335
- // range of ratings, highest
336
- best ?: number | string ;
337
- // range of ratings, lowest
338
- worst ?: number | string ;
339
- }
340
-
341
- interface Link {
342
- types : string [ ] ;
343
- sku : string ;
344
- urlKey : string ;
345
- prices : Prices ;
346
- }
347
-
348
- interface Image {
349
- url : string ;
350
- label : string ;
351
- roles : string [ ] ;
352
- }
353
-
354
- interface Price {
355
- amount ?: number ;
356
- currency ?: string ;
357
- maximumAmount ?: number ;
358
- minimumAmount ?: number ;
359
- variant ?: 'default' | 'strikethrough' ;
360
- }
361
-
362
- interface Prices {
363
- regular : Price ;
364
- final : Price ;
365
- visible : boolean ;
366
- }
367
-
368
- export interface ProductOption {
369
- id : string ;
370
- type : 'text' | 'image' | 'color' | 'dropdown' ;
371
- typename :
372
- | 'ProductViewOptionValueProduct'
373
- | 'ProductViewOptionValueSwatch'
374
- | 'ProductViewOptionValueConfiguration' ;
375
- label : string ;
376
- required : boolean ;
377
- multiple : boolean ;
378
- items : OptionValue [ ] ;
379
- }
380
-
381
- interface OptionValue {
382
- id : string ;
383
- label : string ;
384
- inStock : boolean ;
385
- value : string ;
386
- selected : boolean ;
387
- type : string ;
388
- product ?: {
389
- name : string ;
390
- sku : string ;
391
- prices ?: Prices ;
392
- } ;
393
- }
394
-
395
- interface Attribute {
396
- name : string ;
397
- label : string ;
398
- value : string ;
399
- }
400
-
401
275
interface BatchResult {
402
276
sku : string ;
403
277
status : number ;
0 commit comments