@omnixhq/ucp-js-sdk 1.0.1 → 1.0.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.
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as z$1 from "zod";
2
- import { z } from "zod";
3
2
  //#region src/spec_generated.ts
4
3
  const CapabilityBaseSchema = z$1.intersection(z$1.object({
5
4
  "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("Entity version in YYYY-MM-DD format."),
@@ -162,7 +161,7 @@ const BuyerConsentBuyerSchema = z$1.intersection(z$1.object({
162
161
  "last_name": z$1.string().describe("Last name of the buyer.").optional(),
163
162
  "email": z$1.string().describe("Email of the buyer.").optional(),
164
163
  "phone_number": z$1.string().describe("E.164 standard.").optional()
165
- }), z$1.object({ "consent": z$1.object({
164
+ }).passthrough(), z$1.object({ "consent": z$1.object({
166
165
  "analytics": z$1.boolean().describe("Consent for analytics and performance tracking.").optional(),
167
166
  "preferences": z$1.boolean().describe("Consent for storing user preferences.").optional(),
168
167
  "marketing": z$1.boolean().describe("Consent for marketing communications.").optional(),
@@ -269,12 +268,12 @@ const CheckoutSchema = z$1.object({
269
268
  "last_name": z$1.string().describe("Last name of the buyer.").optional(),
270
269
  "email": z$1.string().describe("Email of the buyer.").optional(),
271
270
  "phone_number": z$1.string().describe("E.164 standard.").optional()
272
- }).describe("Representation of the buyer.").optional(),
271
+ }).passthrough().describe("Representation of the buyer.").optional(),
273
272
  "context": z$1.object({
274
273
  "address_country": z$1.string().describe("The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example \"US\". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as \"SGP\" or a full country name such as \"Singapore\" can also be used. Optional hint for market context (currency, availability, pricing)—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
275
274
  "address_region": z$1.string().describe("The region in which the locality is, and which is in the country. For example, California or another appropriate first-level Administrative division. Optional hint for progressive localization—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
276
275
  "postal_code": z$1.string().describe("The postal code. For example, 94043. Optional hint for regional refinement—higher-resolution data (e.g., shipping address) supersedes this value.").optional()
277
- }).describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.").optional(),
276
+ }).passthrough().describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.").optional(),
278
277
  "status": z$1.enum([
279
278
  "incomplete",
280
279
  "requires_escalation",
@@ -361,14 +360,14 @@ const CheckoutSchema = z$1.object({
361
360
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
362
361
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
363
362
  }).describe("The billing address associated with this payment method.").optional(),
364
- "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
363
+ "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
365
364
  "display": z$1.record(z$1.string(), z$1.unknown()).describe("Display information for this payment instrument. Each payment instrument schema defines its specific display properties, as outlined by the payment handler.").optional()
366
- }).describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.").optional(),
365
+ }).passthrough().describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.").optional(),
367
366
  "order": z$1.object({
368
367
  "id": z$1.string().describe("Unique order identifier."),
369
368
  "permalink_url": z$1.string().url().describe("Permalink to access the order on merchant site.")
370
369
  }).describe("Details about an order created for this checkout session.").optional()
371
- }).describe("Base checkout schema. Extensions compose onto this using allOf.");
370
+ }).passthrough().describe("Base checkout schema. Extensions compose onto this using allOf.");
372
371
  const CheckoutCreateRequestSchema = z$1.object({
373
372
  "line_items": z$1.array(z$1.object({
374
373
  "id": z$1.string(),
@@ -399,12 +398,12 @@ const CheckoutCreateRequestSchema = z$1.object({
399
398
  "last_name": z$1.string().describe("Last name of the buyer.").optional(),
400
399
  "email": z$1.string().describe("Email of the buyer.").optional(),
401
400
  "phone_number": z$1.string().describe("E.164 standard.").optional()
402
- }).describe("Representation of the buyer.").optional(),
401
+ }).passthrough().describe("Representation of the buyer.").optional(),
403
402
  "context": z$1.object({
404
403
  "address_country": z$1.string().describe("The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example \"US\". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as \"SGP\" or a full country name such as \"Singapore\" can also be used. Optional hint for market context (currency, availability, pricing)—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
405
404
  "address_region": z$1.string().describe("The region in which the locality is, and which is in the country. For example, California or another appropriate first-level Administrative division. Optional hint for progressive localization—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
406
405
  "postal_code": z$1.string().describe("The postal code. For example, 94043. Optional hint for regional refinement—higher-resolution data (e.g., shipping address) supersedes this value.").optional()
407
- }).describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.").optional(),
406
+ }).passthrough().describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.").optional(),
408
407
  "payment": z$1.object({ "instruments": z$1.array(z$1.intersection(z$1.object({
409
408
  "id": z$1.string().describe("A unique identifier for this instrument instance, assigned by the platform."),
410
409
  "handler_id": z$1.string().describe("The unique identifier for the handler instance that produced this instrument. This corresponds to the 'id' field in the Payment Handler definition."),
@@ -420,9 +419,9 @@ const CheckoutCreateRequestSchema = z$1.object({
420
419
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
421
420
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
422
421
  }).describe("The billing address associated with this payment method.").optional(),
423
- "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
422
+ "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
424
423
  "display": z$1.record(z$1.string(), z$1.unknown()).describe("Display information for this payment instrument. Each payment instrument schema defines its specific display properties, as outlined by the payment handler.").optional()
425
- }).describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.").optional()
424
+ }).passthrough().describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.").optional()
426
425
  }).strict();
427
426
  const CheckoutUpdateRequestSchema = z$1.object({
428
427
  "id": z$1.string().describe("Unique identifier of the checkout session."),
@@ -455,12 +454,12 @@ const CheckoutUpdateRequestSchema = z$1.object({
455
454
  "last_name": z$1.string().describe("Last name of the buyer.").optional(),
456
455
  "email": z$1.string().describe("Email of the buyer.").optional(),
457
456
  "phone_number": z$1.string().describe("E.164 standard.").optional()
458
- }).describe("Representation of the buyer.").optional(),
457
+ }).passthrough().describe("Representation of the buyer.").optional(),
459
458
  "context": z$1.object({
460
459
  "address_country": z$1.string().describe("The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example \"US\". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as \"SGP\" or a full country name such as \"Singapore\" can also be used. Optional hint for market context (currency, availability, pricing)—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
461
460
  "address_region": z$1.string().describe("The region in which the locality is, and which is in the country. For example, California or another appropriate first-level Administrative division. Optional hint for progressive localization—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
462
461
  "postal_code": z$1.string().describe("The postal code. For example, 94043. Optional hint for regional refinement—higher-resolution data (e.g., shipping address) supersedes this value.").optional()
463
- }).describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.").optional(),
462
+ }).passthrough().describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.").optional(),
464
463
  "payment": z$1.object({ "instruments": z$1.array(z$1.intersection(z$1.object({
465
464
  "id": z$1.string().describe("A unique identifier for this instrument instance, assigned by the platform."),
466
465
  "handler_id": z$1.string().describe("The unique identifier for the handler instance that produced this instrument. This corresponds to the 'id' field in the Payment Handler definition."),
@@ -476,9 +475,9 @@ const CheckoutUpdateRequestSchema = z$1.object({
476
475
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
477
476
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
478
477
  }).describe("The billing address associated with this payment method.").optional(),
479
- "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
478
+ "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
480
479
  "display": z$1.record(z$1.string(), z$1.unknown()).describe("Display information for this payment instrument. Each payment instrument schema defines its specific display properties, as outlined by the payment handler.").optional()
481
- }).describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.").optional()
480
+ }).passthrough().describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.").optional()
482
481
  }).strict();
483
482
  const CheckoutCompleteRequestSchema = z$1.object({ "payment": z$1.object({ "instruments": z$1.array(z$1.intersection(z$1.object({
484
483
  "id": z$1.string().describe("A unique identifier for this instrument instance, assigned by the platform."),
@@ -495,9 +494,9 @@ const CheckoutCompleteRequestSchema = z$1.object({ "payment": z$1.object({ "inst
495
494
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
496
495
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
497
496
  }).describe("The billing address associated with this payment method.").optional(),
498
- "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
497
+ "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
499
498
  "display": z$1.record(z$1.string(), z$1.unknown()).describe("Display information for this payment instrument. Each payment instrument schema defines its specific display properties, as outlined by the payment handler.").optional()
500
- }).describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.") }).strict();
499
+ }).passthrough().describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.") }).strict();
501
500
  const DiscountAllocationSchema = z$1.object({
502
501
  "path": z$1.string().describe("JSONPath to the allocation target (e.g., '$.line_items[0]', '$.totals.shipping')."),
503
502
  "amount": z$1.number().int().gte(0).describe("Amount allocated to this target in minor (cents) currency units.")
@@ -549,7 +548,7 @@ const FulfillmentExtensionFulfillmentOptionSchema = z$1.object({
549
548
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
550
549
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
551
550
  })).describe("Fulfillment option totals breakdown.")
552
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).");
551
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).");
553
552
  const FulfillmentExtensionFulfillmentGroupSchema = z$1.object({
554
553
  "id": z$1.string().describe("Group identifier for referencing merchant-generated groups in updates."),
555
554
  "line_item_ids": z$1.array(z$1.string()).describe("Line item IDs included in this group/package."),
@@ -573,9 +572,9 @@ const FulfillmentExtensionFulfillmentGroupSchema = z$1.object({
573
572
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
574
573
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
575
574
  })).describe("Fulfillment option totals breakdown.")
576
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
575
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
577
576
  "selected_option_id": z$1.union([z$1.string().describe("ID of the selected fulfillment option for this group."), z$1.null().describe("ID of the selected fulfillment option for this group.")]).describe("ID of the selected fulfillment option for this group.").optional()
578
- }).describe("A merchant-generated package/group of line items with fulfillment options.");
577
+ }).passthrough().describe("A merchant-generated package/group of line items with fulfillment options.");
579
578
  const FulfillmentExtensionFulfillmentMethodSchema = z$1.object({
580
579
  "id": z$1.string().describe("Unique fulfillment method identifier."),
581
580
  "type": z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type."),
@@ -605,7 +604,7 @@ const FulfillmentExtensionFulfillmentMethodSchema = z$1.object({
605
604
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
606
605
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
607
606
  }).describe("Physical address of the location.").optional()
608
- }).describe("A pickup location (retail store, locker, etc.).")];
607
+ }).passthrough().describe("A pickup location (retail store, locker, etc.).")];
609
608
  const errors = schemas.reduce((errors, schema) => ((result) => result.error ? [...errors, result.error] : errors)(schema.safeParse(x)), []);
610
609
  const passed = schemas.length - errors.length;
611
610
  if (passed !== 1) ctx.addIssue(errors.length ? {
@@ -643,16 +642,16 @@ const FulfillmentExtensionFulfillmentMethodSchema = z$1.object({
643
642
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
644
643
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
645
644
  })).describe("Fulfillment option totals breakdown.")
646
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
645
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
647
646
  "selected_option_id": z$1.union([z$1.string().describe("ID of the selected fulfillment option for this group."), z$1.null().describe("ID of the selected fulfillment option for this group.")]).describe("ID of the selected fulfillment option for this group.").optional()
648
- }).describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
649
- }).describe("A fulfillment method (shipping or pickup) with destinations and groups.");
647
+ }).passthrough().describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
648
+ }).passthrough().describe("A fulfillment method (shipping or pickup) with destinations and groups.");
650
649
  const FulfillmentExtensionFulfillmentAvailableMethodSchema = z$1.object({
651
650
  "type": z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type this availability applies to."),
652
651
  "line_item_ids": z$1.array(z$1.string()).describe("Line items available for this fulfillment method."),
653
652
  "fulfillable_on": z$1.union([z$1.string().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers)."), z$1.null().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).")]).describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).").optional(),
654
653
  "description": z$1.string().describe("Human-readable availability info (e.g., 'Available for pickup at Downtown Store today').").optional()
655
- }).describe("Inventory availability hint for a fulfillment method type.");
654
+ }).passthrough().describe("Inventory availability hint for a fulfillment method type.");
656
655
  const FulfillmentExtensionFulfillmentSchema = z$1.object({
657
656
  "methods": z$1.array(z$1.object({
658
657
  "id": z$1.string().describe("Unique fulfillment method identifier."),
@@ -683,7 +682,7 @@ const FulfillmentExtensionFulfillmentSchema = z$1.object({
683
682
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
684
683
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
685
684
  }).describe("Physical address of the location.").optional()
686
- }).describe("A pickup location (retail store, locker, etc.).")];
685
+ }).passthrough().describe("A pickup location (retail store, locker, etc.).")];
687
686
  const errors = schemas.reduce((errors, schema) => ((result) => result.error ? [...errors, result.error] : errors)(schema.safeParse(x)), []);
688
687
  const passed = schemas.length - errors.length;
689
688
  if (passed !== 1) ctx.addIssue(errors.length ? {
@@ -721,16 +720,16 @@ const FulfillmentExtensionFulfillmentSchema = z$1.object({
721
720
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
722
721
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
723
722
  })).describe("Fulfillment option totals breakdown.")
724
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
723
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
725
724
  "selected_option_id": z$1.union([z$1.string().describe("ID of the selected fulfillment option for this group."), z$1.null().describe("ID of the selected fulfillment option for this group.")]).describe("ID of the selected fulfillment option for this group.").optional()
726
- }).describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
727
- }).describe("A fulfillment method (shipping or pickup) with destinations and groups.")).describe("Fulfillment methods for cart items.").optional(),
725
+ }).passthrough().describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
726
+ }).passthrough().describe("A fulfillment method (shipping or pickup) with destinations and groups.")).describe("Fulfillment methods for cart items.").optional(),
728
727
  "available_methods": z$1.array(z$1.object({
729
728
  "type": z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type this availability applies to."),
730
729
  "line_item_ids": z$1.array(z$1.string()).describe("Line items available for this fulfillment method."),
731
730
  "fulfillable_on": z$1.union([z$1.string().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers)."), z$1.null().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).")]).describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).").optional(),
732
731
  "description": z$1.string().describe("Human-readable availability info (e.g., 'Available for pickup at Downtown Store today').").optional()
733
- }).describe("Inventory availability hint for a fulfillment method type.")).describe("Inventory availability hints.").optional()
732
+ }).passthrough().describe("Inventory availability hint for a fulfillment method type.")).describe("Inventory availability hints.").optional()
734
733
  }).describe("Container for fulfillment methods and availability.");
735
734
  const OrderSchema = z$1.object({
736
735
  "ucp": z$1.intersection(z$1.object({
@@ -891,9 +890,9 @@ const PaymentSchema = z$1.object({ "instruments": z$1.array(z$1.intersection(z$1
891
890
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
892
891
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
893
892
  }).describe("The billing address associated with this payment method.").optional(),
894
- "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
893
+ "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
895
894
  "display": z$1.record(z$1.string(), z$1.unknown()).describe("Display information for this payment instrument. Each payment instrument schema defines its specific display properties, as outlined by the payment handler.").optional()
896
- }).describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.");
895
+ }).passthrough().describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({ "selected": z$1.boolean().describe("Whether this instrument is selected by the user.").optional() })).describe("A payment instrument with selection state.")).describe("The payment instruments available for this payment. Each instrument is associated with a specific handler via the handler_id field. Handlers can extend the base payment_instrument schema to add handler-specific fields.").optional() }).describe("Payment configuration containing handlers.");
897
896
  const AccountInfoSchema = z$1.object({ "payment_account_reference": z$1.string().describe("EMVCo PAR. A unique identifier linking a payment card to a specific account, enabling tracking across tokens (Apple Pay, physical card, etc).").optional() }).describe("Non-sensitive backend identifiers for linking.");
898
897
  const AdjustmentSchema = z$1.object({
899
898
  "id": z$1.string().describe("Adjustment event identifier."),
@@ -927,8 +926,8 @@ const BuyerSchema = z$1.object({
927
926
  "last_name": z$1.string().describe("Last name of the buyer.").optional(),
928
927
  "email": z$1.string().describe("Email of the buyer.").optional(),
929
928
  "phone_number": z$1.string().describe("E.164 standard.").optional()
930
- });
931
- const CardCredentialSchema = z$1.intersection(z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types."), z$1.object({
929
+ }).passthrough();
930
+ const CardCredentialSchema = z$1.intersection(z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types."), z$1.object({
932
931
  "type": z$1.literal("card").describe("The credential type identifier for card credentials."),
933
932
  "card_number_type": z$1.enum([
934
933
  "fpan",
@@ -958,9 +957,9 @@ const CardPaymentInstrumentSchema = z$1.intersection(z$1.object({
958
957
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
959
958
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
960
959
  }).describe("The billing address associated with this payment method.").optional(),
961
- "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
960
+ "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
962
961
  "display": z$1.record(z$1.string(), z$1.unknown()).describe("Display information for this payment instrument. Each payment instrument schema defines its specific display properties, as outlined by the payment handler.").optional()
963
- }).describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({
962
+ }).passthrough().describe("The base definition for any payment instrument. It links the instrument to a specific payment handler."), z$1.object({
964
963
  "type": z$1.literal("card").describe("Indicates this is a card payment instrument."),
965
964
  "display": z$1.object({
966
965
  "brand": z$1.string().describe("The card brand/network (e.g., visa, mastercard, amex).").optional(),
@@ -975,7 +974,7 @@ const ContextSchema = z$1.object({
975
974
  "address_country": z$1.string().describe("The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example \"US\". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as \"SGP\" or a full country name such as \"Singapore\" can also be used. Optional hint for market context (currency, availability, pricing)—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
976
975
  "address_region": z$1.string().describe("The region in which the locality is, and which is in the country. For example, California or another appropriate first-level Administrative division. Optional hint for progressive localization—higher-resolution data (e.g., shipping address) supersedes this value.").optional(),
977
976
  "postal_code": z$1.string().describe("The postal code. For example, 94043. Optional hint for regional refinement—higher-resolution data (e.g., shipping address) supersedes this value.").optional()
978
- }).describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.");
977
+ }).passthrough().describe("Provisional buyer signals for relevance and localization: product availability, pricing, currency, tax, shipping, payment methods, and eligibility (e.g., student or affiliation discounts). Businesses SHOULD use these values when authoritative data (e.g., address) is absent, and MAY ignore unsupported values without returning errors. Context can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. Platforms SHOULD progressively enhance context throughout the buyer journey.");
979
978
  const ExpectationSchema = z$1.object({
980
979
  "id": z$1.string().describe("Expectation identifier."),
981
980
  "line_items": z$1.array(z$1.object({
@@ -1031,7 +1030,7 @@ const FulfillmentSchema = z$1.object({
1031
1030
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
1032
1031
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
1033
1032
  }).describe("Physical address of the location.").optional()
1034
- }).describe("A pickup location (retail store, locker, etc.).")];
1033
+ }).passthrough().describe("A pickup location (retail store, locker, etc.).")];
1035
1034
  const errors = schemas.reduce((errors, schema) => ((result) => result.error ? [...errors, result.error] : errors)(schema.safeParse(x)), []);
1036
1035
  const passed = schemas.length - errors.length;
1037
1036
  if (passed !== 1) ctx.addIssue(errors.length ? {
@@ -1069,23 +1068,23 @@ const FulfillmentSchema = z$1.object({
1069
1068
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
1070
1069
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
1071
1070
  })).describe("Fulfillment option totals breakdown.")
1072
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
1071
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
1073
1072
  "selected_option_id": z$1.union([z$1.string().describe("ID of the selected fulfillment option for this group."), z$1.null().describe("ID of the selected fulfillment option for this group.")]).describe("ID of the selected fulfillment option for this group.").optional()
1074
- }).describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
1075
- }).describe("A fulfillment method (shipping or pickup) with destinations and groups.")).describe("Fulfillment methods for cart items.").optional(),
1073
+ }).passthrough().describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
1074
+ }).passthrough().describe("A fulfillment method (shipping or pickup) with destinations and groups.")).describe("Fulfillment methods for cart items.").optional(),
1076
1075
  "available_methods": z$1.array(z$1.object({
1077
1076
  "type": z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type this availability applies to."),
1078
1077
  "line_item_ids": z$1.array(z$1.string()).describe("Line items available for this fulfillment method."),
1079
1078
  "fulfillable_on": z$1.union([z$1.string().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers)."), z$1.null().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).")]).describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).").optional(),
1080
1079
  "description": z$1.string().describe("Human-readable availability info (e.g., 'Available for pickup at Downtown Store today').").optional()
1081
- }).describe("Inventory availability hint for a fulfillment method type.")).describe("Inventory availability hints.").optional()
1080
+ }).passthrough().describe("Inventory availability hint for a fulfillment method type.")).describe("Inventory availability hints.").optional()
1082
1081
  }).describe("Container for fulfillment methods and availability.");
1083
1082
  const FulfillmentAvailableMethodSchema = z$1.object({
1084
1083
  "type": z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type this availability applies to."),
1085
1084
  "line_item_ids": z$1.array(z$1.string()).describe("Line items available for this fulfillment method."),
1086
1085
  "fulfillable_on": z$1.union([z$1.string().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers)."), z$1.null().describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).")]).describe("'now' for immediate availability, or ISO 8601 date for future (preorders, transfers).").optional(),
1087
1086
  "description": z$1.string().describe("Human-readable availability info (e.g., 'Available for pickup at Downtown Store today').").optional()
1088
- }).describe("Inventory availability hint for a fulfillment method type.");
1087
+ }).passthrough().describe("Inventory availability hint for a fulfillment method type.");
1089
1088
  const FulfillmentDestinationSchema = z$1.record(z$1.string(), z$1.unknown()).and(z$1.unknown().superRefine((x, ctx) => {
1090
1089
  const schemas = [z$1.record(z$1.string(), z$1.unknown()).and(z$1.intersection(z$1.object({
1091
1090
  "extended_address": z$1.string().describe("An address extension such as an apartment number, C/O or alternative name.").optional(),
@@ -1111,7 +1110,7 @@ const FulfillmentDestinationSchema = z$1.record(z$1.string(), z$1.unknown()).and
1111
1110
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
1112
1111
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
1113
1112
  }).describe("Physical address of the location.").optional()
1114
- }).describe("A pickup location (retail store, locker, etc.).")];
1113
+ }).passthrough().describe("A pickup location (retail store, locker, etc.).")];
1115
1114
  const errors = schemas.reduce((errors, schema) => ((result) => result.error ? [...errors, result.error] : errors)(schema.safeParse(x)), []);
1116
1115
  const passed = schemas.length - errors.length;
1117
1116
  if (passed !== 1) ctx.addIssue(errors.length ? {
@@ -1161,9 +1160,9 @@ const FulfillmentGroupSchema = z$1.object({
1161
1160
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
1162
1161
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
1163
1162
  })).describe("Fulfillment option totals breakdown.")
1164
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
1163
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
1165
1164
  "selected_option_id": z$1.union([z$1.string().describe("ID of the selected fulfillment option for this group."), z$1.null().describe("ID of the selected fulfillment option for this group.")]).describe("ID of the selected fulfillment option for this group.").optional()
1166
- }).describe("A merchant-generated package/group of line items with fulfillment options.");
1165
+ }).passthrough().describe("A merchant-generated package/group of line items with fulfillment options.");
1167
1166
  const FulfillmentGroupUpdateRequestSchema = z$1.object({ "id": z$1.string().describe("Group identifier for referencing merchant-generated groups in updates.") }).strict();
1168
1167
  const FulfillmentMethodSchema = z$1.object({
1169
1168
  "id": z$1.string().describe("Unique fulfillment method identifier."),
@@ -1194,7 +1193,7 @@ const FulfillmentMethodSchema = z$1.object({
1194
1193
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
1195
1194
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
1196
1195
  }).describe("Physical address of the location.").optional()
1197
- }).describe("A pickup location (retail store, locker, etc.).")];
1196
+ }).passthrough().describe("A pickup location (retail store, locker, etc.).")];
1198
1197
  const errors = schemas.reduce((errors, schema) => ((result) => result.error ? [...errors, result.error] : errors)(schema.safeParse(x)), []);
1199
1198
  const passed = schemas.length - errors.length;
1200
1199
  if (passed !== 1) ctx.addIssue(errors.length ? {
@@ -1232,10 +1231,10 @@ const FulfillmentMethodSchema = z$1.object({
1232
1231
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
1233
1232
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
1234
1233
  })).describe("Fulfillment option totals breakdown.")
1235
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
1234
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).")).describe("Available fulfillment options for this group.").optional(),
1236
1235
  "selected_option_id": z$1.union([z$1.string().describe("ID of the selected fulfillment option for this group."), z$1.null().describe("ID of the selected fulfillment option for this group.")]).describe("ID of the selected fulfillment option for this group.").optional()
1237
- }).describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
1238
- }).describe("A fulfillment method (shipping or pickup) with destinations and groups.");
1236
+ }).passthrough().describe("A merchant-generated package/group of line items with fulfillment options.")).describe("Fulfillment groups for selecting options. Agent sets selected_option_id on groups to choose shipping method.").optional()
1237
+ }).passthrough().describe("A fulfillment method (shipping or pickup) with destinations and groups.");
1239
1238
  const FulfillmentMethodCreateRequestSchema = z$1.object({
1240
1239
  "type": z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type."),
1241
1240
  "line_item_ids": z$1.array(z$1.string()).describe("Line item IDs fulfilled via this method.").optional()
@@ -1264,7 +1263,7 @@ const FulfillmentOptionSchema = z$1.object({
1264
1263
  "display_text": z$1.string().describe("Text to display against the amount. Should reflect appropriate method (e.g., 'Shipping', 'Delivery').").optional(),
1265
1264
  "amount": z$1.number().int().gte(0).describe("If type == total, sums subtotal - discount + fulfillment + tax + fee. Should be >= 0. Amount in minor (cents) currency units.")
1266
1265
  })).describe("Fulfillment option totals breakdown.")
1267
- }).describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).");
1266
+ }).passthrough().describe("A fulfillment option within a group (e.g., Standard Shipping $5, Express $15).");
1268
1267
  const ItemSchema = z$1.object({
1269
1268
  "id": z$1.string().describe("Should be recognized by both the Platform, and the Business. For Google it should match the id provided in the \"id\" field in the product feed."),
1270
1269
  "title": z$1.string().describe("Product title."),
@@ -1415,7 +1414,7 @@ const OrderLineItemSchema = z$1.object({
1415
1414
  ]).describe("Derived status: fulfilled if quantity.fulfilled == quantity.total, partial if quantity.fulfilled > 0, otherwise processing."),
1416
1415
  "parent_id": z$1.string().describe("Parent line item identifier for any nested structures.").optional()
1417
1416
  });
1418
- const PaymentCredentialSchema = z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.");
1417
+ const PaymentCredentialSchema = z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.");
1419
1418
  const PaymentIdentitySchema = z$1.object({ "access_token": z$1.string().describe("Unique identifier for this participant, obtained during onboarding with the tokenizer.") }).describe("Identity of a participant for token binding. The access_token uniquely identifies the participant who tokens should be bound to.");
1420
1419
  const PaymentInstrumentSchema = z$1.object({
1421
1420
  "id": z$1.string().describe("A unique identifier for this instrument instance, assigned by the platform."),
@@ -1432,9 +1431,9 @@ const PaymentInstrumentSchema = z$1.object({
1432
1431
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
1433
1432
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
1434
1433
  }).describe("The billing address associated with this payment method.").optional(),
1435
- "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
1434
+ "credential": z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types.").optional(),
1436
1435
  "display": z$1.record(z$1.string(), z$1.unknown()).describe("Display information for this payment instrument. Each payment instrument schema defines its specific display properties, as outlined by the payment handler.").optional()
1437
- }).describe("The base definition for any payment instrument. It links the instrument to a specific payment handler.");
1436
+ }).passthrough().describe("The base definition for any payment instrument. It links the instrument to a specific payment handler.");
1438
1437
  const PlatformFulfillmentConfigSchema = z$1.object({ "supports_multi_group": z$1.boolean().describe("Enables multiple groups per method.").default(false) }).describe("Platform's fulfillment configuration.");
1439
1438
  const PostalAddressSchema = z$1.object({
1440
1439
  "extended_address": z$1.string().describe("An address extension such as an apartment number, C/O or alternative name.").optional(),
@@ -1461,7 +1460,7 @@ const RetailLocationSchema = z$1.object({
1461
1460
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
1462
1461
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
1463
1462
  }).describe("Physical address of the location.").optional()
1464
- }).describe("A pickup location (retail store, locker, etc.).");
1463
+ }).passthrough().describe("A pickup location (retail store, locker, etc.).");
1465
1464
  const ShippingDestinationSchema = z$1.record(z$1.string(), z$1.unknown()).and(z$1.intersection(z$1.object({
1466
1465
  "extended_address": z$1.string().describe("An address extension such as an apartment number, C/O or alternative name.").optional(),
1467
1466
  "street_address": z$1.string().describe("The street address.").optional(),
@@ -1473,7 +1472,7 @@ const ShippingDestinationSchema = z$1.record(z$1.string(), z$1.unknown()).and(z$
1473
1472
  "last_name": z$1.string().describe("Optional. Last name of the contact associated with the address.").optional(),
1474
1473
  "phone_number": z$1.string().describe("Optional. Phone number of the contact associated with the address.").optional()
1475
1474
  }), z$1.object({ "id": z$1.string().describe("ID specific to this shipping destination.") }))).describe("Shipping destination.");
1476
- const TokenCredentialSchema = z$1.intersection(z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).describe("The base definition for any payment credential. Handlers define specific credential types."), z$1.object({
1475
+ const TokenCredentialSchema = z$1.intersection(z$1.object({ "type": z$1.string().describe("The credential type discriminator. Specific schemas will constrain this to a constant value.") }).passthrough().describe("The base definition for any payment credential. Handlers define specific credential types."), z$1.object({
1477
1476
  "type": z$1.string().describe("The specific type of token produced by the handler (e.g., 'stripe_token')."),
1478
1477
  "token": z$1.string().describe("The token value.")
1479
1478
  })).describe("Base token credential schema. Concrete payment handlers may extend this schema with additional fields and define their own constraints.");
@@ -1777,6 +1776,342 @@ const UcpResponseOrderSchema = z$1.intersection(z$1.object({
1777
1776
  "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1778
1777
  "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1779
1778
  }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })).describe("Capability reference in responses. Only name/version required to confirm active capabilities."))).optional() })).describe("UCP metadata for order responses. No payment handlers needed post-purchase.");
1779
+ const ProfileSchemaSigningKeySchema = z$1.object({
1780
+ "kid": z$1.string().describe("Key ID. Referenced in signature headers to identify which key to use for verification."),
1781
+ "kty": z$1.string().describe("Key type (e.g., 'EC', 'RSA')."),
1782
+ "crv": z$1.string().describe("Curve name for EC keys (e.g., 'P-256').").optional(),
1783
+ "x": z$1.string().describe("X coordinate for EC public keys (base64url encoded).").optional(),
1784
+ "y": z$1.string().describe("Y coordinate for EC public keys (base64url encoded).").optional(),
1785
+ "n": z$1.string().describe("Modulus for RSA public keys (base64url encoded).").optional(),
1786
+ "e": z$1.string().describe("Exponent for RSA public keys (base64url encoded).").optional(),
1787
+ "use": z$1.enum(["sig", "enc"]).describe("Key usage. Should be 'sig' for signing keys.").optional(),
1788
+ "alg": z$1.string().describe("Algorithm (e.g., 'ES256', 'RS256').").optional()
1789
+ }).describe("Public key for signature verification in JWK format.");
1790
+ const ProfileSchemaBaseSchema = z$1.object({
1791
+ "ucp": z$1.object({
1792
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1793
+ "services": z$1.record(z$1.array(z$1.intersection(z$1.object({
1794
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1795
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1796
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1797
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1798
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1799
+ }).describe("Shared foundation for all UCP entities."), z$1.object({
1800
+ "transport": z$1.enum([
1801
+ "rest",
1802
+ "mcp",
1803
+ "a2a",
1804
+ "embedded"
1805
+ ]).describe("Transport protocol for this service binding."),
1806
+ "endpoint": z$1.string().url().describe("Endpoint URL for this transport binding.").optional()
1807
+ })))).describe("Service registry keyed by reverse-domain name.").optional(),
1808
+ "capabilities": z$1.record(z$1.array(z$1.intersection(z$1.object({
1809
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1810
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1811
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1812
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1813
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1814
+ }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })))).describe("Capability registry keyed by reverse-domain name.").optional(),
1815
+ "payment_handlers": z$1.record(z$1.array(z$1.intersection(z$1.object({
1816
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1817
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1818
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1819
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1820
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1821
+ }).describe("Shared foundation for all UCP entities."), z$1.record(z$1.string(), z$1.unknown())))).describe("Payment handler registry keyed by reverse-domain name.").optional()
1822
+ }).describe("Base UCP metadata with shared properties for all schema types."),
1823
+ "signing_keys": z$1.array(z$1.object({
1824
+ "kid": z$1.string().describe("Key ID. Referenced in signature headers to identify which key to use for verification."),
1825
+ "kty": z$1.string().describe("Key type (e.g., 'EC', 'RSA')."),
1826
+ "crv": z$1.string().describe("Curve name for EC keys (e.g., 'P-256').").optional(),
1827
+ "x": z$1.string().describe("X coordinate for EC public keys (base64url encoded).").optional(),
1828
+ "y": z$1.string().describe("Y coordinate for EC public keys (base64url encoded).").optional(),
1829
+ "n": z$1.string().describe("Modulus for RSA public keys (base64url encoded).").optional(),
1830
+ "e": z$1.string().describe("Exponent for RSA public keys (base64url encoded).").optional(),
1831
+ "use": z$1.enum(["sig", "enc"]).describe("Key usage. Should be 'sig' for signing keys.").optional(),
1832
+ "alg": z$1.string().describe("Algorithm (e.g., 'ES256', 'RS256').").optional()
1833
+ }).describe("Public key for signature verification in JWK format.")).describe("Public keys for signature verification (JWK format). Used to verify signed responses, webhooks, and other authenticated messages from this party.").optional()
1834
+ }).passthrough().describe("Base discovery profile with shared properties for all profile types.");
1835
+ const ProfileSchemaPlatformProfileSchema = z$1.intersection(z$1.object({
1836
+ "ucp": z$1.object({
1837
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1838
+ "services": z$1.record(z$1.array(z$1.intersection(z$1.object({
1839
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1840
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1841
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1842
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1843
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1844
+ }).describe("Shared foundation for all UCP entities."), z$1.object({
1845
+ "transport": z$1.enum([
1846
+ "rest",
1847
+ "mcp",
1848
+ "a2a",
1849
+ "embedded"
1850
+ ]).describe("Transport protocol for this service binding."),
1851
+ "endpoint": z$1.string().url().describe("Endpoint URL for this transport binding.").optional()
1852
+ })))).describe("Service registry keyed by reverse-domain name.").optional(),
1853
+ "capabilities": z$1.record(z$1.array(z$1.intersection(z$1.object({
1854
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1855
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1856
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1857
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1858
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1859
+ }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })))).describe("Capability registry keyed by reverse-domain name.").optional(),
1860
+ "payment_handlers": z$1.record(z$1.array(z$1.intersection(z$1.object({
1861
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1862
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1863
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1864
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1865
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1866
+ }).describe("Shared foundation for all UCP entities."), z$1.record(z$1.string(), z$1.unknown())))).describe("Payment handler registry keyed by reverse-domain name.").optional()
1867
+ }).describe("Base UCP metadata with shared properties for all schema types."),
1868
+ "signing_keys": z$1.array(z$1.object({
1869
+ "kid": z$1.string().describe("Key ID. Referenced in signature headers to identify which key to use for verification."),
1870
+ "kty": z$1.string().describe("Key type (e.g., 'EC', 'RSA')."),
1871
+ "crv": z$1.string().describe("Curve name for EC keys (e.g., 'P-256').").optional(),
1872
+ "x": z$1.string().describe("X coordinate for EC public keys (base64url encoded).").optional(),
1873
+ "y": z$1.string().describe("Y coordinate for EC public keys (base64url encoded).").optional(),
1874
+ "n": z$1.string().describe("Modulus for RSA public keys (base64url encoded).").optional(),
1875
+ "e": z$1.string().describe("Exponent for RSA public keys (base64url encoded).").optional(),
1876
+ "use": z$1.enum(["sig", "enc"]).describe("Key usage. Should be 'sig' for signing keys.").optional(),
1877
+ "alg": z$1.string().describe("Algorithm (e.g., 'ES256', 'RS256').").optional()
1878
+ }).describe("Public key for signature verification in JWK format.")).describe("Public keys for signature verification (JWK format). Used to verify signed responses, webhooks, and other authenticated messages from this party.").optional()
1879
+ }).passthrough().describe("Base discovery profile with shared properties for all profile types."), z$1.object({ "ucp": z$1.intersection(z$1.object({
1880
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1881
+ "services": z$1.record(z$1.array(z$1.intersection(z$1.object({
1882
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1883
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1884
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1885
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1886
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1887
+ }).describe("Shared foundation for all UCP entities."), z$1.object({
1888
+ "transport": z$1.enum([
1889
+ "rest",
1890
+ "mcp",
1891
+ "a2a",
1892
+ "embedded"
1893
+ ]).describe("Transport protocol for this service binding."),
1894
+ "endpoint": z$1.string().url().describe("Endpoint URL for this transport binding.").optional()
1895
+ })))).describe("Service registry keyed by reverse-domain name.").optional(),
1896
+ "capabilities": z$1.record(z$1.array(z$1.intersection(z$1.object({
1897
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1898
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1899
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1900
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1901
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1902
+ }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })))).describe("Capability registry keyed by reverse-domain name.").optional(),
1903
+ "payment_handlers": z$1.record(z$1.array(z$1.intersection(z$1.object({
1904
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1905
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1906
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1907
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1908
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1909
+ }).describe("Shared foundation for all UCP entities."), z$1.record(z$1.string(), z$1.unknown())))).describe("Payment handler registry keyed by reverse-domain name.").optional()
1910
+ }).describe("Base UCP metadata with shared properties for all schema types."), z$1.object({
1911
+ "services": z$1.record(z$1.array(z$1.intersection(z$1.intersection(z$1.object({
1912
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1913
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1914
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1915
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1916
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1917
+ }).describe("Shared foundation for all UCP entities."), z$1.object({
1918
+ "transport": z$1.enum([
1919
+ "rest",
1920
+ "mcp",
1921
+ "a2a",
1922
+ "embedded"
1923
+ ]).describe("Transport protocol for this service binding."),
1924
+ "endpoint": z$1.string().url().describe("Endpoint URL for this transport binding.").optional()
1925
+ })), z$1.intersection(z$1.record(z$1.string(), z$1.unknown()), z$1.union([
1926
+ z$1.object({ "transport": z$1.literal("rest").optional() }),
1927
+ z$1.object({ "transport": z$1.literal("mcp").optional() }),
1928
+ z$1.object({ "transport": z$1.literal("a2a").optional() }),
1929
+ z$1.object({ "transport": z$1.literal("embedded").optional() })
1930
+ ]))).describe("Full service declaration for platform-level discovery. Different transports require different fields."))),
1931
+ "capabilities": z$1.record(z$1.array(z$1.intersection(z$1.intersection(z$1.object({
1932
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1933
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1934
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1935
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1936
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1937
+ }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })), z$1.record(z$1.string(), z$1.unknown())).describe("Full capability declaration for platform-level discovery. Includes spec/schema URLs for agent fetching."))).optional(),
1938
+ "payment_handlers": z$1.record(z$1.array(z$1.intersection(z$1.intersection(z$1.object({
1939
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1940
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1941
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1942
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1943
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1944
+ }).describe("Shared foundation for all UCP entities."), z$1.record(z$1.string(), z$1.unknown())), z$1.record(z$1.string(), z$1.unknown())).describe("Platform declaration for discovery profiles. May include partial config state required for discovery.")))
1945
+ })).describe("Full UCP metadata for platform-level configuration. Hosted at a URI advertised by the platform in request headers.").optional() })).describe("Full discovery profile for platforms. Exposes complete service, capability, and payment handler registries.");
1946
+ const ProfileSchemaBusinessProfileSchema = z$1.intersection(z$1.object({
1947
+ "ucp": z$1.object({
1948
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1949
+ "services": z$1.record(z$1.array(z$1.intersection(z$1.object({
1950
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1951
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1952
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1953
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1954
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1955
+ }).describe("Shared foundation for all UCP entities."), z$1.object({
1956
+ "transport": z$1.enum([
1957
+ "rest",
1958
+ "mcp",
1959
+ "a2a",
1960
+ "embedded"
1961
+ ]).describe("Transport protocol for this service binding."),
1962
+ "endpoint": z$1.string().url().describe("Endpoint URL for this transport binding.").optional()
1963
+ })))).describe("Service registry keyed by reverse-domain name.").optional(),
1964
+ "capabilities": z$1.record(z$1.array(z$1.intersection(z$1.object({
1965
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1966
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1967
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1968
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1969
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1970
+ }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })))).describe("Capability registry keyed by reverse-domain name.").optional(),
1971
+ "payment_handlers": z$1.record(z$1.array(z$1.intersection(z$1.object({
1972
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1973
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1974
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1975
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1976
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1977
+ }).describe("Shared foundation for all UCP entities."), z$1.record(z$1.string(), z$1.unknown())))).describe("Payment handler registry keyed by reverse-domain name.").optional()
1978
+ }).describe("Base UCP metadata with shared properties for all schema types."),
1979
+ "signing_keys": z$1.array(z$1.object({
1980
+ "kid": z$1.string().describe("Key ID. Referenced in signature headers to identify which key to use for verification."),
1981
+ "kty": z$1.string().describe("Key type (e.g., 'EC', 'RSA')."),
1982
+ "crv": z$1.string().describe("Curve name for EC keys (e.g., 'P-256').").optional(),
1983
+ "x": z$1.string().describe("X coordinate for EC public keys (base64url encoded).").optional(),
1984
+ "y": z$1.string().describe("Y coordinate for EC public keys (base64url encoded).").optional(),
1985
+ "n": z$1.string().describe("Modulus for RSA public keys (base64url encoded).").optional(),
1986
+ "e": z$1.string().describe("Exponent for RSA public keys (base64url encoded).").optional(),
1987
+ "use": z$1.enum(["sig", "enc"]).describe("Key usage. Should be 'sig' for signing keys.").optional(),
1988
+ "alg": z$1.string().describe("Algorithm (e.g., 'ES256', 'RS256').").optional()
1989
+ }).describe("Public key for signature verification in JWK format.")).describe("Public keys for signature verification (JWK format). Used to verify signed responses, webhooks, and other authenticated messages from this party.").optional()
1990
+ }).passthrough().describe("Base discovery profile with shared properties for all profile types."), z$1.object({ "ucp": z$1.intersection(z$1.object({
1991
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1992
+ "services": z$1.record(z$1.array(z$1.intersection(z$1.object({
1993
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
1994
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
1995
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
1996
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
1997
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
1998
+ }).describe("Shared foundation for all UCP entities."), z$1.object({
1999
+ "transport": z$1.enum([
2000
+ "rest",
2001
+ "mcp",
2002
+ "a2a",
2003
+ "embedded"
2004
+ ]).describe("Transport protocol for this service binding."),
2005
+ "endpoint": z$1.string().url().describe("Endpoint URL for this transport binding.").optional()
2006
+ })))).describe("Service registry keyed by reverse-domain name.").optional(),
2007
+ "capabilities": z$1.record(z$1.array(z$1.intersection(z$1.object({
2008
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
2009
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
2010
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
2011
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
2012
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
2013
+ }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })))).describe("Capability registry keyed by reverse-domain name.").optional(),
2014
+ "payment_handlers": z$1.record(z$1.array(z$1.intersection(z$1.object({
2015
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
2016
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
2017
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
2018
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
2019
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
2020
+ }).describe("Shared foundation for all UCP entities."), z$1.record(z$1.string(), z$1.unknown())))).describe("Payment handler registry keyed by reverse-domain name.").optional()
2021
+ }).describe("Base UCP metadata with shared properties for all schema types."), z$1.object({
2022
+ "services": z$1.record(z$1.array(z$1.intersection(z$1.intersection(z$1.object({
2023
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
2024
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
2025
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
2026
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
2027
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
2028
+ }).describe("Shared foundation for all UCP entities."), z$1.object({
2029
+ "transport": z$1.enum([
2030
+ "rest",
2031
+ "mcp",
2032
+ "a2a",
2033
+ "embedded"
2034
+ ]).describe("Transport protocol for this service binding."),
2035
+ "endpoint": z$1.string().url().describe("Endpoint URL for this transport binding.").optional()
2036
+ })), z$1.union([
2037
+ z$1.object({ "transport": z$1.literal("rest").optional() }),
2038
+ z$1.object({ "transport": z$1.literal("mcp").optional() }),
2039
+ z$1.object({ "transport": z$1.literal("a2a").optional() }),
2040
+ z$1.object({
2041
+ "transport": z$1.literal("embedded").optional(),
2042
+ "config": z$1.object({ "delegate": z$1.array(z$1.string()).describe("Delegations the business allows. At service-level, declares available delegations. In checkout responses, confirms accepted delegations for this session.").optional() }).describe("Per-checkout configuration for embedded transport binding. Allows businesses to vary ECP availability and delegations based on cart contents, agent authorization, or policy.").optional()
2043
+ })
2044
+ ])).describe("Service binding for business/merchant configuration. May override platform endpoints."))),
2045
+ "capabilities": z$1.record(z$1.array(z$1.intersection(z$1.object({
2046
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
2047
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
2048
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
2049
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
2050
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
2051
+ }).describe("Shared foundation for all UCP entities."), z$1.object({ "extends": z$1.string().regex(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9_]*)+$")).describe("Parent capability this extends. Present for extensions, absent for root capabilities.").optional() })).describe("Capability configuration for business/merchant level. May include business-specific config overrides."))).optional(),
2052
+ "payment_handlers": z$1.record(z$1.array(z$1.intersection(z$1.object({
2053
+ "version": z$1.string().regex(/* @__PURE__ */ new RegExp("^\\d{4}-\\d{2}-\\d{2}$")).describe("UCP version in YYYY-MM-DD format."),
2054
+ "spec": z$1.string().url().describe("URL to human-readable specification document.").optional(),
2055
+ "schema": z$1.string().url().describe("URL to JSON Schema defining this entity's structure and payloads.").optional(),
2056
+ "id": z$1.string().describe("Unique identifier for this entity instance. Used to disambiguate when multiple instances exist.").optional(),
2057
+ "config": z$1.record(z$1.string(), z$1.unknown()).describe("Entity-specific configuration. Structure defined by each entity's schema.").optional()
2058
+ }).describe("Shared foundation for all UCP entities."), z$1.record(z$1.string(), z$1.unknown())).describe("Business declaration for discovery profiles. May include partial config state required for discovery.")))
2059
+ })).describe("UCP metadata for business/merchant-level configuration. Subset of platform schema with business-specific settings.").optional() })).describe("Discovery profile for businesses/merchants. Subset of platform profile with business-specific configuration.");
2060
+ const ServiceBaseTransportEnumSchema = z$1.enum([
2061
+ "rest",
2062
+ "mcp",
2063
+ "a2a",
2064
+ "embedded"
2065
+ ]).describe("Transport protocol for this service binding.");
2066
+ const CheckoutStatusEnumSchema = z$1.enum([
2067
+ "incomplete",
2068
+ "requires_escalation",
2069
+ "ready_for_complete",
2070
+ "complete_in_progress",
2071
+ "completed",
2072
+ "canceled"
2073
+ ]).describe("Checkout state indicating the current phase and required action. See Checkout Status lifecycle documentation for state transition details.");
2074
+ const DiscountAppliedDiscountMethodEnumSchema = z$1.enum(["each", "across"]).describe("Allocation method. 'each' = applied independently per item. 'across' = split proportionally by value.");
2075
+ const AdjustmentStatusEnumSchema = z$1.enum([
2076
+ "pending",
2077
+ "completed",
2078
+ "failed"
2079
+ ]).describe("Adjustment status.");
2080
+ const CardCredentialCardNumberTypeEnumSchema = z$1.enum([
2081
+ "fpan",
2082
+ "network_token",
2083
+ "dpan"
2084
+ ]).describe("The type of card number. Network tokens are preferred with fallback to FPAN. See PCI Scope for more details.");
2085
+ const ExpectationMethodTypeEnumSchema = z$1.enum([
2086
+ "shipping",
2087
+ "pickup",
2088
+ "digital"
2089
+ ]).describe("Delivery method type (shipping, pickup, digital).");
2090
+ const FulfillmentAvailableMethodTypeEnumSchema = z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type this availability applies to.");
2091
+ const FulfillmentMethodTypeEnumSchema = z$1.enum(["shipping", "pickup"]).describe("Fulfillment method type.");
2092
+ const MessageErrorContentTypeEnumSchema = z$1.enum(["plain", "markdown"]).describe("Content format, default = plain.");
2093
+ const MessageErrorSeverityEnumSchema = z$1.enum([
2094
+ "recoverable",
2095
+ "requires_buyer_input",
2096
+ "requires_buyer_review"
2097
+ ]).describe("Declares who resolves this error. 'recoverable': agent can fix via API. 'requires_buyer_input': merchant requires information their API doesn't support collecting programmatically (checkout incomplete). 'requires_buyer_review': buyer must authorize before order placement due to policy, regulatory, or entitlement rules (checkout complete). Errors with 'requires_*' severity contribute to 'status: requires_escalation'.");
2098
+ const MessageInfoContentTypeEnumSchema = z$1.enum(["plain", "markdown"]).describe("Content format, default = plain.");
2099
+ const MessageWarningContentTypeEnumSchema = z$1.enum(["plain", "markdown"]).describe("Content format, default = plain.");
2100
+ const OrderLineItemStatusEnumSchema = z$1.enum([
2101
+ "processing",
2102
+ "partial",
2103
+ "fulfilled"
2104
+ ]).describe("Derived status: fulfilled if quantity.fulfilled == quantity.total, partial if quantity.fulfilled > 0, otherwise processing.");
2105
+ const TotalTypeEnumSchema = z$1.enum([
2106
+ "items_discount",
2107
+ "subtotal",
2108
+ "discount",
2109
+ "fulfillment",
2110
+ "tax",
2111
+ "fee",
2112
+ "total"
2113
+ ]).describe("Type of total categorization.");
2114
+ const ProfileSchemaSigningKeyUseEnumSchema = z$1.enum(["sig", "enc"]).describe("Key usage. Should be 'sig' for signing keys.");
1780
2115
  //#endregion
1781
2116
  //#region src/extensions.ts
1782
2117
  const ItemResponseSchema = ItemSchema;
@@ -1784,63 +2119,14 @@ const TotalResponseSchema = TotalSchema;
1784
2119
  const LineItemResponseSchema = LineItemSchema;
1785
2120
  const FulfillmentResponseSchema = FulfillmentSchema;
1786
2121
  const FulfillmentMethodResponseSchema = FulfillmentMethodSchema;
1787
- const CheckoutResponseStatusSchema = z.enum([
1788
- "incomplete",
1789
- "requires_escalation",
1790
- "ready_for_complete",
1791
- "complete_in_progress",
1792
- "completed",
1793
- "canceled"
1794
- ]);
1795
- const ExtendedPaymentCredentialSchema = PaymentCredentialSchema.extend({ token: z.string().optional() });
2122
+ const CheckoutResponseStatusSchema = CheckoutStatusEnumSchema;
1796
2123
  const PaymentResponseSchema = PaymentSchema.passthrough();
1797
2124
  const PaymentInstrumentResponseSchema = PaymentInstrumentSchema.passthrough();
1798
- const UcpDiscoveryProfileSchema = z.object({ ucp: z.object({
1799
- version: z.string(),
1800
- capabilities: z.record(z.string(), z.array(UcpEntitySchema)).optional(),
1801
- services: z.record(z.string(), z.array(UcpEntitySchema)).optional(),
1802
- payment_handlers: z.array(PaymentHandlerResponseSchema).optional()
1803
- }) });
1804
- const PlatformConfigSchema = z.object({ webhook_url: z.string().url().optional() });
1805
- const FulfillmentRequestSchema = z.object({ methods: z.array(z.object({
1806
- id: z.string(),
1807
- type: z.enum(["shipping", "pickup"]),
1808
- line_item_ids: z.array(z.string()),
1809
- selected_destination_id: z.string().nullable().optional(),
1810
- groups: z.array(z.object({
1811
- id: z.string(),
1812
- selected_option_id: z.string().nullable().optional()
1813
- }).passthrough()).optional()
1814
- }).passthrough()).optional() }).passthrough();
1815
- const DiscountsObjectSchema = z.object({ codes: z.array(z.string()).optional() }).passthrough();
1816
- const ConsentSchema = z.object({
1817
- marketing: z.boolean().optional(),
1818
- sms: z.boolean().optional(),
1819
- terms: z.boolean().optional()
1820
- }).passthrough();
1821
- const Ap2ResponseSchema = z.object({
1822
- mandate: z.string().optional(),
1823
- status: z.string().optional()
1824
- }).passthrough();
2125
+ const UcpDiscoveryProfileSchema = ProfileSchemaBaseSchema;
2126
+ const UcpDiscoveryPlatformProfileSchema = ProfileSchemaPlatformProfileSchema;
2127
+ const UcpDiscoveryBusinessProfileSchema = ProfileSchemaBusinessProfileSchema;
2128
+ const UcpSigningKeySchema = ProfileSchemaSigningKeySchema;
1825
2129
  const CheckoutResponseSchema = CheckoutSchema.passthrough();
1826
- const ExtendedCheckoutResponseSchema = CheckoutSchema.extend({
1827
- fulfillment: FulfillmentResponseSchema.optional(),
1828
- discounts: DiscountsObjectSchema.optional(),
1829
- ap2: Ap2ResponseSchema.optional(),
1830
- order_id: z.string().optional(),
1831
- order_permalink_url: z.string().optional(),
1832
- platform: PlatformConfigSchema.optional()
1833
- }).passthrough();
1834
- const ExtendedCheckoutCreateRequestSchema = CheckoutCreateRequestSchema.extend({
1835
- fulfillment: FulfillmentRequestSchema.optional(),
1836
- discounts: DiscountsObjectSchema.optional(),
1837
- buyer: BuyerSchema.extend({ consent: ConsentSchema.optional() }).optional()
1838
- });
1839
- const ExtendedCheckoutUpdateRequestSchema = CheckoutUpdateRequestSchema.extend({
1840
- fulfillment: FulfillmentRequestSchema.optional(),
1841
- discounts: DiscountsObjectSchema.optional(),
1842
- buyer: BuyerSchema.extend({ consent: ConsentSchema.optional() }).optional()
1843
- });
1844
2130
  const OrderUpdateSchema = OrderSchema;
1845
2131
  //#endregion
1846
- export { AccountInfoSchema, AdjustmentSchema, Ap2MandateAp2WithCheckoutMandateSchema, Ap2MandateAp2WithMerchantAuthorizationSchema, Ap2MandateCheckoutMandateSchema, Ap2MandateErrorCodeSchema, Ap2MandateMerchantAuthorizationSchema, BindingSchema, BusinessFulfillmentConfigSchema, BuyerConsentBuyerSchema, BuyerConsentConsentSchema, BuyerSchema, CapabilityBaseSchema, CapabilityBusinessSchema, CapabilityPlatformSchema, CapabilityResponseSchema, CardCredentialSchema, CardPaymentInstrumentSchema, CheckoutCompleteRequestSchema, CheckoutCreateRequestSchema, CheckoutResponseSchema, CheckoutResponseStatusSchema, CheckoutSchema, CheckoutUpdateRequestSchema, ContextSchema, DiscountAllocationSchema, DiscountAppliedDiscountSchema, DiscountDiscountsObjectSchema, EmbeddedConfigSchema, ExpectationSchema, ExtendedCheckoutCreateRequestSchema, ExtendedCheckoutResponseSchema, ExtendedCheckoutUpdateRequestSchema, ExtendedPaymentCredentialSchema, FulfillmentAvailableMethodSchema, FulfillmentDestinationSchema, FulfillmentEventSchema, FulfillmentExtensionFulfillmentAvailableMethodSchema, FulfillmentExtensionFulfillmentGroupSchema, FulfillmentExtensionFulfillmentMethodSchema, FulfillmentExtensionFulfillmentOptionSchema, FulfillmentExtensionFulfillmentSchema, FulfillmentGroupSchema, FulfillmentGroupUpdateRequestSchema, FulfillmentMethodCreateRequestSchema, FulfillmentMethodResponseSchema, FulfillmentMethodSchema, FulfillmentMethodUpdateRequestSchema, FulfillmentOptionSchema, FulfillmentResponseSchema, FulfillmentSchema, ItemResponseSchema, ItemSchema, LineItemResponseSchema, LineItemSchema, LineItemUpdateRequestSchema, LinkSchema, MerchantFulfillmentConfigSchema, MessageErrorSchema, MessageInfoSchema, MessageSchema, MessageWarningSchema, OrderConfirmationSchema, OrderLineItemSchema, OrderSchema, OrderUpdateSchema, PaymentCredentialSchema, PaymentHandlerBaseSchema, PaymentHandlerBusinessSchema, PaymentHandlerPlatformSchema, PaymentHandlerResponseSchema, PaymentIdentitySchema, PaymentInstrumentResponseSchema, PaymentInstrumentSchema, PaymentResponseSchema, PaymentSchema, PlatformConfigSchema, PlatformFulfillmentConfigSchema, PostalAddressSchema, RetailLocationSchema, ServiceBaseSchema, ServiceBusinessSchema, ServicePlatformSchema, ServiceResponseSchema, ShippingDestinationSchema, TokenCredentialSchema, TotalResponseSchema, TotalSchema, UcpBaseSchema, UcpBusinessSchema, UcpDiscoveryProfileSchema, UcpEntitySchema, UcpPlatformSchema, UcpResponseCheckoutSchema, UcpResponseOrderSchema, UcpReverseDomainNameSchema, UcpVersionSchema };
2132
+ export { AccountInfoSchema, AdjustmentSchema, AdjustmentStatusEnumSchema, Ap2MandateAp2WithCheckoutMandateSchema, Ap2MandateAp2WithMerchantAuthorizationSchema, Ap2MandateCheckoutMandateSchema, Ap2MandateErrorCodeSchema, Ap2MandateMerchantAuthorizationSchema, BindingSchema, BusinessFulfillmentConfigSchema, BuyerConsentBuyerSchema, BuyerConsentConsentSchema, BuyerSchema, CapabilityBaseSchema, CapabilityBusinessSchema, CapabilityPlatformSchema, CapabilityResponseSchema, CardCredentialCardNumberTypeEnumSchema, CardCredentialSchema, CardPaymentInstrumentSchema, CheckoutCompleteRequestSchema, CheckoutCreateRequestSchema, CheckoutResponseSchema, CheckoutResponseStatusSchema, CheckoutSchema, CheckoutStatusEnumSchema, CheckoutUpdateRequestSchema, ContextSchema, DiscountAllocationSchema, DiscountAppliedDiscountMethodEnumSchema, DiscountAppliedDiscountSchema, DiscountDiscountsObjectSchema, EmbeddedConfigSchema, ExpectationMethodTypeEnumSchema, ExpectationSchema, FulfillmentAvailableMethodSchema, FulfillmentAvailableMethodTypeEnumSchema, FulfillmentDestinationSchema, FulfillmentEventSchema, FulfillmentExtensionFulfillmentAvailableMethodSchema, FulfillmentExtensionFulfillmentGroupSchema, FulfillmentExtensionFulfillmentMethodSchema, FulfillmentExtensionFulfillmentOptionSchema, FulfillmentExtensionFulfillmentSchema, FulfillmentGroupSchema, FulfillmentGroupUpdateRequestSchema, FulfillmentMethodCreateRequestSchema, FulfillmentMethodResponseSchema, FulfillmentMethodSchema, FulfillmentMethodTypeEnumSchema, FulfillmentMethodUpdateRequestSchema, FulfillmentOptionSchema, FulfillmentResponseSchema, FulfillmentSchema, ItemResponseSchema, ItemSchema, LineItemResponseSchema, LineItemSchema, LineItemUpdateRequestSchema, LinkSchema, MerchantFulfillmentConfigSchema, MessageErrorContentTypeEnumSchema, MessageErrorSchema, MessageErrorSeverityEnumSchema, MessageInfoContentTypeEnumSchema, MessageInfoSchema, MessageSchema, MessageWarningContentTypeEnumSchema, MessageWarningSchema, OrderConfirmationSchema, OrderLineItemSchema, OrderLineItemStatusEnumSchema, OrderSchema, OrderUpdateSchema, PaymentCredentialSchema, PaymentHandlerBaseSchema, PaymentHandlerBusinessSchema, PaymentHandlerPlatformSchema, PaymentHandlerResponseSchema, PaymentIdentitySchema, PaymentInstrumentResponseSchema, PaymentInstrumentSchema, PaymentResponseSchema, PaymentSchema, PlatformFulfillmentConfigSchema, PostalAddressSchema, ProfileSchemaBaseSchema, ProfileSchemaBusinessProfileSchema, ProfileSchemaPlatformProfileSchema, ProfileSchemaSigningKeySchema, ProfileSchemaSigningKeyUseEnumSchema, RetailLocationSchema, ServiceBaseSchema, ServiceBaseTransportEnumSchema, ServiceBusinessSchema, ServicePlatformSchema, ServiceResponseSchema, ShippingDestinationSchema, TokenCredentialSchema, TotalResponseSchema, TotalSchema, TotalTypeEnumSchema, UcpBaseSchema, UcpBusinessSchema, UcpDiscoveryBusinessProfileSchema, UcpDiscoveryPlatformProfileSchema, UcpDiscoveryProfileSchema, UcpEntitySchema, UcpPlatformSchema, UcpResponseCheckoutSchema, UcpResponseOrderSchema, UcpReverseDomainNameSchema, UcpSigningKeySchema, UcpVersionSchema };