@redotech/redo-api-schema 2.2.137 → 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 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,44 @@ 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 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
+ };
949
994
  /**
950
995
  * Webhook create
951
996
  * @description Webhook create.
@@ -1609,6 +1654,40 @@ export interface operations {
1609
1654
  };
1610
1655
  };
1611
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
+ };
1612
1691
  /**
1613
1692
  * List webhooks
1614
1693
  * @description List webhooks for store.
package/lib/openapi.yaml CHANGED
@@ -1044,6 +1044,62 @@ components:
1044
1044
  - id
1045
1045
  title: Storefront Customer
1046
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
1047
1103
  webhook-create.schema:
1048
1104
  description: Webhook create.
1049
1105
  properties:
@@ -1787,6 +1843,38 @@ paths:
1787
1843
  parameters:
1788
1844
  - $ref: '#/components/parameters/store-id.param'
1789
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
1790
1878
  /stores/{storeId}/webhooks:
1791
1879
  description: Webhooks.
1792
1880
  get:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.137"
34
+ "version": "2.2.144"
35
35
  }