@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/api.d.ts
CHANGED
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
* later by a merchant who took an order on and now has the goods or has run
|
|
43
43
|
* out of them. The order machine keeps the same two apart, and in the
|
|
44
44
|
* synchronous mode it is the returned answer that exists and the explicit
|
|
45
|
-
* calls that do not.
|
|
46
|
-
* of that decision, read alone, leaves the synchronous handler with no address
|
|
47
|
-
* at all.
|
|
45
|
+
* calls that do not. ADR-0004 §2 settles this.
|
|
48
46
|
*/
|
|
49
47
|
import { z } from "zod";
|
|
50
48
|
import type { Fulfillment, PublicCard } from "./card.js";
|
|
@@ -70,10 +68,28 @@ export declare const OrderWithStatusSchema: z.ZodObject<{
|
|
|
70
68
|
as_of: z.ZodISODateTime;
|
|
71
69
|
}, z.core.$strict>;
|
|
72
70
|
price_id: z.ZodOptional<z.ZodString>;
|
|
71
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
line_one: z.ZodString;
|
|
74
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
75
|
+
city: z.ZodString;
|
|
76
|
+
state: z.ZodOptional<z.ZodString>;
|
|
77
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
78
|
+
country: z.ZodString;
|
|
79
|
+
phone_number: z.ZodString;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
country: z.ZodString;
|
|
82
|
+
state: z.ZodOptional<z.ZodString>;
|
|
83
|
+
city: z.ZodString;
|
|
84
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
erased_at: z.ZodISODateTime;
|
|
87
|
+
}, z.core.$strict>]>>;
|
|
73
88
|
test: z.ZodBoolean;
|
|
74
89
|
status: z.ZodEnum<{
|
|
75
90
|
delivered: "delivered";
|
|
76
91
|
in_progress: "in_progress";
|
|
92
|
+
shipped: "shipped";
|
|
77
93
|
rejected: "rejected";
|
|
78
94
|
payment_unresolved: "payment_unresolved";
|
|
79
95
|
declined: "declined";
|
|
@@ -104,10 +120,28 @@ export declare const OrderListSchema: z.ZodObject<{
|
|
|
104
120
|
as_of: z.ZodISODateTime;
|
|
105
121
|
}, z.core.$strict>;
|
|
106
122
|
price_id: z.ZodOptional<z.ZodString>;
|
|
123
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
124
|
+
name: z.ZodString;
|
|
125
|
+
line_one: z.ZodString;
|
|
126
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
127
|
+
city: z.ZodString;
|
|
128
|
+
state: z.ZodOptional<z.ZodString>;
|
|
129
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
130
|
+
country: z.ZodString;
|
|
131
|
+
phone_number: z.ZodString;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
country: z.ZodString;
|
|
134
|
+
state: z.ZodOptional<z.ZodString>;
|
|
135
|
+
city: z.ZodString;
|
|
136
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
erased_at: z.ZodISODateTime;
|
|
139
|
+
}, z.core.$strict>]>>;
|
|
107
140
|
test: z.ZodBoolean;
|
|
108
141
|
status: z.ZodEnum<{
|
|
109
142
|
delivered: "delivered";
|
|
110
143
|
in_progress: "in_progress";
|
|
144
|
+
shipped: "shipped";
|
|
111
145
|
rejected: "rejected";
|
|
112
146
|
payment_unresolved: "payment_unresolved";
|
|
113
147
|
declined: "declined";
|
|
@@ -159,7 +193,7 @@ export declare const MerchantCardListSchema: z.ZodObject<{
|
|
|
159
193
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
160
194
|
title: z.ZodOptional<z.ZodString>;
|
|
161
195
|
}, z.core.$strict>>>>;
|
|
162
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
196
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
163
197
|
type: z.ZodEnum<{
|
|
164
198
|
string: "string";
|
|
165
199
|
number: "number";
|
|
@@ -168,18 +202,20 @@ export declare const MerchantCardListSchema: z.ZodObject<{
|
|
|
168
202
|
}>;
|
|
169
203
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
170
204
|
title: z.ZodOptional<z.ZodString>;
|
|
171
|
-
}, z.core.$strict
|
|
205
|
+
}, z.core.$strict>>>>;
|
|
172
206
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
173
207
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
174
208
|
sync: "sync";
|
|
175
209
|
async: "async";
|
|
176
210
|
confirm: "confirm";
|
|
211
|
+
ship: "ship";
|
|
177
212
|
}>>;
|
|
178
213
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
179
214
|
url: z.ZodURL;
|
|
180
215
|
}, z.core.$strict>]>>;
|
|
181
216
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
182
217
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
218
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
183
219
|
}, z.core.$strict>;
|
|
184
220
|
selling: z.ZodEnum<{
|
|
185
221
|
open: "open";
|
|
@@ -217,6 +253,7 @@ export declare const ReceiptListSchema: z.ZodObject<{
|
|
|
217
253
|
outcome: z.ZodEnum<{
|
|
218
254
|
delivered: "delivered";
|
|
219
255
|
in_progress: "in_progress";
|
|
256
|
+
shipped: "shipped";
|
|
220
257
|
refund_due: "refund_due";
|
|
221
258
|
refunded: "refunded";
|
|
222
259
|
}>;
|
|
@@ -296,6 +333,23 @@ export declare const WorkerPollResponseSchema: z.ZodObject<{
|
|
|
296
333
|
as_of: z.ZodISODateTime;
|
|
297
334
|
}, z.core.$strict>;
|
|
298
335
|
price_id: z.ZodOptional<z.ZodString>;
|
|
336
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
337
|
+
name: z.ZodString;
|
|
338
|
+
line_one: z.ZodString;
|
|
339
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
340
|
+
city: z.ZodString;
|
|
341
|
+
state: z.ZodOptional<z.ZodString>;
|
|
342
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
343
|
+
country: z.ZodString;
|
|
344
|
+
phone_number: z.ZodString;
|
|
345
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
346
|
+
country: z.ZodString;
|
|
347
|
+
state: z.ZodOptional<z.ZodString>;
|
|
348
|
+
city: z.ZodString;
|
|
349
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
350
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
351
|
+
erased_at: z.ZodISODateTime;
|
|
352
|
+
}, z.core.$strict>]>>;
|
|
299
353
|
test: z.ZodBoolean;
|
|
300
354
|
}, z.core.$strict>;
|
|
301
355
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -305,6 +359,12 @@ export declare const WorkerPollResponseSchema: z.ZodObject<{
|
|
|
305
359
|
payload: z.ZodObject<{
|
|
306
360
|
merchant_item_id: z.ZodString;
|
|
307
361
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
362
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
363
|
+
country: z.ZodString;
|
|
364
|
+
state: z.ZodOptional<z.ZodString>;
|
|
365
|
+
city: z.ZodString;
|
|
366
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
367
|
+
}, z.core.$strict>>;
|
|
308
368
|
price_id: z.ZodString;
|
|
309
369
|
purpose: z.ZodEnum<{
|
|
310
370
|
purchase: "purchase";
|
|
@@ -454,49 +514,24 @@ export declare const QuoteAnswerAckSchema: z.ZodObject<{
|
|
|
454
514
|
*/
|
|
455
515
|
export declare const PurchaseRequestSchema: z.ZodObject<{
|
|
456
516
|
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
517
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
518
|
+
name: z.ZodString;
|
|
519
|
+
line_one: z.ZodString;
|
|
520
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
521
|
+
city: z.ZodString;
|
|
522
|
+
state: z.ZodOptional<z.ZodString>;
|
|
523
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
524
|
+
country: z.ZodString;
|
|
525
|
+
phone_number: z.ZodString;
|
|
526
|
+
}, z.core.$strict>>;
|
|
457
527
|
}, z.core.$strict>;
|
|
458
|
-
/**
|
|
459
|
-
* What became of a purchase, told to the agent that made it.
|
|
460
|
-
*
|
|
461
|
-
* The shape of the list is the decision rather than its length. This document
|
|
462
|
-
* is what the buyer is owed — where their order stands, what it cost them, the
|
|
463
|
-
* goods once those exist, and where to ask again — and it is deliberately
|
|
464
|
-
* smaller than the merchant's own view of the same order. It carries no
|
|
465
|
-
* merchant, no merchant's key for the product, none of the parameters the
|
|
466
|
-
* buyer sent and nothing about any other order, because whoever holds an
|
|
467
|
-
* order's identifier can read it (ADR-0011) and an answer assembled from the
|
|
468
|
-
* merchant's record would hand all of that to whoever guessed one.
|
|
469
|
-
*
|
|
470
|
-
* Both of the agent's doors answer in it, and that is one concept rather than
|
|
471
|
-
* two: the purchase and the later read are the same question — where does my
|
|
472
|
-
* order stand — asked at two moments. Two documents for it would be two
|
|
473
|
-
* readers for an integrator to write, and the one that came back from the
|
|
474
|
-
* purchase was the merchant's own, with the merchant's key for the product and
|
|
475
|
-
* the buyer's own parameters in it. What a purchase answers with beyond this
|
|
476
|
-
* document is the payment exchange that precedes it, which is a header and not
|
|
477
|
-
* a document at all.
|
|
478
|
-
*
|
|
479
|
-
* The two nullable fields are required rather than optional, and that is the
|
|
480
|
-
* fifth gate written into a shape. `price` is null for an order nobody ever
|
|
481
|
-
* named a price for — a product that was gone, a price question that went
|
|
482
|
-
* unanswered — and `delivered` is null while there are no goods to hand over.
|
|
483
|
-
* Left out instead, either would be a silence a reader cannot tell from an
|
|
484
|
-
* oversight; present and null, it is a fact.
|
|
485
|
-
*
|
|
486
|
-
* The status vocabulary folds several of the machine's endings into `rejected`
|
|
487
|
-
* on the argument that the reason travels separately, in the refusal code, and
|
|
488
|
-
* `refusal` is where it travels. It is optional because most endings have no
|
|
489
|
-
* refusal behind them, and what remains coarse is said in that field's own
|
|
490
|
-
* words rather than left to be discovered: a product that was gone and a
|
|
491
|
-
* payment that failed its check both still arrive as a bare `rejected`,
|
|
492
|
-
* because neither was worded by anybody.
|
|
493
|
-
*/
|
|
494
528
|
export declare const AgentOrderStatusSchema: z.ZodObject<{
|
|
495
529
|
order_id: z.ZodString;
|
|
496
530
|
status_url: z.ZodURL;
|
|
497
531
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
498
532
|
delivered: "delivered";
|
|
499
533
|
in_progress: "in_progress";
|
|
534
|
+
shipped: "shipped";
|
|
500
535
|
rejected: "rejected";
|
|
501
536
|
payment_unresolved: "payment_unresolved";
|
|
502
537
|
declined: "declined";
|
|
@@ -513,6 +548,17 @@ export declare const AgentOrderStatusSchema: z.ZodObject<{
|
|
|
513
548
|
as_of: z.ZodISODateTime;
|
|
514
549
|
}, z.core.$loose>>;
|
|
515
550
|
delivered: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
551
|
+
shipment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
552
|
+
carrier: z.ZodString;
|
|
553
|
+
tracking_number: z.ZodNullable<z.ZodString>;
|
|
554
|
+
tracking_url: z.ZodOptional<z.ZodString>;
|
|
555
|
+
shipped_at: z.ZodISODateTime;
|
|
556
|
+
estimated_delivery: z.ZodOptional<z.ZodObject<{
|
|
557
|
+
earliest: z.ZodISODateTime;
|
|
558
|
+
latest: z.ZodISODateTime;
|
|
559
|
+
}, z.core.$loose>>;
|
|
560
|
+
}, z.core.$loose>>>;
|
|
561
|
+
ship_by: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
516
562
|
test: z.ZodBoolean;
|
|
517
563
|
refusal: z.ZodOptional<z.ZodObject<{
|
|
518
564
|
code: z.ZodString;
|
|
@@ -553,15 +599,8 @@ export declare const CatalogPageSchema: z.ZodObject<{
|
|
|
553
599
|
export declare const cardsOf: (page: CatalogPage) => (PublicCard & {
|
|
554
600
|
readonly fulfillment: Fulfillment;
|
|
555
601
|
})[];
|
|
556
|
-
/**
|
|
557
|
-
|
|
558
|
-
*
|
|
559
|
-
* `DELETE` is here for the one call that removes rows rather than marking them,
|
|
560
|
-
* and it earns the third verb rather than being folded into a POST: what it
|
|
561
|
-
* does to a key is not what disabling one does, and a surface that spelled both
|
|
562
|
-
* as a POST would be inviting a reader to think it was.
|
|
563
|
-
*/
|
|
564
|
-
export declare const HTTP_METHODS: readonly ["GET", "POST", "DELETE"];
|
|
602
|
+
/** The methods this surface uses. */
|
|
603
|
+
export declare const HTTP_METHODS: readonly ["GET", "POST"];
|
|
565
604
|
export type HttpMethod = (typeof HTTP_METHODS)[number];
|
|
566
605
|
/**
|
|
567
606
|
* Which door a call is behind.
|
|
@@ -710,7 +749,7 @@ export type ErrorEnvelope = z.infer<typeof ErrorEnvelopeSchema>;
|
|
|
710
749
|
* has to act on it belongs to the route that sends it and to the sentence the
|
|
711
750
|
* refusal carries.
|
|
712
751
|
*/
|
|
713
|
-
export declare const ERROR_CODES: readonly ["body_too_large", "body_undecodable", "call_refused", "charset_unsupported", "encoding_unsupported", "gateway_failed", "
|
|
752
|
+
export declare const ERROR_CODES: readonly ["body_too_large", "body_undecodable", "call_refused", "charset_unsupported", "encoding_unsupported", "gateway_failed", "key_opened_this_call", "malformed_body", "malformed_query", "merchant_departed", "no_such_item", "no_such_key", "no_such_order", "no_such_route", "not_authorised", "not_selling", "not_this_purchase", "order_closed_before_it_was_priced", "order_not_priced_yet", "params_do_not_fit", "payment_already_spent", "payment_not_taken", "payment_not_verified", "ship_to_changed", "ship_to_does_not_fit"];
|
|
714
753
|
/** One of the codes this gateway is known to refuse a call with. */
|
|
715
754
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
|
716
755
|
/**
|
|
@@ -807,7 +846,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
807
846
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
808
847
|
title: z.ZodOptional<z.ZodString>;
|
|
809
848
|
}, z.core.$strict>>>>;
|
|
810
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
849
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
811
850
|
type: z.ZodEnum<{
|
|
812
851
|
string: "string";
|
|
813
852
|
number: "number";
|
|
@@ -816,18 +855,20 @@ export declare const API_ROUTES: Readonly<{
|
|
|
816
855
|
}>;
|
|
817
856
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
818
857
|
title: z.ZodOptional<z.ZodString>;
|
|
819
|
-
}, z.core.$strict
|
|
858
|
+
}, z.core.$strict>>>>;
|
|
820
859
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
821
860
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
822
861
|
sync: "sync";
|
|
823
862
|
async: "async";
|
|
824
863
|
confirm: "confirm";
|
|
864
|
+
ship: "ship";
|
|
825
865
|
}>>;
|
|
826
866
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
827
867
|
url: z.ZodURL;
|
|
828
868
|
}, z.core.$strict>]>>;
|
|
829
869
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
830
870
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
871
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
831
872
|
}, z.core.$strict>;
|
|
832
873
|
response: {
|
|
833
874
|
document: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -881,7 +922,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
881
922
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
882
923
|
title: z.ZodOptional<z.ZodString>;
|
|
883
924
|
}, z.core.$strict>>>>;
|
|
884
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
925
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
885
926
|
type: z.ZodEnum<{
|
|
886
927
|
string: "string";
|
|
887
928
|
number: "number";
|
|
@@ -890,18 +931,20 @@ export declare const API_ROUTES: Readonly<{
|
|
|
890
931
|
}>;
|
|
891
932
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
892
933
|
title: z.ZodOptional<z.ZodString>;
|
|
893
|
-
}, z.core.$strict
|
|
934
|
+
}, z.core.$strict>>>>;
|
|
894
935
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
895
936
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
896
937
|
sync: "sync";
|
|
897
938
|
async: "async";
|
|
898
939
|
confirm: "confirm";
|
|
940
|
+
ship: "ship";
|
|
899
941
|
}>>;
|
|
900
942
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
901
943
|
url: z.ZodURL;
|
|
902
944
|
}, z.core.$strict>]>>;
|
|
903
945
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
904
946
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
947
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
905
948
|
}, z.core.$strict>;
|
|
906
949
|
selling: z.ZodEnum<{
|
|
907
950
|
open: "open";
|
|
@@ -940,7 +983,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
940
983
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
941
984
|
title: z.ZodOptional<z.ZodString>;
|
|
942
985
|
}, z.core.$strict>>>>;
|
|
943
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
986
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
944
987
|
type: z.ZodEnum<{
|
|
945
988
|
string: "string";
|
|
946
989
|
number: "number";
|
|
@@ -949,18 +992,20 @@ export declare const API_ROUTES: Readonly<{
|
|
|
949
992
|
}>;
|
|
950
993
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
951
994
|
title: z.ZodOptional<z.ZodString>;
|
|
952
|
-
}, z.core.$strict
|
|
995
|
+
}, z.core.$strict>>>>;
|
|
953
996
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
954
997
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
955
998
|
sync: "sync";
|
|
956
999
|
async: "async";
|
|
957
1000
|
confirm: "confirm";
|
|
1001
|
+
ship: "ship";
|
|
958
1002
|
}>>;
|
|
959
1003
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
960
1004
|
url: z.ZodURL;
|
|
961
1005
|
}, z.core.$strict>]>>;
|
|
962
1006
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
963
1007
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
1008
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
964
1009
|
}, z.core.$strict>;
|
|
965
1010
|
selling: z.ZodEnum<{
|
|
966
1011
|
open: "open";
|
|
@@ -998,7 +1043,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
998
1043
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
999
1044
|
title: z.ZodOptional<z.ZodString>;
|
|
1000
1045
|
}, z.core.$strict>>>>;
|
|
1001
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1046
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1002
1047
|
type: z.ZodEnum<{
|
|
1003
1048
|
string: "string";
|
|
1004
1049
|
number: "number";
|
|
@@ -1007,18 +1052,20 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1007
1052
|
}>;
|
|
1008
1053
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
1009
1054
|
title: z.ZodOptional<z.ZodString>;
|
|
1010
|
-
}, z.core.$strict
|
|
1055
|
+
}, z.core.$strict>>>>;
|
|
1011
1056
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1012
1057
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
1013
1058
|
sync: "sync";
|
|
1014
1059
|
async: "async";
|
|
1015
1060
|
confirm: "confirm";
|
|
1061
|
+
ship: "ship";
|
|
1016
1062
|
}>>;
|
|
1017
1063
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
1018
1064
|
url: z.ZodURL;
|
|
1019
1065
|
}, z.core.$strict>]>>;
|
|
1020
1066
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
1021
1067
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
1068
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
1022
1069
|
}, z.core.$strict>;
|
|
1023
1070
|
selling: z.ZodEnum<{
|
|
1024
1071
|
open: "open";
|
|
@@ -1062,7 +1109,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1062
1109
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
1063
1110
|
title: z.ZodOptional<z.ZodString>;
|
|
1064
1111
|
}, z.core.$strict>>>>;
|
|
1065
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1112
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1066
1113
|
type: z.ZodEnum<{
|
|
1067
1114
|
string: "string";
|
|
1068
1115
|
number: "number";
|
|
@@ -1071,18 +1118,20 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1071
1118
|
}>;
|
|
1072
1119
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
1073
1120
|
title: z.ZodOptional<z.ZodString>;
|
|
1074
|
-
}, z.core.$strict
|
|
1121
|
+
}, z.core.$strict>>>>;
|
|
1075
1122
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1076
1123
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
1077
1124
|
sync: "sync";
|
|
1078
1125
|
async: "async";
|
|
1079
1126
|
confirm: "confirm";
|
|
1127
|
+
ship: "ship";
|
|
1080
1128
|
}>>;
|
|
1081
1129
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
1082
1130
|
url: z.ZodURL;
|
|
1083
1131
|
}, z.core.$strict>]>>;
|
|
1084
1132
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
1085
1133
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
1134
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
1086
1135
|
}, z.core.$strict>;
|
|
1087
1136
|
selling: z.ZodEnum<{
|
|
1088
1137
|
open: "open";
|
|
@@ -1127,7 +1176,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1127
1176
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
1128
1177
|
title: z.ZodOptional<z.ZodString>;
|
|
1129
1178
|
}, z.core.$strict>>>>;
|
|
1130
|
-
result: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1179
|
+
result: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1131
1180
|
type: z.ZodEnum<{
|
|
1132
1181
|
string: "string";
|
|
1133
1182
|
number: "number";
|
|
@@ -1136,18 +1185,20 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1136
1185
|
}>;
|
|
1137
1186
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
1138
1187
|
title: z.ZodOptional<z.ZodString>;
|
|
1139
|
-
}, z.core.$strict
|
|
1188
|
+
}, z.core.$strict>>>>;
|
|
1140
1189
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1141
1190
|
fulfillment: z.ZodDefault<z.ZodEnum<{
|
|
1142
1191
|
sync: "sync";
|
|
1143
1192
|
async: "async";
|
|
1144
1193
|
confirm: "confirm";
|
|
1194
|
+
ship: "ship";
|
|
1145
1195
|
}>>;
|
|
1146
1196
|
price_check: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"handler">, z.ZodObject<{
|
|
1147
1197
|
url: z.ZodURL;
|
|
1148
1198
|
}, z.core.$strict>]>>;
|
|
1149
1199
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
1150
1200
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
1201
|
+
ship_within_seconds: z.ZodOptional<z.ZodInt>;
|
|
1151
1202
|
}, z.core.$strict>;
|
|
1152
1203
|
selling: z.ZodEnum<{
|
|
1153
1204
|
open: "open";
|
|
@@ -1159,21 +1210,6 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1159
1210
|
}, z.core.$strict>;
|
|
1160
1211
|
};
|
|
1161
1212
|
};
|
|
1162
|
-
register_merchant: {
|
|
1163
|
-
method: "POST";
|
|
1164
|
-
path: string;
|
|
1165
|
-
auth: "none";
|
|
1166
|
-
description: string;
|
|
1167
|
-
request: z.ZodObject<{
|
|
1168
|
-
invitation: z.ZodString;
|
|
1169
|
-
}, z.core.$strict>;
|
|
1170
|
-
response: {
|
|
1171
|
-
document: z.ZodObject<{
|
|
1172
|
-
merchant_id: z.ZodString;
|
|
1173
|
-
secret: z.ZodString;
|
|
1174
|
-
}, z.core.$strict>;
|
|
1175
|
-
};
|
|
1176
|
-
};
|
|
1177
1213
|
get_seller_name: {
|
|
1178
1214
|
method: "GET";
|
|
1179
1215
|
path: string;
|
|
@@ -1217,24 +1253,6 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1217
1253
|
}, z.core.$strict>;
|
|
1218
1254
|
};
|
|
1219
1255
|
};
|
|
1220
|
-
set_payout_wallet: {
|
|
1221
|
-
method: "POST";
|
|
1222
|
-
path: string;
|
|
1223
|
-
auth: "merchant_key";
|
|
1224
|
-
description: string;
|
|
1225
|
-
request: z.ZodObject<{
|
|
1226
|
-
payout_wallet: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
1227
|
-
}, z.core.$strict>;
|
|
1228
|
-
response: {
|
|
1229
|
-
document: z.ZodObject<{
|
|
1230
|
-
payout_wallet: z.ZodNullable<z.ZodString>;
|
|
1231
|
-
pending: z.ZodNullable<z.ZodObject<{
|
|
1232
|
-
payout_wallet: z.ZodString;
|
|
1233
|
-
takes_effect_at: z.ZodISODateTime;
|
|
1234
|
-
}, z.core.$strict>>;
|
|
1235
|
-
}, z.core.$strict>;
|
|
1236
|
-
};
|
|
1237
|
-
};
|
|
1238
1256
|
list_keys: {
|
|
1239
1257
|
method: "GET";
|
|
1240
1258
|
path: string;
|
|
@@ -1291,28 +1309,6 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1291
1309
|
}, z.core.$strict>;
|
|
1292
1310
|
};
|
|
1293
1311
|
};
|
|
1294
|
-
issue_dashboard_key: {
|
|
1295
|
-
method: "POST";
|
|
1296
|
-
path: string;
|
|
1297
|
-
auth: "merchant_key";
|
|
1298
|
-
description: string;
|
|
1299
|
-
response: {
|
|
1300
|
-
document: z.ZodObject<{
|
|
1301
|
-
secret: z.ZodString;
|
|
1302
|
-
}, z.core.$strict>;
|
|
1303
|
-
};
|
|
1304
|
-
};
|
|
1305
|
-
forget_dashboard_key: {
|
|
1306
|
-
method: "DELETE";
|
|
1307
|
-
path: string;
|
|
1308
|
-
auth: "merchant_key";
|
|
1309
|
-
description: string;
|
|
1310
|
-
response: {
|
|
1311
|
-
document: z.ZodObject<{
|
|
1312
|
-
forgotten: z.ZodLiteral<true>;
|
|
1313
|
-
}, z.core.$strict>;
|
|
1314
|
-
};
|
|
1315
|
-
};
|
|
1316
1312
|
get_order: {
|
|
1317
1313
|
method: "GET";
|
|
1318
1314
|
path: string;
|
|
@@ -1330,10 +1326,28 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1330
1326
|
as_of: z.ZodISODateTime;
|
|
1331
1327
|
}, z.core.$strict>;
|
|
1332
1328
|
price_id: z.ZodOptional<z.ZodString>;
|
|
1329
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1330
|
+
name: z.ZodString;
|
|
1331
|
+
line_one: z.ZodString;
|
|
1332
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
1333
|
+
city: z.ZodString;
|
|
1334
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1335
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1336
|
+
country: z.ZodString;
|
|
1337
|
+
phone_number: z.ZodString;
|
|
1338
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1339
|
+
country: z.ZodString;
|
|
1340
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1341
|
+
city: z.ZodString;
|
|
1342
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1343
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1344
|
+
erased_at: z.ZodISODateTime;
|
|
1345
|
+
}, z.core.$strict>]>>;
|
|
1333
1346
|
test: z.ZodBoolean;
|
|
1334
1347
|
status: z.ZodEnum<{
|
|
1335
1348
|
delivered: "delivered";
|
|
1336
1349
|
in_progress: "in_progress";
|
|
1350
|
+
shipped: "shipped";
|
|
1337
1351
|
rejected: "rejected";
|
|
1338
1352
|
payment_unresolved: "payment_unresolved";
|
|
1339
1353
|
declined: "declined";
|
|
@@ -1370,10 +1384,28 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1370
1384
|
as_of: z.ZodISODateTime;
|
|
1371
1385
|
}, z.core.$strict>;
|
|
1372
1386
|
price_id: z.ZodOptional<z.ZodString>;
|
|
1387
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1388
|
+
name: z.ZodString;
|
|
1389
|
+
line_one: z.ZodString;
|
|
1390
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
city: z.ZodString;
|
|
1392
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1393
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1394
|
+
country: z.ZodString;
|
|
1395
|
+
phone_number: z.ZodString;
|
|
1396
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1397
|
+
country: z.ZodString;
|
|
1398
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1399
|
+
city: z.ZodString;
|
|
1400
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1401
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1402
|
+
erased_at: z.ZodISODateTime;
|
|
1403
|
+
}, z.core.$strict>]>>;
|
|
1373
1404
|
test: z.ZodBoolean;
|
|
1374
1405
|
status: z.ZodEnum<{
|
|
1375
1406
|
delivered: "delivered";
|
|
1376
1407
|
in_progress: "in_progress";
|
|
1408
|
+
shipped: "shipped";
|
|
1377
1409
|
rejected: "rejected";
|
|
1378
1410
|
payment_unresolved: "payment_unresolved";
|
|
1379
1411
|
declined: "declined";
|
|
@@ -1409,6 +1441,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1409
1441
|
outcome: z.ZodEnum<{
|
|
1410
1442
|
delivered: "delivered";
|
|
1411
1443
|
in_progress: "in_progress";
|
|
1444
|
+
shipped: "shipped";
|
|
1412
1445
|
refund_due: "refund_due";
|
|
1413
1446
|
refunded: "refunded";
|
|
1414
1447
|
}>;
|
|
@@ -1444,6 +1477,23 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1444
1477
|
as_of: z.ZodISODateTime;
|
|
1445
1478
|
}, z.core.$strict>;
|
|
1446
1479
|
price_id: z.ZodOptional<z.ZodString>;
|
|
1480
|
+
ship_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1481
|
+
name: z.ZodString;
|
|
1482
|
+
line_one: z.ZodString;
|
|
1483
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
1484
|
+
city: z.ZodString;
|
|
1485
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1486
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1487
|
+
country: z.ZodString;
|
|
1488
|
+
phone_number: z.ZodString;
|
|
1489
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1490
|
+
country: z.ZodString;
|
|
1491
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1492
|
+
city: z.ZodString;
|
|
1493
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1494
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1495
|
+
erased_at: z.ZodISODateTime;
|
|
1496
|
+
}, z.core.$strict>]>>;
|
|
1447
1497
|
test: z.ZodBoolean;
|
|
1448
1498
|
}, z.core.$strict>;
|
|
1449
1499
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -1453,6 +1503,12 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1453
1503
|
payload: z.ZodObject<{
|
|
1454
1504
|
merchant_item_id: z.ZodString;
|
|
1455
1505
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1506
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
1507
|
+
country: z.ZodString;
|
|
1508
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1509
|
+
city: z.ZodString;
|
|
1510
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1511
|
+
}, z.core.$strict>>;
|
|
1456
1512
|
price_id: z.ZodString;
|
|
1457
1513
|
purpose: z.ZodEnum<{
|
|
1458
1514
|
purchase: "purchase";
|
|
@@ -1666,6 +1722,16 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1666
1722
|
description: string;
|
|
1667
1723
|
request: z.ZodObject<{
|
|
1668
1724
|
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1725
|
+
ship_to: z.ZodOptional<z.ZodObject<{
|
|
1726
|
+
name: z.ZodString;
|
|
1727
|
+
line_one: z.ZodString;
|
|
1728
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
1729
|
+
city: z.ZodString;
|
|
1730
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1731
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1732
|
+
country: z.ZodString;
|
|
1733
|
+
phone_number: z.ZodString;
|
|
1734
|
+
}, z.core.$strict>>;
|
|
1669
1735
|
}, z.core.$strict>;
|
|
1670
1736
|
also_answers_on: "GET"[];
|
|
1671
1737
|
response: {
|
|
@@ -1675,6 +1741,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1675
1741
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1676
1742
|
delivered: "delivered";
|
|
1677
1743
|
in_progress: "in_progress";
|
|
1744
|
+
shipped: "shipped";
|
|
1678
1745
|
rejected: "rejected";
|
|
1679
1746
|
payment_unresolved: "payment_unresolved";
|
|
1680
1747
|
declined: "declined";
|
|
@@ -1691,6 +1758,17 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1691
1758
|
as_of: z.ZodISODateTime;
|
|
1692
1759
|
}, z.core.$loose>>;
|
|
1693
1760
|
delivered: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1761
|
+
shipment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1762
|
+
carrier: z.ZodString;
|
|
1763
|
+
tracking_number: z.ZodNullable<z.ZodString>;
|
|
1764
|
+
tracking_url: z.ZodOptional<z.ZodString>;
|
|
1765
|
+
shipped_at: z.ZodISODateTime;
|
|
1766
|
+
estimated_delivery: z.ZodOptional<z.ZodObject<{
|
|
1767
|
+
earliest: z.ZodISODateTime;
|
|
1768
|
+
latest: z.ZodISODateTime;
|
|
1769
|
+
}, z.core.$loose>>;
|
|
1770
|
+
}, z.core.$loose>>>;
|
|
1771
|
+
ship_by: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
1694
1772
|
test: z.ZodBoolean;
|
|
1695
1773
|
refusal: z.ZodOptional<z.ZodObject<{
|
|
1696
1774
|
code: z.ZodString;
|
|
@@ -1715,6 +1793,7 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1715
1793
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1716
1794
|
delivered: "delivered";
|
|
1717
1795
|
in_progress: "in_progress";
|
|
1796
|
+
shipped: "shipped";
|
|
1718
1797
|
rejected: "rejected";
|
|
1719
1798
|
payment_unresolved: "payment_unresolved";
|
|
1720
1799
|
declined: "declined";
|
|
@@ -1731,6 +1810,17 @@ export declare const API_ROUTES: Readonly<{
|
|
|
1731
1810
|
as_of: z.ZodISODateTime;
|
|
1732
1811
|
}, z.core.$loose>>;
|
|
1733
1812
|
delivered: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1813
|
+
shipment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1814
|
+
carrier: z.ZodString;
|
|
1815
|
+
tracking_number: z.ZodNullable<z.ZodString>;
|
|
1816
|
+
tracking_url: z.ZodOptional<z.ZodString>;
|
|
1817
|
+
shipped_at: z.ZodISODateTime;
|
|
1818
|
+
estimated_delivery: z.ZodOptional<z.ZodObject<{
|
|
1819
|
+
earliest: z.ZodISODateTime;
|
|
1820
|
+
latest: z.ZodISODateTime;
|
|
1821
|
+
}, z.core.$loose>>;
|
|
1822
|
+
}, z.core.$loose>>>;
|
|
1823
|
+
ship_by: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
1734
1824
|
test: z.ZodBoolean;
|
|
1735
1825
|
refusal: z.ZodOptional<z.ZodObject<{
|
|
1736
1826
|
code: z.ZodString;
|