Skip to content

Commit

Permalink
Updated descs for some schemas; moved some fields in cart entity as d…
Browse files Browse the repository at this point in the history
…efinitions for local refs; added collection_id to click_item event.
  • Loading branch information
misterpig committed Jun 17, 2024
1 parent 60fd0af commit 1792342
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"properties": {
"payment_id": {
"type": "string",
"description": "The `payment` entity ID for which this event is attached with.",
"maxLength": 255
},
"new_payment": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "Event occurs when a customer cancels for a subscription",
"description": "Event occurs when a customer cancels a subscription",
"properties": {
"subscription_id": {
"type": "string",
Expand All @@ -10,7 +10,7 @@
"string",
"null"
],
"description": "The reason if given in notes for why the subscription was cancelled.",
"description": "Reason why the subscription was cancelled.",
"maxLength": 512
}
},
Expand Down
135 changes: 72 additions & 63 deletions schemas/io.snowplow.ecomm/cart/jsonschema/1-0-0
Original file line number Diff line number Diff line change
@@ -1,5 +1,76 @@
{
"description": "The cart entity contains the products and bundles that have been added to cart, as well as information about discounts and total costs",
"definitions": {
"discovery": {
"type": "object",
"properties": {
"discovery_type": {
"type": "string",
"description": "The type of discovery.",
"maxLength": 255
},
"discovery_id": {
"type": "string",
"description": "The identifier for the specific discovery. As an example if from a search then a `search_id` will be used.",
"maxLength": 255
},
"discovery_index": {
"type": [
"integer",
"null"
],
"description": "Any index associated with the discovery, as an example, if the discovery was from a search then the search_index will be used.",
"minimum": 0,
"maximum": 2147483647
}
},
"additionalProperties": false,
"required": [
"discovery_type",
"discovery_id"
]
},
"items_in_cart": {
"type": "object",
"properties": {
"item_type": {
"type": [
"string",
"null"
],
"description": "Examples: \"product\", \"bundle\".",
"maxLength": 255
},
"quantity": {
"type": "number",
"description": "The number of items of this item ID.",
"minimum": 0,
"maximum": 9999999
},
"item_id": {
"type": "string",
"description": "The item's ID.",
"maxLength": 255
},
"discovery": {
"type": [
"array",
"null"
],
"description": "An array of objects which indicates how the user had interacted with the item.",
"items": {
"$ref": "#/definitions/discovery"
}
}
},
"additionalProperties": false,
"required": [
"quantity",
"item_id"
]
}
},

"properties": {
"cart_id": {
"type": "string",
Expand Down Expand Up @@ -83,69 +154,7 @@
],
"description": "The list of items in the cart.",
"items": {
"type": "object",
"properties": {
"item_type": {
"type": [
"string",
"null"
],
"description": "Examples: \"product\", \"bundle\".",
"maxLength": 255
},
"quantity": {
"type": "number",
"description": "The number of items of this item ID.",
"minimum": 0,
"maximum": 9999999
},
"item_id": {
"type": "string",
"description": "The item's ID.",
"maxLength": 255
},
"discovery": {
"type": [
"array",
"null"
],
"description": "An array of objects which indicates how the user had interacted with the item.",
"items": {
"type": "object",
"properties": {
"discovery_type": {
"type": "string",
"description": "The type of discovery.",
"maxLength": 255
},
"discovery_id": {
"type": "string",
"description": "The identifier for the specific discovery. As an example if from a search then a `search_id` will be used.",
"maxLength": 255
},
"discovery_index": {
"type": [
"integer",
"null"
],
"description": "Any index associated with the discovery, as an example, if the discovery was from a search then the search_index will be used.",
"minimum": 0,
"maximum": 2147483647
}
},
"additionalProperties": false,
"required": [
"discovery_type",
"discovery_id"
]
}
}
},
"additionalProperties": false,
"required": [
"quantity",
"item_id"
]
"$ref": "#/definitions/items_in_cart"
}
}
},
Expand Down
9 changes: 7 additions & 2 deletions schemas/io.snowplow.ecomm/click_item/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@
"description": "The general type of the item, currently supports the two types of a singular product and a bundle of products.",
"maxLength": 255
},
"click_position": {
"collection_id": {
"type": "string",
"description": "The ID of the collection entity from which the item that was clicked is located in.",
"maxLength": 255
},
"position": {
"type": [
"integer",
"null"
],
"description": "The numerical position of the item on the page, if the item appears first, click_position would be 1",
"description": "The numerical position of the item on the page, if the item appears first, position would be 1",
"minimum": 1,
"maximum": 2147483647
}
Expand Down
2 changes: 1 addition & 1 deletion schemas/io.snowplow.ecomm/collection/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"integer",
"null"
],
"description": "The total number items to be displayed on each page.",
"description": "The total number of items to be displayed on each page.",
"minimum": 1,
"maximum": 2147483647
},
Expand Down

0 comments on commit 1792342

Please sign in to comment.