Skip to content

Commit 67b0eab

Browse files
authored
feat(specs): update shopify source and task inputs (#2987)
1 parent 2d4c430 commit 67b0eab

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed

specs/ingestion/common/schemas/source.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ SourceInput:
414414
- $ref: '#/SourceBigQuery'
415415
- $ref: '#/SourceGA4BigQueryExport'
416416
- $ref: '#/SourceDocker'
417+
- $ref: '#/SourceShopify'
417418

418419
SourceUpdateCommercetools:
419420
type: object
@@ -449,7 +450,77 @@ SourceUpdateInput:
449450
- $ref: '#/SourceBigQuery'
450451
- $ref: '#/SourceGA4BigQueryExport'
451452
- $ref: '#/SourceUpdateDocker'
453+
- $ref: '#/SourceUpdateShopify'
452454

453455
DockerSourceStream:
454456
type: object
455457
description: Stream definition (see the Singer specification for details).
458+
459+
SourceUpdateShopify:
460+
title: Shopify
461+
type: object
462+
additionalProperties: false
463+
properties:
464+
collectionIDIndexing:
465+
type: boolean
466+
default: false
467+
description: |
468+
Whether to index collection IDs.
469+
470+
If your store has `has_collection_search_page` set to true,
471+
collection IDs will be indexed even if `collectionIDIndexing` is false.
472+
increaseProductCollectionLimit:
473+
type: boolean
474+
default: false
475+
description: |
476+
Whether to increase the number of indexed collections per product.
477+
If true, Algolia indexes 200 collections per product.
478+
If false, 100 collections per product are indexed.
479+
defaultPriceRatioAsOne:
480+
type: boolean
481+
default: true
482+
description: |
483+
Whether to set the default price ratio to 1 if no sale price is present.
484+
485+
The price ratio is determined by the ratio: `sale_price` / `regular_price`.
486+
If no sale price is present, the price ratio would be 0.
487+
If `defaultPriceRatioAsOne` is true, the price ratio is indexed as 1 instead.
488+
excludeOOSVariantsForPriceAtTRS:
489+
type: boolean
490+
default: true
491+
description: |
492+
Whether to exclude out-of-stock variants when determining the `max_variant_price` and `min_variant_price` attributes.
493+
includeVariantsInventory:
494+
type: boolean
495+
default: true
496+
description: |
497+
Whether to include an inventory with every variant for every product record.
498+
hasCollectionSearchPage:
499+
type: boolean
500+
default: false
501+
description: |
502+
Whether to include collection IDs and handles in the product records.
503+
productNamedTags:
504+
type: boolean
505+
default: false
506+
description: |
507+
Whether to convert tags on products to named tags.
508+
509+
To learn more, see [Named tags](https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/named-tags).
510+
511+
SourceShopify:
512+
allOf:
513+
- $ref: '#/SourceUpdateShopify'
514+
- $ref: '#/sourceShopifyBase'
515+
516+
sourceShopifyBase:
517+
type: object
518+
additionalProperties: false
519+
properties:
520+
shopURL:
521+
type: string
522+
description: URL of the Shopify store.
523+
required:
524+
- shopURL
525+
x-discriminator-fields:
526+
- shopURL

specs/ingestion/common/schemas/task.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ TaskInput:
145145
- $ref: '#/OnDemandDateUtilsInput'
146146
- $ref: '#/ScheduleDateUtilsInput'
147147
- $ref: '#/StreamingUtilsInput'
148+
- $ref: '#/ShopifyInput'
148149

149150
TriggerInput:
150151
type: object
@@ -410,3 +411,57 @@ failureThreshold:
410411
minimum: 0
411412
maximum: 100
412413
description: Maximum accepted percentage of failures for a task run to finish successfully.
414+
415+
ShopifyInput:
416+
title: Shopify input
417+
type: object
418+
additionalProperties: false
419+
description: Represents the required elements of the task input when using a `shopify` source.
420+
properties:
421+
metafields:
422+
type: array
423+
items:
424+
$ref: '#/ShopifyMetafield'
425+
market:
426+
$ref: '#/ShopifyMarket'
427+
required:
428+
- metafields
429+
- market
430+
431+
ShopifyMetafield:
432+
type: object
433+
additionalProperties: false
434+
description: Represents a metafield in Shopify.
435+
properties:
436+
namespace:
437+
type: string
438+
key:
439+
type: string
440+
value:
441+
type: string
442+
required:
443+
- namespace
444+
- key
445+
- value
446+
447+
ShopifyMarket:
448+
type: object
449+
additionalProperties: false
450+
description: Represents a market in Shopify.
451+
properties:
452+
countries:
453+
type: array
454+
items:
455+
type: string
456+
currencies:
457+
type: array
458+
items:
459+
type: string
460+
locales:
461+
type: array
462+
items:
463+
type: string
464+
required:
465+
- countries
466+
- currencies
467+
- locales

0 commit comments

Comments
 (0)