Skip to content

Instantly share code, notes, and snippets.

@amey-rye
Last active June 9, 2025 20:56
Show Gist options
  • Select an option

  • Save amey-rye/4853842d039db75e0a1ae238b4a21722 to your computer and use it in GitHub Desktop.

Select an option

Save amey-rye/4853842d039db75e0a1ae238b4a21722 to your computer and use it in GitHub Desktop.
JSON Schemas for Rye Webhooks
{
"$ref": "#/definitions/RyeWebhook",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AmazonMarketplace": {
"const": "amazon",
"type": "string"
},
"AmazonOrderPlacedData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"order": {
"additionalProperties": false,
"properties": {
"amazonBusinessEmailId": {
"type": "string"
},
"amazonGroupId": {
"type": "string"
},
"amazonOrders": {
"items": {
"$ref": "#/definitions/Pick%3CBaseAmazonOrder%2C(%22amazonOrderId%22%7C%22products%22)%3E"
},
"type": "array"
},
"currency": {
"type": "string"
},
"defaultCurrencyPriceSet": {
"$ref": "#/definitions/PriceSet"
},
"discountCents": {
"type": "number"
},
"marginCents": {
"type": "number"
},
"shippingCents": {
"type": "number"
},
"subtotalCents": {
"type": "number"
},
"taxCents": {
"type": "number"
},
"totalCents": {
"type": "number"
}
},
"required": [
"amazonOrders",
"currency",
"discountCents",
"shippingCents",
"subtotalCents",
"taxCents",
"totalCents"
],
"type": "object"
}
},
"required": [
"marketplace",
"order"
],
"type": "object"
},
"AmazonOrderRequestProduct": {
"additionalProperties": false,
"properties": {
"amazonBusinessPrice": {
"anyOf": [
{
"$ref": "#/definitions/AmazonProductPrice"
},
{
"type": "null"
}
]
},
"price": {
"$ref": "#/definitions/AmazonProductPrice"
},
"productId": {
"type": "string"
},
"quantity": {
"type": "number"
},
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
"quantity",
"productId"
],
"type": "object"
},
"AmazonOrderWithTrackingObtained": {
"additionalProperties": false,
"properties": {
"amazonOrderId": {
"type": "string"
},
"products": {
"items": {
"$ref": "#/definitions/AmazonOrderRequestProduct"
},
"type": "array"
},
"shipments": {
"items": {
"$ref": "#/definitions/AmazonShipment"
},
"type": "array"
}
},
"required": [
"amazonOrderId",
"products"
],
"type": "object"
},
"AmazonProductPrice": {
"additionalProperties": false,
"properties": {
"currencyCode": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"value",
"currencyCode"
],
"type": "object"
},
"AmazonPublicDeliveredEventData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"marketplaceOrderId": {
"type": "string"
},
"shipments": {
"items": {
"$ref": "#/definitions/AmazonShipment"
},
"type": "array"
}
},
"required": [
"marketplace",
"marketplaceOrderId",
"shipments"
],
"type": "object"
},
"AmazonPublicDeliveryDelayedEventData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"marketplaceOrderId": {
"type": "string"
},
"shipments": {
"items": {
"$ref": "#/definitions/AmazonShipment"
},
"type": "array"
}
},
"required": [
"marketplace",
"marketplaceOrderId",
"shipments"
],
"type": "object"
},
"AmazonReturnApprovedEventData": {
"additionalProperties": false,
"properties": {
"approvedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"refund": {
"$ref": "#/definitions/RefundBreakdown"
},
"requestedLineItems": {
"items": {
"$ref": "#/definitions/AmazonReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
},
"shippingLabelUrl": {
"type": "string"
}
},
"required": [
"approvedAt",
"marketplace",
"refund",
"requestedLineItems",
"returnId",
"shippingLabelUrl"
],
"type": "object"
},
"AmazonReturnClosedEventData": {
"additionalProperties": false,
"properties": {
"closedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"refundedLineItems": {
"items": {
"$ref": "#/definitions/AmazonReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
}
},
"required": [
"closedAt",
"marketplace",
"refundedLineItems",
"returnId"
],
"type": "object"
},
"AmazonReturnDeniedEventData": {
"additionalProperties": false,
"properties": {
"deniedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"requestedLineItems": {
"items": {
"$ref": "#/definitions/AmazonReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
}
},
"required": [
"deniedAt",
"marketplace",
"requestedLineItems",
"returnId"
],
"type": "object"
},
"AmazonReturnLineItem": {
"additionalProperties": false,
"properties": {
"price": {
"$ref": "#/definitions/AmazonProductPrice"
},
"productId": {
"type": "string"
},
"productImageUrl": {
"type": "string"
},
"productName": {
"type": "string"
},
"quantity": {
"type": "number"
},
"reason": {
"type": "string"
},
"refundAmount": {
"type": "number"
},
"status": {
"$ref": "#/definitions/LineItemReturnStatus"
}
},
"required": [
"productId",
"quantity",
"status"
],
"type": "object"
},
"AmazonReturnRequestAcceptedEventData": {
"additionalProperties": false,
"properties": {
"acceptedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"returnId": {
"type": "string"
}
},
"required": [
"acceptedAt",
"marketplace",
"returnId"
],
"type": "object"
},
"AmazonReturnRequestedEventData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"requestedAt": {
"type": "string"
},
"requestedLineItems": {
"items": {
"$ref": "#/definitions/AmazonReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
}
},
"required": [
"marketplace",
"requestedAt",
"requestedLineItems",
"returnId"
],
"type": "object"
},
"AmazonShipment": {
"additionalProperties": false,
"description": "The shipment sent to the customer.",
"properties": {
"carrierName": {
"description": "The name of the shipment carrier.",
"type": "string"
},
"carrierTracking": {
"description": "The tracking number from the shipment carrier.",
"type": [
"string",
"null"
]
},
"carrierTrackingUrl": {
"description": "Tracking url for the shipment carrier",
"type": "string"
},
"deliveryInformation": {
"$ref": "#/definitions/DeliveryInformation",
"description": "The delivery status and estimated delivery date."
},
"shipmentDate": {
"description": "Date when the item was shipped.",
"format": "Firestore Timestamp",
"type": "string"
},
"shipmentQuantity": {
"description": "The total number of items for shipping.",
"type": "number"
},
"shipmentStatus": {
"description": "The current status of the shipment.",
"enum": [
"SHIPPED",
null
],
"type": [
"string",
"null"
]
}
},
"required": [
"shipmentDate",
"shipmentStatus",
"carrierTracking",
"deliveryInformation",
"shipmentQuantity",
"carrierName",
"carrierTrackingUrl"
],
"type": "object"
},
"AmazonTrackingObtainedData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/AmazonMarketplace"
},
"order": {
"additionalProperties": false,
"properties": {
"amazonOrders": {
"items": {
"$ref": "#/definitions/AmazonOrderWithTrackingObtained"
},
"type": "array"
},
"currency": {
"type": "string"
},
"defaultCurrencyPriceSet": {
"$ref": "#/definitions/PriceSet"
},
"discountCents": {
"type": "number"
},
"marginCents": {
"type": "number"
},
"shippingCents": {
"type": "number"
},
"subtotalCents": {
"type": "number"
},
"taxCents": {
"type": "number"
},
"totalCents": {
"type": "number"
}
},
"required": [
"amazonOrders",
"currency",
"discountCents",
"shippingCents",
"subtotalCents",
"taxCents",
"totalCents"
],
"type": "object"
}
},
"required": [
"marketplace",
"order"
],
"type": "object"
},
"BaseShopifyOrderFulfillment": {
"additionalProperties": false,
"properties": {
"products": {
"items": {
"$ref": "#/definitions/ShopifyOrderRequestProduct"
},
"type": "array"
},
"trackingDetails": {
"items": {
"$ref": "#/definitions/TrackedOrderDetails"
},
"type": "array"
}
},
"required": [
"products",
"trackingDetails"
],
"type": "object"
},
"CompletePaymentChallenge": {
"additionalProperties": false,
"properties": {
"redirectURL": {
"type": "string"
},
"type": {
"const": "CompletePaymentChallenge",
"type": "string"
}
},
"required": [
"type",
"redirectURL"
],
"type": "object"
},
"DeliveryInformation": {
"additionalProperties": false,
"description": "The delivery status and estimated delivery date.",
"properties": {
"deliveryStatus": {
"description": "The current delivery status of the shipment.",
"enum": [
"DELIVERED",
"NOT_DELIVERED",
"NOT_AVAILABLE"
],
"type": "string"
},
"expectedDeliveryDate": {
"description": "The expected delivery date of the shipment.",
"format": "Firestore Timestamp",
"type": "string"
}
},
"required": [
"expectedDeliveryDate",
"deliveryStatus"
],
"type": "object"
},
"ExperimentalOrderAffiliateCommissionUpdatedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"commission": {
"$ref": "#/definitions/ResolvedExperimentalAffiliateCommission"
}
},
"required": [
"commission"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.ExperimentalOrderAffiliateCommissionUpdated"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"LineItemReturnStatus": {
"enum": [
"RETURN_REQUESTED",
"RETURN_ACCEPTED",
"RETURN_APPROVED",
"RETURN_CLOSED",
"RETURN_DENIED",
"RETURN_CANCELLED"
],
"type": "string"
},
"Marketplace": {
"anyOf": [
{
"$ref": "#/definitions/AmazonMarketplace"
},
{
"$ref": "#/definitions/ShopifyMarketplace"
}
]
},
"OrderEventType.ExperimentalOrderAffiliateCommissionUpdated": {
"const": "EXPERIMENTAL_ORDER_AFFILIATE_COMMISSION_UPDATED",
"type": "string"
},
"OrderEventType.OrderCancelFailed": {
"const": "ORDER_CANCEL_FAILED",
"type": "string"
},
"OrderEventType.OrderCancelRequested": {
"const": "ORDER_CANCEL_REQUESTED",
"type": "string"
},
"OrderEventType.OrderCancelStarted": {
"const": "ORDER_CANCEL_STARTED",
"type": "string"
},
"OrderEventType.OrderCancelSucceeded": {
"const": "ORDER_CANCEL_SUCCEEDED",
"type": "string"
},
"OrderEventType.OrderDelivered": {
"const": "ORDER_DELIVERED",
"type": "string"
},
"OrderEventType.OrderDeliveryDelayed": {
"const": "ORDER_DELIVERY_DELAYED",
"type": "string"
},
"OrderEventType.OrderFailed": {
"const": "ORDER_FAILED",
"type": "string"
},
"OrderEventType.OrderPlaced": {
"const": "ORDER_PLACED",
"type": "string"
},
"OrderEventType.OrderRequiresAction": {
"const": "ORDER_REQUIRES_ACTION",
"type": "string"
},
"OrderEventType.OrderSubmissionStarted": {
"const": "ORDER_SUBMISSION_STARTED",
"type": "string"
},
"OrderEventType.OrderSubmissionSucceeded": {
"const": "ORDER_SUBMISSION_SUCCEEDED",
"type": "string"
},
"OrderEventType.PaymentFailed": {
"const": "PAYMENT_FAILED",
"type": "string"
},
"OrderEventType.PaymentRefunded": {
"const": "PAYMENT_REFUNDED",
"type": "string"
},
"OrderEventType.PaymentSucceeded": {
"const": "PAYMENT_SUCCEEDED",
"type": "string"
},
"OrderEventType.RefundCreated": {
"const": "REFUND_CREATED",
"type": "string"
},
"OrderEventType.ReturnApproved": {
"const": "RETURN_APPROVED",
"type": "string"
},
"OrderEventType.ReturnCancelled": {
"const": "RETURN_CANCELLED",
"type": "string"
},
"OrderEventType.ReturnClosed": {
"const": "RETURN_CLOSED",
"type": "string"
},
"OrderEventType.ReturnDenied": {
"const": "RETURN_DENIED",
"type": "string"
},
"OrderEventType.ReturnRequestAccepted": {
"const": "RETURN_REQUEST_ACCEPTED",
"type": "string"
},
"OrderEventType.ReturnRequested": {
"const": "RETURN_REQUESTED",
"type": "string"
},
"OrderEventType.TrackingObtained": {
"const": "TRACKING_OBTAINED",
"type": "string"
},
"OrderFailedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/Marketplace"
},
"reason": {
"type": "string"
},
"reasonCode": {
"$ref": "#/definitions/OrderFailedReasonCode"
},
"refund": {
"$ref": "#/definitions/StripeRefund"
},
"retryable": {
"description": "Indicates whether it is recommended to retry submitting the order.\n\nOrders cannot be resubmitted directly; you must create a new cart\n\n* `true`: It is recommended to retry submitting the order. This is usually the case when the failure is due to a temporary issue.\n* `false`: It is not recommended to retry submitting the order. This is usually the case when the failure is due to something that is unlikely to resolve automatically. For example, the merchant may have misconfigured their store.\n* No value: Indicates our system does not have enough information to determine whether it is recommended to retry submitting the order.",
"type": "boolean"
}
},
"required": [
"marketplace"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderFailed"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"OrderFailedReasonCode": {
"enum": [
"3DS_CHALLENGE_EXPIRED",
"3DS_CHALLENGE_REJECTED",
"BILLING_ADDRESS_INVALID_POSTAL_CODE",
"CANCELED",
"DENIED_BY_MARKETPLACE",
"ENVIRONMENT_MISMATCH",
"INSUFFICIENT_FUNDS",
"INTERNAL_ERROR",
"INVALID_REQUEST",
"MERCHANT_CONFIGURATION",
"OUT_OF_STOCK",
"PAYMENT_DECLINED",
"PAYMENT_DISHONORED",
"PAYMENT_FAILED",
"PAYMENT_INVALID",
"PAYMENT_UNSUPPORTED",
"SHIPPING_ADDRESS_BLACKLISTED",
"SHIPPING_ADDRESS_UNAVAILABLE",
"SHIPPING_METHOD_EXPIRED",
"TIMEOUT",
"UNAUTHENTICATED",
"UPSTREAM_SERVICE_ERROR"
],
"type": "string"
},
"OrderPlacedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonOrderPlacedData"
},
{
"$ref": "#/definitions/ShopifyOrderPlacedData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderPlaced"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"OrderRequiresActionEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"order": {
"additionalProperties": false,
"properties": {
"requiredActions": {
"$ref": "#/definitions/Record%3Cstring%2CRequiredAction%3E"
}
},
"required": [
"requiredActions"
],
"type": "object"
}
},
"required": [
"order"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderRequiresAction"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"OrderSubmissionStartedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/Marketplace"
}
},
"required": [
"marketplace"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderSubmissionStarted"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"OrderSubmissionSucceededEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/Marketplace"
}
},
"required": [
"marketplace"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderSubmissionSucceeded"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PaymentFailedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/Marketplace"
}
},
"required": [
"marketplace"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.PaymentFailed"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PaymentRefundedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"$ref": "#/definitions/Record%3Cstring%2Cnever%3E"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.PaymentRefunded"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PaymentSucceededEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"amount": {
"type": "number"
},
"marketplace": {
"$ref": "#/definitions/Marketplace"
}
},
"required": [
"marketplace",
"amount"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.PaymentSucceeded"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"Pick<BaseAmazonOrder,(\"amazonOrderId\"|\"products\")>": {
"additionalProperties": false,
"properties": {
"amazonOrderId": {
"type": "string"
},
"products": {
"items": {
"$ref": "#/definitions/AmazonOrderRequestProduct"
},
"type": "array"
}
},
"required": [
"amazonOrderId",
"products"
],
"type": "object"
},
"Price": {
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"displayValue": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"value",
"currency",
"displayValue"
],
"type": "object"
},
"PriceSet": {
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"discountCents": {
"type": "number"
},
"marginCents": {
"type": "number"
},
"shippingCents": {
"type": "number"
},
"subtotalCents": {
"type": "number"
},
"taxCents": {
"type": "number"
},
"totalCents": {
"type": "number"
}
},
"required": [
"shippingCents",
"subtotalCents",
"taxCents",
"totalCents",
"discountCents",
"currency"
],
"type": "object"
},
"PublicDeliveredEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonPublicDeliveredEventData"
},
{
"$ref": "#/definitions/ShopifyPublicDeliveredEventData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderDelivered"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PublicDeliveryDelayedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonPublicDeliveryDelayedEventData"
},
{
"$ref": "#/definitions/ShopifyPublicDeliveryDelayedEventData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderDeliveryDelayed"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PublicOrderCancelFailedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/Marketplace"
},
"reason": {
"type": "string"
}
},
"required": [
"marketplace",
"reason"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderCancelFailed"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PublicOrderCancelRequestedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/Marketplace"
},
"marketplaceOrderId": {
"type": "string"
},
"requestedAt": {
"type": "string"
}
},
"required": [
"marketplace",
"requestedAt",
"marketplaceOrderId"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderCancelRequested"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PublicOrderCancelStartedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/Marketplace"
},
"startedAt": {
"type": "string"
}
},
"required": [
"marketplace",
"startedAt"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderCancelStarted"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"PublicOrderCancelledEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"cancelledAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/Marketplace"
},
"refund": {
"$ref": "#/definitions/StripeRefund"
}
},
"required": [
"marketplace",
"cancelledAt"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.OrderCancelSucceeded"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"Record<string,RequiredAction>": {
"additionalProperties": {
"$ref": "#/definitions/RequiredAction"
},
"type": "object"
},
"Record<string,never>": {
"additionalProperties": {
"not": {}
},
"type": "object"
},
"RefundBreakdown": {
"additionalProperties": false,
"properties": {
"currencyCode": {
"type": "string"
},
"subtotalCents": {
"type": "number"
},
"taxCents": {
"type": "number"
},
"totalCents": {
"type": "number"
}
},
"required": [
"subtotalCents",
"taxCents",
"totalCents",
"currencyCode"
],
"type": "object"
},
"RefundCreatedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"amount": {
"$ref": "#/definitions/Price"
}
},
"required": [
"amount"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.RefundCreated"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"RequireTypename<(ExperimentalAffiliateCommissionConfirmed|ExperimentalAffiliateCommissionFinalized|ExperimentalAffiliateCommissionPending|ExperimentalAffiliateCommissionUnconfirmed|ExperimentalAffiliateCommissionUpdated)>": {
"additionalProperties": false,
"description": "NestJS' GraphQL codegen outputs types with an optional `__typename` field, like this:\n\n```typescript export class Cart { __typename?: 'Cart'; // ... } ```\n\nThis type converts these codegen outputs so that the `__typename` field is required.\n\n```typescript export class Cart { __typename: 'Cart'; // ... } ```\n\nThis works with union types.\n\n```typescript type OrderEventEntity = RequireTypename< | OrderCanceledOrderEvent | OrderFailedOrderEvent > ```",
"properties": {
"__typename": {
"enum": [
"ExperimentalAffiliateCommissionConfirmed",
"ExperimentalAffiliateCommissionFinalized",
"ExperimentalAffiliateCommissionPending",
"ExperimentalAffiliateCommissionUnconfirmed",
"ExperimentalAffiliateCommissionUpdated"
],
"type": "string"
},
"commissionAmount": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"__typename": {},
"currency": {},
"displayValue": {},
"value": {}
},
"required": [
"value",
"currency",
"displayValue"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"__typename": {},
"currency": {},
"displayValue": {},
"value": {}
},
"required": [
"value",
"currency",
"displayValue"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"__typename": {},
"currency": {},
"displayValue": {},
"value": {}
},
"required": [
"value",
"currency",
"displayValue"
],
"type": "object"
}
]
},
"orderAmount": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"__typename": {},
"currency": {},
"displayValue": {},
"value": {}
},
"required": [
"value",
"currency",
"displayValue"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"__typename": {},
"currency": {},
"displayValue": {},
"value": {}
},
"required": [
"value",
"currency",
"displayValue"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"__typename": {},
"currency": {},
"displayValue": {},
"value": {}
},
"required": [
"value",
"currency",
"displayValue"
],
"type": "object"
}
]
},
"updatedAt": {}
},
"required": [
"commissionAmount",
"orderAmount",
"updatedAt"
],
"type": "object"
},
"RequiredAction": {
"$ref": "#/definitions/CompletePaymentChallenge"
},
"ResolvedExperimentalAffiliateCommission": {
"$ref": "#/definitions/RequireTypename%3C(ExperimentalAffiliateCommissionConfirmed%7CExperimentalAffiliateCommissionFinalized%7CExperimentalAffiliateCommissionPending%7CExperimentalAffiliateCommissionUnconfirmed%7CExperimentalAffiliateCommissionUpdated)%3E"
},
"ReturnApprovedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonReturnApprovedEventData"
},
{
"$ref": "#/definitions/ShopifyReturnApprovedEventData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.ReturnApproved"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"ReturnCancelledEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"additionalProperties": false,
"properties": {
"cancelledAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/Marketplace"
},
"returnId": {
"type": "string"
}
},
"required": [
"marketplace",
"returnId",
"cancelledAt"
],
"type": "object"
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.ReturnCancelled"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"ReturnClosedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonReturnClosedEventData"
},
{
"$ref": "#/definitions/ShopifyReturnClosedEventData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.ReturnClosed"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"ReturnDeniedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonReturnDeniedEventData"
},
{
"$ref": "#/definitions/ShopifyReturnDeniedEventData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.ReturnDenied"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"ReturnRequestAcceptedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonReturnRequestAcceptedEventData"
},
{
"$ref": "#/definitions/ShopifyReturnRequestAcceptedEventData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.ReturnRequestAccepted"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"ReturnRequestedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonReturnRequestedEventData"
},
{
"$ref": "#/definitions/ShopifyReturnRequestedEventData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.ReturnRequested"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
},
"RyeWebhook": {
"anyOf": [
{
"$ref": "#/definitions/PaymentSucceededEvent"
},
{
"$ref": "#/definitions/PaymentFailedEvent"
},
{
"$ref": "#/definitions/PaymentRefundedEvent"
},
{
"$ref": "#/definitions/OrderSubmissionStartedEvent"
},
{
"$ref": "#/definitions/OrderSubmissionSucceededEvent"
},
{
"$ref": "#/definitions/OrderPlacedEvent"
},
{
"$ref": "#/definitions/OrderFailedEvent"
},
{
"$ref": "#/definitions/PublicOrderCancelledEvent"
},
{
"$ref": "#/definitions/PublicOrderCancelFailedEvent"
},
{
"$ref": "#/definitions/PublicOrderCancelStartedEvent"
},
{
"$ref": "#/definitions/PublicOrderCancelRequestedEvent"
},
{
"$ref": "#/definitions/RefundCreatedEvent"
},
{
"$ref": "#/definitions/ReturnApprovedEvent"
},
{
"$ref": "#/definitions/ReturnDeniedEvent"
},
{
"$ref": "#/definitions/ReturnCancelledEvent"
},
{
"$ref": "#/definitions/ReturnRequestedEvent"
},
{
"$ref": "#/definitions/ReturnRequestAcceptedEvent"
},
{
"$ref": "#/definitions/ReturnClosedEvent"
},
{
"$ref": "#/definitions/TrackingObtainedEvent"
},
{
"$ref": "#/definitions/ExperimentalOrderAffiliateCommissionUpdatedEvent"
},
{
"$ref": "#/definitions/PublicDeliveryDelayedEvent"
},
{
"$ref": "#/definitions/PublicDeliveredEvent"
},
{
"$ref": "#/definitions/OrderRequiresActionEvent"
}
],
"description": "How public events are represented on data transfer"
},
"ShopifyMarketplace": {
"const": "shopify",
"type": "string"
},
"ShopifyOrderPlacedData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"order": {
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"defaultCurrencyPriceSet": {
"$ref": "#/definitions/PriceSet"
},
"discountCents": {
"type": "number"
},
"marginCents": {
"type": "number"
},
"shippingCents": {
"type": "number"
},
"subtotalCents": {
"type": "number"
},
"taxCents": {
"type": "number"
},
"totalCents": {
"type": "number"
}
},
"required": [
"currency",
"discountCents",
"shippingCents",
"subtotalCents",
"taxCents",
"totalCents"
],
"type": "object"
},
"orderEmailOverride": {
"type": "string"
}
},
"required": [
"marketplace",
"order"
],
"type": "object"
},
"ShopifyOrderRequestProduct": {
"additionalProperties": false,
"properties": {
"price": {
"type": [
"number",
"null"
]
},
"productId": {
"type": "string"
},
"quantity": {
"type": "number"
},
"title": {
"type": [
"string",
"null"
]
},
"variantId": {
"type": "string"
}
},
"required": [
"quantity",
"variantId",
"productId"
],
"type": "object"
},
"ShopifyPublicDeliveredEventData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"marketplaceOrderId": {
"type": "string"
}
},
"required": [
"marketplace",
"marketplaceOrderId"
],
"type": "object"
},
"ShopifyPublicDeliveryDelayedEventData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"marketplaceOrderId": {
"type": "string"
}
},
"required": [
"marketplace",
"marketplaceOrderId"
],
"type": "object"
},
"ShopifyReturnApprovedEventData": {
"additionalProperties": false,
"properties": {
"approvedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"refundAmount": {
"type": "number"
},
"requestedLineItems": {
"items": {
"$ref": "#/definitions/ShopifyReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
},
"shippingLabelUrl": {
"type": "string"
}
},
"required": [
"approvedAt",
"marketplace",
"refundAmount",
"requestedLineItems",
"returnId",
"shippingLabelUrl"
],
"type": "object"
},
"ShopifyReturnClosedEventData": {
"additionalProperties": false,
"properties": {
"closedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"refundedLineItems": {
"items": {
"$ref": "#/definitions/ShopifyReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
}
},
"required": [
"closedAt",
"marketplace",
"refundedLineItems",
"returnId"
],
"type": "object"
},
"ShopifyReturnDeniedEventData": {
"additionalProperties": false,
"properties": {
"deniedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"requestedLineItems": {
"items": {
"$ref": "#/definitions/ShopifyReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
}
},
"required": [
"deniedAt",
"marketplace",
"requestedLineItems",
"returnId"
],
"type": "object"
},
"ShopifyReturnLineItem": {
"additionalProperties": false,
"properties": {
"currencyCode": {
"type": "string"
},
"price": {
"type": "string"
},
"productImageUrl": {
"type": "string"
},
"productName": {
"type": "string"
},
"quantity": {
"type": "number"
},
"reason": {
"type": "string"
},
"refundAmount": {
"type": "number"
},
"status": {
"$ref": "#/definitions/LineItemReturnStatus"
},
"variantId": {
"type": "string"
}
},
"required": [
"currencyCode",
"price",
"quantity",
"status",
"variantId"
],
"type": "object"
},
"ShopifyReturnRequestAcceptedEventData": {
"additionalProperties": false,
"properties": {
"acceptedAt": {
"type": "string"
},
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"returnId": {
"type": "string"
}
},
"required": [
"acceptedAt",
"marketplace",
"returnId"
],
"type": "object"
},
"ShopifyReturnRequestedEventData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"requestedAt": {
"type": "string"
},
"requestedLineItems": {
"items": {
"$ref": "#/definitions/ShopifyReturnLineItem"
},
"type": "array"
},
"returnId": {
"type": "string"
}
},
"required": [
"marketplace",
"requestedAt",
"requestedLineItems",
"returnId"
],
"type": "object"
},
"ShopifyTrackingObtainedData": {
"additionalProperties": false,
"properties": {
"marketplace": {
"$ref": "#/definitions/ShopifyMarketplace"
},
"order": {
"additionalProperties": false,
"properties": {
"fulfillments": {
"items": {
"$ref": "#/definitions/BaseShopifyOrderFulfillment"
},
"type": "array"
}
},
"required": [
"fulfillments"
],
"type": "object"
}
},
"required": [
"order"
],
"type": "object"
},
"StripeRefund": {
"additionalProperties": false,
"properties": {
"amount": {
"description": "Amount, in %s.",
"type": "number"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"type": "number"
},
"currency": {
"description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).",
"type": "string"
},
"description": {
"description": "An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)",
"type": "string"
},
"id": {
"description": "Unique identifier for the object.",
"type": "string"
},
"object": {
"const": "refund",
"description": "String representing the object's type. Objects of the same type share the same value.",
"type": "string"
},
"receipt_number": {
"description": "This is the transaction number that appears on email receipts sent for this refund.",
"type": [
"string",
"null"
]
},
"status": {
"description": "Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.",
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"object",
"amount",
"created",
"currency",
"receipt_number",
"status"
],
"type": "object"
},
"TrackedOrderDetails": {
"additionalProperties": false,
"properties": {
"courierName": {
"type": "string"
},
"courierUrl": {
"type": "string"
},
"trackingNumber": {
"type": "string"
}
},
"required": [
"trackingNumber",
"courierUrl",
"courierName"
],
"type": "object"
},
"TrackingObtainedEvent": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "string"
},
"data": {
"anyOf": [
{
"$ref": "#/definitions/AmazonTrackingObtainedData"
},
{
"$ref": "#/definitions/ShopifyTrackingObtainedData"
}
]
},
"developerId": {
"type": "string"
},
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"type": {
"$ref": "#/definitions/OrderEventType.TrackingObtained"
}
},
"required": [
"createdAt",
"data",
"developerId",
"id",
"requestId",
"type"
],
"type": "object"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment