Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(specs): update shopify source and task inputs #2987

Merged
merged 6 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 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,64 @@ 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
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
description: |
If a shop has `has_collection_search_page` set to true, we *will* index collection IDs even if this is set to `false`.
Default is `false`.
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
increaseProductCollectionLimit:
type: boolean
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
description: |
Used to determine if we should index 100 or 200 collections per product.
Default is `false`.
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
defaultPriceRatioAsOne:
type: boolean
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
description: |
The price ratio is determined by `sale_price`/`regular_price`. If no sale price is present, this indexes a 1 instead of a 0.
Default is `true`.
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
excludeOOSVariantsForPriceAtTRS:
type: boolean
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
description: |
Don't include out-of-stock variants when determining the `max_variant_price` and `min_variant_price` attributes.
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
Default is `true`.
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
includeVariantsInventory:
type: boolean
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
description: |
Whether we should include an object with the inventory of every variant on the object.
Default is `true`.
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
hasCollectionSearchPage:
type: boolean
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
description: |
Determine if we should index collection information (ID & handle) in the product records.
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
productNamedTags:
type: boolean
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
description: |
Whether to convert tags on products to named tags (see https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/named-tags).
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved

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
52 changes: 52 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,54 @@ 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'
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved

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
Loading