add error statement for context

This commit is contained in:
AshwiniK-protean
2025-04-23 18:06:19 +05:30
parent d86d23d43d
commit 914d6f47f2
222 changed files with 30003 additions and 1123 deletions

View File

@@ -0,0 +1,32 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "cancel",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"cancel"
]
}
},
"required": [
"action"
]
}
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "confirm",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"confirm"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
}
},
"required": [
"message",
"context"
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "init",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"init"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_cancel",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_cancel"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_confirm",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_confirm"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_init",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_init"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_rating",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_rating"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"feedback_form": {
"description": "A feedback form to allow the user to provide additional information on the rating provided",
"allOf": [
{
"$ref": "./definitions.json#/$defs/XInput"
}
]
}
}
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_search",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_search"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"catalog": {
"$ref": "./definitions.json#/$defs/Catalog"
}
},
"required": [
"catalog"
]
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_select",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_select"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
}
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_status",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_status"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,42 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_support",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_support"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"support": {
"$ref": "./definitions.json#/$defs/Support"
}
}
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_track",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_track"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"tracking": {
"$ref": "./definitions.json#/$defs/Tracking"
}
},
"required": [
"tracking"
]
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "on_update",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_update"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "./definitions.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,42 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "rating",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"rating"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"ratings": {
"type": "array",
"items": {
"$ref": "./definitions.json#/$defs/Rating"
}
}
}
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "Response",
"type": "object",
"properties": {},
"required": []
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "search",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
}
]
},
"message": {
"properties": {
"intent": {
"$ref": "./definitions.json#/$defs/Intent"
}
},
"type": "object"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "select",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"select"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "./definitions.json#/$defs/Order"
}
},
"required": [
"order"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "status",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"status"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"ref_id": {
"$ref": "./definitions.json#/$defs/Order"
},
"order_id": {
"$ref": "./definitions.json#/$defs/Order"
}
}
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "support",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"support"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"support": {
"$ref": "./definitions.json#/$defs/Support"
}
}
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "track",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"track"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order_id": {
"$ref": "./definitions.json#/$defs/Order"
},
"callback_url": {
"type": "string",
"format": "uri"
}
},
"required": [
"order_id"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,53 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "update",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "./definitions.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"update"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"update_target": {
"description": "Comma separated values of order objects being updated. For example: ```\"update_target\":\"item,billing,fulfillment\"```",
"type": "string"
},
"order": {
"description": "Updated order object",
"allOf": [
{
"$ref": "./definitions.json#/$defs/Order"
}
]
}
},
"required": [
"update_target",
"order"
]
}
},
"required": [
"message",
"context"
]
}