@keystrokehq/shopify 0.0.11 → 0.0.16-integration-id-canonicalization.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.
Files changed (52) hide show
  1. package/README.md +14 -153
  2. package/dist/{schemas.d.mts → common-C2s35du9.d.mts} +3 -2
  3. package/dist/{schemas.mjs → common-JZyHdK6p.mjs} +3 -3
  4. package/dist/credential-sets/index.d.mts +2 -0
  5. package/dist/credential-sets/index.mjs +4 -0
  6. package/dist/index.d.mts +4 -1
  7. package/dist/index.mjs +6 -1
  8. package/dist/operations/index.d.mts +2 -0
  9. package/dist/operations/index.mjs +3 -0
  10. package/dist/schemas/index.d.mts +2 -0
  11. package/dist/schemas/index.mjs +3 -0
  12. package/dist/shopify-app.credential-set-DuAYUhzY.d.mts +65 -0
  13. package/dist/shopify-app.credential-set-M3vKwTji.mjs +17 -0
  14. package/dist/{integration-vSl3XHTG.mjs → shopify.credential-set-CaxST3GP.mjs} +6 -141
  15. package/dist/update-shopify-product.operation-ByYhZggW.mjs +1972 -0
  16. package/dist/update-shopify-product.operation-Db_kLuJa.d.mts +2817 -0
  17. package/package.json +11 -67
  18. package/dist/_official/index.d.mts +0 -38
  19. package/dist/_official/index.mjs +0 -3
  20. package/dist/_runtime/index.d.mts +0 -56
  21. package/dist/_runtime/index.mjs +0 -150
  22. package/dist/articles.d.mts +0 -174
  23. package/dist/articles.mjs +0 -252
  24. package/dist/blogs.d.mts +0 -113
  25. package/dist/blogs.mjs +0 -174
  26. package/dist/client.d.mts +0 -22
  27. package/dist/client.mjs +0 -90
  28. package/dist/collections.d.mts +0 -140
  29. package/dist/collections.mjs +0 -209
  30. package/dist/connection.d.mts +0 -2
  31. package/dist/connection.mjs +0 -3
  32. package/dist/customers.d.mts +0 -161
  33. package/dist/customers.mjs +0 -225
  34. package/dist/events.d.mts +0 -181
  35. package/dist/events.mjs +0 -67
  36. package/dist/factory-BKmxl2-8.mjs +0 -7
  37. package/dist/fulfillments.d.mts +0 -99
  38. package/dist/fulfillments.mjs +0 -167
  39. package/dist/integration-HrSKAMfF.d.mts +0 -70
  40. package/dist/inventory.d.mts +0 -103
  41. package/dist/inventory.mjs +0 -182
  42. package/dist/locations.d.mts +0 -47
  43. package/dist/locations.mjs +0 -81
  44. package/dist/messaging.d.mts +0 -1
  45. package/dist/messaging.mjs +0 -1
  46. package/dist/operation-helpers-CKEDIx0o.mjs +0 -21
  47. package/dist/orders.d.mts +0 -229
  48. package/dist/orders.mjs +0 -271
  49. package/dist/products.d.mts +0 -155
  50. package/dist/products.mjs +0 -171
  51. package/dist/shop.d.mts +0 -20
  52. package/dist/shop.mjs +0 -31
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/shopify",
3
- "version": "0.0.11",
3
+ "version": "0.0.16-integration-id-canonicalization.0",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -9,73 +9,17 @@
9
9
  "types": "./dist/index.d.mts",
10
10
  "default": "./dist/index.mjs"
11
11
  },
12
- "./messaging": {
13
- "types": "./dist/messaging.d.mts",
14
- "default": "./dist/messaging.mjs"
12
+ "./credential-sets": {
13
+ "types": "./dist/credential-sets/index.d.mts",
14
+ "default": "./dist/credential-sets/index.mjs"
15
15
  },
16
- "./connection": {
17
- "types": "./dist/connection.d.mts",
18
- "default": "./dist/connection.mjs"
19
- },
20
- "./client": {
21
- "types": "./dist/client.d.mts",
22
- "default": "./dist/client.mjs"
16
+ "./operations": {
17
+ "types": "./dist/operations/index.d.mts",
18
+ "default": "./dist/operations/index.mjs"
23
19
  },
24
20
  "./schemas": {
25
- "types": "./dist/schemas.d.mts",
26
- "default": "./dist/schemas.mjs"
27
- },
28
- "./events": {
29
- "types": "./dist/events.d.mts",
30
- "default": "./dist/events.mjs"
31
- },
32
- "./shop": {
33
- "types": "./dist/shop.d.mts",
34
- "default": "./dist/shop.mjs"
35
- },
36
- "./products": {
37
- "types": "./dist/products.d.mts",
38
- "default": "./dist/products.mjs"
39
- },
40
- "./collections": {
41
- "types": "./dist/collections.d.mts",
42
- "default": "./dist/collections.mjs"
43
- },
44
- "./orders": {
45
- "types": "./dist/orders.d.mts",
46
- "default": "./dist/orders.mjs"
47
- },
48
- "./customers": {
49
- "types": "./dist/customers.d.mts",
50
- "default": "./dist/customers.mjs"
51
- },
52
- "./blogs": {
53
- "types": "./dist/blogs.d.mts",
54
- "default": "./dist/blogs.mjs"
55
- },
56
- "./articles": {
57
- "types": "./dist/articles.d.mts",
58
- "default": "./dist/articles.mjs"
59
- },
60
- "./inventory": {
61
- "types": "./dist/inventory.d.mts",
62
- "default": "./dist/inventory.mjs"
63
- },
64
- "./locations": {
65
- "types": "./dist/locations.d.mts",
66
- "default": "./dist/locations.mjs"
67
- },
68
- "./fulfillments": {
69
- "types": "./dist/fulfillments.d.mts",
70
- "default": "./dist/fulfillments.mjs"
71
- },
72
- "./_official": {
73
- "types": "./dist/_official/index.d.mts",
74
- "default": "./dist/_official/index.mjs"
75
- },
76
- "./_runtime": {
77
- "types": "./dist/_runtime/index.d.mts",
78
- "default": "./dist/_runtime/index.mjs"
21
+ "types": "./dist/schemas/index.d.mts",
22
+ "default": "./dist/schemas/index.mjs"
79
23
  }
80
24
  },
81
25
  "files": [
@@ -97,9 +41,9 @@
97
41
  "vitest": "^4.0.18",
98
42
  "@keystrokehq/core": "^0.0.12",
99
43
  "@keystrokehq/test-utils": "0.0.0",
100
- "@keystrokehq/integration-authoring": "0.0.9",
44
+ "@keystrokehq/credential-connection": "1.0.0",
101
45
  "@keystrokehq/typescript-config": "0.0.0",
102
- "@keystrokehq/credential-connection": "1.0.0"
46
+ "@keystrokehq/integration-authoring": "0.0.9"
103
47
  },
104
48
  "keywords": [
105
49
  "shopify",
@@ -1,38 +0,0 @@
1
- import { i as shopifyOfficialIntegration, n as shopify, r as shopifyBundle, t as ShopifyCredentials } from "../integration-HrSKAMfF.mjs";
2
- import { CredentialSet } from "@keystrokehq/core";
3
- import { z } from "zod";
4
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
5
- import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
6
-
7
- //#region src/_official/provider-app.d.ts
8
- declare const shopifyAppCredentialSet: CredentialSet<"keystroke:shopify-app", z.ZodObject<{
9
- clientId: z.ZodString;
10
- clientSecret: z.ZodString;
11
- webhookSecret: z.ZodString;
12
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
13
- clientId: z.ZodString;
14
- clientSecret: z.ZodString;
15
- webhookSecret: z.ZodString;
16
- }, z.core.$strip>>[] | undefined>;
17
- declare const shopifyOfficialProviderSeed: {
18
- readonly provider: "shopify";
19
- readonly appRef: "shopify-platform";
20
- readonly displayName: "Shopify Platform";
21
- readonly credentialSetName: "Keystroke Shopify Platform App";
22
- readonly envShape: {
23
- readonly KEYSTROKE_OFFICIAL_SHOPIFY_APP_ID: z.ZodOptional<z.ZodString>;
24
- readonly KEYSTROKE_OFFICIAL_SHOPIFY_CLIENT_ID: z.ZodOptional<z.ZodString>;
25
- readonly KEYSTROKE_OFFICIAL_SHOPIFY_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
26
- readonly KEYSTROKE_OFFICIAL_SHOPIFY_WEBHOOK_SECRET: z.ZodOptional<z.ZodString>;
27
- };
28
- readonly requiredEnvKeys: readonly ["KEYSTROKE_OFFICIAL_SHOPIFY_APP_ID", "KEYSTROKE_OFFICIAL_SHOPIFY_CLIENT_ID", "KEYSTROKE_OFFICIAL_SHOPIFY_CLIENT_SECRET", "KEYSTROKE_OFFICIAL_SHOPIFY_WEBHOOK_SECRET"];
29
- readonly externalAppIdEnvKey: "KEYSTROKE_OFFICIAL_SHOPIFY_APP_ID";
30
- readonly buildCredentials: (env: Record<string, string | undefined>) => {
31
- clientId: string | undefined;
32
- clientSecret: string | undefined;
33
- webhookSecret: string | undefined;
34
- };
35
- };
36
- type ShopifyAppCredentials = InferCredentialSetAuth<typeof shopifyAppCredentialSet>;
37
- //#endregion
38
- export { type ShopifyAppCredentials, type ShopifyCredentials, shopify, shopifyAppCredentialSet, shopifyBundle, shopifyOfficialIntegration, shopifyOfficialProviderSeed };
@@ -1,3 +0,0 @@
1
- import { a as shopifyAppCredentialSet, n as shopifyBundle, o as shopifyOfficialProviderSeed, r as shopifyOfficialIntegration, t as shopify } from "../integration-vSl3XHTG.mjs";
2
-
3
- export { shopify, shopifyAppCredentialSet, shopifyBundle, shopifyOfficialIntegration, shopifyOfficialProviderSeed };
@@ -1,56 +0,0 @@
1
- import { t as ShopifyCredentials } from "../integration-HrSKAMfF.mjs";
2
- import { z } from "zod";
3
-
4
- //#region src/webhook-management.d.ts
5
- declare const SHOPIFY_WEBHOOK_RUNTIME_DEFINITIONS: readonly [{
6
- readonly eventTopic: "products/create";
7
- readonly subscriptionTopic: "PRODUCTS_CREATE";
8
- readonly path: "/shopify/products/create";
9
- }, {
10
- readonly eventTopic: "products/update";
11
- readonly subscriptionTopic: "PRODUCTS_UPDATE";
12
- readonly path: "/shopify/products/update";
13
- }, {
14
- readonly eventTopic: "products/delete";
15
- readonly subscriptionTopic: "PRODUCTS_DELETE";
16
- readonly path: "/shopify/products/delete";
17
- }, {
18
- readonly eventTopic: "orders/create";
19
- readonly subscriptionTopic: "ORDERS_CREATE";
20
- readonly path: "/shopify/orders/create";
21
- }, {
22
- readonly eventTopic: "orders/updated";
23
- readonly subscriptionTopic: "ORDERS_UPDATED";
24
- readonly path: "/shopify/orders/updated";
25
- }, {
26
- readonly eventTopic: "orders/cancelled";
27
- readonly subscriptionTopic: "ORDERS_CANCELLED";
28
- readonly path: "/shopify/orders/cancelled";
29
- }, {
30
- readonly eventTopic: "orders/fulfilled";
31
- readonly subscriptionTopic: "ORDERS_FULFILLED";
32
- readonly path: "/shopify/orders/fulfilled";
33
- }];
34
- declare const webhookSubscriptionSchema: z.ZodObject<{
35
- id: z.ZodString;
36
- topic: z.ZodEnum<{
37
- PRODUCTS_CREATE: "PRODUCTS_CREATE";
38
- PRODUCTS_UPDATE: "PRODUCTS_UPDATE";
39
- PRODUCTS_DELETE: "PRODUCTS_DELETE";
40
- ORDERS_CREATE: "ORDERS_CREATE";
41
- ORDERS_UPDATED: "ORDERS_UPDATED";
42
- ORDERS_CANCELLED: "ORDERS_CANCELLED";
43
- ORDERS_FULFILLED: "ORDERS_FULFILLED";
44
- }>;
45
- uri: z.ZodString;
46
- }, z.core.$strip>;
47
- interface EnsureShopifyWebhookSubscriptionsResult {
48
- readonly kept: readonly string[];
49
- readonly created: readonly string[];
50
- readonly deleted: readonly string[];
51
- }
52
- declare function buildShopifyWebhookCallbackUri(baseUrl: string, path: string): string;
53
- declare function listShopifyWebhookSubscriptions(credentials: ShopifyCredentials): Promise<readonly z.infer<typeof webhookSubscriptionSchema>[]>;
54
- declare function ensureShopifyWebhookSubscriptions(credentials: ShopifyCredentials, callbackBaseUrl: string): Promise<EnsureShopifyWebhookSubscriptionsResult>;
55
- //#endregion
56
- export { SHOPIFY_WEBHOOK_RUNTIME_DEFINITIONS, buildShopifyWebhookCallbackUri, ensureShopifyWebhookSubscriptions, listShopifyWebhookSubscriptions };
@@ -1,150 +0,0 @@
1
- import { shopifyGlobalIdSchema, shopifyUserErrorSchema } from "../schemas.mjs";
2
- import { createShopifyClient } from "../client.mjs";
3
- import { shopifyWebhookSubscriptionTopicSchema, shopifyWebhookTopicSchema } from "../events.mjs";
4
- import { z } from "zod";
5
-
6
- //#region src/webhook-management.ts
7
- const shopifyWebhookRuntimeDefinitionSchema = z.object({
8
- eventTopic: shopifyWebhookTopicSchema,
9
- subscriptionTopic: shopifyWebhookSubscriptionTopicSchema,
10
- path: z.string().min(1)
11
- });
12
- const SHOPIFY_WEBHOOK_RUNTIME_DEFINITIONS = [
13
- {
14
- eventTopic: "products/create",
15
- subscriptionTopic: "PRODUCTS_CREATE",
16
- path: "/shopify/products/create"
17
- },
18
- {
19
- eventTopic: "products/update",
20
- subscriptionTopic: "PRODUCTS_UPDATE",
21
- path: "/shopify/products/update"
22
- },
23
- {
24
- eventTopic: "products/delete",
25
- subscriptionTopic: "PRODUCTS_DELETE",
26
- path: "/shopify/products/delete"
27
- },
28
- {
29
- eventTopic: "orders/create",
30
- subscriptionTopic: "ORDERS_CREATE",
31
- path: "/shopify/orders/create"
32
- },
33
- {
34
- eventTopic: "orders/updated",
35
- subscriptionTopic: "ORDERS_UPDATED",
36
- path: "/shopify/orders/updated"
37
- },
38
- {
39
- eventTopic: "orders/cancelled",
40
- subscriptionTopic: "ORDERS_CANCELLED",
41
- path: "/shopify/orders/cancelled"
42
- },
43
- {
44
- eventTopic: "orders/fulfilled",
45
- subscriptionTopic: "ORDERS_FULFILLED",
46
- path: "/shopify/orders/fulfilled"
47
- }
48
- ];
49
- const webhookSubscriptionSchema = z.object({
50
- id: shopifyGlobalIdSchema,
51
- topic: shopifyWebhookSubscriptionTopicSchema,
52
- uri: z.string().url()
53
- });
54
- const listWebhookSubscriptionsResponseSchema = z.object({ webhookSubscriptions: z.object({ nodes: z.array(webhookSubscriptionSchema) }) });
55
- const createWebhookSubscriptionResponseSchema = z.object({ webhookSubscriptionCreate: z.object({
56
- webhookSubscription: webhookSubscriptionSchema.nullable(),
57
- userErrors: z.array(shopifyUserErrorSchema)
58
- }) });
59
- const deleteWebhookSubscriptionResponseSchema = z.object({ webhookSubscriptionDelete: z.object({
60
- deletedWebhookSubscriptionId: shopifyGlobalIdSchema.nullable(),
61
- userErrors: z.array(shopifyUserErrorSchema)
62
- }) });
63
- function assertNoUserErrors(userErrors) {
64
- if (userErrors.length === 0) return;
65
- const message = userErrors.map((error) => error.field && error.field.length > 0 ? `${error.field.join(".")}: ${error.message}` : error.message).join("; ");
66
- throw new Error(`Shopify webhook subscription error: ${message}`);
67
- }
68
- function buildShopifyWebhookCallbackUri(baseUrl, path) {
69
- return new URL(path, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`).toString();
70
- }
71
- async function listShopifyWebhookSubscriptions(credentials) {
72
- return (await createShopifyClient(credentials).graphql(`
73
- query ListWebhookSubscriptions($topics: [WebhookSubscriptionTopic!]) {
74
- webhookSubscriptions(first: 50, topics: $topics) {
75
- nodes {
76
- id
77
- topic
78
- uri
79
- }
80
- }
81
- }
82
- `, listWebhookSubscriptionsResponseSchema, { variables: { topics: SHOPIFY_WEBHOOK_RUNTIME_DEFINITIONS.map((definition) => definition.subscriptionTopic) } })).webhookSubscriptions.nodes;
83
- }
84
- async function createShopifyWebhookSubscription(credentials, topic, uri) {
85
- const response = await createShopifyClient(credentials).graphql(`
86
- mutation CreateWebhookSubscription(
87
- $topic: WebhookSubscriptionTopic!
88
- $webhookSubscription: WebhookSubscriptionInput!
89
- ) {
90
- webhookSubscriptionCreate(topic: $topic, webhookSubscription: $webhookSubscription) {
91
- webhookSubscription {
92
- id
93
- topic
94
- uri
95
- }
96
- userErrors {
97
- field
98
- message
99
- }
100
- }
101
- }
102
- `, createWebhookSubscriptionResponseSchema, { variables: {
103
- topic,
104
- webhookSubscription: { uri }
105
- } });
106
- assertNoUserErrors(response.webhookSubscriptionCreate.userErrors);
107
- if (!response.webhookSubscriptionCreate.webhookSubscription) throw new Error(`Shopify did not return the created webhook subscription for ${topic}.`);
108
- return response.webhookSubscriptionCreate.webhookSubscription;
109
- }
110
- async function deleteShopifyWebhookSubscription(credentials, id) {
111
- const response = await createShopifyClient(credentials).graphql(`
112
- mutation DeleteWebhookSubscription($id: ID!) {
113
- webhookSubscriptionDelete(id: $id) {
114
- deletedWebhookSubscriptionId
115
- userErrors {
116
- field
117
- message
118
- }
119
- }
120
- }
121
- `, deleteWebhookSubscriptionResponseSchema, { variables: { id } });
122
- assertNoUserErrors(response.webhookSubscriptionDelete.userErrors);
123
- if (!response.webhookSubscriptionDelete.deletedWebhookSubscriptionId) throw new Error(`Shopify did not confirm deletion for webhook subscription ${id}.`);
124
- return response.webhookSubscriptionDelete.deletedWebhookSubscriptionId;
125
- }
126
- async function ensureShopifyWebhookSubscriptions(credentials, callbackBaseUrl) {
127
- const existing = await listShopifyWebhookSubscriptions(credentials);
128
- const kept = [];
129
- const created = [];
130
- const deleted = [];
131
- for (const definition of SHOPIFY_WEBHOOK_RUNTIME_DEFINITIONS) {
132
- const expectedUri = buildShopifyWebhookCallbackUri(callbackBaseUrl, definition.path);
133
- const matches = existing.filter((subscription) => subscription.topic === definition.subscriptionTopic);
134
- const canonical = matches.find((subscription) => subscription.uri === expectedUri);
135
- if (canonical) kept.push(canonical.id);
136
- for (const subscription of matches) if (!canonical || subscription.id !== canonical.id) deleted.push(await deleteShopifyWebhookSubscription(credentials, subscription.id));
137
- if (!canonical) {
138
- const createdSubscription = await createShopifyWebhookSubscription(credentials, definition.subscriptionTopic, expectedUri);
139
- created.push(createdSubscription.id);
140
- }
141
- }
142
- return {
143
- kept,
144
- created,
145
- deleted
146
- };
147
- }
148
-
149
- //#endregion
150
- export { SHOPIFY_WEBHOOK_RUNTIME_DEFINITIONS, buildShopifyWebhookCallbackUri, ensureShopifyWebhookSubscriptions, listShopifyWebhookSubscriptions };
@@ -1,174 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
-
5
- //#region src/articles.d.ts
6
- declare const listArticles: _keystrokehq_core0.Operation<z.ZodObject<{
7
- first: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8
- after: z.ZodOptional<z.ZodString>;
9
- query: z.ZodOptional<z.ZodString>;
10
- }, z.core.$strip>, z.ZodObject<{
11
- nodes: z.ZodArray<z.ZodObject<{
12
- id: z.ZodString;
13
- title: z.ZodString;
14
- handle: z.ZodString;
15
- blog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
16
- id: z.ZodString;
17
- title: z.ZodString;
18
- handle: z.ZodString;
19
- createdAt: z.ZodOptional<z.ZodISODateTime>;
20
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
21
- commentPolicy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
- templateSuffix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
- }, z.core.$strip>>>;
24
- author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
- summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
- image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
29
- url: z.ZodURL;
30
- altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
- }, z.core.$strip>>>;
32
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
33
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
34
- }, z.core.$strip>>;
35
- pageInfo: z.ZodObject<{
36
- hasNextPage: z.ZodBoolean;
37
- hasPreviousPage: z.ZodOptional<z.ZodBoolean>;
38
- startCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
- endCursor: z.ZodNullable<z.ZodString>;
40
- }, z.core.$strip>;
41
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"shopify", z.ZodObject<{
42
- SHOPIFY_STORE_DOMAIN: z.ZodString;
43
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
44
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
45
- SHOPIFY_STORE_DOMAIN: z.ZodString;
46
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
47
- }, z.core.$strip>>[] | undefined>], undefined>;
48
- declare const getArticle: _keystrokehq_core0.Operation<z.ZodObject<{
49
- id: z.ZodString;
50
- }, z.core.$strip>, z.ZodObject<{
51
- id: z.ZodString;
52
- title: z.ZodString;
53
- handle: z.ZodString;
54
- blog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
55
- id: z.ZodString;
56
- title: z.ZodString;
57
- handle: z.ZodString;
58
- createdAt: z.ZodOptional<z.ZodISODateTime>;
59
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
60
- commentPolicy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
- templateSuffix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
- }, z.core.$strip>>>;
63
- author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
- summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
- image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
68
- url: z.ZodURL;
69
- altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
- }, z.core.$strip>>>;
71
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
72
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
73
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"shopify", z.ZodObject<{
74
- SHOPIFY_STORE_DOMAIN: z.ZodString;
75
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
76
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
77
- SHOPIFY_STORE_DOMAIN: z.ZodString;
78
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
79
- }, z.core.$strip>>[] | undefined>], undefined>;
80
- declare const createArticle: _keystrokehq_core0.Operation<z.ZodObject<{
81
- handle: z.ZodOptional<z.ZodString>;
82
- body: z.ZodOptional<z.ZodString>;
83
- summary: z.ZodOptional<z.ZodString>;
84
- authorName: z.ZodOptional<z.ZodString>;
85
- isPublished: z.ZodOptional<z.ZodBoolean>;
86
- publishDate: z.ZodOptional<z.ZodISODateTime>;
87
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
- blogId: z.ZodString;
89
- title: z.ZodString;
90
- }, z.core.$strip>, z.ZodObject<{
91
- id: z.ZodString;
92
- title: z.ZodString;
93
- handle: z.ZodString;
94
- blog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
95
- id: z.ZodString;
96
- title: z.ZodString;
97
- handle: z.ZodString;
98
- createdAt: z.ZodOptional<z.ZodISODateTime>;
99
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
100
- commentPolicy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
- templateSuffix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
- }, z.core.$strip>>>;
103
- author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
- summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
107
- image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
108
- url: z.ZodURL;
109
- altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
- }, z.core.$strip>>>;
111
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
112
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
113
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"shopify", z.ZodObject<{
114
- SHOPIFY_STORE_DOMAIN: z.ZodString;
115
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
116
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
117
- SHOPIFY_STORE_DOMAIN: z.ZodString;
118
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
119
- }, z.core.$strip>>[] | undefined>], undefined>;
120
- declare const updateArticle: _keystrokehq_core0.Operation<z.ZodObject<{
121
- blogId: z.ZodOptional<z.ZodString>;
122
- title: z.ZodOptional<z.ZodString>;
123
- handle: z.ZodOptional<z.ZodString>;
124
- body: z.ZodOptional<z.ZodString>;
125
- summary: z.ZodOptional<z.ZodString>;
126
- authorName: z.ZodOptional<z.ZodString>;
127
- isPublished: z.ZodOptional<z.ZodBoolean>;
128
- publishDate: z.ZodOptional<z.ZodISODateTime>;
129
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
130
- id: z.ZodString;
131
- redirectNewHandle: z.ZodOptional<z.ZodBoolean>;
132
- }, z.core.$strip>, z.ZodObject<{
133
- id: z.ZodString;
134
- title: z.ZodString;
135
- handle: z.ZodString;
136
- blog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
137
- id: z.ZodString;
138
- title: z.ZodString;
139
- handle: z.ZodString;
140
- createdAt: z.ZodOptional<z.ZodISODateTime>;
141
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
142
- commentPolicy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
- templateSuffix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
- }, z.core.$strip>>>;
145
- author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
- summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
149
- image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
150
- url: z.ZodURL;
151
- altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
- }, z.core.$strip>>>;
153
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
154
- updatedAt: z.ZodOptional<z.ZodISODateTime>;
155
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"shopify", z.ZodObject<{
156
- SHOPIFY_STORE_DOMAIN: z.ZodString;
157
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
158
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
159
- SHOPIFY_STORE_DOMAIN: z.ZodString;
160
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
161
- }, z.core.$strip>>[] | undefined>], undefined>;
162
- declare const deleteArticle: _keystrokehq_core0.Operation<z.ZodObject<{
163
- id: z.ZodString;
164
- }, z.core.$strip>, z.ZodObject<{
165
- deletedArticleId: z.ZodString;
166
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"shopify", z.ZodObject<{
167
- SHOPIFY_STORE_DOMAIN: z.ZodString;
168
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
169
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
170
- SHOPIFY_STORE_DOMAIN: z.ZodString;
171
- SHOPIFY_ACCESS_TOKEN: z.ZodString;
172
- }, z.core.$strip>>[] | undefined>], undefined>;
173
- //#endregion
174
- export { createArticle, deleteArticle, getArticle, listArticles, updateArticle };