@shopify/shop-minis-platform 0.0.0-snapshot.20250703092030

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/LICENSE.txt ADDED
@@ -0,0 +1,9 @@
1
+ Copyright (c) 2023-present Shopify Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ The rights granted above may only be exercised to develop and distribute applications that integrate or interoperate with Shopify software or services, and, if applicable, to distribute, offer for sale or otherwise make available any such applications via the Shopify app store. All other uses of the Software are strictly prohibited.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # @shopify/shop-minis-platform
2
+
3
+ Shared type definitions for Shop Minis Platform.
4
+
5
+ ## Purpose
6
+
7
+ This package provides shared type definitions that can be used across different parts of the Shop Minis Platform, particularly between `shop-minis-react` and the Shop app.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @shopify/shop-minis-platform
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```typescript
18
+ import type {} from '@shopify/shop-minis-platform'
19
+ ```
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@shopify/shop-minis-platform",
3
+ "license": "SEE LICENSE IN LICENSE.txt",
4
+ "version": "0.0.0-snapshot.20250703092030",
5
+ "description": "Shared type definitions for Shop Minis Platform",
6
+ "main": "src/index.ts",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "@shopify:registry": "https://registry.npmjs.org/"
10
+ },
11
+ "files": [
12
+ "src/**/*.{ts,tsx,css}",
13
+ "README.md",
14
+ "LICENSE.txt"
15
+ ],
16
+ "dependencies": {},
17
+ "peerDependencies": {},
18
+ "devDependencies": {},
19
+ "author": "Shopify",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/Shopify/shop-client.git",
23
+ "directory": "packages/minis/shop-minis-platform"
24
+ },
25
+ "scripts": {
26
+ "test": "TZ=UTC jest",
27
+ "tsc:build": "tsc --build ./tsconfig.json"
28
+ }
29
+ }
@@ -0,0 +1,211 @@
1
+ import {ProductList} from '../types'
2
+
3
+ import {
4
+ FollowShopParams,
5
+ UnfollowShopParams,
6
+ FavoriteParams,
7
+ UnfavoriteParams,
8
+ GetShopAppInformationResponse,
9
+ ProductRecommendationImpressionParams,
10
+ ProductRecommendationClickParams,
11
+ GetAccountInformationParams,
12
+ GetAccountInformationResponse,
13
+ GetCurrentUserParams,
14
+ GetCurrentUserResponse,
15
+ CreateOrderAttributionParams,
16
+ AddToCartParams,
17
+ BuyProductParams,
18
+ BuyProductsParams,
19
+ ShowErrorScreenParams,
20
+ ShowErrorToastParams,
21
+ GetDeeplinkPathsResponse,
22
+ NavigateToDeeplinkParams,
23
+ NavigateToShopParams,
24
+ NavigateToProductParams,
25
+ NavigateToOrderParams,
26
+ NavigateToCheckoutParams,
27
+ CreateImageUploadLinkParams,
28
+ CreateImageUploadLinkResponse,
29
+ CompleteImageUploadParams,
30
+ CompleteImageUploadResponse,
31
+ GetAsyncStorageItemParams,
32
+ SetAsyncStorageItemParams,
33
+ RemoveAsyncStorageItemParams,
34
+ SetSecretParams,
35
+ ReportInteractionParams,
36
+ ReportImpressionParams,
37
+ ReportContentImpressionParams,
38
+ GetProductListsParams,
39
+ GetProductListsResponse,
40
+ GetProductListParams,
41
+ GetProductListResponse,
42
+ AddProductListParams,
43
+ RemoveProductListParams,
44
+ RenameProductListParams,
45
+ AddProductListItemParams,
46
+ RemoveProductListItemParams,
47
+ GetRecommendedProductsParams,
48
+ GetRecommendedProductsResponse,
49
+ GetRecommendedShopsParams,
50
+ GetRecommendedShopsResponse,
51
+ SearchProductsByShopParams,
52
+ SearchProductsByShopResponse,
53
+ GetOrdersParams,
54
+ GetOrdersResponse,
55
+ GetBuyerAttributesParams,
56
+ GetBuyerAttributesResponse,
57
+ ShowFeedbackSheetParams,
58
+ GetPopularProductsParams,
59
+ GetPopularProductsResponse,
60
+ ShareParams,
61
+ ShareResponse,
62
+ GetCuratedProductsParams,
63
+ GetCuratedProductsResponse,
64
+ GetSavedProductsParams,
65
+ GetSavedProductsResponse,
66
+ GetRecentProductsParams,
67
+ GetRecentProductsResponse,
68
+ GetProductSearchParams,
69
+ GetProductSearchResponse,
70
+ GetProductsParams,
71
+ GetProductsResponse,
72
+ GetProductParams,
73
+ GetProductResponse,
74
+ GetProductVariantsParams,
75
+ GetProductVariantsResponse,
76
+ GetProductMediaParams,
77
+ GetProductMediaResponse,
78
+ GetShopParams,
79
+ GetShopResponse,
80
+ GetRecentShopsParams,
81
+ GetRecentShopsResponse,
82
+ GetFollowedShopsParams,
83
+ GetFollowedShopsResponse,
84
+ PreviewProductInARParams,
85
+ } from './params'
86
+ import {ShopAction, SnakeToCamelCase} from './shared'
87
+
88
+ export type ShopActions = {
89
+ [K in keyof ShopActionEvents as SnakeToCamelCase<K>]: ShopActionEvents[K]
90
+ }
91
+ export interface ShopActionEvents {
92
+ FOLLOW_SHOP: ShopAction<FollowShopParams, boolean>
93
+ UNFOLLOW_SHOP: ShopAction<UnfollowShopParams, boolean>
94
+ FAVORITE: ShopAction<FavoriteParams, void>
95
+ UNFAVORITE: ShopAction<UnfavoriteParams, void>
96
+ GET_SHOP_APP_INFORMATION: ShopAction<void, GetShopAppInformationResponse>
97
+ PRODUCT_RECOMMENDATION_IMPRESSION: ShopAction<
98
+ ProductRecommendationImpressionParams,
99
+ void
100
+ >
101
+ PRODUCT_RECOMMENDATION_CLICK: ShopAction<
102
+ ProductRecommendationClickParams,
103
+ void
104
+ >
105
+ HIDE_ENTRY_POINT: ShopAction<void, void>
106
+ CLOSE_MINI: ShopAction<void, void>
107
+ GET_ACCOUNT_INFORMATION: ShopAction<
108
+ GetAccountInformationParams,
109
+ GetAccountInformationResponse
110
+ >
111
+ GET_CURRENT_USER: ShopAction<GetCurrentUserParams, GetCurrentUserResponse>
112
+ CREATE_ORDER_ATTRIBUTION: ShopAction<CreateOrderAttributionParams, void>
113
+ ADD_TO_CART: ShopAction<AddToCartParams, void>
114
+ BUY_PRODUCT: ShopAction<BuyProductParams, void>
115
+ BUY_PRODUCTS: ShopAction<BuyProductsParams, void>
116
+ SHOW_ERROR_SCREEN: ShopAction<ShowErrorScreenParams, void>
117
+ SHOW_ERROR_TOAST: ShopAction<ShowErrorToastParams, void>
118
+ GET_DEEPLINK_PATHS: ShopAction<void, GetDeeplinkPathsResponse>
119
+ NAVIGATE_TO_DEEPLINK: ShopAction<NavigateToDeeplinkParams, void>
120
+ NAVIGATE_TO_SHOP: ShopAction<NavigateToShopParams, void>
121
+ NAVIGATE_TO_PRODUCT: ShopAction<NavigateToProductParams, void>
122
+ NAVIGATE_TO_ORDER: ShopAction<NavigateToOrderParams, void>
123
+ NAVIGATE_TO_CHECKOUT: ShopAction<NavigateToCheckoutParams, void>
124
+ CREATE_IMAGE_UPLOAD_LINK: ShopAction<
125
+ CreateImageUploadLinkParams,
126
+ CreateImageUploadLinkResponse
127
+ >
128
+ COMPLETE_IMAGE_UPLOAD: ShopAction<
129
+ CompleteImageUploadParams,
130
+ CompleteImageUploadResponse
131
+ >
132
+ GET_PERSISTED_ITEM: ShopAction<GetAsyncStorageItemParams, string | null>
133
+ SET_PERSISTED_ITEM: ShopAction<SetAsyncStorageItemParams, void>
134
+ REMOVE_PERSISTED_ITEM: ShopAction<RemoveAsyncStorageItemParams, void>
135
+ GET_ALL_PERSISTED_KEYS: ShopAction<void, string[]>
136
+ CLEAR_PERSISTED_ITEMS: ShopAction<void, void>
137
+ GET_INTERNAL_PERSISTED_ITEM: ShopAction<
138
+ GetAsyncStorageItemParams,
139
+ string | null
140
+ >
141
+ SET_INTERNAL_PERSISTED_ITEM: ShopAction<SetAsyncStorageItemParams, void>
142
+ REMOVE_INTERNAL_PERSISTED_ITEM: ShopAction<RemoveAsyncStorageItemParams, void>
143
+ GET_ALL_INTERNAL_PERSISTED_KEYS: ShopAction<void, string[]>
144
+ CLEAR_INTERNAL_PERSISTED_ITEMS: ShopAction<void, void>
145
+ GET_SECRET: ShopAction<void, string | null>
146
+ SET_SECRET: ShopAction<SetSecretParams, void>
147
+ REMOVE_SECRET: ShopAction<void, void>
148
+ REPORT_INTERACTION: ShopAction<ReportInteractionParams, void>
149
+ REPORT_IMPRESSION: ShopAction<ReportImpressionParams, void>
150
+ REPORT_CONTENT_IMPRESSION: ShopAction<ReportContentImpressionParams, void>
151
+ GET_PRODUCT_LISTS: ShopAction<GetProductListsParams, GetProductListsResponse>
152
+ GET_PRODUCT_LIST: ShopAction<GetProductListParams, GetProductListResponse>
153
+ ADD_PRODUCT_LIST: ShopAction<AddProductListParams, ProductList>
154
+ REMOVE_PRODUCT_LIST: ShopAction<RemoveProductListParams, void>
155
+ RENAME_PRODUCT_LIST: ShopAction<RenameProductListParams, ProductList>
156
+ ADD_PRODUCT_LIST_ITEM: ShopAction<AddProductListItemParams, void>
157
+ REMOVE_PRODUCT_LIST_ITEM: ShopAction<RemoveProductListItemParams, void>
158
+ GET_RECOMMENDED_PRODUCTS: ShopAction<
159
+ GetRecommendedProductsParams,
160
+ GetRecommendedProductsResponse
161
+ >
162
+ GET_RECOMMENDED_SHOPS: ShopAction<
163
+ GetRecommendedShopsParams,
164
+ GetRecommendedShopsResponse
165
+ >
166
+ SEARCH_PRODUCTS_BY_SHOP: ShopAction<
167
+ SearchProductsByShopParams,
168
+ SearchProductsByShopResponse
169
+ >
170
+ GET_ORDERS: ShopAction<GetOrdersParams, GetOrdersResponse>
171
+ GET_BUYER_ATTRIBUTES: ShopAction<
172
+ GetBuyerAttributesParams,
173
+ GetBuyerAttributesResponse
174
+ >
175
+ SHOW_FEEDBACK_SHEET: ShopAction<ShowFeedbackSheetParams, void>
176
+ GET_POPULAR_PRODUCTS: ShopAction<
177
+ GetPopularProductsParams,
178
+ GetPopularProductsResponse
179
+ >
180
+ SHARE: ShopAction<ShareParams, ShareResponse>
181
+ GET_CURATED_PRODUCTS: ShopAction<
182
+ GetCuratedProductsParams,
183
+ GetCuratedProductsResponse
184
+ >
185
+ GET_SAVED_PRODUCTS: ShopAction<
186
+ GetSavedProductsParams,
187
+ GetSavedProductsResponse
188
+ >
189
+ GET_RECENT_PRODUCTS: ShopAction<
190
+ GetRecentProductsParams,
191
+ GetRecentProductsResponse
192
+ >
193
+ GET_PRODUCT_SEARCH: ShopAction<
194
+ GetProductSearchParams,
195
+ GetProductSearchResponse
196
+ >
197
+ GET_PRODUCTS: ShopAction<GetProductsParams, GetProductsResponse>
198
+ GET_PRODUCT: ShopAction<GetProductParams, GetProductResponse>
199
+ GET_PRODUCT_VARIANTS: ShopAction<
200
+ GetProductVariantsParams,
201
+ GetProductVariantsResponse
202
+ >
203
+ GET_PRODUCT_MEDIA: ShopAction<GetProductMediaParams, GetProductMediaResponse>
204
+ GET_SHOP: ShopAction<GetShopParams, GetShopResponse>
205
+ GET_RECENT_SHOPS: ShopAction<GetRecentShopsParams, GetRecentShopsResponse>
206
+ GET_FOLLOWED_SHOPS: ShopAction<
207
+ GetFollowedShopsParams,
208
+ GetFollowedShopsResponse
209
+ >
210
+ PREVIEW_PRODUCT_IN_AR: ShopAction<PreviewProductInARParams, void>
211
+ }
@@ -0,0 +1,3 @@
1
+ export * from './actions'
2
+ export * from './shared'
3
+ export * from './params'