Skip to content

Commit

Permalink
feat(specs): update shopify source and task inputs (#2987)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 authored Apr 15, 2024
1 parent 2d4c430 commit 67b0eab
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
71 changes: 71 additions & 0 deletions specs/ingestion/common/schemas/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ SourceInput:
- $ref: '#/SourceBigQuery'
- $ref: '#/SourceGA4BigQueryExport'
- $ref: '#/SourceDocker'
- $ref: '#/SourceShopify'

SourceUpdateCommercetools:
type: object
Expand Down Expand Up @@ -449,7 +450,77 @@ SourceUpdateInput:
- $ref: '#/SourceBigQuery'
- $ref: '#/SourceGA4BigQueryExport'
- $ref: '#/SourceUpdateDocker'
- $ref: '#/SourceUpdateShopify'

DockerSourceStream:
type: object
description: Stream definition (see the Singer specification for details).

SourceUpdateShopify:
title: Shopify
type: object
additionalProperties: false
properties:
collectionIDIndexing:
type: boolean
default: false
description: |
Whether to index collection IDs.
If your store has `has_collection_search_page` set to true,
collection IDs will be indexed even if `collectionIDIndexing` is false.
increaseProductCollectionLimit:
type: boolean
default: false
description: |
Whether to increase the number of indexed collections per product.
If true, Algolia indexes 200 collections per product.
If false, 100 collections per product are indexed.
defaultPriceRatioAsOne:
type: boolean
default: true
description: |
Whether to set the default price ratio to 1 if no sale price is present.
The price ratio is determined by the ratio: `sale_price` / `regular_price`.
If no sale price is present, the price ratio would be 0.
If `defaultPriceRatioAsOne` is true, the price ratio is indexed as 1 instead.
excludeOOSVariantsForPriceAtTRS:
type: boolean
default: true
description: |
Whether to exclude out-of-stock variants when determining the `max_variant_price` and `min_variant_price` attributes.
includeVariantsInventory:
type: boolean
default: true
description: |
Whether to include an inventory with every variant for every product record.
hasCollectionSearchPage:
type: boolean
default: false
description: |
Whether to include collection IDs and handles in the product records.
productNamedTags:
type: boolean
default: false
description: |
Whether to convert tags on products to named tags.
To learn more, see [Named tags](https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/named-tags).
SourceShopify:
allOf:
- $ref: '#/SourceUpdateShopify'
- $ref: '#/sourceShopifyBase'

sourceShopifyBase:
type: object
additionalProperties: false
properties:
shopURL:
type: string
description: URL of the Shopify store.
required:
- shopURL
x-discriminator-fields:
- shopURL
55 changes: 55 additions & 0 deletions specs/ingestion/common/schemas/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ TaskInput:
- $ref: '#/OnDemandDateUtilsInput'
- $ref: '#/ScheduleDateUtilsInput'
- $ref: '#/StreamingUtilsInput'
- $ref: '#/ShopifyInput'

TriggerInput:
type: object
Expand Down Expand Up @@ -410,3 +411,57 @@ failureThreshold:
minimum: 0
maximum: 100
description: Maximum accepted percentage of failures for a task run to finish successfully.

ShopifyInput:
title: Shopify input
type: object
additionalProperties: false
description: Represents the required elements of the task input when using a `shopify` source.
properties:
metafields:
type: array
items:
$ref: '#/ShopifyMetafield'
market:
$ref: '#/ShopifyMarket'
required:
- metafields
- market

ShopifyMetafield:
type: object
additionalProperties: false
description: Represents a metafield in Shopify.
properties:
namespace:
type: string
key:
type: string
value:
type: string
required:
- namespace
- key
- value

ShopifyMarket:
type: object
additionalProperties: false
description: Represents a market in Shopify.
properties:
countries:
type: array
items:
type: string
currencies:
type: array
items:
type: string
locales:
type: array
items:
type: string
required:
- countries
- currencies
- locales

1 comment on commit 67b0eab

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.