Skip to content

Instantly share code, notes, and snippets.

@ayal
Last active July 31, 2023 18:35
Show Gist options
  • Save ayal/f956674cd28a271f1830699349ffb072 to your computer and use it in GitHub Desktop.
Save ayal/f956674cd28a271f1830699349ffb072 to your computer and use it in GitHub Desktop.
update product schema
export const updateProduct__schema = {
name: 'updateProduct',
description: 'Updates specified fields in a product.',
parameters: {
type: 'object',
properties: {
_id: {
type: 'string',
},
product: {
type: 'object',
properties: {
_id: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
name: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
slug: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
visible: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
productType: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: ['unspecified_product_type', 'physical', 'digital'],
},
],
},
},
description: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
sku: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
weight: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
weightRange: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
minValue: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
maxValue: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
stock: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
trackInventory: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
quantity: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
inStock: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
inventoryStatus: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'IN_STOCK',
'OUT_OF_STOCK',
'PARTIALLY_OUT_OF_STOCK',
],
},
],
},
},
},
},
],
},
},
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
currency: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
formatted: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
priceData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
currency: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
formatted: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
convertedPriceData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
currency: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
formatted: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
priceRange: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
minValue: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
maxValue: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
costAndProfitData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
itemCost: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
formattedItemCost: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
profit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
formattedProfit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
profitMargin: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
costRange: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
minValue: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
maxValue: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
pricePerUnitData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
totalQuantity: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
totalMeasurementUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'UNSPECIFIED',
'ML',
'CL',
'L',
'CBM',
'MG',
'G',
'KG',
'MM',
'CM',
'M',
'SQM',
'OZ',
'LB',
'FLOZ',
'PT',
'QT',
'GAL',
'IN',
'FT',
'YD',
'SQFT',
],
},
],
},
},
baseQuantity: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
baseMeasurementUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'UNSPECIFIED',
'ML',
'CL',
'L',
'CBM',
'MG',
'G',
'KG',
'MM',
'CM',
'M',
'SQM',
'OZ',
'LB',
'FLOZ',
'PT',
'QT',
'GAL',
'IN',
'FT',
'YD',
'SQFT',
],
},
],
},
},
},
},
],
},
},
additionalInfoSections: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
title: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
description: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
ribbons: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
text: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
media: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
mainMedia: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
image: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
video: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
files: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
stillFrameMediaId: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
thumbnail: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
mediaType: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'unspecified_media_item_type',
'image',
'video',
'audio',
'document',
'zip',
],
},
],
},
},
title: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
_id: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
items: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
image: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
video: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
files: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
stillFrameMediaId: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
thumbnail: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
mediaType: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'unspecified_media_item_type',
'image',
'video',
'audio',
'document',
'zip',
],
},
],
},
},
title: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
_id: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
},
},
],
},
},
customTextFields: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
title: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
maxLength: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
mandatory: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
},
},
},
],
},
},
manageVariants: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
productOptions: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
optionType: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'unspecified_option_type',
'drop_down',
'color',
],
},
],
},
},
name: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
choices: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
value: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
description: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
media: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
mainMedia: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
image: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
video: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
files: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties:
{
url: {
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
stillFrameMediaId:
{
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
thumbnail: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
mediaType: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'unspecified_media_item_type',
'image',
'video',
'audio',
'document',
'zip',
],
},
],
},
},
title: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
_id: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
items: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
image: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
video: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
files: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items:
{
type: 'object',
properties:
{
url: {
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText:
{
type: {
oneOf:
[
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
stillFrameMediaId:
{
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
thumbnail: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
url: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
width: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
height: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
format: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
altText: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
mediaType: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: [
'unspecified_media_item_type',
'image',
'video',
'audio',
'document',
'zip',
],
},
],
},
},
title: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
_id: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
},
],
},
},
},
},
],
},
},
inStock: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
visible: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
},
},
},
],
},
},
},
},
},
],
},
},
productPageUrl: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
base: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
path: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
numericId: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
inventoryItemId: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
discount: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
type: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
enum: ['UNDEFINED', 'NONE', 'AMOUNT', 'PERCENT'],
},
],
},
},
value: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
collectionIds: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'string',
},
},
],
},
},
variants: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
_id: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
choices: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'Record<string, string>',
},
],
},
},
variant: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
priceData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
currency: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
formatted: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
convertedPriceData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
currency: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
formatted: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
price: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
discountedPrice: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
],
},
},
pricePerUnit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
costAndProfitData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
itemCost: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
formattedItemCost: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
profit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
formattedProfit: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
profitMargin: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
},
},
],
},
},
weight: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'number',
},
],
},
},
sku: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
visible: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
},
},
],
},
},
stock: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
trackQuantity: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
quantity: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'number',
},
],
},
},
inStock: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
},
},
],
},
},
},
},
},
],
},
},
lastUpdated: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
format: 'date-time',
},
],
},
},
_createdDate: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
format: 'date-time',
},
],
},
},
seoData: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
tags: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
type: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
props: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'Record<string, any>',
},
],
},
},
meta: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'Record<string, any>',
},
],
},
},
children: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
custom: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
disabled: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
},
},
},
],
},
},
settings: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'object',
properties: {
preventAutoRedirect: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
keywords: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'array',
items: {
type: 'object',
properties: {
term: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'string',
},
],
},
},
isMain: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'false',
},
{
type: 'true',
},
],
},
},
},
},
},
],
},
},
},
},
],
},
},
},
},
],
},
},
ribbon: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
brand: {
type: {
oneOf: [
{
type: 'undefined',
},
{
type: 'null',
},
{
type: 'string',
},
],
},
},
},
},
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment