@useairfoil/producer-shopify 0.2.0 → 0.2.2

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 (61) hide show
  1. package/LICENSE.txt +201 -0
  2. package/README.md +85 -248
  3. package/dist/index.d.mts +6993 -0
  4. package/dist/index.mjs +3 -0
  5. package/dist/main.d.mts +1 -0
  6. package/dist/main.mjs +700 -0
  7. package/dist/main.mjs.map +1 -0
  8. package/dist/manifest.d.mts +32 -0
  9. package/dist/manifest.mjs +51 -0
  10. package/dist/manifest.mjs.map +1 -0
  11. package/dist/{chunk-Bp6m_JJh.js → rolldown-runtime-D7D4PA-g.mjs} +4 -4
  12. package/dist/src-YBU_KSf5.mjs +2472 -0
  13. package/dist/src-YBU_KSf5.mjs.map +1 -0
  14. package/package.json +27 -27
  15. package/src/{auth.ts → api/auth.ts} +15 -35
  16. package/src/api/client.ts +429 -0
  17. package/src/api/graphql.ts +221 -0
  18. package/src/api/http.ts +25 -0
  19. package/src/connector.ts +266 -163
  20. package/src/create-table.ts +10 -0
  21. package/src/demo/customers.ts +412 -0
  22. package/src/demo/index.ts +31 -0
  23. package/src/demo/setup.ts +63 -0
  24. package/src/demo/shared.ts +114 -0
  25. package/src/index.ts +35 -21
  26. package/src/main.ts +14 -8
  27. package/src/manifest.ts +4 -55
  28. package/src/resources/carts/row.ts +82 -0
  29. package/src/resources/carts/webhook.ts +98 -0
  30. package/src/resources/customers/graphql.ts +175 -0
  31. package/src/resources/customers/row.ts +140 -0
  32. package/src/resources/customers/webhook.ts +30 -0
  33. package/src/resources/orders/graphql.ts +419 -0
  34. package/src/resources/orders/row.ts +306 -0
  35. package/src/resources/orders/webhook.ts +248 -0
  36. package/src/resources/products/graphql.ts +142 -0
  37. package/src/resources/products/row.ts +122 -0
  38. package/src/resources/products/webhook.ts +130 -0
  39. package/src/resources/refunds/graphql.ts +196 -0
  40. package/src/resources/refunds/row.ts +137 -0
  41. package/src/resources/refunds/webhook.ts +123 -0
  42. package/src/resources/shared.ts +300 -0
  43. package/src/sandbox.ts +3 -3
  44. package/src/start.ts +4 -6
  45. package/src/tables.ts +15 -0
  46. package/dist/index.d.ts +0 -965
  47. package/dist/index.js +0 -4
  48. package/dist/main.d.ts +0 -1
  49. package/dist/main.js +0 -49
  50. package/dist/main.js.map +0 -1
  51. package/dist/manifest-BFfx2LkS.js +0 -91
  52. package/dist/manifest-BFfx2LkS.js.map +0 -1
  53. package/dist/manifest-CPOEExQU.d.ts +0 -34
  54. package/dist/manifest.d.ts +0 -2
  55. package/dist/manifest.js +0 -3
  56. package/dist/src-DqmiLrYS.js +0 -984
  57. package/dist/src-DqmiLrYS.js.map +0 -1
  58. package/src/api.ts +0 -636
  59. package/src/schemas.ts +0 -319
  60. package/src/throttle.ts +0 -89
  61. package/src/transient-retry.ts +0 -74
package/dist/index.d.ts DELETED
@@ -1,965 +0,0 @@
1
- import { n as ShopifyConfigDef, r as manifest, t as ShopifyConfig } from "./manifest-CPOEExQU.js";
2
- import * as _useairfoil_connector_kit0 from "@useairfoil/connector-kit";
3
- import { Auth, ConnectorError } from "@useairfoil/connector-kit";
4
- import { Config, Context, Effect, Layer, Redacted, Schema } from "effect";
5
- import { HttpClient } from "effect/unstable/http";
6
- import * as Schema$1 from "effect/Schema";
7
- import * as effect_Types0 from "effect/Types";
8
- import * as effect_Cause0 from "effect/Cause";
9
- import * as effect_unstable_http_HttpClient0 from "effect/unstable/http/HttpClient";
10
-
11
- //#region src/schemas.d.ts
12
- declare const PageInfoSchema: Schema$1.Struct<{
13
- readonly hasNextPage: Schema$1.Boolean;
14
- readonly endCursor: Schema$1.NullOr<Schema$1.String>;
15
- }>;
16
- declare const ProductStatusSchema: Schema$1.Literals<readonly ["ACTIVE", "ARCHIVED", "DRAFT", "UNLISTED"]>;
17
- declare const ProductVariantInventoryPolicySchema: Schema$1.Literals<readonly ["CONTINUE", "DENY"]>;
18
- declare const ProductOptionSchema: Schema$1.Struct<{
19
- readonly id: Schema$1.String;
20
- readonly name: Schema$1.String;
21
- readonly position: Schema$1.Number;
22
- readonly values: Schema$1.$Array<Schema$1.String>;
23
- }>;
24
- declare const ProductVariantSchema: Schema$1.Struct<{
25
- readonly id: Schema$1.String;
26
- readonly legacyResourceId: Schema$1.String;
27
- readonly title: Schema$1.String;
28
- readonly sku: Schema$1.NullOr<Schema$1.String>;
29
- readonly barcode: Schema$1.NullOr<Schema$1.String>;
30
- readonly price: Schema$1.String;
31
- readonly compareAtPrice: Schema$1.NullOr<Schema$1.String>;
32
- readonly inventoryPolicy: Schema$1.Literals<readonly ["CONTINUE", "DENY"]>;
33
- readonly taxable: Schema$1.Boolean;
34
- readonly createdAt: Schema$1.String;
35
- readonly updatedAt: Schema$1.String;
36
- }>;
37
- declare const ProductSchema: Schema$1.Struct<{
38
- readonly id: Schema$1.String;
39
- readonly legacyResourceId: Schema$1.String;
40
- readonly title: Schema$1.String;
41
- readonly handle: Schema$1.String;
42
- readonly descriptionHtml: Schema$1.String;
43
- readonly productType: Schema$1.String;
44
- readonly vendor: Schema$1.String;
45
- readonly status: Schema$1.Literals<readonly ["ACTIVE", "ARCHIVED", "DRAFT", "UNLISTED"]>;
46
- readonly tags: Schema$1.$Array<Schema$1.String>;
47
- readonly createdAt: Schema$1.String;
48
- readonly updatedAt: Schema$1.String;
49
- readonly publishedAt: Schema$1.NullOr<Schema$1.String>;
50
- readonly templateSuffix: Schema$1.NullOr<Schema$1.String>;
51
- readonly featuredMedia: Schema$1.NullOr<Schema$1.Any>;
52
- readonly options: Schema$1.$Array<Schema$1.Struct<{
53
- readonly id: Schema$1.String;
54
- readonly name: Schema$1.String;
55
- readonly position: Schema$1.Number;
56
- readonly values: Schema$1.$Array<Schema$1.String>;
57
- }>>;
58
- readonly variants: Schema$1.$Array<Schema$1.Struct<{
59
- readonly id: Schema$1.String;
60
- readonly legacyResourceId: Schema$1.String;
61
- readonly title: Schema$1.String;
62
- readonly sku: Schema$1.NullOr<Schema$1.String>;
63
- readonly barcode: Schema$1.NullOr<Schema$1.String>;
64
- readonly price: Schema$1.String;
65
- readonly compareAtPrice: Schema$1.NullOr<Schema$1.String>;
66
- readonly inventoryPolicy: Schema$1.Literals<readonly ["CONTINUE", "DENY"]>;
67
- readonly taxable: Schema$1.Boolean;
68
- readonly createdAt: Schema$1.String;
69
- readonly updatedAt: Schema$1.String;
70
- }>>;
71
- }>;
72
- declare const ProductWebhookPayloadSchema: Schema$1.Struct<{
73
- readonly id: Schema$1.Number;
74
- readonly admin_graphql_api_id: Schema$1.String;
75
- readonly body_html: Schema$1.NullOr<Schema$1.String>;
76
- readonly created_at: Schema$1.NullOr<Schema$1.String>;
77
- readonly handle: Schema$1.String;
78
- readonly image: Schema$1.optional<Schema$1.NullOr<Schema$1.Struct<{
79
- readonly src: Schema$1.String;
80
- readonly alt: Schema$1.NullOr<Schema$1.String>;
81
- }>>>;
82
- readonly images: Schema$1.optional<Schema$1.$Array<Schema$1.Any>>;
83
- readonly options: Schema$1.$Array<Schema$1.Struct<{
84
- readonly id: Schema$1.Number;
85
- readonly name: Schema$1.String;
86
- readonly position: Schema$1.Number;
87
- readonly values: Schema$1.$Array<Schema$1.String>;
88
- }>>;
89
- readonly product_type: Schema$1.String;
90
- readonly published_at: Schema$1.NullOr<Schema$1.String>;
91
- readonly published_scope: Schema$1.optional<Schema$1.String>;
92
- readonly status: Schema$1.Literals<readonly ["active", "archived", "draft"]>;
93
- readonly tags: Schema$1.String;
94
- readonly template_suffix: Schema$1.NullOr<Schema$1.String>;
95
- readonly title: Schema$1.String;
96
- readonly updated_at: Schema$1.String;
97
- readonly variants: Schema$1.$Array<Schema$1.Struct<{
98
- readonly admin_graphql_api_id: Schema$1.String;
99
- readonly id: Schema$1.Number;
100
- readonly title: Schema$1.String;
101
- readonly price: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
102
- readonly inventory_policy: Schema$1.Literals<readonly ["continue", "deny"]>;
103
- readonly compare_at_price: Schema$1.NullOr<Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>>;
104
- readonly created_at: Schema$1.String;
105
- readonly updated_at: Schema$1.String;
106
- readonly taxable: Schema$1.Boolean;
107
- readonly barcode: Schema$1.NullOr<Schema$1.String>;
108
- readonly sku: Schema$1.NullOr<Schema$1.String>;
109
- }>>;
110
- readonly variant_gids: Schema$1.$Array<Schema$1.Struct<{
111
- readonly admin_graphql_api_id: Schema$1.String;
112
- readonly updated_at: Schema$1.String;
113
- }>>;
114
- readonly vendor: Schema$1.String;
115
- }>;
116
- declare const ProductDeleteWebhookPayloadSchema: Schema$1.Struct<{
117
- readonly id: Schema$1.Number;
118
- }>;
119
- declare const MoneySchema: Schema$1.Struct<{
120
- readonly amount: Schema$1.String;
121
- readonly currency_code: Schema$1.String;
122
- }>;
123
- declare const MoneyBagSchema: Schema$1.Struct<{
124
- readonly shop_money: Schema$1.Struct<{
125
- readonly amount: Schema$1.String;
126
- readonly currency_code: Schema$1.String;
127
- }>;
128
- readonly presentment_money: Schema$1.Struct<{
129
- readonly amount: Schema$1.String;
130
- readonly currency_code: Schema$1.String;
131
- }>;
132
- }>;
133
- declare const CartLineItemSchema: Schema$1.Struct<{
134
- readonly id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
135
- readonly properties: Schema$1.NullOr<Schema$1.Unknown>;
136
- readonly quantity: Schema$1.Number;
137
- readonly variant_id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
138
- readonly key: Schema$1.String;
139
- readonly discounted_price: Schema$1.String;
140
- readonly discounts: Schema$1.$Array<Schema$1.Unknown>;
141
- readonly gift_card: Schema$1.Boolean;
142
- readonly grams: Schema$1.Number;
143
- readonly line_price: Schema$1.String;
144
- readonly original_line_price: Schema$1.String;
145
- readonly original_price: Schema$1.String;
146
- readonly price: Schema$1.String;
147
- readonly product_id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
148
- readonly sku: Schema$1.NullOr<Schema$1.String>;
149
- readonly taxable: Schema$1.Boolean;
150
- readonly title: Schema$1.String;
151
- readonly total_discount: Schema$1.String;
152
- readonly vendor: Schema$1.String;
153
- readonly discounted_price_set: Schema$1.Struct<{
154
- readonly shop_money: Schema$1.Struct<{
155
- readonly amount: Schema$1.String;
156
- readonly currency_code: Schema$1.String;
157
- }>;
158
- readonly presentment_money: Schema$1.Struct<{
159
- readonly amount: Schema$1.String;
160
- readonly currency_code: Schema$1.String;
161
- }>;
162
- }>;
163
- readonly line_price_set: Schema$1.Struct<{
164
- readonly shop_money: Schema$1.Struct<{
165
- readonly amount: Schema$1.String;
166
- readonly currency_code: Schema$1.String;
167
- }>;
168
- readonly presentment_money: Schema$1.Struct<{
169
- readonly amount: Schema$1.String;
170
- readonly currency_code: Schema$1.String;
171
- }>;
172
- }>;
173
- readonly original_line_price_set: Schema$1.Struct<{
174
- readonly shop_money: Schema$1.Struct<{
175
- readonly amount: Schema$1.String;
176
- readonly currency_code: Schema$1.String;
177
- }>;
178
- readonly presentment_money: Schema$1.Struct<{
179
- readonly amount: Schema$1.String;
180
- readonly currency_code: Schema$1.String;
181
- }>;
182
- }>;
183
- readonly price_set: Schema$1.Struct<{
184
- readonly shop_money: Schema$1.Struct<{
185
- readonly amount: Schema$1.String;
186
- readonly currency_code: Schema$1.String;
187
- }>;
188
- readonly presentment_money: Schema$1.Struct<{
189
- readonly amount: Schema$1.String;
190
- readonly currency_code: Schema$1.String;
191
- }>;
192
- }>;
193
- readonly total_discount_set: Schema$1.Struct<{
194
- readonly shop_money: Schema$1.Struct<{
195
- readonly amount: Schema$1.String;
196
- readonly currency_code: Schema$1.String;
197
- }>;
198
- readonly presentment_money: Schema$1.Struct<{
199
- readonly amount: Schema$1.String;
200
- readonly currency_code: Schema$1.String;
201
- }>;
202
- }>;
203
- readonly parent_relationship: Schema$1.NullOr<Schema$1.Unknown>;
204
- }>;
205
- declare const CartWebhookPayloadSchema: Schema$1.Struct<{
206
- readonly id: Schema$1.String;
207
- readonly token: Schema$1.String;
208
- readonly line_items: Schema$1.$Array<Schema$1.Struct<{
209
- readonly id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
210
- readonly properties: Schema$1.NullOr<Schema$1.Unknown>;
211
- readonly quantity: Schema$1.Number;
212
- readonly variant_id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
213
- readonly key: Schema$1.String;
214
- readonly discounted_price: Schema$1.String;
215
- readonly discounts: Schema$1.$Array<Schema$1.Unknown>;
216
- readonly gift_card: Schema$1.Boolean;
217
- readonly grams: Schema$1.Number;
218
- readonly line_price: Schema$1.String;
219
- readonly original_line_price: Schema$1.String;
220
- readonly original_price: Schema$1.String;
221
- readonly price: Schema$1.String;
222
- readonly product_id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
223
- readonly sku: Schema$1.NullOr<Schema$1.String>;
224
- readonly taxable: Schema$1.Boolean;
225
- readonly title: Schema$1.String;
226
- readonly total_discount: Schema$1.String;
227
- readonly vendor: Schema$1.String;
228
- readonly discounted_price_set: Schema$1.Struct<{
229
- readonly shop_money: Schema$1.Struct<{
230
- readonly amount: Schema$1.String;
231
- readonly currency_code: Schema$1.String;
232
- }>;
233
- readonly presentment_money: Schema$1.Struct<{
234
- readonly amount: Schema$1.String;
235
- readonly currency_code: Schema$1.String;
236
- }>;
237
- }>;
238
- readonly line_price_set: Schema$1.Struct<{
239
- readonly shop_money: Schema$1.Struct<{
240
- readonly amount: Schema$1.String;
241
- readonly currency_code: Schema$1.String;
242
- }>;
243
- readonly presentment_money: Schema$1.Struct<{
244
- readonly amount: Schema$1.String;
245
- readonly currency_code: Schema$1.String;
246
- }>;
247
- }>;
248
- readonly original_line_price_set: Schema$1.Struct<{
249
- readonly shop_money: Schema$1.Struct<{
250
- readonly amount: Schema$1.String;
251
- readonly currency_code: Schema$1.String;
252
- }>;
253
- readonly presentment_money: Schema$1.Struct<{
254
- readonly amount: Schema$1.String;
255
- readonly currency_code: Schema$1.String;
256
- }>;
257
- }>;
258
- readonly price_set: Schema$1.Struct<{
259
- readonly shop_money: Schema$1.Struct<{
260
- readonly amount: Schema$1.String;
261
- readonly currency_code: Schema$1.String;
262
- }>;
263
- readonly presentment_money: Schema$1.Struct<{
264
- readonly amount: Schema$1.String;
265
- readonly currency_code: Schema$1.String;
266
- }>;
267
- }>;
268
- readonly total_discount_set: Schema$1.Struct<{
269
- readonly shop_money: Schema$1.Struct<{
270
- readonly amount: Schema$1.String;
271
- readonly currency_code: Schema$1.String;
272
- }>;
273
- readonly presentment_money: Schema$1.Struct<{
274
- readonly amount: Schema$1.String;
275
- readonly currency_code: Schema$1.String;
276
- }>;
277
- }>;
278
- readonly parent_relationship: Schema$1.NullOr<Schema$1.Unknown>;
279
- }>>;
280
- readonly note: Schema$1.NullOr<Schema$1.String>;
281
- readonly updated_at: Schema$1.String;
282
- readonly created_at: Schema$1.String;
283
- }>;
284
- declare const CartEventSchema: Schema$1.Struct<{
285
- readonly id: Schema$1.String;
286
- readonly token: Schema$1.String;
287
- readonly topic: Schema$1.Literals<readonly ["carts/create", "carts/update"]>;
288
- readonly lineItems: Schema$1.$Array<Schema$1.Struct<{
289
- readonly id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
290
- readonly properties: Schema$1.NullOr<Schema$1.Unknown>;
291
- readonly quantity: Schema$1.Number;
292
- readonly variant_id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
293
- readonly key: Schema$1.String;
294
- readonly discounted_price: Schema$1.String;
295
- readonly discounts: Schema$1.$Array<Schema$1.Unknown>;
296
- readonly gift_card: Schema$1.Boolean;
297
- readonly grams: Schema$1.Number;
298
- readonly line_price: Schema$1.String;
299
- readonly original_line_price: Schema$1.String;
300
- readonly original_price: Schema$1.String;
301
- readonly price: Schema$1.String;
302
- readonly product_id: Schema$1.Union<readonly [Schema$1.String, Schema$1.Number]>;
303
- readonly sku: Schema$1.NullOr<Schema$1.String>;
304
- readonly taxable: Schema$1.Boolean;
305
- readonly title: Schema$1.String;
306
- readonly total_discount: Schema$1.String;
307
- readonly vendor: Schema$1.String;
308
- readonly discounted_price_set: Schema$1.Struct<{
309
- readonly shop_money: Schema$1.Struct<{
310
- readonly amount: Schema$1.String;
311
- readonly currency_code: Schema$1.String;
312
- }>;
313
- readonly presentment_money: Schema$1.Struct<{
314
- readonly amount: Schema$1.String;
315
- readonly currency_code: Schema$1.String;
316
- }>;
317
- }>;
318
- readonly line_price_set: Schema$1.Struct<{
319
- readonly shop_money: Schema$1.Struct<{
320
- readonly amount: Schema$1.String;
321
- readonly currency_code: Schema$1.String;
322
- }>;
323
- readonly presentment_money: Schema$1.Struct<{
324
- readonly amount: Schema$1.String;
325
- readonly currency_code: Schema$1.String;
326
- }>;
327
- }>;
328
- readonly original_line_price_set: Schema$1.Struct<{
329
- readonly shop_money: Schema$1.Struct<{
330
- readonly amount: Schema$1.String;
331
- readonly currency_code: Schema$1.String;
332
- }>;
333
- readonly presentment_money: Schema$1.Struct<{
334
- readonly amount: Schema$1.String;
335
- readonly currency_code: Schema$1.String;
336
- }>;
337
- }>;
338
- readonly price_set: Schema$1.Struct<{
339
- readonly shop_money: Schema$1.Struct<{
340
- readonly amount: Schema$1.String;
341
- readonly currency_code: Schema$1.String;
342
- }>;
343
- readonly presentment_money: Schema$1.Struct<{
344
- readonly amount: Schema$1.String;
345
- readonly currency_code: Schema$1.String;
346
- }>;
347
- }>;
348
- readonly total_discount_set: Schema$1.Struct<{
349
- readonly shop_money: Schema$1.Struct<{
350
- readonly amount: Schema$1.String;
351
- readonly currency_code: Schema$1.String;
352
- }>;
353
- readonly presentment_money: Schema$1.Struct<{
354
- readonly amount: Schema$1.String;
355
- readonly currency_code: Schema$1.String;
356
- }>;
357
- }>;
358
- readonly parent_relationship: Schema$1.NullOr<Schema$1.Unknown>;
359
- }>>;
360
- readonly note: Schema$1.NullOr<Schema$1.String>;
361
- readonly updatedAt: Schema$1.String;
362
- readonly createdAt: Schema$1.String;
363
- }>;
364
- declare const WebhookPayloadSchema: Schema$1.Unknown;
365
- declare const ShopifyNormalize: {
366
- readonly productWebhook: (payload: ProductWebhookPayload & {
367
- readonly created_at: string;
368
- }) => Product;
369
- readonly cartWebhook: (payload: CartWebhookPayload, topic: "carts/create" | "carts/update") => CartEvent;
370
- };
371
- type PageInfo = Schema$1.Schema.Type<typeof PageInfoSchema>;
372
- type ProductStatus = Schema$1.Schema.Type<typeof ProductStatusSchema>;
373
- type ProductVariantInventoryPolicy = Schema$1.Schema.Type<typeof ProductVariantInventoryPolicySchema>;
374
- type ProductOption = Schema$1.Schema.Type<typeof ProductOptionSchema>;
375
- type ProductVariant = Schema$1.Schema.Type<typeof ProductVariantSchema>;
376
- type Product = Schema$1.Schema.Type<typeof ProductSchema>;
377
- type ProductWebhookPayload = Schema$1.Schema.Type<typeof ProductWebhookPayloadSchema>;
378
- type ProductDeleteWebhookPayload = Schema$1.Schema.Type<typeof ProductDeleteWebhookPayloadSchema>;
379
- type Money = Schema$1.Schema.Type<typeof MoneySchema>;
380
- type MoneyBag = Schema$1.Schema.Type<typeof MoneyBagSchema>;
381
- type CartLineItem = Schema$1.Schema.Type<typeof CartLineItemSchema>;
382
- type CartWebhookPayload = Schema$1.Schema.Type<typeof CartWebhookPayloadSchema>;
383
- type CartEvent = Schema$1.Schema.Type<typeof CartEventSchema>;
384
- type WebhookPayload = Schema$1.Schema.Type<typeof WebhookPayloadSchema>;
385
- //#endregion
386
- //#region src/auth.d.ts
387
- type ShopifyAuthErrorReason = "shop_not_permitted" | "invalid_client" | "exchange_failed";
388
- declare const ShopifyAuthError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => effect_Cause0.YieldableError & {
389
- readonly _tag: "ShopifyAuthError";
390
- } & Readonly<A>;
391
- declare class ShopifyAuthError extends ShopifyAuthError_base<{
392
- readonly reason: ShopifyAuthErrorReason;
393
- readonly message: string;
394
- }> {}
395
- type ShopifyAuthService = Auth.TokenCache<ShopifyAuthError>;
396
- declare const ShopifyAuth_base: Context.ServiceClass<ShopifyAuth, "@useairfoil/producer-shopify/ShopifyAuth", ShopifyAuthService>;
397
- declare class ShopifyAuth extends ShopifyAuth_base {}
398
- declare namespace api_d_exports {
399
- export { ShopifyApiClient, ShopifyApiClientService, ShopifyProductPage, layer$1 as layer, layerConfig$1 as layerConfig, make$1 as make };
400
- }
401
- type ShopifyProductPage = {
402
- readonly items: ReadonlyArray<Product>;
403
- readonly endCursor: string | null;
404
- readonly hasMore: boolean;
405
- };
406
- type ShopifyApiClientService = {
407
- readonly checkConnection: Effect.Effect<void, ConnectorError>;
408
- readonly checkProductsAccess: Effect.Effect<void, ConnectorError>;
409
- readonly fetchGraphQL: <A>(options: {
410
- readonly operationName: string;
411
- readonly query: string;
412
- readonly variables?: Record<string, unknown>;
413
- readonly schema: Schema.Decoder<A>;
414
- }) => Effect.Effect<A, ConnectorError>;
415
- readonly fetchProducts: (options: {
416
- readonly first: number;
417
- readonly after?: string;
418
- }) => Effect.Effect<ShopifyProductPage, ConnectorError>;
419
- /**
420
- * Fetches the complete product with every variant page.
421
- * Webhook payloads include only the first 100 variants.
422
- */
423
- readonly fetchProductById: (id: string) => Effect.Effect<Product, ConnectorError>;
424
- };
425
- declare const ShopifyApiClient_base: Context.ServiceClass<ShopifyApiClient, "@useairfoil/producer-shopify/ShopifyApiClient", ShopifyApiClientService>;
426
- declare class ShopifyApiClient extends ShopifyApiClient_base {}
427
- declare const make$1: (config: {
428
- readonly shopDomain: string;
429
- readonly apiVersion: string;
430
- readonly clientId: string;
431
- readonly clientSecret: Redacted.Redacted<string>;
432
- readonly responseMaxRetries: number;
433
- readonly transportMaxRetries: number;
434
- readonly graphqlMaxRetries: number;
435
- readonly retryBaseDelayMs: number;
436
- readonly graphqlRetryBaseDelayMs: number;
437
- readonly retryAfterFallbackSeconds: number;
438
- readonly requestTimeoutSeconds: number;
439
- readonly webhookSecret: Redacted.Redacted<string>;
440
- }) => Effect.Effect<{
441
- checkConnection: Effect.Effect<void, ConnectorError, never>;
442
- checkProductsAccess: Effect.Effect<void, ConnectorError, never>;
443
- fetchGraphQL: <A>(options: {
444
- readonly operationName: string;
445
- readonly query: string;
446
- readonly variables?: Record<string, unknown>;
447
- readonly schema: Schema.Decoder<A>;
448
- }) => Effect.Effect<A, ConnectorError>;
449
- fetchProducts: (options: {
450
- readonly first: number;
451
- readonly after?: string;
452
- }) => Effect.Effect<ShopifyProductPage, ConnectorError>;
453
- fetchProductById: (id: string) => Effect.Effect<Product, ConnectorError>;
454
- }, never, ShopifyAuth | HttpClient.HttpClient>;
455
- declare const layer$1: (config: ShopifyConfig) => Layer.Layer<ShopifyApiClient, ConnectorError, HttpClient.HttpClient | ShopifyAuth>;
456
- declare const layerConfig$1: (config: Config.Wrap<ShopifyConfig>) => Layer.Layer<ShopifyApiClient, ConnectorError | Config.ConfigError, HttpClient.HttpClient | ShopifyAuth>;
457
- declare namespace connector_d_exports {
458
- export { ShopifyConfig, ShopifyConfigDef, ShopifyConnector, ShopifyConnectorRuntime, layer, layerConfig, make, manifest };
459
- }
460
- declare const make: (config: {
461
- readonly shopDomain: string;
462
- readonly apiVersion: string;
463
- readonly clientId: string;
464
- readonly clientSecret: Redacted.Redacted<string>;
465
- readonly responseMaxRetries: number;
466
- readonly transportMaxRetries: number;
467
- readonly graphqlMaxRetries: number;
468
- readonly retryBaseDelayMs: number;
469
- readonly graphqlRetryBaseDelayMs: number;
470
- readonly retryAfterFallbackSeconds: number;
471
- readonly requestTimeoutSeconds: number;
472
- readonly webhookSecret: Redacted.Redacted<string>;
473
- }) => Effect.Effect<_useairfoil_connector_kit0.ConnectorDefinition<readonly [_useairfoil_connector_kit0.ResourceDefinition<Schema.Struct<{
474
- readonly id: Schema.String;
475
- readonly legacyResourceId: Schema.String;
476
- readonly title: Schema.String;
477
- readonly handle: Schema.String;
478
- readonly descriptionHtml: Schema.String;
479
- readonly productType: Schema.String;
480
- readonly vendor: Schema.String;
481
- readonly status: Schema.Literals<readonly ["ACTIVE", "ARCHIVED", "DRAFT", "UNLISTED"]>;
482
- readonly tags: Schema.$Array<Schema.String>;
483
- readonly createdAt: Schema.String;
484
- readonly updatedAt: Schema.String;
485
- readonly publishedAt: Schema.NullOr<Schema.String>;
486
- readonly templateSuffix: Schema.NullOr<Schema.String>;
487
- readonly featuredMedia: Schema.NullOr<Schema.Any>;
488
- readonly options: Schema.$Array<Schema.Struct<{
489
- readonly id: Schema.String;
490
- readonly name: Schema.String;
491
- readonly position: Schema.Number;
492
- readonly values: Schema.$Array<Schema.String>;
493
- }>>;
494
- readonly variants: Schema.$Array<Schema.Struct<{
495
- readonly id: Schema.String;
496
- readonly legacyResourceId: Schema.String;
497
- readonly title: Schema.String;
498
- readonly sku: Schema.NullOr<Schema.String>;
499
- readonly barcode: Schema.NullOr<Schema.String>;
500
- readonly price: Schema.String;
501
- readonly compareAtPrice: Schema.NullOr<Schema.String>;
502
- readonly inventoryPolicy: Schema.Literals<readonly ["CONTINUE", "DENY"]>;
503
- readonly taxable: Schema.Boolean;
504
- readonly createdAt: Schema.String;
505
- readonly updatedAt: Schema.String;
506
- }>>;
507
- }>, {
508
- readonly _tag: "upsert";
509
- readonly payload: {
510
- readonly id: number;
511
- readonly title: string;
512
- readonly admin_graphql_api_id: string;
513
- readonly created_at: string | null;
514
- readonly updated_at: string;
515
- readonly tags: string;
516
- readonly options: readonly {
517
- readonly id: number;
518
- readonly name: string;
519
- readonly position: number;
520
- readonly values: readonly string[];
521
- }[];
522
- readonly variants: readonly {
523
- readonly admin_graphql_api_id: string;
524
- readonly id: number;
525
- readonly title: string;
526
- readonly price: string | number;
527
- readonly inventory_policy: "continue" | "deny";
528
- readonly compare_at_price: string | number | null;
529
- readonly created_at: string;
530
- readonly updated_at: string;
531
- readonly taxable: boolean;
532
- readonly barcode: string | null;
533
- readonly sku: string | null;
534
- }[];
535
- readonly handle: string;
536
- readonly vendor: string;
537
- readonly status: "active" | "archived" | "draft";
538
- readonly body_html: string | null;
539
- readonly published_at: string | null;
540
- readonly template_suffix: string | null;
541
- readonly variant_gids: readonly {
542
- readonly admin_graphql_api_id: string;
543
- readonly updated_at: string;
544
- }[];
545
- readonly product_type: string;
546
- readonly image?: {
547
- readonly src: string;
548
- readonly alt: string | null;
549
- } | null | undefined;
550
- readonly images?: readonly any[] | undefined;
551
- readonly published_scope?: string | undefined;
552
- };
553
- } | {
554
- readonly _tag: "delete";
555
- readonly id: string;
556
- readonly version: string;
557
- }, never, "products">, _useairfoil_connector_kit0.ResourceDefinition<Schema.Struct<{
558
- readonly id: Schema.String;
559
- readonly token: Schema.String;
560
- readonly topic: Schema.Literals<readonly ["carts/create", "carts/update"]>;
561
- readonly lineItems: Schema.$Array<Schema.Struct<{
562
- readonly id: Schema.Union<readonly [Schema.String, Schema.Number]>;
563
- readonly properties: Schema.NullOr<Schema.Unknown>;
564
- readonly quantity: Schema.Number;
565
- readonly variant_id: Schema.Union<readonly [Schema.String, Schema.Number]>;
566
- readonly key: Schema.String;
567
- readonly discounted_price: Schema.String;
568
- readonly discounts: Schema.$Array<Schema.Unknown>;
569
- readonly gift_card: Schema.Boolean;
570
- readonly grams: Schema.Number;
571
- readonly line_price: Schema.String;
572
- readonly original_line_price: Schema.String;
573
- readonly original_price: Schema.String;
574
- readonly price: Schema.String;
575
- readonly product_id: Schema.Union<readonly [Schema.String, Schema.Number]>;
576
- readonly sku: Schema.NullOr<Schema.String>;
577
- readonly taxable: Schema.Boolean;
578
- readonly title: Schema.String;
579
- readonly total_discount: Schema.String;
580
- readonly vendor: Schema.String;
581
- readonly discounted_price_set: Schema.Struct<{
582
- readonly shop_money: Schema.Struct<{
583
- readonly amount: Schema.String;
584
- readonly currency_code: Schema.String;
585
- }>;
586
- readonly presentment_money: Schema.Struct<{
587
- readonly amount: Schema.String;
588
- readonly currency_code: Schema.String;
589
- }>;
590
- }>;
591
- readonly line_price_set: Schema.Struct<{
592
- readonly shop_money: Schema.Struct<{
593
- readonly amount: Schema.String;
594
- readonly currency_code: Schema.String;
595
- }>;
596
- readonly presentment_money: Schema.Struct<{
597
- readonly amount: Schema.String;
598
- readonly currency_code: Schema.String;
599
- }>;
600
- }>;
601
- readonly original_line_price_set: Schema.Struct<{
602
- readonly shop_money: Schema.Struct<{
603
- readonly amount: Schema.String;
604
- readonly currency_code: Schema.String;
605
- }>;
606
- readonly presentment_money: Schema.Struct<{
607
- readonly amount: Schema.String;
608
- readonly currency_code: Schema.String;
609
- }>;
610
- }>;
611
- readonly price_set: Schema.Struct<{
612
- readonly shop_money: Schema.Struct<{
613
- readonly amount: Schema.String;
614
- readonly currency_code: Schema.String;
615
- }>;
616
- readonly presentment_money: Schema.Struct<{
617
- readonly amount: Schema.String;
618
- readonly currency_code: Schema.String;
619
- }>;
620
- }>;
621
- readonly total_discount_set: Schema.Struct<{
622
- readonly shop_money: Schema.Struct<{
623
- readonly amount: Schema.String;
624
- readonly currency_code: Schema.String;
625
- }>;
626
- readonly presentment_money: Schema.Struct<{
627
- readonly amount: Schema.String;
628
- readonly currency_code: Schema.String;
629
- }>;
630
- }>;
631
- readonly parent_relationship: Schema.NullOr<Schema.Unknown>;
632
- }>>;
633
- readonly note: Schema.NullOr<Schema.String>;
634
- readonly updatedAt: Schema.String;
635
- readonly createdAt: Schema.String;
636
- }>, {
637
- readonly topic: "carts/create" | "carts/update";
638
- readonly id: string;
639
- readonly token: string;
640
- readonly line_items: readonly {
641
- readonly id: string | number;
642
- readonly properties: unknown;
643
- readonly quantity: number;
644
- readonly variant_id: string | number;
645
- readonly key: string;
646
- readonly discounted_price: string;
647
- readonly discounts: readonly unknown[];
648
- readonly gift_card: boolean;
649
- readonly grams: number;
650
- readonly line_price: string;
651
- readonly original_line_price: string;
652
- readonly original_price: string;
653
- readonly price: string;
654
- readonly product_id: string | number;
655
- readonly sku: string | null;
656
- readonly taxable: boolean;
657
- readonly title: string;
658
- readonly total_discount: string;
659
- readonly vendor: string;
660
- readonly discounted_price_set: {
661
- readonly shop_money: {
662
- readonly amount: string;
663
- readonly currency_code: string;
664
- };
665
- readonly presentment_money: {
666
- readonly amount: string;
667
- readonly currency_code: string;
668
- };
669
- };
670
- readonly line_price_set: {
671
- readonly shop_money: {
672
- readonly amount: string;
673
- readonly currency_code: string;
674
- };
675
- readonly presentment_money: {
676
- readonly amount: string;
677
- readonly currency_code: string;
678
- };
679
- };
680
- readonly original_line_price_set: {
681
- readonly shop_money: {
682
- readonly amount: string;
683
- readonly currency_code: string;
684
- };
685
- readonly presentment_money: {
686
- readonly amount: string;
687
- readonly currency_code: string;
688
- };
689
- };
690
- readonly price_set: {
691
- readonly shop_money: {
692
- readonly amount: string;
693
- readonly currency_code: string;
694
- };
695
- readonly presentment_money: {
696
- readonly amount: string;
697
- readonly currency_code: string;
698
- };
699
- };
700
- readonly total_discount_set: {
701
- readonly shop_money: {
702
- readonly amount: string;
703
- readonly currency_code: string;
704
- };
705
- readonly presentment_money: {
706
- readonly amount: string;
707
- readonly currency_code: string;
708
- };
709
- };
710
- readonly parent_relationship: unknown;
711
- }[];
712
- readonly note: string | null;
713
- readonly updated_at: string;
714
- readonly created_at: string;
715
- }, never, "cart_events">]>, never, ShopifyApiClient>;
716
- type ShopifyConnectorRuntime = Effect.Success<ReturnType<typeof make>>;
717
- declare const ShopifyConnector_base: Context.ServiceClass<ShopifyConnector, "@useairfoil/producer-shopify/ShopifyConnector", _useairfoil_connector_kit0.ConnectorDefinition<readonly [_useairfoil_connector_kit0.ResourceDefinition<Schema.Struct<{
718
- readonly id: Schema.String;
719
- readonly legacyResourceId: Schema.String;
720
- readonly title: Schema.String;
721
- readonly handle: Schema.String;
722
- readonly descriptionHtml: Schema.String;
723
- readonly productType: Schema.String;
724
- readonly vendor: Schema.String;
725
- readonly status: Schema.Literals<readonly ["ACTIVE", "ARCHIVED", "DRAFT", "UNLISTED"]>;
726
- readonly tags: Schema.$Array<Schema.String>;
727
- readonly createdAt: Schema.String;
728
- readonly updatedAt: Schema.String;
729
- readonly publishedAt: Schema.NullOr<Schema.String>;
730
- readonly templateSuffix: Schema.NullOr<Schema.String>;
731
- readonly featuredMedia: Schema.NullOr<Schema.Any>;
732
- readonly options: Schema.$Array<Schema.Struct<{
733
- readonly id: Schema.String;
734
- readonly name: Schema.String;
735
- readonly position: Schema.Number;
736
- readonly values: Schema.$Array<Schema.String>;
737
- }>>;
738
- readonly variants: Schema.$Array<Schema.Struct<{
739
- readonly id: Schema.String;
740
- readonly legacyResourceId: Schema.String;
741
- readonly title: Schema.String;
742
- readonly sku: Schema.NullOr<Schema.String>;
743
- readonly barcode: Schema.NullOr<Schema.String>;
744
- readonly price: Schema.String;
745
- readonly compareAtPrice: Schema.NullOr<Schema.String>;
746
- readonly inventoryPolicy: Schema.Literals<readonly ["CONTINUE", "DENY"]>;
747
- readonly taxable: Schema.Boolean;
748
- readonly createdAt: Schema.String;
749
- readonly updatedAt: Schema.String;
750
- }>>;
751
- }>, {
752
- readonly _tag: "upsert";
753
- readonly payload: {
754
- readonly id: number;
755
- readonly title: string;
756
- readonly admin_graphql_api_id: string;
757
- readonly created_at: string | null;
758
- readonly updated_at: string;
759
- readonly tags: string;
760
- readonly options: readonly {
761
- readonly id: number;
762
- readonly name: string;
763
- readonly position: number;
764
- readonly values: readonly string[];
765
- }[];
766
- readonly variants: readonly {
767
- readonly admin_graphql_api_id: string;
768
- readonly id: number;
769
- readonly title: string;
770
- readonly price: string | number;
771
- readonly inventory_policy: "continue" | "deny";
772
- readonly compare_at_price: string | number | null;
773
- readonly created_at: string;
774
- readonly updated_at: string;
775
- readonly taxable: boolean;
776
- readonly barcode: string | null;
777
- readonly sku: string | null;
778
- }[];
779
- readonly handle: string;
780
- readonly vendor: string;
781
- readonly status: "active" | "archived" | "draft";
782
- readonly body_html: string | null;
783
- readonly published_at: string | null;
784
- readonly template_suffix: string | null;
785
- readonly variant_gids: readonly {
786
- readonly admin_graphql_api_id: string;
787
- readonly updated_at: string;
788
- }[];
789
- readonly product_type: string;
790
- readonly image?: {
791
- readonly src: string;
792
- readonly alt: string | null;
793
- } | null | undefined;
794
- readonly images?: readonly any[] | undefined;
795
- readonly published_scope?: string | undefined;
796
- };
797
- } | {
798
- readonly _tag: "delete";
799
- readonly id: string;
800
- readonly version: string;
801
- }, never, "products">, _useairfoil_connector_kit0.ResourceDefinition<Schema.Struct<{
802
- readonly id: Schema.String;
803
- readonly token: Schema.String;
804
- readonly topic: Schema.Literals<readonly ["carts/create", "carts/update"]>;
805
- readonly lineItems: Schema.$Array<Schema.Struct<{
806
- readonly id: Schema.Union<readonly [Schema.String, Schema.Number]>;
807
- readonly properties: Schema.NullOr<Schema.Unknown>;
808
- readonly quantity: Schema.Number;
809
- readonly variant_id: Schema.Union<readonly [Schema.String, Schema.Number]>;
810
- readonly key: Schema.String;
811
- readonly discounted_price: Schema.String;
812
- readonly discounts: Schema.$Array<Schema.Unknown>;
813
- readonly gift_card: Schema.Boolean;
814
- readonly grams: Schema.Number;
815
- readonly line_price: Schema.String;
816
- readonly original_line_price: Schema.String;
817
- readonly original_price: Schema.String;
818
- readonly price: Schema.String;
819
- readonly product_id: Schema.Union<readonly [Schema.String, Schema.Number]>;
820
- readonly sku: Schema.NullOr<Schema.String>;
821
- readonly taxable: Schema.Boolean;
822
- readonly title: Schema.String;
823
- readonly total_discount: Schema.String;
824
- readonly vendor: Schema.String;
825
- readonly discounted_price_set: Schema.Struct<{
826
- readonly shop_money: Schema.Struct<{
827
- readonly amount: Schema.String;
828
- readonly currency_code: Schema.String;
829
- }>;
830
- readonly presentment_money: Schema.Struct<{
831
- readonly amount: Schema.String;
832
- readonly currency_code: Schema.String;
833
- }>;
834
- }>;
835
- readonly line_price_set: Schema.Struct<{
836
- readonly shop_money: Schema.Struct<{
837
- readonly amount: Schema.String;
838
- readonly currency_code: Schema.String;
839
- }>;
840
- readonly presentment_money: Schema.Struct<{
841
- readonly amount: Schema.String;
842
- readonly currency_code: Schema.String;
843
- }>;
844
- }>;
845
- readonly original_line_price_set: Schema.Struct<{
846
- readonly shop_money: Schema.Struct<{
847
- readonly amount: Schema.String;
848
- readonly currency_code: Schema.String;
849
- }>;
850
- readonly presentment_money: Schema.Struct<{
851
- readonly amount: Schema.String;
852
- readonly currency_code: Schema.String;
853
- }>;
854
- }>;
855
- readonly price_set: Schema.Struct<{
856
- readonly shop_money: Schema.Struct<{
857
- readonly amount: Schema.String;
858
- readonly currency_code: Schema.String;
859
- }>;
860
- readonly presentment_money: Schema.Struct<{
861
- readonly amount: Schema.String;
862
- readonly currency_code: Schema.String;
863
- }>;
864
- }>;
865
- readonly total_discount_set: Schema.Struct<{
866
- readonly shop_money: Schema.Struct<{
867
- readonly amount: Schema.String;
868
- readonly currency_code: Schema.String;
869
- }>;
870
- readonly presentment_money: Schema.Struct<{
871
- readonly amount: Schema.String;
872
- readonly currency_code: Schema.String;
873
- }>;
874
- }>;
875
- readonly parent_relationship: Schema.NullOr<Schema.Unknown>;
876
- }>>;
877
- readonly note: Schema.NullOr<Schema.String>;
878
- readonly updatedAt: Schema.String;
879
- readonly createdAt: Schema.String;
880
- }>, {
881
- readonly topic: "carts/create" | "carts/update";
882
- readonly id: string;
883
- readonly token: string;
884
- readonly line_items: readonly {
885
- readonly id: string | number;
886
- readonly properties: unknown;
887
- readonly quantity: number;
888
- readonly variant_id: string | number;
889
- readonly key: string;
890
- readonly discounted_price: string;
891
- readonly discounts: readonly unknown[];
892
- readonly gift_card: boolean;
893
- readonly grams: number;
894
- readonly line_price: string;
895
- readonly original_line_price: string;
896
- readonly original_price: string;
897
- readonly price: string;
898
- readonly product_id: string | number;
899
- readonly sku: string | null;
900
- readonly taxable: boolean;
901
- readonly title: string;
902
- readonly total_discount: string;
903
- readonly vendor: string;
904
- readonly discounted_price_set: {
905
- readonly shop_money: {
906
- readonly amount: string;
907
- readonly currency_code: string;
908
- };
909
- readonly presentment_money: {
910
- readonly amount: string;
911
- readonly currency_code: string;
912
- };
913
- };
914
- readonly line_price_set: {
915
- readonly shop_money: {
916
- readonly amount: string;
917
- readonly currency_code: string;
918
- };
919
- readonly presentment_money: {
920
- readonly amount: string;
921
- readonly currency_code: string;
922
- };
923
- };
924
- readonly original_line_price_set: {
925
- readonly shop_money: {
926
- readonly amount: string;
927
- readonly currency_code: string;
928
- };
929
- readonly presentment_money: {
930
- readonly amount: string;
931
- readonly currency_code: string;
932
- };
933
- };
934
- readonly price_set: {
935
- readonly shop_money: {
936
- readonly amount: string;
937
- readonly currency_code: string;
938
- };
939
- readonly presentment_money: {
940
- readonly amount: string;
941
- readonly currency_code: string;
942
- };
943
- };
944
- readonly total_discount_set: {
945
- readonly shop_money: {
946
- readonly amount: string;
947
- readonly currency_code: string;
948
- };
949
- readonly presentment_money: {
950
- readonly amount: string;
951
- readonly currency_code: string;
952
- };
953
- };
954
- readonly parent_relationship: unknown;
955
- }[];
956
- readonly note: string | null;
957
- readonly updated_at: string;
958
- readonly created_at: string;
959
- }, never, "cart_events">]>>;
960
- declare class ShopifyConnector extends ShopifyConnector_base {}
961
- declare const layer: (config: ShopifyConfig) => Layer.Layer<ShopifyConnector, ConnectorError, effect_unstable_http_HttpClient0.HttpClient>;
962
- declare const layerConfig: (config: Config.Wrap<ShopifyConfig>) => Layer.Layer<ShopifyConnector, Config.ConfigError | ConnectorError, effect_unstable_http_HttpClient0.HttpClient>;
963
- //#endregion
964
- export { type CartEvent, CartEventSchema, type CartLineItem, CartLineItemSchema, type CartWebhookPayload, CartWebhookPayloadSchema, type Money, type MoneyBag, MoneyBagSchema, MoneySchema, type PageInfo, PageInfoSchema, type Product, type ProductDeleteWebhookPayload, ProductDeleteWebhookPayloadSchema, type ProductOption, ProductOptionSchema, ProductSchema, type ProductStatus, ProductStatusSchema, type ProductVariant, type ProductVariantInventoryPolicy, ProductVariantInventoryPolicySchema, ProductVariantSchema, type ProductWebhookPayload, ProductWebhookPayloadSchema, api_d_exports as ShopifyApiClient, connector_d_exports as ShopifyConnector, ShopifyNormalize, type WebhookPayload, WebhookPayloadSchema, manifest };
965
- //# sourceMappingURL=index.d.ts.map