@nuanu-ai/agentify-contracts 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/card.js CHANGED
@@ -28,18 +28,26 @@ import { z } from "zod";
28
28
  import { FieldSpecSchema, ParamNameSchema, ParamSpecSchema, paramSpecToValidator, } from "./param-spec.js";
29
29
  import { notPlainTextIn } from "./plain-text.js";
30
30
  import { IdentifierSchema, MoneySchema, OpenWordSchema, TimestampSchema } from "./primitives.js";
31
+ import { SellerSiteSchema } from "./seller-site.js";
31
32
  import { SellingStateSchema } from "./selling.js";
33
+ import { ShipToSchema } from "./ship-to.js";
34
+ import { ShipmentSchema } from "./shipment.js";
32
35
  /**
33
36
  * When the product reaches the agent, and therefore when the money moves.
34
37
  *
35
38
  * `sync` — in the answer to the purchase, and the payment executes last, after
36
39
  * the merchant has delivered. `async` — later, by a separate call, and the
37
40
  * payment executes at the moment of purchase. `confirm` — the merchant is
38
- * asked first, and the payment executes right after they say yes.
41
+ * asked first, and the payment executes right after they say yes. `ship` — a
42
+ * parcel the merchant hands to a carrier (ADR-0033): the payment executes at
43
+ * the moment of purchase, as in `async`, and the order carries the buyer's
44
+ * address until the merchant takes it on, or it ends without them.
39
45
  */
40
- export const FulfillmentSchema = z.enum(["sync", "async", "confirm"]).meta({
41
- description: 'When the product reaches the agent, and so when the money moves. "sync" — in the answer to the purchase, payment last. "async" — later, by a separate call, payment at the moment of purchase. "confirm" — the merchant is asked first and the payment follows their yes. A card cannot be published as "confirm" during the pilot: the confirmation request has no shape on the wire yet, so a handler could not tell one from a paid order.',
46
+ export const FulfillmentSchema = z.enum(["sync", "async", "confirm", "ship"]).meta({
47
+ description: 'When the product reaches the agent, and so when the money moves. "sync" — in the answer to the purchase, payment last. "async" — later, by a separate call, payment at the moment of purchase. "confirm" — the merchant is asked first and the payment follows their yes. "ship" — a parcel the merchant hands to a carrier, payment at the moment of purchase; the purchase carries the address it goes to. A card cannot be published as "confirm" during the pilot: the confirmation request has no shape on the wire yet, so a handler could not tell one from a paid order.',
42
48
  });
49
+ /** The longest a parcel's card may give its merchant to hand it to a carrier: thirty days. */
50
+ const SHIP_WITHIN_AT_MOST_SECONDS = 2_592_000;
43
51
  /**
44
52
  * How the price and availability of this card are asked for, if they are.
45
53
  *
@@ -145,43 +153,6 @@ export const ServiceNameSchema = listedText("service name")
145
153
  * the next time the merchant sets their name.
146
154
  */
147
155
  const StoredServiceNameSchema = listedText("service name");
148
- /** What a seller's site is held to, said once for the refusal and the description. */
149
- const SITE_FORM = "a seller's site is https:// and the domain name of their shop, with nothing after it — https://shop.example: in lower case, a domain name rather than an IP address or a single word, with no path, query, fragment, port, credentials or trailing slash";
150
- /**
151
- * The address of a seller's own shop on the web, where an agent takes what an
152
- * order cannot answer (ADR-0034).
153
- *
154
- * Only an https origin, because anything after the host — a path, a query, a
155
- * fragment — would be text of the merchant's own reaching every agent that
156
- * reads the card, which is the free text the decision refuses. The host is the
157
- * one part the merchant writes, so it is held to a domain name too: labels of
158
- * letters, digits and hyphens, at most 253 characters, ending in a zone of
159
- * letters or a punycode one. Anything a URL parser keeps as written would
160
- * otherwise pass — a sentence of instructions, a quote, a host of any length —
161
- * and so would a single word or an IP address, which point other people's
162
- * agents into somebody's own network. What the pattern cannot do is tell a
163
- * public name from a private one: a name in a zone kept for local networks,
164
- * or a public one whose address leads into one, passes, and so does a
165
- * hyphenated sentence of up to 253 characters that is a valid name. That is
166
- * why an agent is told, beside every site, that nobody checked it.
167
- *
168
- * The pattern says all that in a form the JSON Schema export keeps, and it
169
- * stops the check where it fails, so an address copied with a slash at the end
170
- * is told once. Asking the URL parser for the origin catches what the pattern
171
- * leaves, such as a punycode label the parser would write differently.
172
- */
173
- export const SellerSiteSchema = z
174
- .string()
175
- .regex(/^https:\/\/(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+(?:[a-z]{2,63}|xn--[a-z0-9-]{1,59})$/, { message: SITE_FORM, abort: true })
176
- .refine((site) => {
177
- try {
178
- return new URL(site).origin === site;
179
- }
180
- catch {
181
- return false;
182
- }
183
- }, SITE_FORM)
184
- .meta({ description: `The https origin of a seller's own shop: ${SITE_FORM}.` });
185
156
  /**
186
157
  * Who sells, as an agent reads it beside a product and on an order: the name
187
158
  * the merchant sells under and the site of their shop (ADR-0034).
@@ -445,11 +416,15 @@ const CardFieldsSchema = z.strictObject({
445
416
  * says so, or a generated client would first meet the rule as a refusal.
446
417
  */
447
418
  price: CardPriceSchema.meta({
448
- description: 'Publishing refuses a price that is zero, not in USD or USDC, or written with fewer than two or more than six digits after the dot ("5.00", "0.001"), so that a price the catalog shows is one a payment can be taken at.',
419
+ description: 'Publishing refuses a price that is zero, not in USD or USDC, or written with fewer than two or more than six digits after the dot ("5.00", "0.001"), so that a price the catalog shows is one a payment can be taken at. On a "ship" card it is the goods without shipping: the price a purchase goes through at is the merchant\'s price handler\'s answer, which includes shipping to the buyer\'s place.',
449
420
  }),
450
421
  /** What the agent has to supply to buy. Absent when the purchase needs no input. */
451
422
  params: writtenShort(ParamSpecSchema).optional(),
452
- result: writtenShort(DeclaredResultSchema),
423
+ /**
424
+ * What the agent receives. Every card declares it except a parcel's, whose
425
+ * mode fixes it: the record of the parcel's shipment (ADR-0033).
426
+ */
427
+ result: writtenShort(DeclaredResultSchema).optional(),
453
428
  /**
454
429
  * Words for an agent searching a discovery catalog. Absent on a card whose
455
430
  * merchant named none, and never invented for them.
@@ -479,6 +454,16 @@ const CardFieldsSchema = z.strictObject({
479
454
  confirm_deadline_seconds: z.int().positive().optional(),
480
455
  /** How long the merchant may take to deliver an order it has accepted. */
481
456
  fulfill_deadline_seconds: z.int().positive().optional(),
457
+ /**
458
+ * On a parcel's card, how long the merchant may take to hand it to a carrier,
459
+ * counted from the charge (ADR-0033). A name of its own rather than the
460
+ * delivery deadline's, because on an asynchronous card that number is the
461
+ * time to deliver, and a number read under the wrong name tells a person
462
+ * their parcel arrives when it merely leaves. The ceiling is thirty days, the
463
+ * longest the marketplaces give a seller, and it bounds how long a buyer's
464
+ * money sits with a merchant before the order becomes a refund owed.
465
+ */
466
+ ship_within_seconds: z.int().positive().max(SHIP_WITHIN_AT_MOST_SECONDS).optional(),
482
467
  });
483
468
  /**
484
469
  * Both deadlines are shown to the agent before it pays, which is why a card
@@ -509,8 +494,8 @@ const cardRules = (card, ctx) => {
509
494
  // card that has one problem, and lifting the gate later would uncover it.
510
495
  return;
511
496
  }
512
- // Past the gate only "sync" and "async" remain, and neither is ever asked to
513
- // confirm — which is why this needs no test on the mode of its own.
497
+ // Past the gate no mode is ever asked to confirm — which is why this needs no
498
+ // test on the mode of its own.
514
499
  if (card.confirm_deadline_seconds !== undefined) {
515
500
  ctx.addIssue({
516
501
  code: "custom",
@@ -518,6 +503,24 @@ const cardRules = (card, ctx) => {
518
503
  message: `only a card with fulfillment "confirm" is asked to confirm; this one is "${card.fulfillment}"`,
519
504
  });
520
505
  }
506
+ if (card.fulfillment === "ship") {
507
+ parcelRules(card, ctx);
508
+ return;
509
+ }
510
+ if (card.ship_within_seconds !== undefined) {
511
+ ctx.addIssue({
512
+ code: "custom",
513
+ path: ["ship_within_seconds"],
514
+ message: `only a card with fulfillment "ship" hands its goods to a carrier and names a time to ship; this one is "${card.fulfillment}"`,
515
+ });
516
+ }
517
+ if (card.result === undefined) {
518
+ ctx.addIssue({
519
+ code: "custom",
520
+ path: ["result"],
521
+ message: 'result is required: a card declares what the agent receives, and only a parcel\'s, fulfillment "ship", leaves that to its mode',
522
+ });
523
+ }
521
524
  if (card.fulfillment === "sync" && card.fulfill_deadline_seconds !== undefined) {
522
525
  ctx.addIssue({
523
526
  code: "custom",
@@ -526,12 +529,62 @@ const cardRules = (card, ctx) => {
526
529
  });
527
530
  }
528
531
  };
532
+ /**
533
+ * What a parcel's card is held to (ADR-0033), beside what every card is.
534
+ *
535
+ * Each rule is about a word an agent or a merchant would otherwise read wrong.
536
+ * The time to ship is required because it is the one promise the agent is
537
+ * given about when the goods leave. A result is refused because the mode fixes
538
+ * it — the record of the shipment — and one a merchant declared would be a
539
+ * second promise beside it. A delivery deadline is refused because the number
540
+ * would read as the time the parcel arrives. The price is the merchant's
541
+ * handler's to answer, because shipping depends on where the parcel goes, and
542
+ * only the merchant knows what it costs to send it there. And the address is
543
+ * not one of the card's parameters, because it travels in its own block.
544
+ */
545
+ const parcelRules = (card, ctx) => {
546
+ if (card.ship_within_seconds === undefined) {
547
+ ctx.addIssue({
548
+ code: "custom",
549
+ path: ["ship_within_seconds"],
550
+ message: `a parcel's card names ship_within_seconds, the time to hand it to a carrier counted from the charge, at most ${SHIP_WITHIN_AT_MOST_SECONDS} (thirty days)`,
551
+ });
552
+ }
553
+ if (card.result !== undefined) {
554
+ ctx.addIssue({
555
+ code: "custom",
556
+ path: ["result"],
557
+ message: "a parcel's card declares no result: its mode fixes what the agent receives, the record of the parcel's shipment",
558
+ });
559
+ }
560
+ if (card.fulfill_deadline_seconds !== undefined) {
561
+ ctx.addIssue({
562
+ code: "custom",
563
+ path: ["fulfill_deadline_seconds"],
564
+ message: "a parcel's card names the time to ship, ship_within_seconds, and no delivery deadline: under that name the number would read as the time the parcel arrives",
565
+ });
566
+ }
567
+ if (card.price_check !== "handler") {
568
+ ctx.addIssue({
569
+ code: "custom",
570
+ path: ["price_check"],
571
+ message: "a parcel's price is asked of the merchant's own price handler, price_check: \"handler\", whose answer is the whole price with shipping to the buyer's place",
572
+ });
573
+ }
574
+ if (card.params !== undefined && "ship_to" in card.params) {
575
+ ctx.addIssue({
576
+ code: "custom",
577
+ path: ["params", "ship_to"],
578
+ message: "a parcel's card asks for no ship_to among its parameters: the address travels in a block of its own beside them",
579
+ });
580
+ }
581
+ };
529
582
  // JSON Schema has no way to say "this field only when that one has this
530
583
  // value", and zod drops the rules above when it renders a document. Left at
531
584
  // that, an engineer generating a client from the export would build one that
532
585
  // sends deadlines a card cannot carry and only find out on the first publish.
533
586
  // Saying it in words is weaker than checking it, and better than silence.
534
- const CARD_RULES_IN_WORDS = 'A card cannot be published as fulfillment "confirm" during the pilot: the confirmation request has no shape on the wire yet, so a handler could not tell one from a paid order. confirm_deadline_seconds is only allowed when fulfillment is "confirm", and fulfill_deadline_seconds only when fulfillment is "async" or "confirm" — a synchronous card delivers inside the system-wide response budget and names no deadline of its own.';
587
+ const CARD_RULES_IN_WORDS = 'A card cannot be published as fulfillment "confirm" during the pilot: the confirmation request has no shape on the wire yet, so a handler could not tell one from a paid order. confirm_deadline_seconds is only allowed when fulfillment is "confirm", and fulfill_deadline_seconds only when fulfillment is "async" or "confirm" — a synchronous card delivers inside the system-wide response budget and names no deadline of its own. result is required on every card except one whose fulfillment is "ship". A "ship" card, a parcel, names ship_within_seconds and is the only card that may; it declares no result and no fulfill_deadline_seconds, its price_check is "handler", and it asks for no ship_to among its params, because the purchase carries the address in a block of its own.';
535
588
  /**
536
589
  * The words on a card that an agent reads: the title, the description, and
537
590
  * the title of each field the card declares.
@@ -636,8 +689,12 @@ export const CardSchema = CardFieldsSchema.superRefine(cardRules)
636
689
  * place that picks.
637
690
  */
638
691
  export const purchaseCheckFor = (card) => paramSpecToValidator(card.params ?? {}, "purchase");
639
- /** The check this card's delivery is held to. */
640
- export const deliveryCheckFor = (card) => paramSpecToValidator(card.result, "delivery");
692
+ /**
693
+ * The check this card's delivery is held to: the goods its `result` declared,
694
+ * or for a parcel, which is not delivered with goods at all, its shipment
695
+ * (ADR-0033).
696
+ */
697
+ export const deliveryCheckFor = (card) => card.result === undefined ? ShipmentSchema : paramSpecToValidator(card.result, "delivery");
641
698
  /**
642
699
  * The fields of a card as an agent reads it in a catalog.
643
700
  *
@@ -700,7 +757,11 @@ export const PublicCardSchema = z
700
757
  as_of: TimestampSchema,
701
758
  /** What the agent has to supply to buy. Absent when the purchase needs no input. */
702
759
  params: ReadDeclarationSchema.optional(),
703
- result: declaringAResult(ReadDeclarationSchema),
760
+ /**
761
+ * What the agent receives. Absent on a parcel, whose mode fixes it: the
762
+ * record of the parcel's shipment.
763
+ */
764
+ result: declaringAResult(ReadDeclarationSchema).optional(),
704
765
  /**
705
766
  * Whether the merchant is asked for this product's price and availability at
706
767
  * the moment of purchase, so the sale may go through at a price other than
@@ -735,6 +796,11 @@ export const PublicCardSchema = z
735
796
  fulfill_deadline_seconds: z.int().positive().optional(),
736
797
  /** On "confirm": how long the merchant has to say yes, in seconds. */
737
798
  confirm_deadline_seconds: z.int().positive().optional(),
799
+ /**
800
+ * On "ship": how long the merchant has to hand the parcel to a carrier,
801
+ * counted from the charge, in seconds. When it leaves, not when it arrives.
802
+ */
803
+ ship_within_seconds: z.int().positive().optional(),
738
804
  })
739
805
  .meta({
740
806
  // Everything below is written in prose above as well, and it has to be
@@ -743,7 +809,7 @@ export const PublicCardSchema = z
743
809
  // money on what this card claims. `as_of` in particular means something
744
810
  // narrower here than the same name means elsewhere in this contract, and a
745
811
  // reader who assumed otherwise would trust a stale number.
746
- description: "A product an agent can buy, projected from the card its merchant published. as_of is when the price shown here was published, and nothing more: on a card whose price is checked at purchase it says nothing about how fresh that check will be — elsewhere in this contract the same name means the moment a live answer was true. price_checked_at_purchase says the merchant is asked for a price at the moment of purchase, not that they answer; what happens when they are silent depends on the mode and belongs to the gateway. The number above is what an agent compares when choosing and may not be what the sale goes through at. Two rules hold beyond the shape: a synchronous product names no delivery deadline, because it is delivered inside a response budget that is the same for every product on the platform, and only a product whose merchant is asked to confirm names a confirmation deadline. seller is who sells, as the merchant gave it: Agentify did not check the name or the site. fulfillment is a word whose known values are listed beside it, and more may be added: a reader keeps a default arm, and a card whose mode it does not know is one to pass over, not a reason to stop reading the catalog. This document and every part inside it may also gain fields; a reader ignores the ones it does not know. The type of a declared field in params and result is a closed list, and a card with a type a reader does not know is one to pass over too.",
812
+ description: "A product an agent can buy, projected from the card its merchant published. as_of is when the price shown here was published, and nothing more: on a card whose price is checked at purchase it says nothing about how fresh that check will be — elsewhere in this contract the same name means the moment a live answer was true. price_checked_at_purchase says the merchant is asked for a price at the moment of purchase, not that they answer; what happens when they are silent depends on the mode and belongs to the gateway. The number above is what an agent compares when choosing and may not be what the sale goes through at. Three rules hold beyond the shape: a synchronous product names no delivery deadline, because it is delivered inside a response budget that is the same for every product on the platform; only a product whose merchant is asked to confirm names a confirmation deadline; and a parcel, fulfillment \"ship\", names ship_within_seconds — the time to hand it to a carrier counted from the charge, not the time it arrives — and no result, because what the agent receives is the record of its shipment, while every other product names a result. On a parcel the price shown is the goods without shipping, and the purchase goes through at the merchant's answer for the whole, shipping to the buyer's place included. seller is who sells, as the merchant gave it: Agentify did not check the name or the site. fulfillment is a word whose known values are listed beside it, and more may be added: a reader keeps a default arm, and a card whose mode it does not know is one to pass over, not a reason to stop reading the catalog. This document and every part inside it may also gain fields; a reader ignores the ones it does not know. The type of a declared field in params and result is a closed list, and a card with a type a reader does not know is one to pass over too.",
747
813
  });
748
814
  /**
749
815
  * The card as an agent reads it, built from the card the merchant published.
@@ -768,7 +834,7 @@ export const publicCardOf = (card, issued) => {
768
834
  price: card.price,
769
835
  as_of: issued.as_of,
770
836
  ...(card.params === undefined ? {} : { params: card.params }),
771
- result: card.result,
837
+ ...(card.result === undefined ? {} : { result: card.result }),
772
838
  price_checked_at_purchase: card.price_check !== undefined,
773
839
  };
774
840
  switch (card.fulfillment) {
@@ -793,6 +859,14 @@ export const publicCardOf = (card, issued) => {
793
859
  ? {}
794
860
  : { fulfill_deadline_seconds: card.fulfill_deadline_seconds }),
795
861
  };
862
+ case "ship":
863
+ return {
864
+ ...common,
865
+ fulfillment: "ship",
866
+ ...(card.ship_within_seconds === undefined
867
+ ? {}
868
+ : { ship_within_seconds: card.ship_within_seconds }),
869
+ };
796
870
  }
797
871
  };
798
872
  /**
@@ -827,9 +901,40 @@ const exampleOf = (spec) => Object.fromEntries(Object.entries(spec).map(([name,
827
901
  * inside another schema, so that one line is dropped here.
828
902
  */
829
903
  const purchaseBodySchemaOf = (card) => {
830
- const { $schema, ...body } = z.toJSONSchema(z.strictObject({ params: purchaseCheckFor(card) }));
904
+ const { $schema, ...body } = z.toJSONSchema(z.strictObject({
905
+ params: purchaseCheckFor(card),
906
+ // A parcel's purchase carries the address it goes to beside its
907
+ // parameters, and is refused without one (ADR-0032).
908
+ ...(card.fulfillment === "ship" ? { ship_to: ShipToSchema } : {}),
909
+ }));
831
910
  return body;
832
911
  };
912
+ /**
913
+ * Where a parcel goes, in a listing's example purchase: Agentify's own office
914
+ * (ADR-0033), with the number taken out of it, so that the example is a real
915
+ * place and nobody's home.
916
+ */
917
+ const LISTED_SHIP_TO = {
918
+ name: "Agentify",
919
+ line_one: "Jl. Raya Kediri, Beraban",
920
+ line_two: "Nuanu Creative City",
921
+ city: "Tabanan",
922
+ state: "BA",
923
+ postal_code: "82121",
924
+ country: "ID",
925
+ phone_number: "+62 000 0000 0000",
926
+ };
927
+ /**
928
+ * A recorded shipment, in a listing's example output, written as every other
929
+ * example here is: each field standing for what goes there, and the instant
930
+ * at the start of the clock rather than a date that looks like one somebody
931
+ * shipped on.
932
+ */
933
+ const LISTED_SHIPMENT = {
934
+ carrier: "string",
935
+ tracking_number: "string",
936
+ shipped_at: "1970-01-01T00:00:00Z",
937
+ };
833
938
  /**
834
939
  * The card as a discovery catalog reads it.
835
940
  *
@@ -849,9 +954,14 @@ export const bazaarDeclarationOf = (card, listed) => ({
849
954
  ...(listed.serviceName === null ? {} : { serviceName: listed.serviceName }),
850
955
  ...(card.tags === undefined ? {} : { tags: card.tags }),
851
956
  },
852
- input: { params: exampleOf(card.params ?? {}) },
957
+ input: {
958
+ params: exampleOf(card.params ?? {}),
959
+ ...(card.fulfillment === "ship" ? { ship_to: LISTED_SHIP_TO } : {}),
960
+ },
853
961
  inputSchema: purchaseBodySchemaOf(card),
854
- output: { example: exampleOf(card.result) },
962
+ // What the agent is finally handed: the goods the card declared, or for a
963
+ // parcel the record of its shipment.
964
+ output: { example: card.result === undefined ? LISTED_SHIPMENT : exampleOf(card.result) },
855
965
  });
856
966
  /**
857
967
  * One card as the merchant who published it reads it back.
@@ -73,12 +73,35 @@ export declare const WORKER_ENVELOPE_PAYLOADS: Readonly<{
73
73
  as_of: z.ZodISODateTime;
74
74
  }, z.core.$strict>;
75
75
  price_id: z.ZodOptional<z.ZodString>;
76
+ ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
77
+ name: z.ZodString;
78
+ line_one: z.ZodString;
79
+ line_two: z.ZodOptional<z.ZodString>;
80
+ city: z.ZodString;
81
+ state: z.ZodOptional<z.ZodString>;
82
+ postal_code: z.ZodOptional<z.ZodString>;
83
+ country: z.ZodString;
84
+ phone_number: z.ZodString;
85
+ }, z.core.$strict>, z.ZodObject<{
86
+ country: z.ZodString;
87
+ state: z.ZodOptional<z.ZodString>;
88
+ city: z.ZodString;
89
+ postal_code: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strict>, z.ZodObject<{
91
+ erased_at: z.ZodISODateTime;
92
+ }, z.core.$strict>]>>;
76
93
  test: z.ZodBoolean;
77
94
  }, z.core.$strict>;
78
95
  /** "How much is this and is it there", asked before a sale goes through. */
79
96
  readonly quote_request: z.ZodObject<{
80
97
  merchant_item_id: z.ZodString;
81
98
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
99
+ ship_to: z.ZodOptional<z.ZodObject<{
100
+ country: z.ZodString;
101
+ state: z.ZodOptional<z.ZodString>;
102
+ city: z.ZodString;
103
+ postal_code: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strict>>;
82
105
  price_id: z.ZodString;
83
106
  purpose: z.ZodEnum<{
84
107
  purchase: "purchase";
@@ -128,6 +151,23 @@ export declare const WorkerEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
128
151
  as_of: z.ZodISODateTime;
129
152
  }, z.core.$strict>;
130
153
  price_id: z.ZodOptional<z.ZodString>;
154
+ ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
155
+ name: z.ZodString;
156
+ line_one: z.ZodString;
157
+ line_two: z.ZodOptional<z.ZodString>;
158
+ city: z.ZodString;
159
+ state: z.ZodOptional<z.ZodString>;
160
+ postal_code: z.ZodOptional<z.ZodString>;
161
+ country: z.ZodString;
162
+ phone_number: z.ZodString;
163
+ }, z.core.$strict>, z.ZodObject<{
164
+ country: z.ZodString;
165
+ state: z.ZodOptional<z.ZodString>;
166
+ city: z.ZodString;
167
+ postal_code: z.ZodOptional<z.ZodString>;
168
+ }, z.core.$strict>, z.ZodObject<{
169
+ erased_at: z.ZodISODateTime;
170
+ }, z.core.$strict>]>>;
131
171
  test: z.ZodBoolean;
132
172
  }, z.core.$strict>;
133
173
  }, z.core.$strict>, z.ZodObject<{
@@ -137,6 +177,12 @@ export declare const WorkerEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
137
177
  payload: z.ZodObject<{
138
178
  merchant_item_id: z.ZodString;
139
179
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
180
+ ship_to: z.ZodOptional<z.ZodObject<{
181
+ country: z.ZodString;
182
+ state: z.ZodOptional<z.ZodString>;
183
+ city: z.ZodString;
184
+ postal_code: z.ZodOptional<z.ZodString>;
185
+ }, z.core.$strict>>;
140
186
  price_id: z.ZodString;
141
187
  purpose: z.ZodEnum<{
142
188
  purchase: "purchase";