shopify-store-mcp 1.0.0
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 +7 -0
- package/README.md +172 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.js +65 -0
- package/dist/db.d.ts +19 -0
- package/dist/db.js +161 -0
- package/dist/errors.d.ts +36 -0
- package/dist/errors.js +93 -0
- package/dist/graphql/admin/common/collections.d.ts +8 -0
- package/dist/graphql/admin/common/collections.js +44 -0
- package/dist/graphql/admin/common/customers.d.ts +13 -0
- package/dist/graphql/admin/common/customers.js +112 -0
- package/dist/graphql/admin/common/orders.d.ts +13 -0
- package/dist/graphql/admin/common/orders.js +142 -0
- package/dist/graphql/admin/common/products.d.ts +23 -0
- package/dist/graphql/admin/common/products.js +159 -0
- package/dist/graphql/admin/common/shop.d.ts +7 -0
- package/dist/graphql/admin/common/shop.js +38 -0
- package/dist/graphql/admin/index.d.ts +15 -0
- package/dist/graphql/admin/index.js +18 -0
- package/dist/graphql/admin/specialized/bulk.d.ts +33 -0
- package/dist/graphql/admin/specialized/bulk.js +132 -0
- package/dist/graphql/admin/specialized/files.d.ts +22 -0
- package/dist/graphql/admin/specialized/files.js +170 -0
- package/dist/graphql/admin/specialized/inventory.d.ts +13 -0
- package/dist/graphql/admin/specialized/inventory.js +78 -0
- package/dist/graphql/admin/specialized/metafields.d.ts +22 -0
- package/dist/graphql/admin/specialized/metafields.js +100 -0
- package/dist/graphql/admin/specialized/metaobjects.d.ts +36 -0
- package/dist/graphql/admin/specialized/metaobjects.js +239 -0
- package/dist/graphql/admin/specialized/search.d.ts +21 -0
- package/dist/graphql/admin/specialized/search.js +100 -0
- package/dist/graphql/collections.d.ts +1 -0
- package/dist/graphql/collections.js +37 -0
- package/dist/graphql/customers.d.ts +2 -0
- package/dist/graphql/customers.js +98 -0
- package/dist/graphql/inventory.d.ts +2 -0
- package/dist/graphql/inventory.js +67 -0
- package/dist/graphql/metafields.d.ts +2 -0
- package/dist/graphql/metafields.js +43 -0
- package/dist/graphql/orders.d.ts +2 -0
- package/dist/graphql/orders.js +116 -0
- package/dist/graphql/products.d.ts +4 -0
- package/dist/graphql/products.js +140 -0
- package/dist/graphql/shop.d.ts +1 -0
- package/dist/graphql/shop.js +32 -0
- package/dist/graphql/storefront/common/cart.d.ts +23 -0
- package/dist/graphql/storefront/common/cart.js +210 -0
- package/dist/graphql/storefront/common/collections.d.ts +11 -0
- package/dist/graphql/storefront/common/collections.js +114 -0
- package/dist/graphql/storefront/common/products.d.ts +14 -0
- package/dist/graphql/storefront/common/products.js +155 -0
- package/dist/graphql/storefront/index.d.ts +7 -0
- package/dist/graphql/storefront/index.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +97 -0
- package/dist/logger.d.ts +58 -0
- package/dist/logger.js +165 -0
- package/dist/prompts/index.d.ts +2 -0
- package/dist/prompts/index.js +169 -0
- package/dist/queue.d.ts +73 -0
- package/dist/queue.js +120 -0
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.js +180 -0
- package/dist/shopify-client.d.ts +16 -0
- package/dist/shopify-client.js +39 -0
- package/dist/tools/graphql.d.ts +3 -0
- package/dist/tools/graphql.js +41 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.js +23 -0
- package/dist/tools/infrastructure.d.ts +6 -0
- package/dist/tools/infrastructure.js +215 -0
- package/dist/tools/shop.d.ts +3 -0
- package/dist/tools/shop.js +28 -0
- package/dist/tools/smart-bulk.d.ts +7 -0
- package/dist/tools/smart-bulk.js +286 -0
- package/dist/tools/smart-files.d.ts +7 -0
- package/dist/tools/smart-files.js +169 -0
- package/dist/tools/smart-metaobjects.d.ts +7 -0
- package/dist/tools/smart-metaobjects.js +186 -0
- package/dist/tools/smart-schema.d.ts +7 -0
- package/dist/tools/smart-schema.js +138 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.js +2 -0
- package/dist/utils/polling.d.ts +53 -0
- package/dist/utils/polling.js +77 -0
- package/package.json +83 -0
- package/prisma/schema.prisma +82 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphQL queries for search operations across different resource types
|
|
3
|
+
* Note: Shopify Admin API doesn't have a unified search endpoint.
|
|
4
|
+
* Use individual resource queries with the query parameter for filtering.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Search products by query string
|
|
8
|
+
*/
|
|
9
|
+
export declare const SEARCH_PRODUCTS = "#graphql\n query SearchProducts($first: Int!, $after: String, $query: String!) {\n products(first: $first, after: $after, query: $query) {\n edges {\n node {\n __typename\n id\n title\n handle\n status\n vendor\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
10
|
+
/**
|
|
11
|
+
* Search orders by query string
|
|
12
|
+
*/
|
|
13
|
+
export declare const SEARCH_ORDERS = "#graphql\n query SearchOrders($first: Int!, $after: String, $query: String!) {\n orders(first: $first, after: $after, query: $query) {\n edges {\n node {\n __typename\n id\n name\n email\n displayFinancialStatus\n displayFulfillmentStatus\n createdAt\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
14
|
+
/**
|
|
15
|
+
* Search customers by query string
|
|
16
|
+
*/
|
|
17
|
+
export declare const SEARCH_CUSTOMERS = "#graphql\n query SearchCustomers($first: Int!, $after: String, $query: String!) {\n customers(first: $first, after: $after, query: $query) {\n edges {\n node {\n __typename\n id\n displayName\n email\n numberOfOrders\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
18
|
+
/**
|
|
19
|
+
* Search collections by query string
|
|
20
|
+
*/
|
|
21
|
+
export declare const SEARCH_COLLECTIONS = "#graphql\n query SearchCollections($first: Int!, $after: String, $query: String!) {\n collections(first: $first, after: $after, query: $query) {\n edges {\n node {\n __typename\n id\n title\n handle\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphQL queries for search operations across different resource types
|
|
3
|
+
* Note: Shopify Admin API doesn't have a unified search endpoint.
|
|
4
|
+
* Use individual resource queries with the query parameter for filtering.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Search products by query string
|
|
8
|
+
*/
|
|
9
|
+
export const SEARCH_PRODUCTS = `#graphql
|
|
10
|
+
query SearchProducts($first: Int!, $after: String, $query: String!) {
|
|
11
|
+
products(first: $first, after: $after, query: $query) {
|
|
12
|
+
edges {
|
|
13
|
+
node {
|
|
14
|
+
__typename
|
|
15
|
+
id
|
|
16
|
+
title
|
|
17
|
+
handle
|
|
18
|
+
status
|
|
19
|
+
vendor
|
|
20
|
+
}
|
|
21
|
+
cursor
|
|
22
|
+
}
|
|
23
|
+
pageInfo {
|
|
24
|
+
hasNextPage
|
|
25
|
+
endCursor
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
/**
|
|
31
|
+
* Search orders by query string
|
|
32
|
+
*/
|
|
33
|
+
export const SEARCH_ORDERS = `#graphql
|
|
34
|
+
query SearchOrders($first: Int!, $after: String, $query: String!) {
|
|
35
|
+
orders(first: $first, after: $after, query: $query) {
|
|
36
|
+
edges {
|
|
37
|
+
node {
|
|
38
|
+
__typename
|
|
39
|
+
id
|
|
40
|
+
name
|
|
41
|
+
email
|
|
42
|
+
displayFinancialStatus
|
|
43
|
+
displayFulfillmentStatus
|
|
44
|
+
createdAt
|
|
45
|
+
}
|
|
46
|
+
cursor
|
|
47
|
+
}
|
|
48
|
+
pageInfo {
|
|
49
|
+
hasNextPage
|
|
50
|
+
endCursor
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
/**
|
|
56
|
+
* Search customers by query string
|
|
57
|
+
*/
|
|
58
|
+
export const SEARCH_CUSTOMERS = `#graphql
|
|
59
|
+
query SearchCustomers($first: Int!, $after: String, $query: String!) {
|
|
60
|
+
customers(first: $first, after: $after, query: $query) {
|
|
61
|
+
edges {
|
|
62
|
+
node {
|
|
63
|
+
__typename
|
|
64
|
+
id
|
|
65
|
+
displayName
|
|
66
|
+
email
|
|
67
|
+
numberOfOrders
|
|
68
|
+
}
|
|
69
|
+
cursor
|
|
70
|
+
}
|
|
71
|
+
pageInfo {
|
|
72
|
+
hasNextPage
|
|
73
|
+
endCursor
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
78
|
+
/**
|
|
79
|
+
* Search collections by query string
|
|
80
|
+
*/
|
|
81
|
+
export const SEARCH_COLLECTIONS = `#graphql
|
|
82
|
+
query SearchCollections($first: Int!, $after: String, $query: String!) {
|
|
83
|
+
collections(first: $first, after: $after, query: $query) {
|
|
84
|
+
edges {
|
|
85
|
+
node {
|
|
86
|
+
__typename
|
|
87
|
+
id
|
|
88
|
+
title
|
|
89
|
+
handle
|
|
90
|
+
}
|
|
91
|
+
cursor
|
|
92
|
+
}
|
|
93
|
+
pageInfo {
|
|
94
|
+
hasNextPage
|
|
95
|
+
endCursor
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`;
|
|
100
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COLLECTIONS_QUERY = "\n query GetCollections($first: Int!, $after: String, $query: String) {\n collections(first: $first, after: $after, query: $query) {\n edges {\n node {\n id\n title\n handle\n descriptionHtml\n sortOrder\n productsCount {\n count\n }\n ruleSet {\n appliedDisjunctively\n rules {\n column\n relation\n condition\n }\n }\n image {\n url\n altText\n }\n updatedAt\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const COLLECTIONS_QUERY = `
|
|
2
|
+
query GetCollections($first: Int!, $after: String, $query: String) {
|
|
3
|
+
collections(first: $first, after: $after, query: $query) {
|
|
4
|
+
edges {
|
|
5
|
+
node {
|
|
6
|
+
id
|
|
7
|
+
title
|
|
8
|
+
handle
|
|
9
|
+
descriptionHtml
|
|
10
|
+
sortOrder
|
|
11
|
+
productsCount {
|
|
12
|
+
count
|
|
13
|
+
}
|
|
14
|
+
ruleSet {
|
|
15
|
+
appliedDisjunctively
|
|
16
|
+
rules {
|
|
17
|
+
column
|
|
18
|
+
relation
|
|
19
|
+
condition
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
image {
|
|
23
|
+
url
|
|
24
|
+
altText
|
|
25
|
+
}
|
|
26
|
+
updatedAt
|
|
27
|
+
}
|
|
28
|
+
cursor
|
|
29
|
+
}
|
|
30
|
+
pageInfo {
|
|
31
|
+
hasNextPage
|
|
32
|
+
endCursor
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
//# sourceMappingURL=collections.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const CUSTOMERS_QUERY = "\n query GetCustomers($first: Int!, $after: String, $query: String) {\n customers(first: $first, after: $after, query: $query) {\n edges {\n node {\n id\n displayName\n email\n phone\n state\n numberOfOrders\n amountSpent {\n amount\n currencyCode\n }\n createdAt\n updatedAt\n tags\n defaultAddress {\n city\n province\n country\n }\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
2
|
+
export declare const CUSTOMER_QUERY = "\n query GetCustomer($id: ID!) {\n customer(id: $id) {\n id\n displayName\n firstName\n lastName\n email\n phone\n state\n note\n tags\n numberOfOrders\n amountSpent {\n amount\n currencyCode\n }\n createdAt\n updatedAt\n defaultAddress {\n address1\n address2\n city\n province\n country\n zip\n phone\n }\n addresses {\n address1\n address2\n city\n province\n country\n zip\n }\n orders(first: 10) {\n edges {\n node {\n id\n name\n createdAt\n displayFinancialStatus\n displayFulfillmentStatus\n totalPriceSet {\n shopMoney { amount currencyCode }\n }\n }\n }\n }\n metafields(first: 10) {\n edges {\n node {\n id\n namespace\n key\n value\n type\n }\n }\n }\n }\n }\n";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export const CUSTOMERS_QUERY = `
|
|
2
|
+
query GetCustomers($first: Int!, $after: String, $query: String) {
|
|
3
|
+
customers(first: $first, after: $after, query: $query) {
|
|
4
|
+
edges {
|
|
5
|
+
node {
|
|
6
|
+
id
|
|
7
|
+
displayName
|
|
8
|
+
email
|
|
9
|
+
phone
|
|
10
|
+
state
|
|
11
|
+
numberOfOrders
|
|
12
|
+
amountSpent {
|
|
13
|
+
amount
|
|
14
|
+
currencyCode
|
|
15
|
+
}
|
|
16
|
+
createdAt
|
|
17
|
+
updatedAt
|
|
18
|
+
tags
|
|
19
|
+
defaultAddress {
|
|
20
|
+
city
|
|
21
|
+
province
|
|
22
|
+
country
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
cursor
|
|
26
|
+
}
|
|
27
|
+
pageInfo {
|
|
28
|
+
hasNextPage
|
|
29
|
+
endCursor
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
export const CUSTOMER_QUERY = `
|
|
35
|
+
query GetCustomer($id: ID!) {
|
|
36
|
+
customer(id: $id) {
|
|
37
|
+
id
|
|
38
|
+
displayName
|
|
39
|
+
firstName
|
|
40
|
+
lastName
|
|
41
|
+
email
|
|
42
|
+
phone
|
|
43
|
+
state
|
|
44
|
+
note
|
|
45
|
+
tags
|
|
46
|
+
numberOfOrders
|
|
47
|
+
amountSpent {
|
|
48
|
+
amount
|
|
49
|
+
currencyCode
|
|
50
|
+
}
|
|
51
|
+
createdAt
|
|
52
|
+
updatedAt
|
|
53
|
+
defaultAddress {
|
|
54
|
+
address1
|
|
55
|
+
address2
|
|
56
|
+
city
|
|
57
|
+
province
|
|
58
|
+
country
|
|
59
|
+
zip
|
|
60
|
+
phone
|
|
61
|
+
}
|
|
62
|
+
addresses {
|
|
63
|
+
address1
|
|
64
|
+
address2
|
|
65
|
+
city
|
|
66
|
+
province
|
|
67
|
+
country
|
|
68
|
+
zip
|
|
69
|
+
}
|
|
70
|
+
orders(first: 10) {
|
|
71
|
+
edges {
|
|
72
|
+
node {
|
|
73
|
+
id
|
|
74
|
+
name
|
|
75
|
+
createdAt
|
|
76
|
+
displayFinancialStatus
|
|
77
|
+
displayFulfillmentStatus
|
|
78
|
+
totalPriceSet {
|
|
79
|
+
shopMoney { amount currencyCode }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
metafields(first: 10) {
|
|
85
|
+
edges {
|
|
86
|
+
node {
|
|
87
|
+
id
|
|
88
|
+
namespace
|
|
89
|
+
key
|
|
90
|
+
value
|
|
91
|
+
type
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
//# sourceMappingURL=customers.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const INVENTORY_LEVELS_QUERY = "\n query GetInventoryLevels($first: Int!, $after: String, $query: String) {\n productVariants(first: $first, after: $after, query: $query) {\n edges {\n node {\n id\n title\n sku\n product {\n id\n title\n }\n inventoryItem {\n id\n tracked\n inventoryLevels(first: 10) {\n edges {\n node {\n id\n quantities(names: [\"available\", \"incoming\", \"committed\", \"reserved\", \"on_hand\"]) {\n name\n quantity\n }\n location {\n id\n name\n }\n }\n }\n }\n }\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
2
|
+
export declare const INVENTORY_ADJUST_MUTATION = "\n mutation InventoryAdjustQuantities($input: InventoryAdjustQuantitiesInput!) {\n inventoryAdjustQuantities(input: $input) {\n inventoryAdjustmentGroup {\n reason\n changes {\n name\n delta\n quantityAfterChange\n item {\n id\n }\n location {\n id\n name\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export const INVENTORY_LEVELS_QUERY = `
|
|
2
|
+
query GetInventoryLevels($first: Int!, $after: String, $query: String) {
|
|
3
|
+
productVariants(first: $first, after: $after, query: $query) {
|
|
4
|
+
edges {
|
|
5
|
+
node {
|
|
6
|
+
id
|
|
7
|
+
title
|
|
8
|
+
sku
|
|
9
|
+
product {
|
|
10
|
+
id
|
|
11
|
+
title
|
|
12
|
+
}
|
|
13
|
+
inventoryItem {
|
|
14
|
+
id
|
|
15
|
+
tracked
|
|
16
|
+
inventoryLevels(first: 10) {
|
|
17
|
+
edges {
|
|
18
|
+
node {
|
|
19
|
+
id
|
|
20
|
+
quantities(names: ["available", "incoming", "committed", "reserved", "on_hand"]) {
|
|
21
|
+
name
|
|
22
|
+
quantity
|
|
23
|
+
}
|
|
24
|
+
location {
|
|
25
|
+
id
|
|
26
|
+
name
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
cursor
|
|
34
|
+
}
|
|
35
|
+
pageInfo {
|
|
36
|
+
hasNextPage
|
|
37
|
+
endCursor
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
export const INVENTORY_ADJUST_MUTATION = `
|
|
43
|
+
mutation InventoryAdjustQuantities($input: InventoryAdjustQuantitiesInput!) {
|
|
44
|
+
inventoryAdjustQuantities(input: $input) {
|
|
45
|
+
inventoryAdjustmentGroup {
|
|
46
|
+
reason
|
|
47
|
+
changes {
|
|
48
|
+
name
|
|
49
|
+
delta
|
|
50
|
+
quantityAfterChange
|
|
51
|
+
item {
|
|
52
|
+
id
|
|
53
|
+
}
|
|
54
|
+
location {
|
|
55
|
+
id
|
|
56
|
+
name
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
userErrors {
|
|
61
|
+
field
|
|
62
|
+
message
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
//# sourceMappingURL=inventory.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const METAFIELDS_BY_OWNER_QUERY = "\n query GetMetafields($ownerId: ID!, $first: Int!, $after: String, $namespace: String) {\n node(id: $ownerId) {\n ... on HasMetafields {\n metafields(first: $first, after: $after, namespace: $namespace) {\n edges {\n node {\n id\n namespace\n key\n value\n type\n createdAt\n updatedAt\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n }\n";
|
|
2
|
+
export declare const METAFIELD_SET_MUTATION = "\n mutation MetafieldsSet($metafields: [MetafieldsSetInput!]!) {\n metafieldsSet(metafields: $metafields) {\n metafields {\n id\n namespace\n key\n value\n type\n }\n userErrors {\n field\n message\n }\n }\n }\n";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const METAFIELDS_BY_OWNER_QUERY = `
|
|
2
|
+
query GetMetafields($ownerId: ID!, $first: Int!, $after: String, $namespace: String) {
|
|
3
|
+
node(id: $ownerId) {
|
|
4
|
+
... on HasMetafields {
|
|
5
|
+
metafields(first: $first, after: $after, namespace: $namespace) {
|
|
6
|
+
edges {
|
|
7
|
+
node {
|
|
8
|
+
id
|
|
9
|
+
namespace
|
|
10
|
+
key
|
|
11
|
+
value
|
|
12
|
+
type
|
|
13
|
+
createdAt
|
|
14
|
+
updatedAt
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
pageInfo {
|
|
18
|
+
hasNextPage
|
|
19
|
+
endCursor
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
export const METAFIELD_SET_MUTATION = `
|
|
27
|
+
mutation MetafieldsSet($metafields: [MetafieldsSetInput!]!) {
|
|
28
|
+
metafieldsSet(metafields: $metafields) {
|
|
29
|
+
metafields {
|
|
30
|
+
id
|
|
31
|
+
namespace
|
|
32
|
+
key
|
|
33
|
+
value
|
|
34
|
+
type
|
|
35
|
+
}
|
|
36
|
+
userErrors {
|
|
37
|
+
field
|
|
38
|
+
message
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
//# sourceMappingURL=metafields.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ORDERS_QUERY = "\n query GetOrders($first: Int!, $after: String, $query: String) {\n orders(first: $first, after: $after, query: $query) {\n edges {\n node {\n id\n name\n email\n createdAt\n displayFinancialStatus\n displayFulfillmentStatus\n totalPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n customer {\n id\n displayName\n email\n }\n lineItems(first: 10) {\n edges {\n node {\n title\n quantity\n originalUnitPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n }\n }\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
2
|
+
export declare const ORDER_QUERY = "\n query GetOrder($id: ID!) {\n order(id: $id) {\n id\n name\n email\n phone\n createdAt\n updatedAt\n cancelledAt\n closedAt\n displayFinancialStatus\n displayFulfillmentStatus\n note\n tags\n totalPriceSet {\n shopMoney { amount currencyCode }\n }\n subtotalPriceSet {\n shopMoney { amount currencyCode }\n }\n totalTaxSet {\n shopMoney { amount currencyCode }\n }\n totalShippingPriceSet {\n shopMoney { amount currencyCode }\n }\n customer {\n id\n displayName\n email\n phone\n }\n shippingAddress {\n address1\n address2\n city\n province\n country\n zip\n }\n lineItems(first: 50) {\n edges {\n node {\n title\n quantity\n sku\n originalUnitPriceSet {\n shopMoney { amount currencyCode }\n }\n variant {\n id\n title\n }\n }\n }\n }\n fulfillments {\n id\n status\n trackingInfo {\n number\n url\n company\n }\n }\n }\n }\n";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export const ORDERS_QUERY = `
|
|
2
|
+
query GetOrders($first: Int!, $after: String, $query: String) {
|
|
3
|
+
orders(first: $first, after: $after, query: $query) {
|
|
4
|
+
edges {
|
|
5
|
+
node {
|
|
6
|
+
id
|
|
7
|
+
name
|
|
8
|
+
email
|
|
9
|
+
createdAt
|
|
10
|
+
displayFinancialStatus
|
|
11
|
+
displayFulfillmentStatus
|
|
12
|
+
totalPriceSet {
|
|
13
|
+
shopMoney {
|
|
14
|
+
amount
|
|
15
|
+
currencyCode
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
customer {
|
|
19
|
+
id
|
|
20
|
+
displayName
|
|
21
|
+
email
|
|
22
|
+
}
|
|
23
|
+
lineItems(first: 10) {
|
|
24
|
+
edges {
|
|
25
|
+
node {
|
|
26
|
+
title
|
|
27
|
+
quantity
|
|
28
|
+
originalUnitPriceSet {
|
|
29
|
+
shopMoney {
|
|
30
|
+
amount
|
|
31
|
+
currencyCode
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
cursor
|
|
39
|
+
}
|
|
40
|
+
pageInfo {
|
|
41
|
+
hasNextPage
|
|
42
|
+
endCursor
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
export const ORDER_QUERY = `
|
|
48
|
+
query GetOrder($id: ID!) {
|
|
49
|
+
order(id: $id) {
|
|
50
|
+
id
|
|
51
|
+
name
|
|
52
|
+
email
|
|
53
|
+
phone
|
|
54
|
+
createdAt
|
|
55
|
+
updatedAt
|
|
56
|
+
cancelledAt
|
|
57
|
+
closedAt
|
|
58
|
+
displayFinancialStatus
|
|
59
|
+
displayFulfillmentStatus
|
|
60
|
+
note
|
|
61
|
+
tags
|
|
62
|
+
totalPriceSet {
|
|
63
|
+
shopMoney { amount currencyCode }
|
|
64
|
+
}
|
|
65
|
+
subtotalPriceSet {
|
|
66
|
+
shopMoney { amount currencyCode }
|
|
67
|
+
}
|
|
68
|
+
totalTaxSet {
|
|
69
|
+
shopMoney { amount currencyCode }
|
|
70
|
+
}
|
|
71
|
+
totalShippingPriceSet {
|
|
72
|
+
shopMoney { amount currencyCode }
|
|
73
|
+
}
|
|
74
|
+
customer {
|
|
75
|
+
id
|
|
76
|
+
displayName
|
|
77
|
+
email
|
|
78
|
+
phone
|
|
79
|
+
}
|
|
80
|
+
shippingAddress {
|
|
81
|
+
address1
|
|
82
|
+
address2
|
|
83
|
+
city
|
|
84
|
+
province
|
|
85
|
+
country
|
|
86
|
+
zip
|
|
87
|
+
}
|
|
88
|
+
lineItems(first: 50) {
|
|
89
|
+
edges {
|
|
90
|
+
node {
|
|
91
|
+
title
|
|
92
|
+
quantity
|
|
93
|
+
sku
|
|
94
|
+
originalUnitPriceSet {
|
|
95
|
+
shopMoney { amount currencyCode }
|
|
96
|
+
}
|
|
97
|
+
variant {
|
|
98
|
+
id
|
|
99
|
+
title
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
fulfillments {
|
|
105
|
+
id
|
|
106
|
+
status
|
|
107
|
+
trackingInfo {
|
|
108
|
+
number
|
|
109
|
+
url
|
|
110
|
+
company
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
//# sourceMappingURL=orders.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const PRODUCTS_QUERY = "\n query GetProducts($first: Int!, $after: String, $query: String) {\n products(first: $first, after: $after, query: $query) {\n edges {\n node {\n id\n title\n handle\n descriptionHtml\n vendor\n productType\n status\n tags\n totalInventory\n createdAt\n updatedAt\n variants(first: 10) {\n edges {\n node {\n id\n title\n sku\n price\n inventoryQuantity\n }\n }\n }\n images(first: 5) {\n edges {\n node {\n id\n url\n altText\n }\n }\n }\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
2
|
+
export declare const PRODUCT_QUERY = "\n query GetProduct($id: ID!) {\n product(id: $id) {\n id\n title\n handle\n descriptionHtml\n vendor\n productType\n status\n tags\n totalInventory\n createdAt\n updatedAt\n options {\n id\n name\n values\n }\n variants(first: 100) {\n edges {\n node {\n id\n title\n sku\n price\n compareAtPrice\n inventoryQuantity\n selectedOptions {\n name\n value\n }\n }\n }\n }\n images(first: 20) {\n edges {\n node {\n id\n url\n altText\n width\n height\n }\n }\n }\n metafields(first: 20) {\n edges {\n node {\n id\n namespace\n key\n value\n type\n }\n }\n }\n }\n }\n";
|
|
3
|
+
export declare const PRODUCT_CREATE_MUTATION = "\n mutation ProductCreate($input: ProductInput!) {\n productCreate(input: $input) {\n product {\n id\n title\n handle\n status\n }\n userErrors {\n field\n message\n }\n }\n }\n";
|
|
4
|
+
export declare const PRODUCT_UPDATE_MUTATION = "\n mutation ProductUpdate($input: ProductInput!) {\n productUpdate(input: $input) {\n product {\n id\n title\n handle\n status\n updatedAt\n }\n userErrors {\n field\n message\n }\n }\n }\n";
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export const PRODUCTS_QUERY = `
|
|
2
|
+
query GetProducts($first: Int!, $after: String, $query: String) {
|
|
3
|
+
products(first: $first, after: $after, query: $query) {
|
|
4
|
+
edges {
|
|
5
|
+
node {
|
|
6
|
+
id
|
|
7
|
+
title
|
|
8
|
+
handle
|
|
9
|
+
descriptionHtml
|
|
10
|
+
vendor
|
|
11
|
+
productType
|
|
12
|
+
status
|
|
13
|
+
tags
|
|
14
|
+
totalInventory
|
|
15
|
+
createdAt
|
|
16
|
+
updatedAt
|
|
17
|
+
variants(first: 10) {
|
|
18
|
+
edges {
|
|
19
|
+
node {
|
|
20
|
+
id
|
|
21
|
+
title
|
|
22
|
+
sku
|
|
23
|
+
price
|
|
24
|
+
inventoryQuantity
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
images(first: 5) {
|
|
29
|
+
edges {
|
|
30
|
+
node {
|
|
31
|
+
id
|
|
32
|
+
url
|
|
33
|
+
altText
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
cursor
|
|
39
|
+
}
|
|
40
|
+
pageInfo {
|
|
41
|
+
hasNextPage
|
|
42
|
+
endCursor
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
export const PRODUCT_QUERY = `
|
|
48
|
+
query GetProduct($id: ID!) {
|
|
49
|
+
product(id: $id) {
|
|
50
|
+
id
|
|
51
|
+
title
|
|
52
|
+
handle
|
|
53
|
+
descriptionHtml
|
|
54
|
+
vendor
|
|
55
|
+
productType
|
|
56
|
+
status
|
|
57
|
+
tags
|
|
58
|
+
totalInventory
|
|
59
|
+
createdAt
|
|
60
|
+
updatedAt
|
|
61
|
+
options {
|
|
62
|
+
id
|
|
63
|
+
name
|
|
64
|
+
values
|
|
65
|
+
}
|
|
66
|
+
variants(first: 100) {
|
|
67
|
+
edges {
|
|
68
|
+
node {
|
|
69
|
+
id
|
|
70
|
+
title
|
|
71
|
+
sku
|
|
72
|
+
price
|
|
73
|
+
compareAtPrice
|
|
74
|
+
inventoryQuantity
|
|
75
|
+
selectedOptions {
|
|
76
|
+
name
|
|
77
|
+
value
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
images(first: 20) {
|
|
83
|
+
edges {
|
|
84
|
+
node {
|
|
85
|
+
id
|
|
86
|
+
url
|
|
87
|
+
altText
|
|
88
|
+
width
|
|
89
|
+
height
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
metafields(first: 20) {
|
|
94
|
+
edges {
|
|
95
|
+
node {
|
|
96
|
+
id
|
|
97
|
+
namespace
|
|
98
|
+
key
|
|
99
|
+
value
|
|
100
|
+
type
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
export const PRODUCT_CREATE_MUTATION = `
|
|
108
|
+
mutation ProductCreate($input: ProductInput!) {
|
|
109
|
+
productCreate(input: $input) {
|
|
110
|
+
product {
|
|
111
|
+
id
|
|
112
|
+
title
|
|
113
|
+
handle
|
|
114
|
+
status
|
|
115
|
+
}
|
|
116
|
+
userErrors {
|
|
117
|
+
field
|
|
118
|
+
message
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`;
|
|
123
|
+
export const PRODUCT_UPDATE_MUTATION = `
|
|
124
|
+
mutation ProductUpdate($input: ProductInput!) {
|
|
125
|
+
productUpdate(input: $input) {
|
|
126
|
+
product {
|
|
127
|
+
id
|
|
128
|
+
title
|
|
129
|
+
handle
|
|
130
|
+
status
|
|
131
|
+
updatedAt
|
|
132
|
+
}
|
|
133
|
+
userErrors {
|
|
134
|
+
field
|
|
135
|
+
message
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
//# sourceMappingURL=products.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SHOP_QUERY = "\n query GetShop {\n shop {\n id\n name\n email\n url\n myshopifyDomain\n plan {\n displayName\n partnerDevelopment\n shopifyPlus\n }\n primaryDomain {\n url\n host\n }\n currencyCode\n weightUnit\n billingAddress {\n address1\n city\n province\n country\n zip\n }\n timezoneAbbreviation\n ianaTimezone\n }\n }\n";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const SHOP_QUERY = `
|
|
2
|
+
query GetShop {
|
|
3
|
+
shop {
|
|
4
|
+
id
|
|
5
|
+
name
|
|
6
|
+
email
|
|
7
|
+
url
|
|
8
|
+
myshopifyDomain
|
|
9
|
+
plan {
|
|
10
|
+
displayName
|
|
11
|
+
partnerDevelopment
|
|
12
|
+
shopifyPlus
|
|
13
|
+
}
|
|
14
|
+
primaryDomain {
|
|
15
|
+
url
|
|
16
|
+
host
|
|
17
|
+
}
|
|
18
|
+
currencyCode
|
|
19
|
+
weightUnit
|
|
20
|
+
billingAddress {
|
|
21
|
+
address1
|
|
22
|
+
city
|
|
23
|
+
province
|
|
24
|
+
country
|
|
25
|
+
zip
|
|
26
|
+
}
|
|
27
|
+
timezoneAbbreviation
|
|
28
|
+
ianaTimezone
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
//# sourceMappingURL=shop.js.map
|