@nuanu-ai/agentify-contracts 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +208 -118
- package/dist/api.js +56 -60
- package/dist/card.d.ts +28 -34
- package/dist/card.js +163 -53
- package/dist/envelope.d.ts +46 -0
- package/dist/index.d.ts +194 -27
- package/dist/index.js +15 -9
- package/dist/merchant.d.ts +17 -118
- package/dist/merchant.js +21 -174
- package/dist/order-status.d.ts +2 -1
- package/dist/order-status.js +13 -1
- package/dist/order.d.ts +17 -0
- package/dist/order.js +13 -0
- package/dist/quote.d.ts +6 -0
- package/dist/quote.js +10 -0
- package/dist/receipt.d.ts +8 -5
- package/dist/receipt.js +13 -6
- package/dist/results.d.ts +14 -6
- package/dist/results.js +16 -7
- package/dist/seller-site.d.ts +30 -0
- package/dist/seller-site.js +43 -0
- package/dist/ship-to.d.ts +50 -0
- package/dist/ship-to.js +76 -0
- package/dist/shipment.d.ts +42 -0
- package/dist/shipment.js +112 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ import { z } from "zod";
|
|
|
24
24
|
export type { AgentOrderStatus, AuthMode, CatalogPage, ErrorCode, ErrorEnvelope, HttpMethod, MerchantCardList, OrderAcceptResponse, OrderCallResponse, OrderList, OrderListQuery, OrderWithStatus, PurchaseRequest, QuoteAnswerAck, ReceiptList, RouteDefinition, RouteName, RouteResponse, WorkerPollRequest, WorkerPollResponse, } from "./api.js";
|
|
25
25
|
export { AgentOrderStatusSchema, API_ROUTES, AUTH_MODES, CatalogPageSchema, cardsOf, ERROR_CODES, ErrorEnvelopeSchema, expandPath, HTTP_METHODS, MERCHANT_KEY_HEADER, MerchantCardListSchema, merchantKeyFrom, merchantKeyHeaderValue, mountableRoutes, OrderAcceptResponseSchema, OrderCallResponseSchema, OrderListQuerySchema, OrderListSchema, OrderWithStatusSchema, PurchaseRequestSchema, pathParamsOf, QuoteAnswerAckSchema, ReceiptListSchema, WorkerPollRequestSchema, WorkerPollResponseSchema, } from "./api.js";
|
|
26
26
|
export type { BazaarDeclaration, Card, CardInput, Fulfillment, MerchantCard, PriceCheck, ProjectedCard, PublicCard, Seller, } from "./card.js";
|
|
27
|
-
export { bazaarDeclarationOf, CardSchema, deliveryCheckFor, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, publicCardOf, purchaseCheckFor, SellerSchema,
|
|
27
|
+
export { bazaarDeclarationOf, CardSchema, deliveryCheckFor, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, publicCardOf, purchaseCheckFor, SellerSchema, ServiceNameSchema, TagsSchema, } from "./card.js";
|
|
28
28
|
export type { WorkerEnvelope, WorkerEnvelopeKind } from "./envelope.js";
|
|
29
29
|
export { WORKER_ENVELOPE_KINDS, WORKER_ENVELOPE_PAYLOADS, WorkerEnvelopeSchema, } from "./envelope.js";
|
|
30
30
|
export type { OrderEvent, RefundDueReason } from "./events.js";
|
|
@@ -33,8 +33,8 @@ export type { EvmAddress } from "./evm-address.js";
|
|
|
33
33
|
export { checksummedAddressOf, EvmAddressSchema } from "./evm-address.js";
|
|
34
34
|
export type { Acceptance, Delivery, HandlerAnswer, Refusal, RefusalCode } from "./handler.js";
|
|
35
35
|
export { AcceptanceSchema, DeliverySchema, HandlerAnswerSchema, RECOMMENDED_REFUSAL_CODES, RefusalCodeSchema, RefusalSchema, } from "./handler.js";
|
|
36
|
-
export type {
|
|
37
|
-
export {
|
|
36
|
+
export type { DisabledKey, IssuedKey, IssueKeyRequest, MerchantKey, MerchantKeyList, PayoutWallet, PendingPayoutWallet, SellerName, SellerNameRequest, } from "./merchant.js";
|
|
37
|
+
export { DisabledKeySchema, IssuedKeySchema, IssueKeyRequestSchema, MerchantKeyListSchema, MerchantKeySchema, PayoutWalletSchema, PendingPayoutWalletSchema, SellerNameRequestSchema, SellerNameSchema, } from "./merchant.js";
|
|
38
38
|
export type { Order } from "./order.js";
|
|
39
39
|
export { OrderSchema } from "./order.js";
|
|
40
40
|
export type { OrderStatus } from "./order-status.js";
|
|
@@ -52,8 +52,13 @@ export type { Receipt, ReceiptOutcome } from "./receipt.js";
|
|
|
52
52
|
export { ReceiptOutcomeSchema, ReceiptSchema } from "./receipt.js";
|
|
53
53
|
export type { CallError, MerchantFinding, OrderCallResult, Problem, PublishResult, } from "./results.js";
|
|
54
54
|
export { CARD_REJECTED, CallErrorSchema, MERCHANT_FINDINGS, ORDER_CALL_ERROR_CODES, ORDER_CALL_RESULTS, OrderCallResultSchema, ProblemSchema, PublishResultSchema, } from "./results.js";
|
|
55
|
+
export { SellerSiteSchema } from "./seller-site.js";
|
|
55
56
|
export type { SellingState } from "./selling.js";
|
|
56
57
|
export { SELLING_STATES, SellingStateSchema } from "./selling.js";
|
|
58
|
+
export type { ErasedShipTo, ShipTo, ShipToLocality } from "./ship-to.js";
|
|
59
|
+
export { ErasedShipToSchema, localityOf, ShipToLocalitySchema, ShipToSchema, } from "./ship-to.js";
|
|
60
|
+
export type { RecordedShipment, Shipment } from "./shipment.js";
|
|
61
|
+
export { RecordedShipmentSchema, ShipmentSchema } from "./shipment.js";
|
|
57
62
|
/**
|
|
58
63
|
* The version of the public contract. It grows when the meaning of the fields
|
|
59
64
|
* changes, not when a schema is added: a consumer uses it to decide whether it
|
|
@@ -83,6 +88,7 @@ export declare const schemas: Readonly<{
|
|
|
83
88
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
84
89
|
delivered: "delivered";
|
|
85
90
|
in_progress: "in_progress";
|
|
91
|
+
shipped: "shipped";
|
|
86
92
|
rejected: "rejected";
|
|
87
93
|
payment_unresolved: "payment_unresolved";
|
|
88
94
|
declined: "declined";
|
|
@@ -99,6 +105,17 @@ export declare const schemas: Readonly<{
|
|
|
99
105
|
as_of: z.ZodISODateTime;
|
|
100
106
|
}, z.core.$loose>>;
|
|
101
107
|
delivered: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
108
|
+
shipment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
109
|
+
carrier: z.ZodString;
|
|
110
|
+
tracking_number: z.ZodNullable<z.ZodString>;
|
|
111
|
+
tracking_url: z.ZodOptional<z.ZodString>;
|
|
112
|
+
shipped_at: z.ZodISODateTime;
|
|
113
|
+
estimated_delivery: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
earliest: z.ZodISODateTime;
|
|
115
|
+
latest: z.ZodISODateTime;
|
|
116
|
+
}, z.core.$loose>>;
|
|
117
|
+
}, z.core.$loose>>>;
|
|
118
|
+
ship_by: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
102
119
|
test: z.ZodBoolean;
|
|
103
120
|
refusal: z.ZodOptional<z.ZodObject<{
|
|
104
121
|
code: z.ZodString;
|
|
@@ -138,7 +155,7 @@ export declare const schemas: Readonly<{
|
|
|
138
155
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
139
156
|
title: z.ZodOptional<z.ZodString>;
|
|
140
157
|
}, z.core.$strict>>>>;
|
|
141
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
158
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
142
159
|
type: z.ZodEnum<{
|
|
143
160
|
string: "string";
|
|
144
161
|
number: "number";
|
|
@@ -147,26 +164,25 @@ export declare const schemas: Readonly<{
|
|
|
147
164
|
}>;
|
|
148
165
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
149
166
|
title: z.ZodOptional<z.ZodString>;
|
|
150
|
-
}, z.core.$strict
|
|
167
|
+
}, z.core.$strict>>>>;
|
|
151
168
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
152
169
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
153
170
|
sync: "sync";
|
|
154
171
|
async: "async";
|
|
155
172
|
confirm: "confirm";
|
|
173
|
+
ship: "ship";
|
|
156
174
|
}>>;
|
|
157
175
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
158
176
|
url: z.ZodURL;
|
|
159
177
|
}, z.core.$strict>]>>;
|
|
160
178
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
161
179
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
180
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
162
181
|
}, z.core.$strict>;
|
|
163
182
|
catalog_page: z.ZodObject<{
|
|
164
183
|
items: z.ZodArray<z.ZodUnknown>;
|
|
165
184
|
}, z.core.$loose>;
|
|
166
185
|
currency_code: z.ZodString;
|
|
167
|
-
dashboard_key: z.ZodObject<{
|
|
168
|
-
secret: z.ZodString;
|
|
169
|
-
}, z.core.$strict>;
|
|
170
186
|
delivery: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
171
187
|
disabled_key: z.ZodObject<{
|
|
172
188
|
key: z.ZodObject<{
|
|
@@ -177,6 +193,9 @@ export declare const schemas: Readonly<{
|
|
|
177
193
|
disabled_at: z.ZodNullable<z.ZodISODateTime>;
|
|
178
194
|
}, z.core.$strict>;
|
|
179
195
|
}, z.core.$strict>;
|
|
196
|
+
erased_ship_to: z.ZodObject<{
|
|
197
|
+
erased_at: z.ZodISODateTime;
|
|
198
|
+
}, z.core.$strict>;
|
|
180
199
|
error_envelope: z.ZodObject<{
|
|
181
200
|
error: z.ZodObject<{
|
|
182
201
|
code: z.ZodString;
|
|
@@ -195,13 +214,11 @@ export declare const schemas: Readonly<{
|
|
|
195
214
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
196
215
|
title: z.ZodOptional<z.ZodString>;
|
|
197
216
|
}, z.core.$strict>;
|
|
198
|
-
forgotten_dashboard_key: z.ZodObject<{
|
|
199
|
-
forgotten: z.ZodLiteral<true>;
|
|
200
|
-
}, z.core.$strict>;
|
|
201
217
|
fulfillment: z.ZodEnum<{
|
|
202
218
|
sync: "sync";
|
|
203
219
|
async: "async";
|
|
204
220
|
confirm: "confirm";
|
|
221
|
+
ship: "ship";
|
|
205
222
|
}>;
|
|
206
223
|
handler_answer: z.ZodUnion<readonly [z.ZodObject<{
|
|
207
224
|
delivered: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -250,7 +267,7 @@ export declare const schemas: Readonly<{
|
|
|
250
267
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
251
268
|
title: z.ZodOptional<z.ZodString>;
|
|
252
269
|
}, z.core.$strict>>>>;
|
|
253
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
270
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
254
271
|
type: z.ZodEnum<{
|
|
255
272
|
string: "string";
|
|
256
273
|
number: "number";
|
|
@@ -259,18 +276,20 @@ export declare const schemas: Readonly<{
|
|
|
259
276
|
}>;
|
|
260
277
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
261
278
|
title: z.ZodOptional<z.ZodString>;
|
|
262
|
-
}, z.core.$strict
|
|
279
|
+
}, z.core.$strict>>>>;
|
|
263
280
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
281
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
265
282
|
sync: "sync";
|
|
266
283
|
async: "async";
|
|
267
284
|
confirm: "confirm";
|
|
285
|
+
ship: "ship";
|
|
268
286
|
}>>;
|
|
269
287
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
270
288
|
url: z.ZodURL;
|
|
271
289
|
}, z.core.$strict>]>>;
|
|
272
290
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
273
291
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
292
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
274
293
|
}, z.core.$strict>;
|
|
275
294
|
selling: z.ZodEnum<{
|
|
276
295
|
open: "open";
|
|
@@ -306,7 +325,7 @@ export declare const schemas: Readonly<{
|
|
|
306
325
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
307
326
|
title: z.ZodOptional<z.ZodString>;
|
|
308
327
|
}, z.core.$strict>>>>;
|
|
309
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
328
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
310
329
|
type: z.ZodEnum<{
|
|
311
330
|
string: "string";
|
|
312
331
|
number: "number";
|
|
@@ -315,18 +334,20 @@ export declare const schemas: Readonly<{
|
|
|
315
334
|
}>;
|
|
316
335
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
317
336
|
title: z.ZodOptional<z.ZodString>;
|
|
318
|
-
}, z.core.$strict
|
|
337
|
+
}, z.core.$strict>>>>;
|
|
319
338
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
320
339
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
321
340
|
sync: "sync";
|
|
322
341
|
async: "async";
|
|
323
342
|
confirm: "confirm";
|
|
343
|
+
ship: "ship";
|
|
324
344
|
}>>;
|
|
325
345
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
326
346
|
url: z.ZodURL;
|
|
327
347
|
}, z.core.$strict>]>>;
|
|
328
348
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
329
349
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
350
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
330
351
|
}, z.core.$strict>;
|
|
331
352
|
selling: z.ZodEnum<{
|
|
332
353
|
open: "open";
|
|
@@ -369,6 +390,23 @@ export declare const schemas: Readonly<{
|
|
|
369
390
|
as_of: z.ZodISODateTime;
|
|
370
391
|
}, z.core.$strict>;
|
|
371
392
|
price_id: z.ZodOptional<z.ZodString>;
|
|
393
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
394
|
+
name: z.ZodString;
|
|
395
|
+
line_one: z.ZodString;
|
|
396
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
397
|
+
city: z.ZodString;
|
|
398
|
+
state: z.ZodOptional<z.ZodString>;
|
|
399
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
400
|
+
country: z.ZodString;
|
|
401
|
+
phone_number: z.ZodString;
|
|
402
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
403
|
+
country: z.ZodString;
|
|
404
|
+
state: z.ZodOptional<z.ZodString>;
|
|
405
|
+
city: z.ZodString;
|
|
406
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
407
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
408
|
+
erased_at: z.ZodISODateTime;
|
|
409
|
+
}, z.core.$strict>]>>;
|
|
372
410
|
test: z.ZodBoolean;
|
|
373
411
|
}, z.core.$strict>;
|
|
374
412
|
order_accept_response: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -451,10 +489,28 @@ export declare const schemas: Readonly<{
|
|
|
451
489
|
as_of: z.ZodISODateTime;
|
|
452
490
|
}, z.core.$strict>;
|
|
453
491
|
price_id: z.ZodOptional<z.ZodString>;
|
|
492
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
493
|
+
name: z.ZodString;
|
|
494
|
+
line_one: z.ZodString;
|
|
495
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
496
|
+
city: z.ZodString;
|
|
497
|
+
state: z.ZodOptional<z.ZodString>;
|
|
498
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
499
|
+
country: z.ZodString;
|
|
500
|
+
phone_number: z.ZodString;
|
|
501
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
502
|
+
country: z.ZodString;
|
|
503
|
+
state: z.ZodOptional<z.ZodString>;
|
|
504
|
+
city: z.ZodString;
|
|
505
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
506
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
507
|
+
erased_at: z.ZodISODateTime;
|
|
508
|
+
}, z.core.$strict>]>>;
|
|
454
509
|
test: z.ZodBoolean;
|
|
455
510
|
status: z.ZodEnum<{
|
|
456
511
|
delivered: "delivered";
|
|
457
512
|
in_progress: "in_progress";
|
|
513
|
+
shipped: "shipped";
|
|
458
514
|
rejected: "rejected";
|
|
459
515
|
payment_unresolved: "payment_unresolved";
|
|
460
516
|
declined: "declined";
|
|
@@ -475,6 +531,7 @@ export declare const schemas: Readonly<{
|
|
|
475
531
|
order_status: z.ZodEnum<{
|
|
476
532
|
delivered: "delivered";
|
|
477
533
|
in_progress: "in_progress";
|
|
534
|
+
shipped: "shipped";
|
|
478
535
|
rejected: "rejected";
|
|
479
536
|
payment_unresolved: "payment_unresolved";
|
|
480
537
|
declined: "declined";
|
|
@@ -495,10 +552,28 @@ export declare const schemas: Readonly<{
|
|
|
495
552
|
as_of: z.ZodISODateTime;
|
|
496
553
|
}, z.core.$strict>;
|
|
497
554
|
price_id: z.ZodOptional<z.ZodString>;
|
|
555
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
556
|
+
name: z.ZodString;
|
|
557
|
+
line_one: z.ZodString;
|
|
558
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
559
|
+
city: z.ZodString;
|
|
560
|
+
state: z.ZodOptional<z.ZodString>;
|
|
561
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
562
|
+
country: z.ZodString;
|
|
563
|
+
phone_number: z.ZodString;
|
|
564
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
565
|
+
country: z.ZodString;
|
|
566
|
+
state: z.ZodOptional<z.ZodString>;
|
|
567
|
+
city: z.ZodString;
|
|
568
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
570
|
+
erased_at: z.ZodISODateTime;
|
|
571
|
+
}, z.core.$strict>]>>;
|
|
498
572
|
test: z.ZodBoolean;
|
|
499
573
|
status: z.ZodEnum<{
|
|
500
574
|
delivered: "delivered";
|
|
501
575
|
in_progress: "in_progress";
|
|
576
|
+
shipped: "shipped";
|
|
502
577
|
rejected: "rejected";
|
|
503
578
|
payment_unresolved: "payment_unresolved";
|
|
504
579
|
declined: "declined";
|
|
@@ -533,9 +608,6 @@ export declare const schemas: Readonly<{
|
|
|
533
608
|
takes_effect_at: z.ZodISODateTime;
|
|
534
609
|
}, z.core.$strict>>;
|
|
535
610
|
}, z.core.$strict>;
|
|
536
|
-
payout_wallet_request: z.ZodObject<{
|
|
537
|
-
payout_wallet: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
538
|
-
}, z.core.$strict>;
|
|
539
611
|
pending_payout_wallet: z.ZodObject<{
|
|
540
612
|
payout_wallet: z.ZodString;
|
|
541
613
|
takes_effect_at: z.ZodISODateTime;
|
|
@@ -567,7 +639,7 @@ export declare const schemas: Readonly<{
|
|
|
567
639
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
568
640
|
title: z.ZodOptional<z.ZodString>;
|
|
569
641
|
}, z.core.$loose>>>;
|
|
570
|
-
result: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
642
|
+
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
571
643
|
type: z.ZodEnum<{
|
|
572
644
|
string: "string";
|
|
573
645
|
number: "number";
|
|
@@ -576,7 +648,7 @@ export declare const schemas: Readonly<{
|
|
|
576
648
|
}>;
|
|
577
649
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
578
650
|
title: z.ZodOptional<z.ZodString>;
|
|
579
|
-
}, z.core.$loose
|
|
651
|
+
}, z.core.$loose>>>;
|
|
580
652
|
price_checked_at_purchase: z.ZodBoolean;
|
|
581
653
|
seller: z.ZodObject<{
|
|
582
654
|
name: z.ZodNullable<z.ZodString>;
|
|
@@ -586,9 +658,11 @@ export declare const schemas: Readonly<{
|
|
|
586
658
|
sync: "sync";
|
|
587
659
|
async: "async";
|
|
588
660
|
confirm: "confirm";
|
|
661
|
+
ship: "ship";
|
|
589
662
|
}>, z.ZodString]>;
|
|
590
663
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
591
664
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
665
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
592
666
|
}, z.core.$loose>;
|
|
593
667
|
publish_result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
594
668
|
ok: z.ZodLiteral<true>;
|
|
@@ -608,6 +682,16 @@ export declare const schemas: Readonly<{
|
|
|
608
682
|
}, z.core.$strict>], "ok">;
|
|
609
683
|
purchase_request: z.ZodObject<{
|
|
610
684
|
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
685
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
686
|
+
name: z.ZodString;
|
|
687
|
+
line_one: z.ZodString;
|
|
688
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
689
|
+
city: z.ZodString;
|
|
690
|
+
state: z.ZodOptional<z.ZodString>;
|
|
691
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
692
|
+
country: z.ZodString;
|
|
693
|
+
phone_number: z.ZodString;
|
|
694
|
+
}, z.core.$strict>>;
|
|
611
695
|
}, z.core.$strict>;
|
|
612
696
|
quote_answer_ack: z.ZodObject<{
|
|
613
697
|
used: z.ZodBoolean;
|
|
@@ -619,6 +703,12 @@ export declare const schemas: Readonly<{
|
|
|
619
703
|
quote_request: z.ZodObject<{
|
|
620
704
|
merchant_item_id: z.ZodString;
|
|
621
705
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
706
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
707
|
+
country: z.ZodString;
|
|
708
|
+
state: z.ZodOptional<z.ZodString>;
|
|
709
|
+
city: z.ZodString;
|
|
710
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
711
|
+
}, z.core.$strict>>;
|
|
622
712
|
price_id: z.ZodString;
|
|
623
713
|
purpose: z.ZodEnum<{
|
|
624
714
|
purchase: "purchase";
|
|
@@ -652,6 +742,7 @@ export declare const schemas: Readonly<{
|
|
|
652
742
|
outcome: z.ZodEnum<{
|
|
653
743
|
delivered: "delivered";
|
|
654
744
|
in_progress: "in_progress";
|
|
745
|
+
shipped: "shipped";
|
|
655
746
|
refund_due: "refund_due";
|
|
656
747
|
refunded: "refunded";
|
|
657
748
|
}>;
|
|
@@ -673,6 +764,7 @@ export declare const schemas: Readonly<{
|
|
|
673
764
|
outcome: z.ZodEnum<{
|
|
674
765
|
delivered: "delivered";
|
|
675
766
|
in_progress: "in_progress";
|
|
767
|
+
shipped: "shipped";
|
|
676
768
|
refund_due: "refund_due";
|
|
677
769
|
refunded: "refunded";
|
|
678
770
|
}>;
|
|
@@ -682,16 +774,10 @@ export declare const schemas: Readonly<{
|
|
|
682
774
|
receipt_outcome: z.ZodEnum<{
|
|
683
775
|
delivered: "delivered";
|
|
684
776
|
in_progress: "in_progress";
|
|
777
|
+
shipped: "shipped";
|
|
685
778
|
refund_due: "refund_due";
|
|
686
779
|
refunded: "refunded";
|
|
687
780
|
}>;
|
|
688
|
-
registered_merchant: z.ZodObject<{
|
|
689
|
-
merchant_id: z.ZodString;
|
|
690
|
-
secret: z.ZodString;
|
|
691
|
-
}, z.core.$strict>;
|
|
692
|
-
registration_request: z.ZodObject<{
|
|
693
|
-
invitation: z.ZodString;
|
|
694
|
-
}, z.core.$strict>;
|
|
695
781
|
refund_due_reason: z.ZodEnum<{
|
|
696
782
|
refused: "refused";
|
|
697
783
|
deadline_passed: "deadline_passed";
|
|
@@ -727,6 +813,41 @@ export declare const schemas: Readonly<{
|
|
|
727
813
|
}>;
|
|
728
814
|
seller_site: z.ZodString;
|
|
729
815
|
service_name: z.ZodString;
|
|
816
|
+
ship_to: z.ZodObject<{
|
|
817
|
+
name: z.ZodString;
|
|
818
|
+
line_one: z.ZodString;
|
|
819
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
820
|
+
city: z.ZodString;
|
|
821
|
+
state: z.ZodOptional<z.ZodString>;
|
|
822
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
823
|
+
country: z.ZodString;
|
|
824
|
+
phone_number: z.ZodString;
|
|
825
|
+
}, z.core.$strict>;
|
|
826
|
+
ship_to_locality: z.ZodObject<{
|
|
827
|
+
country: z.ZodString;
|
|
828
|
+
state: z.ZodOptional<z.ZodString>;
|
|
829
|
+
city: z.ZodString;
|
|
830
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
831
|
+
}, z.core.$strict>;
|
|
832
|
+
shipment: z.ZodObject<{
|
|
833
|
+
carrier: z.ZodString;
|
|
834
|
+
tracking_number: z.ZodNullable<z.ZodString>;
|
|
835
|
+
tracking_url: z.ZodOptional<z.ZodString>;
|
|
836
|
+
estimated_delivery: z.ZodOptional<z.ZodObject<{
|
|
837
|
+
earliest: z.ZodISODateTime;
|
|
838
|
+
latest: z.ZodISODateTime;
|
|
839
|
+
}, z.core.$strict>>;
|
|
840
|
+
}, z.core.$strict>;
|
|
841
|
+
recorded_shipment: z.ZodObject<{
|
|
842
|
+
carrier: z.ZodString;
|
|
843
|
+
tracking_number: z.ZodNullable<z.ZodString>;
|
|
844
|
+
tracking_url: z.ZodOptional<z.ZodString>;
|
|
845
|
+
estimated_delivery: z.ZodOptional<z.ZodObject<{
|
|
846
|
+
earliest: z.ZodISODateTime;
|
|
847
|
+
latest: z.ZodISODateTime;
|
|
848
|
+
}, z.core.$strict>>;
|
|
849
|
+
shipped_at: z.ZodISODateTime;
|
|
850
|
+
}, z.core.$strict>;
|
|
730
851
|
tags: z.ZodArray<z.ZodString>;
|
|
731
852
|
timestamp: z.ZodISODateTime;
|
|
732
853
|
worker_envelope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -744,6 +865,23 @@ export declare const schemas: Readonly<{
|
|
|
744
865
|
as_of: z.ZodISODateTime;
|
|
745
866
|
}, z.core.$strict>;
|
|
746
867
|
price_id: z.ZodOptional<z.ZodString>;
|
|
868
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
869
|
+
name: z.ZodString;
|
|
870
|
+
line_one: z.ZodString;
|
|
871
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
872
|
+
city: z.ZodString;
|
|
873
|
+
state: z.ZodOptional<z.ZodString>;
|
|
874
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
875
|
+
country: z.ZodString;
|
|
876
|
+
phone_number: z.ZodString;
|
|
877
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
878
|
+
country: z.ZodString;
|
|
879
|
+
state: z.ZodOptional<z.ZodString>;
|
|
880
|
+
city: z.ZodString;
|
|
881
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
882
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
883
|
+
erased_at: z.ZodISODateTime;
|
|
884
|
+
}, z.core.$strict>]>>;
|
|
747
885
|
test: z.ZodBoolean;
|
|
748
886
|
}, z.core.$strict>;
|
|
749
887
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -753,6 +891,12 @@ export declare const schemas: Readonly<{
|
|
|
753
891
|
payload: z.ZodObject<{
|
|
754
892
|
merchant_item_id: z.ZodString;
|
|
755
893
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
894
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
895
|
+
country: z.ZodString;
|
|
896
|
+
state: z.ZodOptional<z.ZodString>;
|
|
897
|
+
city: z.ZodString;
|
|
898
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
899
|
+
}, z.core.$strict>>;
|
|
756
900
|
price_id: z.ZodString;
|
|
757
901
|
purpose: z.ZodEnum<{
|
|
758
902
|
purchase: "purchase";
|
|
@@ -808,6 +952,23 @@ export declare const schemas: Readonly<{
|
|
|
808
952
|
as_of: z.ZodISODateTime;
|
|
809
953
|
}, z.core.$strict>;
|
|
810
954
|
price_id: z.ZodOptional<z.ZodString>;
|
|
955
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
956
|
+
name: z.ZodString;
|
|
957
|
+
line_one: z.ZodString;
|
|
958
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
959
|
+
city: z.ZodString;
|
|
960
|
+
state: z.ZodOptional<z.ZodString>;
|
|
961
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
962
|
+
country: z.ZodString;
|
|
963
|
+
phone_number: z.ZodString;
|
|
964
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
965
|
+
country: z.ZodString;
|
|
966
|
+
state: z.ZodOptional<z.ZodString>;
|
|
967
|
+
city: z.ZodString;
|
|
968
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
969
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
970
|
+
erased_at: z.ZodISODateTime;
|
|
971
|
+
}, z.core.$strict>]>>;
|
|
811
972
|
test: z.ZodBoolean;
|
|
812
973
|
}, z.core.$strict>;
|
|
813
974
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -817,6 +978,12 @@ export declare const schemas: Readonly<{
|
|
|
817
978
|
payload: z.ZodObject<{
|
|
818
979
|
merchant_item_id: z.ZodString;
|
|
819
980
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
981
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
982
|
+
country: z.ZodString;
|
|
983
|
+
state: z.ZodOptional<z.ZodString>;
|
|
984
|
+
city: z.ZodString;
|
|
985
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
986
|
+
}, z.core.$strict>>;
|
|
820
987
|
price_id: z.ZodString;
|
|
821
988
|
purpose: z.ZodEnum<{
|
|
822
989
|
purchase: "purchase";
|
package/dist/index.js
CHANGED
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { z } from "zod";
|
|
24
24
|
import { AgentOrderStatusSchema, CatalogPageSchema, ErrorEnvelopeSchema, MerchantCardListSchema, OrderAcceptResponseSchema, OrderCallResponseSchema, OrderListQuerySchema, OrderListSchema, OrderWithStatusSchema, PurchaseRequestSchema, QuoteAnswerAckSchema, ReceiptListSchema, WorkerPollRequestSchema, WorkerPollResponseSchema, } from "./api.js";
|
|
25
|
-
import { CardSchema, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, SellerSchema,
|
|
25
|
+
import { CardSchema, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, SellerSchema, ServiceNameSchema, TagsSchema, } from "./card.js";
|
|
26
26
|
import { WorkerEnvelopeSchema } from "./envelope.js";
|
|
27
27
|
import { OrderEventSchema, RefundDueReasonSchema } from "./events.js";
|
|
28
28
|
import { EvmAddressSchema } from "./evm-address.js";
|
|
29
29
|
import { AcceptanceSchema, DeliverySchema, HandlerAnswerSchema, RefusalCodeSchema, RefusalSchema, } from "./handler.js";
|
|
30
|
-
import {
|
|
30
|
+
import { DisabledKeySchema, IssuedKeySchema, IssueKeyRequestSchema, MerchantKeyListSchema, MerchantKeySchema, PayoutWalletSchema, PendingPayoutWalletSchema, SellerNameRequestSchema, SellerNameSchema, } from "./merchant.js";
|
|
31
31
|
import { OrderSchema } from "./order.js";
|
|
32
32
|
import { OrderStatusSchema } from "./order-status.js";
|
|
33
33
|
import { FieldSpecSchema, ParamNameSchema, ParamSpecSchema, ParamTypeSchema, } from "./param-spec.js";
|
|
@@ -35,14 +35,17 @@ import { AmountSchema, CurrencyCodeSchema, IdentifierSchema, MoneySchema, OpenWo
|
|
|
35
35
|
import { QuotePurposeSchema, QuoteRequestSchema, QuoteResponseSchema } from "./quote.js";
|
|
36
36
|
import { ReceiptOutcomeSchema, ReceiptSchema } from "./receipt.js";
|
|
37
37
|
import { CallErrorSchema, OrderCallResultSchema, ProblemSchema, PublishResultSchema, } from "./results.js";
|
|
38
|
+
import { SellerSiteSchema } from "./seller-site.js";
|
|
38
39
|
import { SellingStateSchema } from "./selling.js";
|
|
40
|
+
import { ErasedShipToSchema, ShipToLocalitySchema, ShipToSchema } from "./ship-to.js";
|
|
41
|
+
import { RecordedShipmentSchema, ShipmentSchema } from "./shipment.js";
|
|
39
42
|
export { AgentOrderStatusSchema, API_ROUTES, AUTH_MODES, CatalogPageSchema, cardsOf, ERROR_CODES, ErrorEnvelopeSchema, expandPath, HTTP_METHODS, MERCHANT_KEY_HEADER, MerchantCardListSchema, merchantKeyFrom, merchantKeyHeaderValue, mountableRoutes, OrderAcceptResponseSchema, OrderCallResponseSchema, OrderListQuerySchema, OrderListSchema, OrderWithStatusSchema, PurchaseRequestSchema, pathParamsOf, QuoteAnswerAckSchema, ReceiptListSchema, WorkerPollRequestSchema, WorkerPollResponseSchema, } from "./api.js";
|
|
40
|
-
export { bazaarDeclarationOf, CardSchema, deliveryCheckFor, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, publicCardOf, purchaseCheckFor, SellerSchema,
|
|
43
|
+
export { bazaarDeclarationOf, CardSchema, deliveryCheckFor, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, publicCardOf, purchaseCheckFor, SellerSchema, ServiceNameSchema, TagsSchema, } from "./card.js";
|
|
41
44
|
export { WORKER_ENVELOPE_KINDS, WORKER_ENVELOPE_PAYLOADS, WorkerEnvelopeSchema, } from "./envelope.js";
|
|
42
45
|
export { ORDER_EVENT_TYPES, OrderEventSchema, RefundDueReasonSchema } from "./events.js";
|
|
43
46
|
export { checksummedAddressOf, EvmAddressSchema } from "./evm-address.js";
|
|
44
47
|
export { AcceptanceSchema, DeliverySchema, HandlerAnswerSchema, RECOMMENDED_REFUSAL_CODES, RefusalCodeSchema, RefusalSchema, } from "./handler.js";
|
|
45
|
-
export {
|
|
48
|
+
export { DisabledKeySchema, IssuedKeySchema, IssueKeyRequestSchema, MerchantKeyListSchema, MerchantKeySchema, PayoutWalletSchema, PendingPayoutWalletSchema, SellerNameRequestSchema, SellerNameSchema, } from "./merchant.js";
|
|
46
49
|
export { OrderSchema } from "./order.js";
|
|
47
50
|
export { ORDER_STATUSES, OrderStatusSchema } from "./order-status.js";
|
|
48
51
|
export { FieldSpecSchema, ParamNameSchema, ParamSpecSchema, ParamTypeSchema, PROTOTYPE_KEY_IS_DROPPED, paramSpecToValidator, } from "./param-spec.js";
|
|
@@ -52,7 +55,10 @@ export { AmountSchema, CurrencyCodeSchema, IdentifierSchema, MoneySchema, OpenWo
|
|
|
52
55
|
export { QuotePurposeSchema, QuoteRequestSchema, QuoteResponseSchema } from "./quote.js";
|
|
53
56
|
export { ReceiptOutcomeSchema, ReceiptSchema } from "./receipt.js";
|
|
54
57
|
export { CARD_REJECTED, CallErrorSchema, MERCHANT_FINDINGS, ORDER_CALL_ERROR_CODES, ORDER_CALL_RESULTS, OrderCallResultSchema, ProblemSchema, PublishResultSchema, } from "./results.js";
|
|
58
|
+
export { SellerSiteSchema } from "./seller-site.js";
|
|
55
59
|
export { SELLING_STATES, SellingStateSchema } from "./selling.js";
|
|
60
|
+
export { ErasedShipToSchema, localityOf, ShipToLocalitySchema, ShipToSchema, } from "./ship-to.js";
|
|
61
|
+
export { RecordedShipmentSchema, ShipmentSchema } from "./shipment.js";
|
|
56
62
|
/**
|
|
57
63
|
* The version of the public contract. It grows when the meaning of the fields
|
|
58
64
|
* changes, not when a schema is added: a consumer uses it to decide whether it
|
|
@@ -80,13 +86,12 @@ export const schemas = Object.freeze({
|
|
|
80
86
|
card: CardSchema,
|
|
81
87
|
catalog_page: CatalogPageSchema,
|
|
82
88
|
currency_code: CurrencyCodeSchema,
|
|
83
|
-
dashboard_key: DashboardKeySchema,
|
|
84
89
|
delivery: DeliverySchema,
|
|
85
90
|
disabled_key: DisabledKeySchema,
|
|
91
|
+
erased_ship_to: ErasedShipToSchema,
|
|
86
92
|
error_envelope: ErrorEnvelopeSchema,
|
|
87
93
|
evm_address: EvmAddressSchema,
|
|
88
94
|
field_spec: FieldSpecSchema,
|
|
89
|
-
forgotten_dashboard_key: ForgottenDashboardKeySchema,
|
|
90
95
|
fulfillment: FulfillmentSchema,
|
|
91
96
|
handler_answer: HandlerAnswerSchema,
|
|
92
97
|
identifier: IdentifierSchema,
|
|
@@ -111,7 +116,6 @@ export const schemas = Object.freeze({
|
|
|
111
116
|
param_spec: ParamSpecSchema,
|
|
112
117
|
param_type: ParamTypeSchema,
|
|
113
118
|
payout_wallet: PayoutWalletSchema,
|
|
114
|
-
payout_wallet_request: PayoutWalletRequestSchema,
|
|
115
119
|
pending_payout_wallet: PendingPayoutWalletSchema,
|
|
116
120
|
price_check: PriceCheckSchema,
|
|
117
121
|
problem: ProblemSchema,
|
|
@@ -125,8 +129,6 @@ export const schemas = Object.freeze({
|
|
|
125
129
|
receipt: ReceiptSchema,
|
|
126
130
|
receipt_list: ReceiptListSchema,
|
|
127
131
|
receipt_outcome: ReceiptOutcomeSchema,
|
|
128
|
-
registered_merchant: RegisteredMerchantSchema,
|
|
129
|
-
registration_request: RegistrationRequestSchema,
|
|
130
132
|
refund_due_reason: RefundDueReasonSchema,
|
|
131
133
|
refusal: RefusalSchema,
|
|
132
134
|
refusal_code: RefusalCodeSchema,
|
|
@@ -137,6 +139,10 @@ export const schemas = Object.freeze({
|
|
|
137
139
|
selling_state: SellingStateSchema,
|
|
138
140
|
seller_site: SellerSiteSchema,
|
|
139
141
|
service_name: ServiceNameSchema,
|
|
142
|
+
ship_to: ShipToSchema,
|
|
143
|
+
ship_to_locality: ShipToLocalitySchema,
|
|
144
|
+
shipment: ShipmentSchema,
|
|
145
|
+
recorded_shipment: RecordedShipmentSchema,
|
|
140
146
|
tags: TagsSchema,
|
|
141
147
|
timestamp: TimestampSchema,
|
|
142
148
|
worker_envelope: WorkerEnvelopeSchema,
|