@decocms/apps-shopify 7.2.0 → 7.2.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/apps-shopify",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco commerce app: Shopify integration",
|
|
6
6
|
"repository": {
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"url": "https://github.com/decocms/blocks.git",
|
|
9
9
|
"directory": "packages/apps-shopify"
|
|
10
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"src",
|
|
13
|
+
"tsconfig.json"
|
|
14
|
+
],
|
|
11
15
|
"main": "./src/index.ts",
|
|
12
16
|
"exports": {
|
|
13
17
|
".": "./src/index.ts",
|
|
@@ -27,9 +31,9 @@
|
|
|
27
31
|
"lint:unused": "knip"
|
|
28
32
|
},
|
|
29
33
|
"dependencies": {
|
|
30
|
-
"@decocms/blocks": "7.2.
|
|
31
|
-
"@decocms/apps-commerce": "7.2.
|
|
32
|
-
"@decocms/tanstack": "7.2.
|
|
34
|
+
"@decocms/blocks": "7.2.1",
|
|
35
|
+
"@decocms/apps-commerce": "7.2.1",
|
|
36
|
+
"@decocms/tanstack": "7.2.1"
|
|
33
37
|
},
|
|
34
38
|
"peerDependencies": {
|
|
35
39
|
"react": "^19.0.0",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate-manifests.ts — DO NOT EDIT
|
|
2
|
+
// This file is checked into source control and updated via: npm run generate:manifests
|
|
3
|
+
|
|
4
|
+
import * as actions_cart_addItems from "./actions/cart/addItems";
|
|
5
|
+
import * as actions_cart_updateCoupons from "./actions/cart/updateCoupons";
|
|
6
|
+
import * as actions_cart_updateItems from "./actions/cart/updateItems";
|
|
7
|
+
import * as actions_user_signIn from "./actions/user/signIn";
|
|
8
|
+
import * as actions_user_signUp from "./actions/user/signUp";
|
|
9
|
+
import * as loaders_cart from "./loaders/cart";
|
|
10
|
+
import * as loaders_ProductDetailsPage from "./loaders/ProductDetailsPage";
|
|
11
|
+
import * as loaders_ProductList from "./loaders/ProductList";
|
|
12
|
+
import * as loaders_ProductListingPage from "./loaders/ProductListingPage";
|
|
13
|
+
import * as loaders_RelatedProducts from "./loaders/RelatedProducts";
|
|
14
|
+
import * as loaders_shop from "./loaders/shop";
|
|
15
|
+
import * as loaders_user from "./loaders/user";
|
|
16
|
+
|
|
17
|
+
const manifest = {
|
|
18
|
+
name: "shopify",
|
|
19
|
+
loaders: {
|
|
20
|
+
"shopify/loaders/ProductDetailsPage": loaders_ProductDetailsPage,
|
|
21
|
+
"shopify/loaders/ProductList": loaders_ProductList,
|
|
22
|
+
"shopify/loaders/ProductListingPage": loaders_ProductListingPage,
|
|
23
|
+
"shopify/loaders/RelatedProducts": loaders_RelatedProducts,
|
|
24
|
+
"shopify/loaders/cart": loaders_cart,
|
|
25
|
+
"shopify/loaders/shop": loaders_shop,
|
|
26
|
+
"shopify/loaders/user": loaders_user,
|
|
27
|
+
},
|
|
28
|
+
actions: {
|
|
29
|
+
"shopify/actions/cart/addItems": actions_cart_addItems,
|
|
30
|
+
"shopify/actions/cart/updateCoupons": actions_cart_updateCoupons,
|
|
31
|
+
"shopify/actions/cart/updateItems": actions_cart_updateItems,
|
|
32
|
+
"shopify/actions/user/signIn": actions_user_signIn,
|
|
33
|
+
"shopify/actions/user/signUp": actions_user_signUp,
|
|
34
|
+
},
|
|
35
|
+
sections: {},
|
|
36
|
+
} as const;
|
|
37
|
+
|
|
38
|
+
export type Manifest = typeof manifest;
|
|
39
|
+
export default manifest;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shopify Storefront API GraphQL type stubs.
|
|
3
|
+
* These replace the auto-generated types from the original deco-cx/apps.
|
|
4
|
+
* Types are simplified but maintain the interface contract.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Cart types
|
|
8
|
+
export type CartFragment = {
|
|
9
|
+
id: string;
|
|
10
|
+
checkoutUrl: string;
|
|
11
|
+
totalQuantity: number;
|
|
12
|
+
lines: {
|
|
13
|
+
nodes: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
quantity: number;
|
|
16
|
+
merchandise: {
|
|
17
|
+
__typename?: string;
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
image?: { url: string; altText?: string | null } | null;
|
|
21
|
+
product: { title: string; handle: string; onlineStoreUrl?: string | null };
|
|
22
|
+
price: { amount: string; currencyCode: string };
|
|
23
|
+
compareAtPrice?: { amount: string; currencyCode: string } | null;
|
|
24
|
+
};
|
|
25
|
+
discountAllocations?: Array<{
|
|
26
|
+
__typename?: string;
|
|
27
|
+
code?: string;
|
|
28
|
+
}>;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
cost: {
|
|
32
|
+
totalAmount: { amount: string; currencyCode: string };
|
|
33
|
+
subtotalAmount: { amount: string; currencyCode: string };
|
|
34
|
+
};
|
|
35
|
+
discountCodes?: Array<{ applicable: boolean; code: string }>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Mutation types
|
|
39
|
+
export type AddItemToCartMutation = { cart?: CartFragment | null };
|
|
40
|
+
export type AddItemToCartMutationVariables = { cartId: string; lines: unknown };
|
|
41
|
+
export type UpdateItemsMutation = { cart?: CartFragment | null };
|
|
42
|
+
export type UpdateItemsMutationVariables = { cartId: string; lines: unknown };
|
|
43
|
+
export type AddCouponMutation = { cart?: CartFragment | null };
|
|
44
|
+
export type AddCouponMutationVariables = { cartId: string; discountCodes: string[] };
|
|
45
|
+
|
|
46
|
+
// Product types — these are intentionally loose stubs because the
|
|
47
|
+
// real Shopify Storefront API GraphQL types are huge and only a tiny
|
|
48
|
+
// subset is consumed. `unknown` keeps consumers honest (forces a cast
|
|
49
|
+
// at the boundary) without exploding the type surface.
|
|
50
|
+
export type ProductFragment = unknown;
|
|
51
|
+
export type ProductVariantFragment = unknown;
|
|
52
|
+
export type GetProductQuery = { product?: unknown };
|
|
53
|
+
export type GetProductQueryVariables = { handle?: string; identifiers?: unknown[] };
|
|
54
|
+
export type ProductRecommendationsQuery = { productRecommendations?: unknown[] };
|
|
55
|
+
export type ProductRecommendationsQueryVariables = { productId: string };
|
|
56
|
+
|
|
57
|
+
// Search/Collection types
|
|
58
|
+
export type InputMaybe<T> = T | null | undefined;
|
|
59
|
+
export type ProductCollectionSortKeys = string;
|
|
60
|
+
export type SearchSortKeys = string;
|
|
61
|
+
// Loose shape derived from the only consumers in
|
|
62
|
+
// `shopify/utils/utils.ts` (filterToObject + getFiltersByUrl). Keeps
|
|
63
|
+
// the types honest without depending on Shopify's full GraphQL schema.
|
|
64
|
+
export type ProductFilter = {
|
|
65
|
+
tag?: string;
|
|
66
|
+
productType?: string;
|
|
67
|
+
productVendor?: string;
|
|
68
|
+
available?: boolean;
|
|
69
|
+
price?: { min?: number; max?: number };
|
|
70
|
+
variantOption?: { name: string; value: string };
|
|
71
|
+
productMetafield?: { namespace: string; key: string; value: string };
|
|
72
|
+
taxonomyMetafield?: { namespace: string; key: string; value: string };
|
|
73
|
+
category?: { id: string };
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// Customer types
|
|
77
|
+
export type Customer = {
|
|
78
|
+
id: string;
|
|
79
|
+
firstName?: string | null;
|
|
80
|
+
lastName?: string | null;
|
|
81
|
+
email?: string | null;
|
|
82
|
+
phone?: string | null;
|
|
83
|
+
acceptsMarketing?: boolean;
|
|
84
|
+
defaultAddress?: unknown;
|
|
85
|
+
addresses?: { nodes: unknown[] };
|
|
86
|
+
orders?: { nodes: unknown[] };
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export type CustomerAccessTokenCreateInput = {
|
|
90
|
+
email: string;
|
|
91
|
+
password: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type CustomerAccessTokenCreateWithMultipassPayload = {
|
|
95
|
+
customerAccessToken?: { accessToken: string; expiresAt: string } | null;
|
|
96
|
+
customerUserErrors?: Array<{ message: string; code?: string }>;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type CustomerCreateInput = {
|
|
100
|
+
email: string;
|
|
101
|
+
password: string;
|
|
102
|
+
firstName?: string;
|
|
103
|
+
lastName?: string;
|
|
104
|
+
acceptsMarketing?: boolean;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type CustomerCreatePayload = {
|
|
108
|
+
customer?: Customer | null;
|
|
109
|
+
customerUserErrors?: Array<{ message: string; code?: string }>;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// Shop types
|
|
113
|
+
export type Shop = {
|
|
114
|
+
name: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
shipsToCountries?: string[];
|
|
117
|
+
refundPolicy?: { body: string; title: string; url: string };
|
|
118
|
+
privacyPolicy?: { body: string; title: string; url: string };
|
|
119
|
+
termsOfService?: { body: string; title: string; url: string };
|
|
120
|
+
metafields?: Array<{ key: string; value: string; namespace: string } | null>;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export type ShopMetafieldsArgs = {
|
|
124
|
+
identifiers: Array<{ namespace: string; key: string }>;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// Order/Admin types
|
|
128
|
+
export type CountryCode = string;
|
|
129
|
+
export type Maybe<T> = T | null;
|