@redotech/redo-api-schema 2.2.137 → 2.2.146

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 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
@@ -946,6 +953,68 @@ export interface components {
946
953
  */
947
954
  id: string;
948
955
  };
956
+ /**
957
+ * Storefront Event
958
+ * @description Shopify pixel event for storefront tracking.
959
+ */
960
+ "storefront-event.schema": ({
961
+ /** @description Anonymous identifier for users without account. */
962
+ anonymousId?: string;
963
+ /** @description Cart information. */
964
+ cart?: Record<string, never> | null;
965
+ /** @description Information about specific cart line item. */
966
+ cartLine?: Record<string, never>;
967
+ /** @description Checkout information. */
968
+ checkout?: Record<string, never>;
969
+ /** @description Collection information. */
970
+ collection?: Record<string, never>;
971
+ /** @description Customer information if available. */
972
+ customer?: Record<string, never> | null;
973
+ /**
974
+ * Format: email
975
+ * @description Customer email if available.
976
+ */
977
+ customerEmail?: string;
978
+ /** @description Customer phone if available. */
979
+ customerPhone?: string;
980
+ /** @description Unique identifier for the event. */
981
+ eventId?: string;
982
+ /**
983
+ * @description Name of the Shopify pixel event.
984
+ * @enum {string}
985
+ */
986
+ eventName?: "product_added_to_cart" | "product_removed_from_cart" | "product_viewed" | "checkout_started" | "checkout_completed" | "checkout_contact_info_submitted" | "page_viewed" | "collection_viewed";
987
+ /** @description Product variant information. */
988
+ productVariant?: Record<string, never>;
989
+ /**
990
+ * Format: date-time
991
+ * @description ISO 8601 timestamp when the event occurred.
992
+ */
993
+ timestamp?: string;
994
+ /** @description Page URL without query parameters. */
995
+ urlWithoutParams?: string;
996
+ /** @description Complete page URL with query parameters. */
997
+ urlWithParams?: string;
998
+ [key: string]: unknown;
999
+ }) & ({
1000
+ /** @enum {unknown} */
1001
+ eventName?: "product_added_to_cart";
1002
+ } | {
1003
+ /** @enum {unknown} */
1004
+ eventName?: "product_removed_from_cart";
1005
+ } | {
1006
+ /** @enum {unknown} */
1007
+ eventName?: "product_viewed";
1008
+ } | ({
1009
+ /** @enum {unknown} */
1010
+ eventName?: "checkout_started" | "checkout_completed" | "checkout_contact_info_submitted";
1011
+ }) | {
1012
+ /** @enum {unknown} */
1013
+ eventName?: "page_viewed";
1014
+ } | {
1015
+ /** @enum {unknown} */
1016
+ eventName?: "collection_viewed";
1017
+ });
949
1018
  /**
950
1019
  * Webhook create
951
1020
  * @description Webhook create.
@@ -1609,6 +1678,40 @@ export interface operations {
1609
1678
  };
1610
1679
  };
1611
1680
  };
1681
+ /**
1682
+ * Receive storefront events
1683
+ * @description Processes events from storefronts using Shopify pixel event schema
1684
+ */
1685
+ storefrontEvent: {
1686
+ parameters: {
1687
+ path: {
1688
+ storeId: components["parameters"]["store-id.param"];
1689
+ };
1690
+ };
1691
+ requestBody: {
1692
+ content: {
1693
+ "application/json": components["schemas"]["storefront-event.schema"];
1694
+ };
1695
+ };
1696
+ responses: {
1697
+ /** @description Event processed successfully */
1698
+ 204: {
1699
+ content: never;
1700
+ };
1701
+ /** @description Invalid event payload */
1702
+ 400: {
1703
+ content: {
1704
+ "application/json": components["schemas"]["error.schema"];
1705
+ };
1706
+ };
1707
+ /** @description Error */
1708
+ default: {
1709
+ content: {
1710
+ "application/problem+json": components["schemas"]["error.schema"];
1711
+ };
1712
+ };
1713
+ };
1714
+ };
1612
1715
  /**
1613
1716
  * List webhooks
1614
1717
  * @description List webhooks for store.
package/lib/openapi.yaml CHANGED
@@ -1044,6 +1044,118 @@ components:
1044
1044
  - id
1045
1045
  title: Storefront Customer
1046
1046
  type: object
1047
+ storefront-event.schema:
1048
+ additionalProperties: true
1049
+ allOf:
1050
+ - required:
1051
+ - eventName
1052
+ - eventId
1053
+ - timestamp
1054
+ - oneOf:
1055
+ - required:
1056
+ - customer
1057
+ - required:
1058
+ - anonymousId
1059
+ description: Shopify pixel event for storefront tracking.
1060
+ oneOf:
1061
+ - properties:
1062
+ eventName:
1063
+ enum:
1064
+ - product_added_to_cart
1065
+ required:
1066
+ - cartLine
1067
+ - cart
1068
+ - properties:
1069
+ eventName:
1070
+ enum:
1071
+ - product_removed_from_cart
1072
+ required:
1073
+ - cartLine
1074
+ - cart
1075
+ - properties:
1076
+ eventName:
1077
+ enum:
1078
+ - product_viewed
1079
+ required:
1080
+ - productVariant
1081
+ - properties:
1082
+ eventName:
1083
+ enum:
1084
+ - checkout_started
1085
+ - checkout_completed
1086
+ - checkout_contact_info_submitted
1087
+ required:
1088
+ - checkout
1089
+ - properties:
1090
+ eventName:
1091
+ enum:
1092
+ - page_viewed
1093
+ - properties:
1094
+ eventName:
1095
+ enum:
1096
+ - collection_viewed
1097
+ required:
1098
+ - collection
1099
+ properties:
1100
+ anonymousId:
1101
+ description: Anonymous identifier for users without account.
1102
+ type: string
1103
+ cart:
1104
+ description: Cart information.
1105
+ type:
1106
+ - object
1107
+ - 'null'
1108
+ cartLine:
1109
+ description: Information about specific cart line item.
1110
+ type: object
1111
+ checkout:
1112
+ description: Checkout information.
1113
+ type: object
1114
+ collection:
1115
+ description: Collection information.
1116
+ type: object
1117
+ customer:
1118
+ description: Customer information if available.
1119
+ type:
1120
+ - object
1121
+ - 'null'
1122
+ customerEmail:
1123
+ description: Customer email if available.
1124
+ format: email
1125
+ type: string
1126
+ customerPhone:
1127
+ description: Customer phone if available.
1128
+ type: string
1129
+ eventId:
1130
+ description: Unique identifier for the event.
1131
+ type: string
1132
+ eventName:
1133
+ description: Name of the Shopify pixel event.
1134
+ enum:
1135
+ - product_added_to_cart
1136
+ - product_removed_from_cart
1137
+ - product_viewed
1138
+ - checkout_started
1139
+ - checkout_completed
1140
+ - checkout_contact_info_submitted
1141
+ - page_viewed
1142
+ - collection_viewed
1143
+ type: string
1144
+ productVariant:
1145
+ description: Product variant information.
1146
+ type: object
1147
+ timestamp:
1148
+ description: ISO 8601 timestamp when the event occurred.
1149
+ format: date-time
1150
+ type: string
1151
+ urlWithParams:
1152
+ description: Complete page URL with query parameters.
1153
+ type: string
1154
+ urlWithoutParams:
1155
+ description: Page URL without query parameters.
1156
+ type: string
1157
+ title: Storefront Event
1158
+ type: object
1047
1159
  webhook-create.schema:
1048
1160
  description: Webhook create.
1049
1161
  properties:
@@ -1787,6 +1899,38 @@ paths:
1787
1899
  parameters:
1788
1900
  - $ref: '#/components/parameters/store-id.param'
1789
1901
  summary: Shipment Document
1902
+ /stores/{storeId}/storefront/events:
1903
+ post:
1904
+ description: Processes events from storefronts using Shopify pixel event schema
1905
+ operationId: storefrontEvent
1906
+ parameters:
1907
+ - $ref: '#/components/parameters/store-id.param'
1908
+ requestBody:
1909
+ content:
1910
+ application/json:
1911
+ schema:
1912
+ $ref: '#/components/schemas/storefront-event.schema'
1913
+ required: true
1914
+ responses:
1915
+ '204':
1916
+ description: Event processed successfully
1917
+ '400':
1918
+ content:
1919
+ application/json:
1920
+ schema:
1921
+ $ref: '#/components/schemas/error.schema'
1922
+ description: Invalid event payload
1923
+ default:
1924
+ content:
1925
+ application/problem+json:
1926
+ schema:
1927
+ $ref: '#/components/schemas/error.schema'
1928
+ description: Error
1929
+ security:
1930
+ - Bearer: []
1931
+ summary: Receive storefront events
1932
+ tags:
1933
+ - Storefront
1790
1934
  /stores/{storeId}/webhooks:
1791
1935
  description: Webhooks.
1792
1936
  get:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.137"
34
+ "version": "2.2.146"
35
35
  }