Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
148 changes: 148 additions & 0 deletions schema/FIS/Gift_Card/confirm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
export const confirmSchemaFIS10 = {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"context": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"location": {
"type": "object",
"properties": {
"city": {
"type": "object",
"properties": {
"code": { "type": "string" }
},
"required": ["code"]
},
"country": {
"type": "object",
"properties": {
"code": { "type": "string" }
},
"required": ["code"]
}
},
"required": ["city", "country"]
},
"action": { "type": "string", "enum": ["confirm"] },
"version": { "type": "string" },
"bap_id": { "type": "string" },
"bap_uri": { "type": "string", "format": "uri" },
"bpp_id": { "type": "string" },
"bpp_uri": { "type": "string", "format": "uri" },
"transaction_id": { "type": "string" },
"message_id": { "type": "string" },
"timestamp": { "type": "string", "format": "date-time" },
"ttl": { "type": "string" }
},
"required": [
"domain",
"location",
"action",
"version",
"bap_id",
"bap_uri",
"bpp_id",
"bpp_uri",
"transaction_id",
"message_id",
"timestamp",
"ttl"
]
},
"message": {
"type": "object",
"properties": {
"order": {
"type": "object",
"properties": {
"id": { "type": "string" },
"status": { "type": "string" },
"provider": {
"type": "object",
"properties": {
"id": { "type": "string" }
},
"required": ["id"]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"price": {
"type": "object",
"properties": {
"currency": { "type": "string" },
"value": { "type": "string" },
"offered_value": { "type": "string" }
},
"required": ["currency", "value", "offered_value"]
},
"quantity": {
"type": "object",
"properties": {
"selected": {
"type": "object",
"properties": {
"count": { "type": "integer" }
},
"required": ["count"]
}
},
"required": ["selected"]
},
"fulfillment_ids": {
"type": "array",
"items": { "type": "string" }
},
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "type": "string" }
},
"required": ["code"]
},
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "type": "string" }
},
"required": ["code"]
},
"value": { "type": "string" }
},
"required": ["descriptor", "value"]
}
}
},
"required": ["descriptor", "list"]
}
}
},
"required": ["id", "price", "quantity", "fulfillment_ids", "tags"]
}
}
},
"required": ["id", "status", "provider", "items"]
}
},
"required": ["order"]
}
},
"required": ["context", "message"]
}

156 changes: 156 additions & 0 deletions schema/FIS/Gift_Card/init.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
export const InitSchemaFIS10 = {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"context": {
"type": "object",
"properties": {
"domain": { "type": "string", "pattern": "^ONDC:FIS10$" },
"location": {
"type": "object",
"properties": {
"city": {
"type": "object",
"properties": { "code": { "type": "string" } },
"required": ["code"]
},
"country": {
"type": "object",
"properties": { "code": { "type": "string" } },
"required": ["code"]
}
},
"required": ["city", "country"]
},
"action": { "type": "string", "pattern": "^init$" },
"version": { "type": "string" },
"bap_id": { "type": "string" },
"bap_uri": { "type": "string", "format": "uri" },
"bpp_id": { "type": "string" },
"bpp_uri": { "type": "string", "format": "uri" },
"transaction_id": { "type": "string", "format": "uuid" },
"message_id": { "type": "string", "format": "uuid" },
"timestamp": { "type": "string", "format": "date-time" },
"ttl": { "type": "string" }
},
"required": ["domain", "location", "action", "version", "bap_id", "bap_uri", "bpp_id", "bpp_uri", "transaction_id", "message_id", "timestamp", "ttl"]
},
"message": {
"type": "object",
"properties": {
"order": {
"type": "object",
"properties": {
"provider": {
"type": "object",
"properties": { "id": { "type": "string" } },
"required": ["id"]
},
"fulfillments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"type": { "type": "string" },
"stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contact": {
"type": "object",
"properties": {
"phone": { "type": "string", "pattern": "^[0-9]{10}$" },
"email": { "type": "string", "format": "email" }
},
"required": ["phone", "email"]
},
"person": {
"type": "object",
"properties": { "name": { "type": "string" } },
"required": ["name"]
}
},
"required": ["contact", "person"]
}
}
},
"required": ["id", "type", "stops"]
}
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"quantity": {
"type": "object",
"properties": {
"selected": {
"type": "object",
"properties": { "count": { "type": "integer", "minimum": 1 } },
"required": ["count"]
}
},
"required": ["selected"]
},
"fulfillment_ids": {
"type": "array",
"items": { "type": "string" }
},
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"descriptor": { "type": "object", "properties": { "code": { "type": "string" } }, "required": ["code"] },
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"descriptor": { "type": "object", "properties": { "code": { "type": "string" } }, "required": ["code"] },
"value": { "type": "string" }
},
"required": ["descriptor", "value"]
}
}
},
"required": ["descriptor", "list"]
}
}
},
"required": ["id", "quantity", "fulfillment_ids", "tags"]
}
},
"billing": {
"type": "object",
"properties": {
"name": { "type": "string" },
"address": { "type": "string" },
"city": {
"type": "object",
"properties": { "name": { "type": "string" }, "code": { "type": "string" } },
"required": ["name", "code"]
},
"state": {
"type": "object",
"properties": { "name": { "type": "string" }, "code": { "type": "string" } },
"required": ["name", "code"]
},
"email": { "type": "string", "format": "email" },
"phone": { "type": "string", "pattern": "^[0-9]{10}$" }
},
"required": ["name", "address", "city", "state", "email", "phone"]
}
},
"required": ["provider", "fulfillments", "items", "billing"]
}
},
"required": ["order"]
}
},
"required": ["context", "message"]
}
Loading