@redotech/redo-api-schema 2.2.134 → 2.2.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/openapi.d.ts +92 -0
- package/lib/openapi.yaml +102 -0
- package/package.json +1 -1
package/lib/openapi.d.ts
CHANGED
|
@@ -155,6 +155,13 @@ export interface paths {
|
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
|
+
"/stores/{storeId}/storefront/events": {
|
|
159
|
+
/**
|
|
160
|
+
* Receive storefront events
|
|
161
|
+
* @description Processes events from storefronts using Shopify pixel event schema
|
|
162
|
+
*/
|
|
163
|
+
post: operations["storefrontEvent"];
|
|
164
|
+
};
|
|
158
165
|
"/stores/{storeId}/webhooks": {
|
|
159
166
|
/**
|
|
160
167
|
* List webhooks
|
|
@@ -727,6 +734,11 @@ export interface components {
|
|
|
727
734
|
* @description Return status.
|
|
728
735
|
*/
|
|
729
736
|
status: components["schemas"]["return-status.schema"];
|
|
737
|
+
/**
|
|
738
|
+
* Type
|
|
739
|
+
* @description Return type.
|
|
740
|
+
*/
|
|
741
|
+
type?: components["schemas"]["return-type.schema"];
|
|
730
742
|
/**
|
|
731
743
|
* Updated at
|
|
732
744
|
* Format: date-time
|
|
@@ -767,6 +779,14 @@ export interface components {
|
|
|
767
779
|
* @enum {string}
|
|
768
780
|
*/
|
|
769
781
|
"return-status.schema": "open" | "in_transit" | "delivered" | "needs_review" | "in_review" | "complete" | "rejected" | "flagged" | "pre_shipment" | "deleted";
|
|
782
|
+
/**
|
|
783
|
+
* Return type
|
|
784
|
+
* @description Return type.
|
|
785
|
+
*
|
|
786
|
+
* @example return
|
|
787
|
+
* @enum {string}
|
|
788
|
+
*/
|
|
789
|
+
"return-type.schema": "claim" | "return" | "warranty";
|
|
770
790
|
/**
|
|
771
791
|
* Shipment Document Type
|
|
772
792
|
* @description Type of shipping document.
|
|
@@ -933,6 +953,44 @@ export interface components {
|
|
|
933
953
|
*/
|
|
934
954
|
id: string;
|
|
935
955
|
};
|
|
956
|
+
/**
|
|
957
|
+
* Storefront Event
|
|
958
|
+
* @description Shopify pixel event for storefront tracking.
|
|
959
|
+
*/
|
|
960
|
+
"storefront-event.schema": {
|
|
961
|
+
/** @description Cart information if relevant to the event. */
|
|
962
|
+
cart?: components["schemas"]["storefront-cart.schema"];
|
|
963
|
+
/** @description Identifier for the client that generated the event. */
|
|
964
|
+
clientId: string;
|
|
965
|
+
/** @description Customer information if available. */
|
|
966
|
+
customer?: components["schemas"]["storefront-customer.schema"];
|
|
967
|
+
/** @description Shopify customer ID if available. */
|
|
968
|
+
customerId?: string;
|
|
969
|
+
/** @description Unique identifier for the event. */
|
|
970
|
+
eventId: string;
|
|
971
|
+
/**
|
|
972
|
+
* @description Name of the Shopify pixel event (e.g., 'product_viewed', 'checkout_started').
|
|
973
|
+
* @enum {string}
|
|
974
|
+
*/
|
|
975
|
+
eventName: "product_viewed" | "product_added" | "checkout_started" | "checkout_completed" | "page_viewed";
|
|
976
|
+
/** @description Additional context information. */
|
|
977
|
+
metadata?: {
|
|
978
|
+
[key: string]: unknown;
|
|
979
|
+
};
|
|
980
|
+
/** @description Product ID if event is related to a specific product. */
|
|
981
|
+
productId?: string;
|
|
982
|
+
/** @description Whether the Redo protection was selected in the UI. */
|
|
983
|
+
redoSelected?: boolean;
|
|
984
|
+
/** @description The Shopify shop domain. */
|
|
985
|
+
shopDomain: string;
|
|
986
|
+
/**
|
|
987
|
+
* Format: date-time
|
|
988
|
+
* @description ISO 8601 timestamp when the event occurred.
|
|
989
|
+
*/
|
|
990
|
+
timestamp: string;
|
|
991
|
+
/** @description Variant ID if event is related to a specific product variant. */
|
|
992
|
+
variantId?: string;
|
|
993
|
+
};
|
|
936
994
|
/**
|
|
937
995
|
* Webhook create
|
|
938
996
|
* @description Webhook create.
|
|
@@ -1596,6 +1654,40 @@ export interface operations {
|
|
|
1596
1654
|
};
|
|
1597
1655
|
};
|
|
1598
1656
|
};
|
|
1657
|
+
/**
|
|
1658
|
+
* Receive storefront events
|
|
1659
|
+
* @description Processes events from storefronts using Shopify pixel event schema
|
|
1660
|
+
*/
|
|
1661
|
+
storefrontEvent: {
|
|
1662
|
+
parameters: {
|
|
1663
|
+
path: {
|
|
1664
|
+
storeId: components["parameters"]["store-id.param"];
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
requestBody: {
|
|
1668
|
+
content: {
|
|
1669
|
+
"application/json": components["schemas"]["storefront-event.schema"];
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
responses: {
|
|
1673
|
+
/** @description Event processed successfully */
|
|
1674
|
+
204: {
|
|
1675
|
+
content: never;
|
|
1676
|
+
};
|
|
1677
|
+
/** @description Invalid event payload */
|
|
1678
|
+
400: {
|
|
1679
|
+
content: {
|
|
1680
|
+
"application/json": components["schemas"]["error.schema"];
|
|
1681
|
+
};
|
|
1682
|
+
};
|
|
1683
|
+
/** @description Error */
|
|
1684
|
+
default: {
|
|
1685
|
+
content: {
|
|
1686
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
};
|
|
1690
|
+
};
|
|
1599
1691
|
/**
|
|
1600
1692
|
* List webhooks
|
|
1601
1693
|
* @description List webhooks for store.
|
package/lib/openapi.yaml
CHANGED
|
@@ -738,6 +738,10 @@ components:
|
|
|
738
738
|
$ref: '#/components/schemas/return-status.schema'
|
|
739
739
|
description: Return status.
|
|
740
740
|
title: Status
|
|
741
|
+
type:
|
|
742
|
+
$ref: '#/components/schemas/return-type.schema'
|
|
743
|
+
description: Return type.
|
|
744
|
+
title: Type
|
|
741
745
|
updatedAt:
|
|
742
746
|
description: Time of last update.
|
|
743
747
|
format: date-time
|
|
@@ -801,6 +805,16 @@ components:
|
|
|
801
805
|
example: open
|
|
802
806
|
title: Return status
|
|
803
807
|
type: string
|
|
808
|
+
return-type.schema:
|
|
809
|
+
description: |
|
|
810
|
+
Return type.
|
|
811
|
+
enum:
|
|
812
|
+
- claim
|
|
813
|
+
- return
|
|
814
|
+
- warranty
|
|
815
|
+
example: return
|
|
816
|
+
title: Return type
|
|
817
|
+
type: string
|
|
804
818
|
shipment-document-type.schema:
|
|
805
819
|
description: Type of shipping document.
|
|
806
820
|
enum:
|
|
@@ -1030,6 +1044,62 @@ components:
|
|
|
1030
1044
|
- id
|
|
1031
1045
|
title: Storefront Customer
|
|
1032
1046
|
type: object
|
|
1047
|
+
storefront-event.schema:
|
|
1048
|
+
additionalProperties: false
|
|
1049
|
+
description: Shopify pixel event for storefront tracking.
|
|
1050
|
+
properties:
|
|
1051
|
+
cart:
|
|
1052
|
+
$ref: '#/components/schemas/storefront-cart.schema'
|
|
1053
|
+
description: Cart information if relevant to the event.
|
|
1054
|
+
clientId:
|
|
1055
|
+
description: Identifier for the client that generated the event.
|
|
1056
|
+
type: string
|
|
1057
|
+
customer:
|
|
1058
|
+
$ref: '#/components/schemas/storefront-customer.schema'
|
|
1059
|
+
description: Customer information if available.
|
|
1060
|
+
customerId:
|
|
1061
|
+
description: Shopify customer ID if available.
|
|
1062
|
+
type: string
|
|
1063
|
+
eventId:
|
|
1064
|
+
description: Unique identifier for the event.
|
|
1065
|
+
type: string
|
|
1066
|
+
eventName:
|
|
1067
|
+
description: Name of the Shopify pixel event (e.g., 'product_viewed', 'checkout_started').
|
|
1068
|
+
enum:
|
|
1069
|
+
- product_viewed
|
|
1070
|
+
- product_added
|
|
1071
|
+
- checkout_started
|
|
1072
|
+
- checkout_completed
|
|
1073
|
+
- page_viewed
|
|
1074
|
+
type: string
|
|
1075
|
+
metadata:
|
|
1076
|
+
additionalProperties: true
|
|
1077
|
+
description: Additional context information.
|
|
1078
|
+
type: object
|
|
1079
|
+
productId:
|
|
1080
|
+
description: Product ID if event is related to a specific product.
|
|
1081
|
+
type: string
|
|
1082
|
+
redoSelected:
|
|
1083
|
+
description: Whether the Redo protection was selected in the UI.
|
|
1084
|
+
type: boolean
|
|
1085
|
+
shopDomain:
|
|
1086
|
+
description: The Shopify shop domain.
|
|
1087
|
+
type: string
|
|
1088
|
+
timestamp:
|
|
1089
|
+
description: ISO 8601 timestamp when the event occurred.
|
|
1090
|
+
format: date-time
|
|
1091
|
+
type: string
|
|
1092
|
+
variantId:
|
|
1093
|
+
description: Variant ID if event is related to a specific product variant.
|
|
1094
|
+
type: string
|
|
1095
|
+
required:
|
|
1096
|
+
- eventName
|
|
1097
|
+
- eventId
|
|
1098
|
+
- timestamp
|
|
1099
|
+
- clientId
|
|
1100
|
+
- shopDomain
|
|
1101
|
+
title: Storefront Event
|
|
1102
|
+
type: object
|
|
1033
1103
|
webhook-create.schema:
|
|
1034
1104
|
description: Webhook create.
|
|
1035
1105
|
properties:
|
|
@@ -1773,6 +1843,38 @@ paths:
|
|
|
1773
1843
|
parameters:
|
|
1774
1844
|
- $ref: '#/components/parameters/store-id.param'
|
|
1775
1845
|
summary: Shipment Document
|
|
1846
|
+
/stores/{storeId}/storefront/events:
|
|
1847
|
+
post:
|
|
1848
|
+
description: Processes events from storefronts using Shopify pixel event schema
|
|
1849
|
+
operationId: storefrontEvent
|
|
1850
|
+
parameters:
|
|
1851
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
1852
|
+
requestBody:
|
|
1853
|
+
content:
|
|
1854
|
+
application/json:
|
|
1855
|
+
schema:
|
|
1856
|
+
$ref: '#/components/schemas/storefront-event.schema'
|
|
1857
|
+
required: true
|
|
1858
|
+
responses:
|
|
1859
|
+
'204':
|
|
1860
|
+
description: Event processed successfully
|
|
1861
|
+
'400':
|
|
1862
|
+
content:
|
|
1863
|
+
application/json:
|
|
1864
|
+
schema:
|
|
1865
|
+
$ref: '#/components/schemas/error.schema'
|
|
1866
|
+
description: Invalid event payload
|
|
1867
|
+
default:
|
|
1868
|
+
content:
|
|
1869
|
+
application/problem+json:
|
|
1870
|
+
schema:
|
|
1871
|
+
$ref: '#/components/schemas/error.schema'
|
|
1872
|
+
description: Error
|
|
1873
|
+
security:
|
|
1874
|
+
- Bearer: []
|
|
1875
|
+
summary: Receive storefront events
|
|
1876
|
+
tags:
|
|
1877
|
+
- Storefront
|
|
1776
1878
|
/stores/{storeId}/webhooks:
|
|
1777
1879
|
description: Webhooks.
|
|
1778
1880
|
get:
|
package/package.json
CHANGED