@useairfoil/producer-shopify 0.2.1 → 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.
@@ -1,12 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { ShopifyConfigDef, manifest } from "./manifest.mjs";
3
3
  import * as Schema$1 from "effect/Schema";
4
- import { Auth, Connector, ConnectorError, Cursor, Fetch, Iceberg, Metrics, Resource, Telemetry, Webhook } from "@useairfoil/connector-kit";
5
4
  import { Config, Context, Data, Duration, Effect, Layer, Option, Predicate, Redacted, Schedule, Schema, SchemaTransformation, Stream } from "effect";
5
+ import { Auth, Connector, ConnectorError, Cursor, Fetch, Iceberg, Metrics, Resource, Telemetry, Webhook } from "@useairfoil/connector-kit";
6
6
  import { HttpClient, HttpClientRequest, HttpClientResponse, HttpServerResponse } from "effect/http";
7
7
  import { createHmac, timingSafeEqual } from "node:crypto";
8
8
  //#region src/resources/shared.ts
9
- const field = (fieldId, description) => Iceberg.field(fieldId, { description });
10
9
  const PageInfoSchema = Schema$1.Struct({
11
10
  hasNextPage: Schema$1.Boolean,
12
11
  endCursor: Schema$1.NullOr(Schema$1.String)
@@ -15,46 +14,46 @@ const gid = (type, id) => `gid://shopify/${type}/${id}`;
15
14
  const normalizeAmount = (amount) => amount.includes(".") ? amount.replace(/0+$/, "").replace(/\.$/, "") : amount;
16
15
  const emptyText = (value) => value ?? "";
17
16
  const splitTags = (value) => value.split(",").map((tag) => tag.trim()).filter((tag) => tag.length > 0);
18
- const moneyBag = (baseId) => Schema$1.Struct({
17
+ const moneyBag = Schema$1.Struct({
19
18
  shopMoney: Schema$1.Struct({
20
- amount: Schema$1.String.pipe(field(baseId + 3, "Amount in the shop currency.")),
21
- currencyCode: Schema$1.String.pipe(field(baseId + 4, "Shop currency code."))
22
- }).pipe(field(baseId + 1, "Amount in the shop currency.")),
19
+ amount: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Amount in the shop currency." })),
20
+ currencyCode: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Shop currency code." }))
21
+ }).pipe(Schema$1.annotateKey({ description: "Amount in the shop currency." })),
23
22
  presentmentMoney: Schema$1.Struct({
24
- amount: Schema$1.String.pipe(field(baseId + 5, "Amount in the customer currency.")),
25
- currencyCode: Schema$1.String.pipe(field(baseId + 6, "Customer currency code."))
26
- }).pipe(field(baseId + 2, "Amount in the customer currency."))
27
- });
28
- const address = (baseId) => Schema$1.Struct({
29
- firstName: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 1, "First name.")),
30
- lastName: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 2, "Last name.")),
31
- name: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 3, "Full name.")),
32
- company: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 4, "Company name.")),
33
- address1: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 5, "First address line.")),
34
- address2: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 6, "Second address line.")),
35
- city: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 7, "City.")),
36
- province: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 8, "Province or state.")),
37
- provinceCode: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 9, "Province or state code.")),
38
- country: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 10, "Country.")),
39
- countryCode: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 11, "Two-letter country code.")),
40
- zip: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 12, "Postal code.")),
41
- phone: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 13, "Phone number.")),
42
- latitude: Schema$1.NullOr(Schema$1.Finite).pipe(field(baseId + 14, "Latitude.")),
43
- longitude: Schema$1.NullOr(Schema$1.Finite).pipe(field(baseId + 15, "Longitude."))
44
- });
45
- const attributes = (baseId) => Schema$1.Array(Schema$1.Struct({
46
- key: Schema$1.String.pipe(field(baseId + 2, "Attribute name.")),
47
- value: Schema$1.NullOr(Schema$1.String).pipe(field(baseId + 3, "Attribute value."))
48
- }).annotate({ fieldId: baseId + 1 }));
49
- const taxLines = (baseId) => Schema$1.Array(Schema$1.Struct({
50
- title: Schema$1.String.pipe(field(baseId + 2, "Tax name.")),
51
- rate: Schema$1.NullOr(Schema$1.Finite).pipe(field(baseId + 3, "Tax rate as a fraction.")),
52
- priceSet: moneyBag(baseId + 10).pipe(field(baseId + 4, "Tax amount."))
53
- }).annotate({ fieldId: baseId + 1 }));
54
- const discountAllocations = (baseId) => Schema$1.Array(Schema$1.Struct({
55
- discountApplicationIndex: Schema$1.Int.pipe(field(baseId + 2, "Index of the order discount application.")),
56
- amountSet: moneyBag(baseId + 10).pipe(field(baseId + 3, "Allocated discount amount."))
57
- }).annotate({ fieldId: baseId + 1 }));
23
+ amount: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Amount in the customer currency." })),
24
+ currencyCode: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Customer currency code." }))
25
+ }).pipe(Schema$1.annotateKey({ description: "Amount in the customer currency." }))
26
+ });
27
+ const address = Schema$1.Struct({
28
+ firstName: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "First name." })),
29
+ lastName: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Last name." })),
30
+ name: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Full name." })),
31
+ company: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Company name." })),
32
+ address1: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "First address line." })),
33
+ address2: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Second address line." })),
34
+ city: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "City." })),
35
+ province: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Province or state." })),
36
+ provinceCode: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Province or state code." })),
37
+ country: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Country." })),
38
+ countryCode: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Two-letter country code." })),
39
+ zip: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Postal code." })),
40
+ phone: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Phone number." })),
41
+ latitude: Schema$1.NullOr(Schema$1.Finite).pipe(Schema$1.annotateKey({ description: "Latitude." })),
42
+ longitude: Schema$1.NullOr(Schema$1.Finite).pipe(Schema$1.annotateKey({ description: "Longitude." }))
43
+ });
44
+ const attributes = Schema$1.Array(Schema$1.Struct({
45
+ key: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Attribute name." })),
46
+ value: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Attribute value." }))
47
+ }));
48
+ const taxLines = Schema$1.Array(Schema$1.Struct({
49
+ title: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Tax name." })),
50
+ rate: Schema$1.NullOr(Schema$1.Finite).pipe(Schema$1.annotateKey({ description: "Tax rate as a fraction." })),
51
+ priceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Tax amount." }))
52
+ }));
53
+ const discountAllocations = Schema$1.Array(Schema$1.Struct({
54
+ discountApplicationIndex: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Index of the order discount application." })),
55
+ amountSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Allocated discount amount." }))
56
+ }));
58
57
  const RestMoneyBagSchema = Schema$1.Struct({
59
58
  shop_money: Schema$1.Struct({
60
59
  amount: Schema$1.String,
@@ -320,47 +319,47 @@ const ProductStatusSchema = Schema$1.Literals([
320
319
  ]);
321
320
  const ProductVariantInventoryPolicySchema = Schema$1.Literals(["CONTINUE", "DENY"]);
322
321
  const ProductImageSchema = Schema$1.Struct({
323
- url: Schema$1.String.pipe(field(202, "URL of the image.")),
324
- altText: Schema$1.NullOr(Schema$1.String).pipe(field(203, "Alternative text for the image."))
322
+ url: Schema$1.String.pipe(Schema$1.annotateKey({ description: "URL of the image." })),
323
+ altText: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Alternative text for the image." }))
325
324
  });
326
- const ProductFeaturedMediaSchema = Schema$1.Struct({ image: Schema$1.NullOr(ProductImageSchema).pipe(field(201, "Image for the featured media.")) });
325
+ const ProductFeaturedMediaSchema = Schema$1.Struct({ image: Schema$1.NullOr(ProductImageSchema).pipe(Schema$1.annotateKey({ description: "Image for the featured media." })) });
327
326
  const ProductOptionSchema = Schema$1.Struct({
328
- id: Schema$1.String.pipe(field(302, "Unique product option identifier.")),
329
- name: Schema$1.String.pipe(field(303, "Name of the product option.")),
330
- position: Schema$1.Int.pipe(field(304, "Position of the option on the product.")),
331
- values: Schema$1.Array(Schema$1.String.annotate({ fieldId: 306 })).pipe(field(305, "Values available for the option."))
327
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique product option identifier." })),
328
+ name: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Name of the product option." })),
329
+ position: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Position of the option on the product." })),
330
+ values: Schema$1.Array(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Values available for the option." }))
332
331
  });
333
332
  const ProductVariantSchema = Schema$1.Struct({
334
- id: Schema$1.String.pipe(field(402, "Unique product variant identifier.")),
335
- legacyResourceId: Schema$1.String.pipe(field(403, "Numeric variant identifier stored as text.")),
336
- title: Schema$1.String.pipe(field(404, "Display title of the variant.")),
337
- sku: Schema$1.NullOr(Schema$1.String).pipe(field(405, "Stock keeping unit for the variant.")),
338
- barcode: Schema$1.NullOr(Schema$1.String).pipe(field(406, "Barcode for the variant.")),
339
- price: Schema$1.String.pipe(field(407, "Price of the variant.")),
340
- compareAtPrice: Schema$1.NullOr(Schema$1.String).pipe(field(408, "Original price used for comparison.")),
341
- inventoryPolicy: ProductVariantInventoryPolicySchema.pipe(field(409, "Behavior when the variant is out of stock.")),
342
- taxable: Schema$1.Boolean.pipe(field(410, "Whether the variant is taxable.")),
343
- createdAt: Schema$1.Date.pipe(field(411, "Time when the variant was created.")),
344
- updatedAt: Schema$1.Date.pipe(field(412, "Time when the variant was last changed."))
333
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique product variant identifier." })),
334
+ legacyResourceId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Numeric variant identifier stored as text." })),
335
+ title: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Display title of the variant." })),
336
+ sku: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Stock keeping unit for the variant." })),
337
+ barcode: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Barcode for the variant." })),
338
+ price: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Price of the variant." })),
339
+ compareAtPrice: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Original price used for comparison." })),
340
+ inventoryPolicy: ProductVariantInventoryPolicySchema.pipe(Schema$1.annotateKey({ description: "Behavior when the variant is out of stock." })),
341
+ taxable: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the variant is taxable." })),
342
+ createdAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the variant was created." })),
343
+ updatedAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the variant was last changed." }))
345
344
  });
346
345
  const ProductSchema = Schema$1.Struct({
347
- id: Schema$1.String.pipe(field(1, "Unique product identifier.")),
348
- legacyResourceId: Schema$1.String.pipe(field(2, "Numeric product identifier stored as text.")),
349
- title: Schema$1.String.pipe(field(3, "Title of the product.")),
350
- handle: Schema$1.String.pipe(field(4, "URL handle for the product.")),
351
- descriptionHtml: Schema$1.String.pipe(field(5, "Product description as HTML.")),
352
- productType: Schema$1.String.pipe(field(6, "Merchant-defined product type.")),
353
- vendor: Schema$1.String.pipe(field(7, "Vendor of the product.")),
354
- status: ProductStatusSchema.pipe(field(8, "Current product status.")),
355
- tags: Schema$1.Array(Schema$1.String.annotate({ fieldId: 101 })).pipe(field(9, "Tags added to the product.")),
356
- createdAt: Schema$1.Date.pipe(field(10, "Time when the product was created.")),
357
- updatedAt: Schema$1.Date.pipe(field(11, "Time when the product was last changed.")),
358
- publishedAt: Schema$1.NullOr(Schema$1.Date).pipe(field(12, "Time when the product was published.")),
359
- templateSuffix: Schema$1.NullOr(Schema$1.String).pipe(field(13, "Theme template suffix used by the product.")),
360
- featuredMedia: Schema$1.NullOr(ProductFeaturedMediaSchema).pipe(field(14, "Featured media for the product.")),
361
- options: Schema$1.Array(ProductOptionSchema.annotate({ fieldId: 301 })).pipe(field(15, "Options for the product.")),
362
- variants: Schema$1.Array(ProductVariantSchema.annotate({ fieldId: 401 })).pipe(field(16, "Variants of the product.")),
363
- _deleted: Schema$1.optional(Schema$1.Boolean).pipe(field(17, "Whether the product was deleted."))
346
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique product identifier." })),
347
+ legacyResourceId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Numeric product identifier stored as text." })),
348
+ title: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Title of the product." })),
349
+ handle: Schema$1.String.pipe(Schema$1.annotateKey({ description: "URL handle for the product." })),
350
+ descriptionHtml: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Product description as HTML." })),
351
+ productType: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Merchant-defined product type." })),
352
+ vendor: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Vendor of the product." })),
353
+ status: ProductStatusSchema.pipe(Schema$1.annotateKey({ description: "Current product status." })),
354
+ tags: Schema$1.Array(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Tags added to the product." })),
355
+ createdAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the product was created." })),
356
+ updatedAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the product was last changed." })),
357
+ publishedAt: Schema$1.NullOr(Schema$1.Date).pipe(Schema$1.annotateKey({ description: "Time when the product was published." })),
358
+ templateSuffix: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Theme template suffix used by the product." })),
359
+ featuredMedia: Schema$1.NullOr(ProductFeaturedMediaSchema).pipe(Schema$1.annotateKey({ description: "Featured media for the product." })),
360
+ options: Schema$1.Array(ProductOptionSchema).pipe(Schema$1.annotateKey({ description: "Options for the product." })),
361
+ variants: Schema$1.Array(ProductVariantSchema).pipe(Schema$1.annotateKey({ description: "Variants of the product." })),
362
+ _deleted: Schema$1.optional(Schema$1.Boolean).pipe(Schema$1.annotateKey({ description: "Whether the product was deleted." }))
364
363
  }).annotate({ description: "Products in a Shopify store." }).pipe(Iceberg.identifier("id"));
365
364
  //#endregion
366
365
  //#region src/resources/products/webhook.ts
@@ -499,44 +498,44 @@ const ProductSubscriberStatusSchema = Schema$1.Literals([
499
498
  "PAUSED"
500
499
  ]);
501
500
  const CustomerAddressSchema = Schema$1.Struct({
502
- id: Schema$1.String.pipe(field(121, "Unique address identifier.")),
503
- ...address(121).fields
501
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique address identifier." })),
502
+ ...address.fields
504
503
  });
505
504
  const CustomerSchema = Schema$1.Struct({
506
- id: Schema$1.String.pipe(field(1, "Unique customer identifier.")),
507
- legacyResourceId: Schema$1.String.pipe(field(2, "Numeric customer identifier stored as text.")),
508
- firstName: Schema$1.NullOr(Schema$1.String).pipe(field(3, "First name.")),
509
- lastName: Schema$1.NullOr(Schema$1.String).pipe(field(4, "Last name.")),
510
- displayName: Schema$1.String.pipe(field(5, "Full name shown in Shopify.")),
511
- email: Schema$1.NullOr(Schema$1.String).pipe(field(6, "Default email address.")),
512
- emailMarketingState: Schema$1.NullOr(EmailMarketingStateSchema).pipe(field(7, "Email marketing consent state.")),
513
- emailMarketingOptInLevel: Schema$1.NullOr(MarketingOptInLevelSchema).pipe(field(8, "Email marketing opt-in level.")),
514
- emailMarketingUpdatedAt: Schema$1.NullOr(Schema$1.Date).pipe(field(9, "Time when email marketing consent last changed.")),
515
- phone: Schema$1.NullOr(Schema$1.String).pipe(field(10, "Default phone number.")),
516
- smsMarketingState: Schema$1.NullOr(SmsMarketingStateSchema).pipe(field(11, "SMS marketing consent state.")),
517
- smsMarketingOptInLevel: Schema$1.NullOr(MarketingOptInLevelSchema).pipe(field(12, "SMS marketing opt-in level.")),
518
- smsMarketingUpdatedAt: Schema$1.NullOr(Schema$1.Date).pipe(field(13, "Time when SMS marketing consent last changed.")),
519
- smsMarketingCollectedFrom: Schema$1.NullOr(ConsentCollectedFromSchema).pipe(field(14, "Where SMS marketing consent was collected.")),
520
- note: Schema$1.NullOr(Schema$1.String).pipe(field(15, "Merchant note about the customer.")),
521
- state: CustomerStateSchema.pipe(field(16, "Customer account state.")),
522
- verifiedEmail: Schema$1.Boolean.pipe(field(17, "Whether the email address is verified.")),
523
- taxExempt: Schema$1.Boolean.pipe(field(18, "Whether the customer is exempt from tax.")),
524
- taxExemptions: Schema$1.Array(Schema$1.String.annotate({ fieldId: 100 })).pipe(field(19, "Tax exemptions that apply to the customer.")),
525
- tags: Schema$1.Array(Schema$1.String.annotate({ fieldId: 101 })).pipe(field(20, "Tags added to the customer.")),
526
- locale: Schema$1.NullOr(Schema$1.String).pipe(field(21, "Customer language.")),
527
- numberOfOrders: Schema$1.Int.pipe(field(22, "Number of orders the customer placed.")),
505
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique customer identifier." })),
506
+ legacyResourceId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Numeric customer identifier stored as text." })),
507
+ firstName: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "First name." })),
508
+ lastName: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Last name." })),
509
+ displayName: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Full name shown in Shopify." })),
510
+ email: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Default email address." })),
511
+ emailMarketingState: Schema$1.NullOr(EmailMarketingStateSchema).pipe(Schema$1.annotateKey({ description: "Email marketing consent state." })),
512
+ emailMarketingOptInLevel: Schema$1.NullOr(MarketingOptInLevelSchema).pipe(Schema$1.annotateKey({ description: "Email marketing opt-in level." })),
513
+ emailMarketingUpdatedAt: Schema$1.NullOr(Schema$1.Date).pipe(Schema$1.annotateKey({ description: "Time when email marketing consent last changed." })),
514
+ phone: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Default phone number." })),
515
+ smsMarketingState: Schema$1.NullOr(SmsMarketingStateSchema).pipe(Schema$1.annotateKey({ description: "SMS marketing consent state." })),
516
+ smsMarketingOptInLevel: Schema$1.NullOr(MarketingOptInLevelSchema).pipe(Schema$1.annotateKey({ description: "SMS marketing opt-in level." })),
517
+ smsMarketingUpdatedAt: Schema$1.NullOr(Schema$1.Date).pipe(Schema$1.annotateKey({ description: "Time when SMS marketing consent last changed." })),
518
+ smsMarketingCollectedFrom: Schema$1.NullOr(ConsentCollectedFromSchema).pipe(Schema$1.annotateKey({ description: "Where SMS marketing consent was collected." })),
519
+ note: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Merchant note about the customer." })),
520
+ state: CustomerStateSchema.pipe(Schema$1.annotateKey({ description: "Customer account state." })),
521
+ verifiedEmail: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the email address is verified." })),
522
+ taxExempt: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the customer is exempt from tax." })),
523
+ taxExemptions: Schema$1.Array(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Tax exemptions that apply to the customer." })),
524
+ tags: Schema$1.Array(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Tags added to the customer." })),
525
+ locale: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Customer language." })),
526
+ numberOfOrders: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Number of orders the customer placed." })),
528
527
  amountSpent: Schema$1.Struct({
529
- amount: Schema$1.String.pipe(field(111, "Amount spent.")),
530
- currencyCode: Schema$1.String.pipe(field(112, "Shop currency code."))
531
- }).pipe(field(23, "Total amount spent in the shop currency.")),
532
- lastOrderId: Schema$1.NullOr(Schema$1.String).pipe(field(24, "Most recent order identifier.")),
533
- productSubscriberStatus: Schema$1.NullOr(ProductSubscriberStatusSchema).pipe(field(25, "Subscription status for products.")),
534
- dataSaleOptOut: Schema$1.NullOr(Schema$1.Boolean).pipe(field(26, "Whether the customer opted out of data sale.")),
535
- defaultAddressId: Schema$1.NullOr(Schema$1.String).pipe(field(27, "Default address identifier.")),
536
- addresses: Schema$1.Array(CustomerAddressSchema.annotate({ fieldId: 120 })).pipe(field(28, "Saved addresses.")),
537
- createdAt: Schema$1.Date.pipe(field(29, "Time when the customer was created.")),
538
- updatedAt: Schema$1.Date.pipe(field(30, "Time when the customer was last changed.")),
539
- _deleted: Schema$1.optional(Schema$1.Boolean).pipe(field(31, "Whether the customer was deleted."))
528
+ amount: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Amount spent." })),
529
+ currencyCode: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Shop currency code." }))
530
+ }).pipe(Schema$1.annotateKey({ description: "Total amount spent in the shop currency." })),
531
+ lastOrderId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Most recent order identifier." })),
532
+ productSubscriberStatus: Schema$1.NullOr(ProductSubscriberStatusSchema).pipe(Schema$1.annotateKey({ description: "Subscription status for products." })),
533
+ dataSaleOptOut: Schema$1.NullOr(Schema$1.Boolean).pipe(Schema$1.annotateKey({ description: "Whether the customer opted out of data sale." })),
534
+ defaultAddressId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Default address identifier." })),
535
+ addresses: Schema$1.Array(CustomerAddressSchema).pipe(Schema$1.annotateKey({ description: "Saved addresses." })),
536
+ createdAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the customer was created." })),
537
+ updatedAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the customer was last changed." })),
538
+ _deleted: Schema$1.optional(Schema$1.Boolean).pipe(Schema$1.annotateKey({ description: "Whether the customer was deleted." }))
540
539
  }).annotate({ description: "Customers in a Shopify store." }).pipe(Iceberg.identifier("id"));
541
540
  //#endregion
542
541
  //#region src/resources/customers/graphql.ts
@@ -709,104 +708,104 @@ const DiscountTargetSelectionSchema = Schema$1.Literals([
709
708
  const DiscountTargetTypeSchema = Schema$1.Literals(["LINE_ITEM", "SHIPPING_LINE"]);
710
709
  const DiscountValueTypeSchema = Schema$1.Literals(["PERCENTAGE", "FIXED_AMOUNT"]);
711
710
  const DiscountApplicationSchema = Schema$1.Struct({
712
- index: Schema$1.Int.pipe(field(161, "Position used by discount allocations.")),
713
- type: DiscountApplicationTypeSchema.pipe(field(162, "How the discount was applied.")),
714
- code: Schema$1.NullOr(Schema$1.String).pipe(field(163, "Discount code.")),
715
- title: Schema$1.NullOr(Schema$1.String).pipe(field(164, "Discount title.")),
716
- description: Schema$1.NullOr(Schema$1.String).pipe(field(165, "Manual discount description.")),
717
- allocationMethod: DiscountAllocationMethodSchema.pipe(field(166, "How the value is split.")),
718
- targetSelection: DiscountTargetSelectionSchema.pipe(field(167, "Which lines are targeted.")),
719
- targetType: DiscountTargetTypeSchema.pipe(field(168, "Kind of lines targeted.")),
720
- valueType: DiscountValueTypeSchema.pipe(field(169, "Whether the value is a percent.")),
721
- value: Schema$1.String.pipe(field(170, "Percent or amount in the customer currency."))
711
+ index: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Position used by discount allocations." })),
712
+ type: DiscountApplicationTypeSchema.pipe(Schema$1.annotateKey({ description: "How the discount was applied." })),
713
+ code: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Discount code." })),
714
+ title: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Discount title." })),
715
+ description: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Manual discount description." })),
716
+ allocationMethod: DiscountAllocationMethodSchema.pipe(Schema$1.annotateKey({ description: "How the value is split." })),
717
+ targetSelection: DiscountTargetSelectionSchema.pipe(Schema$1.annotateKey({ description: "Which lines are targeted." })),
718
+ targetType: DiscountTargetTypeSchema.pipe(Schema$1.annotateKey({ description: "Kind of lines targeted." })),
719
+ valueType: DiscountValueTypeSchema.pipe(Schema$1.annotateKey({ description: "Whether the value is a percent." })),
720
+ value: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Percent or amount in the customer currency." }))
722
721
  });
723
722
  const ShippingLineSchema = Schema$1.Struct({
724
- id: Schema$1.NullOr(Schema$1.String).pipe(field(501, "Unique shipping line identifier.")),
725
- title: Schema$1.String.pipe(field(502, "Shipping method title.")),
726
- code: Schema$1.NullOr(Schema$1.String).pipe(field(503, "Shipping rate code.")),
727
- source: Schema$1.NullOr(Schema$1.String).pipe(field(504, "Source of the shipping rate.")),
728
- carrierIdentifier: Schema$1.NullOr(Schema$1.String).pipe(field(505, "Carrier service identifier.")),
729
- phone: Schema$1.NullOr(Schema$1.String).pipe(field(506, "Phone number for the shipping line.")),
730
- isRemoved: Schema$1.Boolean.pipe(field(507, "Whether the line was removed by an edit.")),
731
- originalPriceSet: moneyBag(520).pipe(field(508, "Price before discounts.")),
732
- discountedPriceSet: moneyBag(530).pipe(field(509, "Price after discounts.")),
733
- currentDiscountedPriceSet: moneyBag(540).pipe(field(510, "Price after discounts, edits, and refunds.")),
734
- taxLines: taxLines(550).pipe(field(511, "Taxes on the shipping line.")),
735
- discountAllocations: discountAllocations(570).pipe(field(512, "Discounts on the line."))
723
+ id: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Unique shipping line identifier." })),
724
+ title: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Shipping method title." })),
725
+ code: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Shipping rate code." })),
726
+ source: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Source of the shipping rate." })),
727
+ carrierIdentifier: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Carrier service identifier." })),
728
+ phone: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Phone number for the shipping line." })),
729
+ isRemoved: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the line was removed by an edit." })),
730
+ originalPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Price before discounts." })),
731
+ discountedPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Price after discounts." })),
732
+ currentDiscountedPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Price after discounts, edits, and refunds." })),
733
+ taxLines: taxLines.pipe(Schema$1.annotateKey({ description: "Taxes on the shipping line." })),
734
+ discountAllocations: discountAllocations.pipe(Schema$1.annotateKey({ description: "Discounts on the line." }))
736
735
  });
737
736
  const OrderLineItemSchema = Schema$1.Struct({
738
- id: Schema$1.String.pipe(field(601, "Unique line item identifier.")),
739
- name: Schema$1.String.pipe(field(602, "Product and variant name.")),
740
- title: Schema$1.String.pipe(field(603, "Product title.")),
741
- variantTitle: Schema$1.NullOr(Schema$1.String).pipe(field(604, "Variant title.")),
742
- sku: Schema$1.NullOr(Schema$1.String).pipe(field(605, "Stock keeping unit.")),
743
- vendor: Schema$1.NullOr(Schema$1.String).pipe(field(606, "Product vendor.")),
744
- productId: Schema$1.NullOr(Schema$1.String).pipe(field(607, "Product identifier.")),
745
- variantId: Schema$1.NullOr(Schema$1.String).pipe(field(608, "Product variant identifier.")),
746
- quantity: Schema$1.Int.pipe(field(609, "Quantity when the order was placed.")),
747
- currentQuantity: Schema$1.Int.pipe(field(610, "Quantity after removals and refunds.")),
748
- taxable: Schema$1.Boolean.pipe(field(611, "Whether the line item is taxable.")),
749
- requiresShipping: Schema$1.Boolean.pipe(field(612, "Whether the line item needs shipping.")),
750
- isGiftCard: Schema$1.Boolean.pipe(field(613, "Whether the line item is a gift card.")),
751
- originalUnitPriceSet: moneyBag(630).pipe(field(614, "Unit price before discounts.")),
752
- totalDiscountSet: moneyBag(640).pipe(field(615, "Total discount on the line.")),
753
- taxLines: taxLines(650).pipe(field(616, "Taxes on the line.")),
754
- discountAllocations: discountAllocations(670).pipe(field(617, "Discounts on the line.")),
755
- customAttributes: attributes(690).pipe(field(618, "Custom line properties."))
737
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique line item identifier." })),
738
+ name: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Product and variant name." })),
739
+ title: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Product title." })),
740
+ variantTitle: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Variant title." })),
741
+ sku: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Stock keeping unit." })),
742
+ vendor: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Product vendor." })),
743
+ productId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Product identifier." })),
744
+ variantId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Product variant identifier." })),
745
+ quantity: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Quantity when the order was placed." })),
746
+ currentQuantity: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Quantity after removals and refunds." })),
747
+ taxable: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the line item is taxable." })),
748
+ requiresShipping: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the line item needs shipping." })),
749
+ isGiftCard: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the line item is a gift card." })),
750
+ originalUnitPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Unit price before discounts." })),
751
+ totalDiscountSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Total discount on the line." })),
752
+ taxLines: taxLines.pipe(Schema$1.annotateKey({ description: "Taxes on the line." })),
753
+ discountAllocations: discountAllocations.pipe(Schema$1.annotateKey({ description: "Discounts on the line." })),
754
+ customAttributes: attributes.pipe(Schema$1.annotateKey({ description: "Custom line properties." }))
756
755
  });
757
756
  const OrderSchema = Schema$1.Struct({
758
- id: Schema$1.String.pipe(field(1, "Unique order identifier.")),
759
- legacyResourceId: Schema$1.String.pipe(field(2, "Numeric order identifier stored as text.")),
760
- name: Schema$1.String.pipe(field(3, "Order name shown to the merchant.")),
761
- email: Schema$1.NullOr(Schema$1.String).pipe(field(4, "Email used for the order.")),
762
- phone: Schema$1.NullOr(Schema$1.String).pipe(field(5, "Phone used for the order.")),
763
- customerId: Schema$1.NullOr(Schema$1.String).pipe(field(6, "Customer identifier.")),
764
- customerLocale: Schema$1.NullOr(Schema$1.String).pipe(field(7, "Customer language.")),
765
- customerAcceptsMarketing: Schema$1.Boolean.pipe(field(8, "Whether the buyer accepts marketing.")),
766
- billingAddress: Schema$1.NullOr(address(100)).pipe(field(9, "Billing address.")),
767
- shippingAddress: Schema$1.NullOr(address(120)).pipe(field(10, "Shipping address.")),
768
- note: Schema$1.NullOr(Schema$1.String).pipe(field(11, "Order note.")),
769
- customAttributes: attributes(140).pipe(field(12, "Custom order attributes.")),
770
- tags: Schema$1.Array(Schema$1.String.annotate({ fieldId: 150 })).pipe(field(13, "Tags added to the order.")),
771
- confirmationNumber: Schema$1.NullOr(Schema$1.String).pipe(field(14, "Confirmation number.")),
772
- poNumber: Schema$1.NullOr(Schema$1.String).pipe(field(15, "Purchase order number.")),
773
- sourceName: Schema$1.NullOr(Schema$1.String).pipe(field(16, "Channel that created the order.")),
774
- sourceIdentifier: Schema$1.NullOr(Schema$1.String).pipe(field(17, "Identifier from the source.")),
775
- appId: Schema$1.NullOr(Schema$1.String).pipe(field(18, "App that created the order.")),
776
- paymentGatewayNames: Schema$1.Array(Schema$1.String.annotate({ fieldId: 152 })).pipe(field(19, "Payment gateways used.")),
777
- test: Schema$1.Boolean.pipe(field(20, "Whether the order is a test order.")),
778
- taxesIncluded: Schema$1.Boolean.pipe(field(21, "Whether prices include taxes.")),
779
- taxExempt: Schema$1.Boolean.pipe(field(22, "Whether the order is exempt from tax.")),
780
- dutiesIncluded: Schema$1.Boolean.pipe(field(23, "Whether prices include duties.")),
781
- estimatedTaxes: Schema$1.Boolean.pipe(field(24, "Whether taxes are estimates.")),
782
- totalWeight: Schema$1.NullOr(Schema$1.Int).pipe(field(25, "Total weight in grams.")),
783
- displayFinancialStatus: Schema$1.NullOr(OrderFinancialStatusSchema).pipe(field(26, "Payment status of the order.")),
784
- cancelReason: Schema$1.NullOr(OrderCancelReasonSchema).pipe(field(27, "Reason the order was cancelled.")),
785
- cancelledAt: Schema$1.NullOr(Schema$1.Date).pipe(field(28, "Time when the order was cancelled.")),
786
- closedAt: Schema$1.NullOr(Schema$1.Date).pipe(field(29, "Time when the order was closed.")),
787
- processedAt: Schema$1.Date.pipe(field(30, "Time when the order was processed.")),
788
- createdAt: Schema$1.Date.pipe(field(31, "Time when the order was created.")),
789
- updatedAt: Schema$1.Date.pipe(field(32, "Time when the order was last changed.")),
790
- currencyCode: Schema$1.String.pipe(field(33, "Shop currency code.")),
791
- presentmentCurrencyCode: Schema$1.String.pipe(field(34, "Customer currency code.")),
792
- discountCodes: Schema$1.Array(Schema$1.String.annotate({ fieldId: 151 })).pipe(field(35, "Discount codes used.")),
793
- discountApplications: Schema$1.Array(DiscountApplicationSchema.annotate({ fieldId: 160 })).pipe(field(36, "Discounts applied to the order.")),
794
- subtotalPriceSet: Schema$1.NullOr(moneyBag(200)).pipe(field(37, "Subtotal when the order was placed.")),
795
- currentSubtotalPriceSet: moneyBag(210).pipe(field(38, "Subtotal after edits and refunds.")),
796
- totalDiscountsSet: Schema$1.NullOr(moneyBag(220)).pipe(field(39, "Discounts when the order was placed.")),
797
- currentTotalDiscountsSet: moneyBag(230).pipe(field(40, "Discounts after edits and refunds.")),
798
- totalShippingPriceSet: moneyBag(240).pipe(field(41, "Shipping when the order was placed.")),
799
- currentShippingPriceSet: moneyBag(250).pipe(field(42, "Shipping after edits and refunds.")),
800
- totalTaxSet: Schema$1.NullOr(moneyBag(260)).pipe(field(43, "Tax when the order was placed.")),
801
- currentTotalTaxSet: moneyBag(270).pipe(field(44, "Tax after edits and refunds.")),
802
- originalTotalDutiesSet: Schema$1.NullOr(moneyBag(280)).pipe(field(45, "Duties when the order was placed.")),
803
- currentTotalDutiesSet: Schema$1.NullOr(moneyBag(290)).pipe(field(46, "Duties after edits and refunds.")),
804
- totalPriceSet: moneyBag(300).pipe(field(47, "Total when the order was placed.")),
805
- currentTotalPriceSet: moneyBag(310).pipe(field(48, "Total after edits and refunds.")),
806
- taxLines: taxLines(400).pipe(field(49, "Taxes when the order was placed.")),
807
- shippingLines: Schema$1.Array(ShippingLineSchema.annotate({ fieldId: 500 })).pipe(field(50, "Shipping lines, including removed ones.")),
808
- lineItems: Schema$1.Array(OrderLineItemSchema.annotate({ fieldId: 600 })).pipe(field(51, "Line items in the order.")),
809
- _deleted: Schema$1.optional(Schema$1.Boolean).pipe(field(52, "Whether the order was deleted."))
757
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique order identifier." })),
758
+ legacyResourceId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Numeric order identifier stored as text." })),
759
+ name: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Order name shown to the merchant." })),
760
+ email: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Email used for the order." })),
761
+ phone: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Phone used for the order." })),
762
+ customerId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Customer identifier." })),
763
+ customerLocale: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Customer language." })),
764
+ customerAcceptsMarketing: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the buyer accepts marketing." })),
765
+ billingAddress: Schema$1.NullOr(address).pipe(Schema$1.annotateKey({ description: "Billing address." })),
766
+ shippingAddress: Schema$1.NullOr(address).pipe(Schema$1.annotateKey({ description: "Shipping address." })),
767
+ note: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Order note." })),
768
+ customAttributes: attributes.pipe(Schema$1.annotateKey({ description: "Custom order attributes." })),
769
+ tags: Schema$1.Array(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Tags added to the order." })),
770
+ confirmationNumber: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Confirmation number." })),
771
+ poNumber: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Purchase order number." })),
772
+ sourceName: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Channel that created the order." })),
773
+ sourceIdentifier: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Identifier from the source." })),
774
+ appId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "App that created the order." })),
775
+ paymentGatewayNames: Schema$1.Array(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Payment gateways used." })),
776
+ test: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the order is a test order." })),
777
+ taxesIncluded: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether prices include taxes." })),
778
+ taxExempt: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the order is exempt from tax." })),
779
+ dutiesIncluded: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether prices include duties." })),
780
+ estimatedTaxes: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether taxes are estimates." })),
781
+ totalWeight: Schema$1.NullOr(Schema$1.Int).pipe(Schema$1.annotateKey({ description: "Total weight in grams." })),
782
+ displayFinancialStatus: Schema$1.NullOr(OrderFinancialStatusSchema).pipe(Schema$1.annotateKey({ description: "Payment status of the order." })),
783
+ cancelReason: Schema$1.NullOr(OrderCancelReasonSchema).pipe(Schema$1.annotateKey({ description: "Reason the order was cancelled." })),
784
+ cancelledAt: Schema$1.NullOr(Schema$1.Date).pipe(Schema$1.annotateKey({ description: "Time when the order was cancelled." })),
785
+ closedAt: Schema$1.NullOr(Schema$1.Date).pipe(Schema$1.annotateKey({ description: "Time when the order was closed." })),
786
+ processedAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the order was processed." })),
787
+ createdAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the order was created." })),
788
+ updatedAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the order was last changed." })),
789
+ currencyCode: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Shop currency code." })),
790
+ presentmentCurrencyCode: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Customer currency code." })),
791
+ discountCodes: Schema$1.Array(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Discount codes used." })),
792
+ discountApplications: Schema$1.Array(DiscountApplicationSchema).pipe(Schema$1.annotateKey({ description: "Discounts applied to the order." })),
793
+ subtotalPriceSet: Schema$1.NullOr(moneyBag).pipe(Schema$1.annotateKey({ description: "Subtotal when the order was placed." })),
794
+ currentSubtotalPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Subtotal after edits and refunds." })),
795
+ totalDiscountsSet: Schema$1.NullOr(moneyBag).pipe(Schema$1.annotateKey({ description: "Discounts when the order was placed." })),
796
+ currentTotalDiscountsSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Discounts after edits and refunds." })),
797
+ totalShippingPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Shipping when the order was placed." })),
798
+ currentShippingPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Shipping after edits and refunds." })),
799
+ totalTaxSet: Schema$1.NullOr(moneyBag).pipe(Schema$1.annotateKey({ description: "Tax when the order was placed." })),
800
+ currentTotalTaxSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Tax after edits and refunds." })),
801
+ originalTotalDutiesSet: Schema$1.NullOr(moneyBag).pipe(Schema$1.annotateKey({ description: "Duties when the order was placed." })),
802
+ currentTotalDutiesSet: Schema$1.NullOr(moneyBag).pipe(Schema$1.annotateKey({ description: "Duties after edits and refunds." })),
803
+ totalPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Total when the order was placed." })),
804
+ currentTotalPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Total after edits and refunds." })),
805
+ taxLines: taxLines.pipe(Schema$1.annotateKey({ description: "Taxes when the order was placed." })),
806
+ shippingLines: Schema$1.Array(ShippingLineSchema).pipe(Schema$1.annotateKey({ description: "Shipping lines, including removed ones." })),
807
+ lineItems: Schema$1.Array(OrderLineItemSchema).pipe(Schema$1.annotateKey({ description: "Line items in the order." })),
808
+ _deleted: Schema$1.optional(Schema$1.Boolean).pipe(Schema$1.annotateKey({ description: "Whether the order was deleted." }))
810
809
  }).annotate({ description: "Orders in a Shopify store." }).pipe(Iceberg.identifier("id"));
811
810
  //#endregion
812
811
  //#region src/resources/orders/graphql.ts
@@ -1276,49 +1275,49 @@ const RestockTypeSchema = Schema$1.Literals([
1276
1275
  "NO_RESTOCK"
1277
1276
  ]);
1278
1277
  const RefundSchema = Schema$1.Struct({
1279
- id: Schema$1.String.pipe(field(1, "Unique refund identifier.")),
1280
- legacyResourceId: Schema$1.String.pipe(field(2, "Numeric refund identifier stored as text.")),
1281
- orderId: Schema$1.String.pipe(field(3, "Refunded order identifier.")),
1282
- note: Schema$1.NullOr(Schema$1.String).pipe(field(4, "Refund note.")),
1283
- createdAt: Schema$1.NullOr(Schema$1.Date).pipe(field(5, "Time when the refund was created.")),
1284
- processedAt: Schema$1.Date.pipe(field(6, "Time when the refund was processed.")),
1278
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique refund identifier." })),
1279
+ legacyResourceId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Numeric refund identifier stored as text." })),
1280
+ orderId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Refunded order identifier." })),
1281
+ note: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Refund note." })),
1282
+ createdAt: Schema$1.NullOr(Schema$1.Date).pipe(Schema$1.annotateKey({ description: "Time when the refund was created." })),
1283
+ processedAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the refund was processed." })),
1285
1284
  transactions: Schema$1.Array(Schema$1.Struct({
1286
- id: Schema$1.String.pipe(field(101, "Unique transaction identifier.")),
1287
- kind: TransactionKindSchema.pipe(field(102, "Kind of transaction.")),
1288
- status: TransactionStatusSchema.pipe(field(103, "Status reported for the transaction.")),
1289
- amount: Schema$1.String.pipe(field(104, "Amount in the customer currency.")),
1290
- currencyCode: Schema$1.String.pipe(field(105, "Customer currency code.")),
1291
- gateway: Schema$1.NullOr(Schema$1.String).pipe(field(106, "Payment gateway.")),
1292
- test: Schema$1.Boolean.pipe(field(107, "Whether the transaction is a test.")),
1293
- errorCode: Schema$1.NullOr(Schema$1.String).pipe(field(108, "Gateway error code.")),
1294
- parentTransactionId: Schema$1.NullOr(Schema$1.String).pipe(field(109, "Transaction this one refunds.")),
1295
- createdAt: Schema$1.Date.pipe(field(110, "Time when the transaction was created.")),
1296
- processedAt: Schema$1.NullOr(Schema$1.Date).pipe(field(111, "Time when the transaction was processed."))
1297
- }).annotate({ fieldId: 100 })).pipe(field(7, "Transactions that move the refunded money.")),
1285
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique transaction identifier." })),
1286
+ kind: TransactionKindSchema.pipe(Schema$1.annotateKey({ description: "Kind of transaction." })),
1287
+ status: TransactionStatusSchema.pipe(Schema$1.annotateKey({ description: "Status reported for the transaction." })),
1288
+ amount: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Amount in the customer currency." })),
1289
+ currencyCode: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Customer currency code." })),
1290
+ gateway: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Payment gateway." })),
1291
+ test: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the transaction is a test." })),
1292
+ errorCode: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Gateway error code." })),
1293
+ parentTransactionId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Transaction this one refunds." })),
1294
+ createdAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the transaction was created." })),
1295
+ processedAt: Schema$1.NullOr(Schema$1.Date).pipe(Schema$1.annotateKey({ description: "Time when the transaction was processed." }))
1296
+ })).pipe(Schema$1.annotateKey({ description: "Transactions that move the refunded money." })),
1298
1297
  refundLineItems: Schema$1.Array(Schema$1.Struct({
1299
- id: Schema$1.NullOr(Schema$1.String).pipe(field(201, "Unique refund line item identifier.")),
1300
- lineItemId: Schema$1.String.pipe(field(202, "Refunded order line item identifier.")),
1301
- quantity: Schema$1.Int.pipe(field(203, "Quantity refunded.")),
1302
- restockType: RestockTypeSchema.pipe(field(204, "How the items were restocked.")),
1303
- locationId: Schema$1.NullOr(Schema$1.String).pipe(field(205, "Restock location identifier.")),
1304
- subtotalSet: moneyBag(210).pipe(field(206, "Refunded subtotal.")),
1305
- totalTaxSet: moneyBag(220).pipe(field(207, "Refunded tax."))
1306
- }).annotate({ fieldId: 200 })).pipe(field(8, "Refunded order line items.")),
1298
+ id: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Unique refund line item identifier." })),
1299
+ lineItemId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Refunded order line item identifier." })),
1300
+ quantity: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Quantity refunded." })),
1301
+ restockType: RestockTypeSchema.pipe(Schema$1.annotateKey({ description: "How the items were restocked." })),
1302
+ locationId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Restock location identifier." })),
1303
+ subtotalSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Refunded subtotal." })),
1304
+ totalTaxSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Refunded tax." }))
1305
+ })).pipe(Schema$1.annotateKey({ description: "Refunded order line items." })),
1307
1306
  refundShippingLines: Schema$1.Array(Schema$1.Struct({
1308
- id: Schema$1.String.pipe(field(301, "Unique refund shipping line identifier.")),
1309
- shippingLineId: Schema$1.NullOr(Schema$1.String).pipe(field(302, "Refunded shipping line.")),
1310
- subtotalAmountSet: moneyBag(310).pipe(field(303, "Refunded shipping amount."))
1311
- }).annotate({ fieldId: 300 })).pipe(field(9, "Refunded shipping.")),
1307
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique refund shipping line identifier." })),
1308
+ shippingLineId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Refunded shipping line." })),
1309
+ subtotalAmountSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Refunded shipping amount." }))
1310
+ })).pipe(Schema$1.annotateKey({ description: "Refunded shipping." })),
1312
1311
  orderAdjustments: Schema$1.Array(Schema$1.Struct({
1313
- id: Schema$1.String.pipe(field(401, "Unique order adjustment identifier.")),
1314
- reason: Schema$1.NullOr(Schema$1.String).pipe(field(402, "Reason for the adjustment.")),
1315
- amountSet: moneyBag(410).pipe(field(403, "Adjustment amount.")),
1316
- taxAmountSet: moneyBag(420).pipe(field(404, "Tax on the adjustment."))
1317
- }).annotate({ fieldId: 400 })).pipe(field(10, "Refund discrepancy adjustments.")),
1312
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique order adjustment identifier." })),
1313
+ reason: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Reason for the adjustment." })),
1314
+ amountSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Adjustment amount." })),
1315
+ taxAmountSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Tax on the adjustment." }))
1316
+ })).pipe(Schema$1.annotateKey({ description: "Refund discrepancy adjustments." })),
1318
1317
  duties: Schema$1.Array(Schema$1.Struct({
1319
- dutyId: Schema$1.NullOr(Schema$1.String).pipe(field(501, "Refunded duty identifier.")),
1320
- amountSet: moneyBag(510).pipe(field(502, "Refunded duty amount."))
1321
- }).annotate({ fieldId: 500 })).pipe(field(11, "Refunded duties."))
1318
+ dutyId: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Refunded duty identifier." })),
1319
+ amountSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Refunded duty amount." }))
1320
+ })).pipe(Schema$1.annotateKey({ description: "Refunded duties." }))
1322
1321
  }).annotate({ description: "Refunds on orders in a Shopify store." }).pipe(Iceberg.identifier("id"));
1323
1322
  //#endregion
1324
1323
  //#region src/resources/refunds/graphql.ts
@@ -1824,40 +1823,40 @@ const layerConfig$1 = (config) => Layer.effect(ShopifyApiClient)(Config.unwrap(c
1824
1823
  //#endregion
1825
1824
  //#region src/resources/carts/row.ts
1826
1825
  const CartLineItemSchema = Schema$1.Struct({
1827
- id: Schema$1.String.pipe(field(102, "Unique cart line identifier.")),
1828
- properties: Schema$1.NullOr(Schema$1.String).pipe(field(103, "Custom line properties stored as JSON.")),
1829
- quantity: Schema$1.Int.pipe(field(104, "Quantity of the cart line.")),
1830
- variantId: Schema$1.String.pipe(field(105, "Product variant identifier.")),
1831
- key: Schema$1.String.pipe(field(106, "Unique key for the cart line.")),
1832
- discountedPrice: Schema$1.String.pipe(field(107, "Price after discounts.")),
1833
- discounts: Schema$1.String.pipe(field(108, "Line discounts stored as JSON.")),
1834
- giftCard: Schema$1.Boolean.pipe(field(109, "Whether the line is a gift card.")),
1835
- grams: Schema$1.Int.pipe(field(110, "Weight of the line in grams.")),
1836
- linePrice: Schema$1.String.pipe(field(111, "Total price for the line.")),
1837
- originalLinePrice: Schema$1.String.pipe(field(112, "Line price before discounts.")),
1838
- originalPrice: Schema$1.String.pipe(field(113, "Unit price before discounts.")),
1839
- price: Schema$1.String.pipe(field(114, "Current unit price.")),
1840
- productId: Schema$1.String.pipe(field(115, "Product identifier.")),
1841
- sku: Schema$1.NullOr(Schema$1.String).pipe(field(116, "Stock keeping unit for the line.")),
1842
- taxable: Schema$1.Boolean.pipe(field(117, "Whether the line is taxable.")),
1843
- title: Schema$1.String.pipe(field(118, "Title of the cart line.")),
1844
- totalDiscount: Schema$1.String.pipe(field(119, "Total discount for the line.")),
1845
- vendor: Schema$1.String.pipe(field(120, "Vendor of the product.")),
1846
- discountedPriceSet: moneyBag(200).pipe(field(121, "Price after discounts.")),
1847
- linePriceSet: moneyBag(210).pipe(field(122, "Total price for the line.")),
1848
- originalLinePriceSet: moneyBag(220).pipe(field(123, "Line price before discounts.")),
1849
- priceSet: moneyBag(230).pipe(field(124, "Current unit price.")),
1850
- totalDiscountSet: moneyBag(240).pipe(field(125, "Total discount for the line.")),
1851
- parentRelationship: Schema$1.NullOr(Schema$1.String).pipe(field(126, "Parent relationship stored as JSON."))
1826
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique cart line identifier." })),
1827
+ properties: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Custom line properties stored as JSON." })),
1828
+ quantity: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Quantity of the cart line." })),
1829
+ variantId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Product variant identifier." })),
1830
+ key: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique key for the cart line." })),
1831
+ discountedPrice: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Price after discounts." })),
1832
+ discounts: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Line discounts stored as JSON." })),
1833
+ giftCard: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the line is a gift card." })),
1834
+ grams: Schema$1.Int.pipe(Schema$1.annotateKey({ description: "Weight of the line in grams." })),
1835
+ linePrice: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Total price for the line." })),
1836
+ originalLinePrice: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Line price before discounts." })),
1837
+ originalPrice: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unit price before discounts." })),
1838
+ price: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Current unit price." })),
1839
+ productId: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Product identifier." })),
1840
+ sku: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Stock keeping unit for the line." })),
1841
+ taxable: Schema$1.Boolean.pipe(Schema$1.annotateKey({ description: "Whether the line is taxable." })),
1842
+ title: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Title of the cart line." })),
1843
+ totalDiscount: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Total discount for the line." })),
1844
+ vendor: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Vendor of the product." })),
1845
+ discountedPriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Price after discounts." })),
1846
+ linePriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Total price for the line." })),
1847
+ originalLinePriceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Line price before discounts." })),
1848
+ priceSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Current unit price." })),
1849
+ totalDiscountSet: moneyBag.pipe(Schema$1.annotateKey({ description: "Total discount for the line." })),
1850
+ parentRelationship: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Parent relationship stored as JSON." }))
1852
1851
  });
1853
1852
  const CartSchema = Schema$1.Struct({
1854
- id: Schema$1.String.pipe(field(1, "Unique cart identifier.")),
1855
- token: Schema$1.String.pipe(field(2, "Token for the cart.")),
1856
- topic: Schema$1.Literals(["carts/create", "carts/update"]).pipe(field(3, "Webhook topic that last changed the cart.")),
1857
- lineItems: Schema$1.Array(CartLineItemSchema.annotate({ fieldId: 101 })).pipe(field(4, "Items in the cart.")),
1858
- note: Schema$1.NullOr(Schema$1.String).pipe(field(5, "Note added to the cart.")),
1859
- updatedAt: Schema$1.Date.pipe(field(6, "Time when the cart was last changed.")),
1860
- createdAt: Schema$1.Date.pipe(field(7, "Time when the cart was created."))
1853
+ id: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Unique cart identifier." })),
1854
+ token: Schema$1.String.pipe(Schema$1.annotateKey({ description: "Token for the cart." })),
1855
+ topic: Schema$1.Literals(["carts/create", "carts/update"]).pipe(Schema$1.annotateKey({ description: "Webhook topic that last changed the cart." })),
1856
+ lineItems: Schema$1.Array(CartLineItemSchema).pipe(Schema$1.annotateKey({ description: "Items in the cart." })),
1857
+ note: Schema$1.NullOr(Schema$1.String).pipe(Schema$1.annotateKey({ description: "Note added to the cart." })),
1858
+ updatedAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the cart was last changed." })),
1859
+ createdAt: Schema$1.Date.pipe(Schema$1.annotateKey({ description: "Time when the cart was created." }))
1861
1860
  }).annotate({ description: "Latest state of each cart in a Shopify store." }).pipe(Iceberg.identifier("id"));
1862
1861
  //#endregion
1863
1862
  //#region src/resources/customers/webhook.ts
@@ -2470,4 +2469,4 @@ const ShopifyNormalize = {
2470
2469
  //#endregion
2471
2470
  export { CartWebhookPayloadSchema as C, normalizeAmount as E, ProductVariantSchema as S, gid as T, ProductWebhookPayloadSchema as _, RefundWebhookPayloadSchema as a, ProductStatusSchema as b, OrderWebhookPayloadSchema as c, CartSchema as d, client_exports as f, ProductDeleteWebhookPayloadSchema as g, CustomerSchema as h, layerConfig as i, fromOrderWebhook as l, OrderSchema as m, ShopifyConnector as n, fromRefundWebhook as o, RefundSchema as p, connector_exports as r, OrderDeleteWebhookPayloadSchema as s, ShopifyNormalize as t, CartLineItemSchema as u, ProductOptionSchema as v, PageInfoSchema as w, ProductVariantInventoryPolicySchema as x, ProductSchema as y };
2472
2471
 
2473
- //# sourceMappingURL=src-Bgvuhcfk.mjs.map
2472
+ //# sourceMappingURL=src-YBU_KSf5.mjs.map