@nuanu-ai/agentify-contracts 0.5.0 → 0.7.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 +57 -215
- package/dist/api.js +75 -31
- package/dist/card.d.ts +130 -77
- package/dist/card.js +261 -63
- package/dist/index.d.ts +48 -184
- package/dist/index.js +14 -9
- package/dist/merchant.d.ts +16 -14
- package/dist/merchant.js +55 -27
- package/dist/plain-text.d.ts +60 -0
- package/dist/plain-text.js +191 -0
- package/dist/price-rule.d.ts +73 -0
- package/dist/price-rule.js +104 -0
- package/dist/primitives.d.ts +19 -6
- package/dist/primitives.js +20 -6
- package/dist/quote.js +3 -1
- package/dist/results.d.ts +5 -4
- package/dist/results.js +6 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
*/
|
|
23
23
|
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
|
-
export { AgentOrderStatusSchema, API_ROUTES, AUTH_MODES, CatalogPageSchema, 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
|
-
export type { BazaarDeclaration, Card, CardInput, Fulfillment, MerchantCard, PriceCheck, PublicCard, } from "./card.js";
|
|
27
|
-
export { bazaarDeclarationOf, CardSchema, deliveryCheckFor, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, publicCardOf, purchaseCheckFor, ServiceNameSchema, TagsSchema, } from "./card.js";
|
|
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
|
+
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, SellerSiteSchema, 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,16 +33,19 @@ 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 { DashboardKey, DisabledKey, ForgottenDashboardKey, IssuedKey, IssueKeyRequest, MerchantKey, MerchantKeyList, PayoutWallet, PayoutWalletRequest, PendingPayoutWallet, RegisteredMerchant, RegistrationRequest, SellerName, SellerNameRequest, } from "./merchant.js";
|
|
37
|
+
export { DashboardKeySchema, DisabledKeySchema, ForgottenDashboardKeySchema, IssuedKeySchema, IssueKeyRequestSchema, MerchantKeyListSchema, MerchantKeySchema, PayoutWalletRequestSchema, PayoutWalletSchema, PendingPayoutWalletSchema, RegisteredMerchantSchema, RegistrationRequestSchema, 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";
|
|
41
41
|
export { ORDER_STATUSES, OrderStatusSchema } from "./order-status.js";
|
|
42
42
|
export type { FieldSpec, FieldSpecInput, ParamSpec, ParamSpecDirection, ParamSpecInput, ParamType, } from "./param-spec.js";
|
|
43
43
|
export { FieldSpecSchema, ParamNameSchema, ParamSpecSchema, ParamTypeSchema, PROTOTYPE_KEY_IS_DROPPED, paramSpecToValidator, } from "./param-spec.js";
|
|
44
|
-
export type {
|
|
45
|
-
export {
|
|
44
|
+
export type { TextLines } from "./plain-text.js";
|
|
45
|
+
export { notPlainTextIn } from "./plain-text.js";
|
|
46
|
+
export { PAYABLE_CURRENCIES, PAYABLE_DECIMALS, priceProblemsOf } from "./price-rule.js";
|
|
47
|
+
export type { Amount, CurrencyCode, Identifier, Money, OpenWord, SalePrice, Timestamp, } from "./primitives.js";
|
|
48
|
+
export { AmountSchema, CurrencyCodeSchema, IdentifierSchema, MoneySchema, OpenWordSchema, SalePriceSchema, TimestampSchema, } from "./primitives.js";
|
|
46
49
|
export type { QuotePurpose, QuoteRequest, QuoteResponse } from "./quote.js";
|
|
47
50
|
export { QuotePurposeSchema, QuoteRequestSchema, QuoteResponseSchema } from "./quote.js";
|
|
48
51
|
export type { Receipt, ReceiptOutcome } from "./receipt.js";
|
|
@@ -77,7 +80,7 @@ export declare const schemas: Readonly<{
|
|
|
77
80
|
agent_order_status: z.ZodObject<{
|
|
78
81
|
order_id: z.ZodString;
|
|
79
82
|
status_url: z.ZodURL;
|
|
80
|
-
status: z.ZodEnum<{
|
|
83
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
81
84
|
delivered: "delivered";
|
|
82
85
|
in_progress: "in_progress";
|
|
83
86
|
rejected: "rejected";
|
|
@@ -88,24 +91,25 @@ export declare const schemas: Readonly<{
|
|
|
88
91
|
refund_due: "refund_due";
|
|
89
92
|
refunded: "refunded";
|
|
90
93
|
delivered_unpaid: "delivered_unpaid";
|
|
91
|
-
}>;
|
|
94
|
+
}>, z.ZodString]>;
|
|
92
95
|
price: z.ZodNullable<z.ZodObject<{
|
|
93
96
|
amount: z.ZodString;
|
|
94
97
|
currency: z.ZodString;
|
|
95
98
|
at: z.ZodISODateTime;
|
|
96
99
|
as_of: z.ZodISODateTime;
|
|
97
|
-
}, z.core.$
|
|
100
|
+
}, z.core.$loose>>;
|
|
98
101
|
delivered: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
99
102
|
test: z.ZodBoolean;
|
|
100
103
|
refusal: z.ZodOptional<z.ZodObject<{
|
|
101
104
|
code: z.ZodString;
|
|
102
105
|
message: z.ZodString;
|
|
103
|
-
}, z.core.$
|
|
104
|
-
|
|
106
|
+
}, z.core.$loose>>;
|
|
107
|
+
seller: z.ZodObject<{
|
|
108
|
+
name: z.ZodNullable<z.ZodString>;
|
|
109
|
+
site: z.ZodNullable<z.ZodString>;
|
|
110
|
+
}, z.core.$loose>;
|
|
111
|
+
}, z.core.$loose>;
|
|
105
112
|
amount: z.ZodString;
|
|
106
|
-
cabinet_key: z.ZodObject<{
|
|
107
|
-
secret: z.ZodString;
|
|
108
|
-
}, z.core.$strict>;
|
|
109
113
|
call_error: z.ZodObject<{
|
|
110
114
|
code: z.ZodString;
|
|
111
115
|
message: z.ZodString;
|
|
@@ -157,105 +161,12 @@ export declare const schemas: Readonly<{
|
|
|
157
161
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
158
162
|
}, z.core.$strict>;
|
|
159
163
|
catalog_page: z.ZodObject<{
|
|
160
|
-
items: z.ZodArray<z.
|
|
161
|
-
|
|
162
|
-
title: z.ZodString;
|
|
163
|
-
description: z.ZodString;
|
|
164
|
-
price: z.ZodObject<{
|
|
165
|
-
amount: z.ZodString;
|
|
166
|
-
currency: z.ZodString;
|
|
167
|
-
}, z.core.$strict>;
|
|
168
|
-
as_of: z.ZodISODateTime;
|
|
169
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
170
|
-
type: z.ZodEnum<{
|
|
171
|
-
string: "string";
|
|
172
|
-
number: "number";
|
|
173
|
-
boolean: "boolean";
|
|
174
|
-
integer: "integer";
|
|
175
|
-
}>;
|
|
176
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
-
title: z.ZodOptional<z.ZodString>;
|
|
178
|
-
}, z.core.$strict>>>;
|
|
179
|
-
result: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
180
|
-
type: z.ZodEnum<{
|
|
181
|
-
string: "string";
|
|
182
|
-
number: "number";
|
|
183
|
-
boolean: "boolean";
|
|
184
|
-
integer: "integer";
|
|
185
|
-
}>;
|
|
186
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
-
title: z.ZodOptional<z.ZodString>;
|
|
188
|
-
}, z.core.$strict>>;
|
|
189
|
-
price_checked_at_purchase: z.ZodBoolean;
|
|
190
|
-
fulfillment: z.ZodLiteral<"sync">;
|
|
191
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
192
|
-
id: z.ZodString;
|
|
193
|
-
title: z.ZodString;
|
|
194
|
-
description: z.ZodString;
|
|
195
|
-
price: z.ZodObject<{
|
|
196
|
-
amount: z.ZodString;
|
|
197
|
-
currency: z.ZodString;
|
|
198
|
-
}, z.core.$strict>;
|
|
199
|
-
as_of: z.ZodISODateTime;
|
|
200
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
201
|
-
type: z.ZodEnum<{
|
|
202
|
-
string: "string";
|
|
203
|
-
number: "number";
|
|
204
|
-
boolean: "boolean";
|
|
205
|
-
integer: "integer";
|
|
206
|
-
}>;
|
|
207
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
-
title: z.ZodOptional<z.ZodString>;
|
|
209
|
-
}, z.core.$strict>>>;
|
|
210
|
-
result: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
211
|
-
type: z.ZodEnum<{
|
|
212
|
-
string: "string";
|
|
213
|
-
number: "number";
|
|
214
|
-
boolean: "boolean";
|
|
215
|
-
integer: "integer";
|
|
216
|
-
}>;
|
|
217
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
-
title: z.ZodOptional<z.ZodString>;
|
|
219
|
-
}, z.core.$strict>>;
|
|
220
|
-
price_checked_at_purchase: z.ZodBoolean;
|
|
221
|
-
fulfillment: z.ZodLiteral<"async">;
|
|
222
|
-
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
223
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
224
|
-
id: z.ZodString;
|
|
225
|
-
title: z.ZodString;
|
|
226
|
-
description: z.ZodString;
|
|
227
|
-
price: z.ZodObject<{
|
|
228
|
-
amount: z.ZodString;
|
|
229
|
-
currency: z.ZodString;
|
|
230
|
-
}, z.core.$strict>;
|
|
231
|
-
as_of: z.ZodISODateTime;
|
|
232
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
233
|
-
type: z.ZodEnum<{
|
|
234
|
-
string: "string";
|
|
235
|
-
number: "number";
|
|
236
|
-
boolean: "boolean";
|
|
237
|
-
integer: "integer";
|
|
238
|
-
}>;
|
|
239
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
-
title: z.ZodOptional<z.ZodString>;
|
|
241
|
-
}, z.core.$strict>>>;
|
|
242
|
-
result: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
243
|
-
type: z.ZodEnum<{
|
|
244
|
-
string: "string";
|
|
245
|
-
number: "number";
|
|
246
|
-
boolean: "boolean";
|
|
247
|
-
integer: "integer";
|
|
248
|
-
}>;
|
|
249
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
250
|
-
title: z.ZodOptional<z.ZodString>;
|
|
251
|
-
}, z.core.$strict>>;
|
|
252
|
-
price_checked_at_purchase: z.ZodBoolean;
|
|
253
|
-
fulfillment: z.ZodLiteral<"confirm">;
|
|
254
|
-
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
255
|
-
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
256
|
-
}, z.core.$strict>], "fulfillment">>;
|
|
257
|
-
}, z.core.$strict>;
|
|
164
|
+
items: z.ZodArray<z.ZodUnknown>;
|
|
165
|
+
}, z.core.$loose>;
|
|
258
166
|
currency_code: z.ZodString;
|
|
167
|
+
dashboard_key: z.ZodObject<{
|
|
168
|
+
secret: z.ZodString;
|
|
169
|
+
}, z.core.$strict>;
|
|
259
170
|
delivery: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
260
171
|
disabled_key: z.ZodObject<{
|
|
261
172
|
key: z.ZodObject<{
|
|
@@ -284,7 +195,7 @@ export declare const schemas: Readonly<{
|
|
|
284
195
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
285
196
|
title: z.ZodOptional<z.ZodString>;
|
|
286
197
|
}, z.core.$strict>;
|
|
287
|
-
|
|
198
|
+
forgotten_dashboard_key: z.ZodObject<{
|
|
288
199
|
forgotten: z.ZodLiteral<true>;
|
|
289
200
|
}, z.core.$strict>;
|
|
290
201
|
fulfillment: z.ZodEnum<{
|
|
@@ -446,6 +357,7 @@ export declare const schemas: Readonly<{
|
|
|
446
357
|
amount: z.ZodString;
|
|
447
358
|
currency: z.ZodString;
|
|
448
359
|
}, z.core.$strict>;
|
|
360
|
+
open_word: z.ZodString;
|
|
449
361
|
order: z.ZodObject<{
|
|
450
362
|
id: z.ZodString;
|
|
451
363
|
merchant_item_id: z.ZodString;
|
|
@@ -636,45 +548,14 @@ export declare const schemas: Readonly<{
|
|
|
636
548
|
code: z.ZodString;
|
|
637
549
|
message: z.ZodString;
|
|
638
550
|
}, z.core.$strict>;
|
|
639
|
-
public_card: z.
|
|
640
|
-
id: z.ZodString;
|
|
641
|
-
title: z.ZodString;
|
|
642
|
-
description: z.ZodString;
|
|
643
|
-
price: z.ZodObject<{
|
|
644
|
-
amount: z.ZodString;
|
|
645
|
-
currency: z.ZodString;
|
|
646
|
-
}, z.core.$strict>;
|
|
647
|
-
as_of: z.ZodISODateTime;
|
|
648
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
649
|
-
type: z.ZodEnum<{
|
|
650
|
-
string: "string";
|
|
651
|
-
number: "number";
|
|
652
|
-
boolean: "boolean";
|
|
653
|
-
integer: "integer";
|
|
654
|
-
}>;
|
|
655
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
656
|
-
title: z.ZodOptional<z.ZodString>;
|
|
657
|
-
}, z.core.$strict>>>;
|
|
658
|
-
result: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
659
|
-
type: z.ZodEnum<{
|
|
660
|
-
string: "string";
|
|
661
|
-
number: "number";
|
|
662
|
-
boolean: "boolean";
|
|
663
|
-
integer: "integer";
|
|
664
|
-
}>;
|
|
665
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
666
|
-
title: z.ZodOptional<z.ZodString>;
|
|
667
|
-
}, z.core.$strict>>;
|
|
668
|
-
price_checked_at_purchase: z.ZodBoolean;
|
|
669
|
-
fulfillment: z.ZodLiteral<"sync">;
|
|
670
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
551
|
+
public_card: z.ZodObject<{
|
|
671
552
|
id: z.ZodString;
|
|
672
553
|
title: z.ZodString;
|
|
673
554
|
description: z.ZodString;
|
|
674
555
|
price: z.ZodObject<{
|
|
675
556
|
amount: z.ZodString;
|
|
676
557
|
currency: z.ZodString;
|
|
677
|
-
}, z.core.$
|
|
558
|
+
}, z.core.$loose>;
|
|
678
559
|
as_of: z.ZodISODateTime;
|
|
679
560
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
680
561
|
type: z.ZodEnum<{
|
|
@@ -685,7 +566,7 @@ export declare const schemas: Readonly<{
|
|
|
685
566
|
}>;
|
|
686
567
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
687
568
|
title: z.ZodOptional<z.ZodString>;
|
|
688
|
-
}, z.core.$
|
|
569
|
+
}, z.core.$loose>>>;
|
|
689
570
|
result: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
690
571
|
type: z.ZodEnum<{
|
|
691
572
|
string: "string";
|
|
@@ -695,44 +576,20 @@ export declare const schemas: Readonly<{
|
|
|
695
576
|
}>;
|
|
696
577
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
697
578
|
title: z.ZodOptional<z.ZodString>;
|
|
698
|
-
}, z.core.$
|
|
579
|
+
}, z.core.$loose>>;
|
|
699
580
|
price_checked_at_purchase: z.ZodBoolean;
|
|
700
|
-
|
|
581
|
+
seller: z.ZodObject<{
|
|
582
|
+
name: z.ZodNullable<z.ZodString>;
|
|
583
|
+
site: z.ZodNullable<z.ZodString>;
|
|
584
|
+
}, z.core.$loose>;
|
|
585
|
+
fulfillment: z.ZodUnion<readonly [z.ZodEnum<{
|
|
586
|
+
sync: "sync";
|
|
587
|
+
async: "async";
|
|
588
|
+
confirm: "confirm";
|
|
589
|
+
}>, z.ZodString]>;
|
|
701
590
|
fulfill_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
702
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
703
|
-
id: z.ZodString;
|
|
704
|
-
title: z.ZodString;
|
|
705
|
-
description: z.ZodString;
|
|
706
|
-
price: z.ZodObject<{
|
|
707
|
-
amount: z.ZodString;
|
|
708
|
-
currency: z.ZodString;
|
|
709
|
-
}, z.core.$strict>;
|
|
710
|
-
as_of: z.ZodISODateTime;
|
|
711
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
712
|
-
type: z.ZodEnum<{
|
|
713
|
-
string: "string";
|
|
714
|
-
number: "number";
|
|
715
|
-
boolean: "boolean";
|
|
716
|
-
integer: "integer";
|
|
717
|
-
}>;
|
|
718
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
719
|
-
title: z.ZodOptional<z.ZodString>;
|
|
720
|
-
}, z.core.$strict>>>;
|
|
721
|
-
result: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
722
|
-
type: z.ZodEnum<{
|
|
723
|
-
string: "string";
|
|
724
|
-
number: "number";
|
|
725
|
-
boolean: "boolean";
|
|
726
|
-
integer: "integer";
|
|
727
|
-
}>;
|
|
728
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
729
|
-
title: z.ZodOptional<z.ZodString>;
|
|
730
|
-
}, z.core.$strict>>;
|
|
731
|
-
price_checked_at_purchase: z.ZodBoolean;
|
|
732
|
-
fulfillment: z.ZodLiteral<"confirm">;
|
|
733
591
|
confirm_deadline_seconds: z.ZodOptional<z.ZodInt>;
|
|
734
|
-
|
|
735
|
-
}, z.core.$strict>], "fulfillment">;
|
|
592
|
+
}, z.core.$loose>;
|
|
736
593
|
publish_result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
737
594
|
ok: z.ZodLiteral<true>;
|
|
738
595
|
id: z.ZodString;
|
|
@@ -851,17 +708,24 @@ export declare const schemas: Readonly<{
|
|
|
851
708
|
at: z.ZodISODateTime;
|
|
852
709
|
as_of: z.ZodISODateTime;
|
|
853
710
|
}, z.core.$strict>;
|
|
711
|
+
seller: z.ZodObject<{
|
|
712
|
+
name: z.ZodNullable<z.ZodString>;
|
|
713
|
+
site: z.ZodNullable<z.ZodString>;
|
|
714
|
+
}, z.core.$strict>;
|
|
854
715
|
seller_name: z.ZodObject<{
|
|
855
716
|
seller_name: z.ZodNullable<z.ZodString>;
|
|
717
|
+
seller_site: z.ZodNullable<z.ZodString>;
|
|
856
718
|
}, z.core.$strict>;
|
|
857
719
|
seller_name_request: z.ZodObject<{
|
|
858
|
-
seller_name: z.ZodPipe<z.ZodString, z.ZodString
|
|
720
|
+
seller_name: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
721
|
+
seller_site: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
859
722
|
}, z.core.$strict>;
|
|
860
723
|
selling_state: z.ZodEnum<{
|
|
861
724
|
open: "open";
|
|
862
725
|
paused: "paused";
|
|
863
726
|
departed: "departed";
|
|
864
727
|
}>;
|
|
728
|
+
seller_site: z.ZodString;
|
|
865
729
|
service_name: z.ZodString;
|
|
866
730
|
tags: z.ZodArray<z.ZodString>;
|
|
867
731
|
timestamp: z.ZodISODateTime;
|
package/dist/index.js
CHANGED
|
@@ -22,31 +22,33 @@
|
|
|
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, ServiceNameSchema, TagsSchema, } from "./card.js";
|
|
25
|
+
import { CardSchema, FulfillmentSchema, MerchantCardSchema, PriceCheckSchema, PublicCardSchema, SellerSchema, SellerSiteSchema, 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 { DashboardKeySchema, DisabledKeySchema, ForgottenDashboardKeySchema, IssuedKeySchema, IssueKeyRequestSchema, MerchantKeyListSchema, MerchantKeySchema, PayoutWalletRequestSchema, PayoutWalletSchema, PendingPayoutWalletSchema, RegisteredMerchantSchema, RegistrationRequestSchema, 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";
|
|
34
|
-
import { AmountSchema, CurrencyCodeSchema, IdentifierSchema, MoneySchema, SalePriceSchema, TimestampSchema, } from "./primitives.js";
|
|
34
|
+
import { AmountSchema, CurrencyCodeSchema, IdentifierSchema, MoneySchema, OpenWordSchema, SalePriceSchema, TimestampSchema, } from "./primitives.js";
|
|
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
38
|
import { SellingStateSchema } from "./selling.js";
|
|
39
|
-
export { AgentOrderStatusSchema, API_ROUTES, AUTH_MODES, CatalogPageSchema, 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, ServiceNameSchema, TagsSchema, } from "./card.js";
|
|
39
|
+
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, SellerSiteSchema, ServiceNameSchema, TagsSchema, } from "./card.js";
|
|
41
41
|
export { WORKER_ENVELOPE_KINDS, WORKER_ENVELOPE_PAYLOADS, WorkerEnvelopeSchema, } from "./envelope.js";
|
|
42
42
|
export { ORDER_EVENT_TYPES, OrderEventSchema, RefundDueReasonSchema } from "./events.js";
|
|
43
43
|
export { checksummedAddressOf, EvmAddressSchema } from "./evm-address.js";
|
|
44
44
|
export { AcceptanceSchema, DeliverySchema, HandlerAnswerSchema, RECOMMENDED_REFUSAL_CODES, RefusalCodeSchema, RefusalSchema, } from "./handler.js";
|
|
45
|
-
export {
|
|
45
|
+
export { DashboardKeySchema, DisabledKeySchema, ForgottenDashboardKeySchema, IssuedKeySchema, IssueKeyRequestSchema, MerchantKeyListSchema, MerchantKeySchema, PayoutWalletRequestSchema, PayoutWalletSchema, PendingPayoutWalletSchema, RegisteredMerchantSchema, RegistrationRequestSchema, SellerNameRequestSchema, SellerNameSchema, } from "./merchant.js";
|
|
46
46
|
export { OrderSchema } from "./order.js";
|
|
47
47
|
export { ORDER_STATUSES, OrderStatusSchema } from "./order-status.js";
|
|
48
48
|
export { FieldSpecSchema, ParamNameSchema, ParamSpecSchema, ParamTypeSchema, PROTOTYPE_KEY_IS_DROPPED, paramSpecToValidator, } from "./param-spec.js";
|
|
49
|
-
export {
|
|
49
|
+
export { notPlainTextIn } from "./plain-text.js";
|
|
50
|
+
export { PAYABLE_CURRENCIES, PAYABLE_DECIMALS, priceProblemsOf } from "./price-rule.js";
|
|
51
|
+
export { AmountSchema, CurrencyCodeSchema, IdentifierSchema, MoneySchema, OpenWordSchema, SalePriceSchema, TimestampSchema, } from "./primitives.js";
|
|
50
52
|
export { QuotePurposeSchema, QuoteRequestSchema, QuoteResponseSchema } from "./quote.js";
|
|
51
53
|
export { ReceiptOutcomeSchema, ReceiptSchema } from "./receipt.js";
|
|
52
54
|
export { CARD_REJECTED, CallErrorSchema, MERCHANT_FINDINGS, ORDER_CALL_ERROR_CODES, ORDER_CALL_RESULTS, OrderCallResultSchema, ProblemSchema, PublishResultSchema, } from "./results.js";
|
|
@@ -74,17 +76,17 @@ export const schemas = Object.freeze({
|
|
|
74
76
|
acceptance: AcceptanceSchema,
|
|
75
77
|
agent_order_status: AgentOrderStatusSchema,
|
|
76
78
|
amount: AmountSchema,
|
|
77
|
-
cabinet_key: CabinetKeySchema,
|
|
78
79
|
call_error: CallErrorSchema,
|
|
79
80
|
card: CardSchema,
|
|
80
81
|
catalog_page: CatalogPageSchema,
|
|
81
82
|
currency_code: CurrencyCodeSchema,
|
|
83
|
+
dashboard_key: DashboardKeySchema,
|
|
82
84
|
delivery: DeliverySchema,
|
|
83
85
|
disabled_key: DisabledKeySchema,
|
|
84
86
|
error_envelope: ErrorEnvelopeSchema,
|
|
85
87
|
evm_address: EvmAddressSchema,
|
|
86
88
|
field_spec: FieldSpecSchema,
|
|
87
|
-
|
|
89
|
+
forgotten_dashboard_key: ForgottenDashboardKeySchema,
|
|
88
90
|
fulfillment: FulfillmentSchema,
|
|
89
91
|
handler_answer: HandlerAnswerSchema,
|
|
90
92
|
identifier: IdentifierSchema,
|
|
@@ -95,6 +97,7 @@ export const schemas = Object.freeze({
|
|
|
95
97
|
merchant_key: MerchantKeySchema,
|
|
96
98
|
merchant_key_list: MerchantKeyListSchema,
|
|
97
99
|
money: MoneySchema,
|
|
100
|
+
open_word: OpenWordSchema,
|
|
98
101
|
order: OrderSchema,
|
|
99
102
|
order_accept_response: OrderAcceptResponseSchema,
|
|
100
103
|
order_call_response: OrderCallResponseSchema,
|
|
@@ -128,9 +131,11 @@ export const schemas = Object.freeze({
|
|
|
128
131
|
refusal: RefusalSchema,
|
|
129
132
|
refusal_code: RefusalCodeSchema,
|
|
130
133
|
sale_price: SalePriceSchema,
|
|
134
|
+
seller: SellerSchema,
|
|
131
135
|
seller_name: SellerNameSchema,
|
|
132
136
|
seller_name_request: SellerNameRequestSchema,
|
|
133
137
|
selling_state: SellingStateSchema,
|
|
138
|
+
seller_site: SellerSiteSchema,
|
|
134
139
|
service_name: ServiceNameSchema,
|
|
135
140
|
tags: TagsSchema,
|
|
136
141
|
timestamp: TimestampSchema,
|
package/dist/merchant.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* wallet their sales are paid into, and the keys they open the door with.
|
|
4
4
|
*
|
|
5
5
|
* The first two belong together because registering is the act that produces
|
|
6
|
-
* both: one call makes the merchant and the key its
|
|
6
|
+
* both: one call makes the merchant and the key its dashboard will call as them
|
|
7
7
|
* with, and what comes back carries that key once. Split across two files, a
|
|
8
8
|
* reader working out what registering leaves a merchant holding would have to
|
|
9
9
|
* read both to find that it is a key of a kind no list here carries. The name is here for the same reason read the other way round — it is a
|
|
@@ -52,8 +52,8 @@ export declare const MerchantKeySchema: z.ZodObject<{
|
|
|
52
52
|
* broken.
|
|
53
53
|
*
|
|
54
54
|
* It is not always one of the keys beside it, and that is the thing a reader is
|
|
55
|
-
* likeliest to assume and be wrong about. A
|
|
56
|
-
*
|
|
55
|
+
* likeliest to assume and be wrong about. A dashboard calls with a key made for a
|
|
56
|
+
* dashboard, and those are in nobody's list, so a client that looked this
|
|
57
57
|
* identifier up among the rows would find nothing — which is an answer rather
|
|
58
58
|
* than an error, and a screen has to be built for it.
|
|
59
59
|
*
|
|
@@ -109,10 +109,10 @@ export declare const DisabledKeySchema: z.ZodObject<{
|
|
|
109
109
|
}, z.core.$strict>;
|
|
110
110
|
}, z.core.$strict>;
|
|
111
111
|
/**
|
|
112
|
-
* A key made for a
|
|
112
|
+
* A key made for a dashboard, which is the secret and nothing else.
|
|
113
113
|
*
|
|
114
114
|
* Every other answer that makes a key carries the row beside it, and this one
|
|
115
|
-
* cannot. A key made for a
|
|
115
|
+
* cannot. A key made for a dashboard is in no merchant's list — they did not
|
|
116
116
|
* issue it and have no reason to know it exists — so an identifier here would
|
|
117
117
|
* name a row that no screen of theirs draws and no call of theirs reaches: not
|
|
118
118
|
* the list it is absent from, and not the revoking, which takes the keys a
|
|
@@ -120,7 +120,7 @@ export declare const DisabledKeySchema: z.ZodObject<{
|
|
|
120
120
|
* is put it on the row of whoever just signed in, and that is the whole of what
|
|
121
121
|
* it needs.
|
|
122
122
|
*/
|
|
123
|
-
export declare const
|
|
123
|
+
export declare const DashboardKeySchema: z.ZodObject<{
|
|
124
124
|
secret: z.ZodString;
|
|
125
125
|
}, z.core.$strict>;
|
|
126
126
|
/**
|
|
@@ -133,7 +133,7 @@ export declare const CabinetKeySchema: z.ZodObject<{
|
|
|
133
133
|
* is done, and it is said in a field rather than left to a status code so that
|
|
134
134
|
* a client reads one document and not two kinds of evidence.
|
|
135
135
|
*/
|
|
136
|
-
export declare const
|
|
136
|
+
export declare const ForgottenDashboardKeySchema: z.ZodObject<{
|
|
137
137
|
forgotten: z.ZodLiteral<true>;
|
|
138
138
|
}, z.core.$strict>;
|
|
139
139
|
/**
|
|
@@ -155,6 +155,7 @@ export declare const ForgottenCabinetKeySchema: z.ZodObject<{
|
|
|
155
155
|
*/
|
|
156
156
|
export declare const SellerNameSchema: z.ZodObject<{
|
|
157
157
|
seller_name: z.ZodNullable<z.ZodString>;
|
|
158
|
+
seller_site: z.ZodNullable<z.ZodString>;
|
|
158
159
|
}, z.core.$strict>;
|
|
159
160
|
/**
|
|
160
161
|
* What a merchant sends to change what their products are sold under.
|
|
@@ -169,13 +170,14 @@ export declare const SellerNameSchema: z.ZodObject<{
|
|
|
169
170
|
* which is this same call, or an end to selling, which is the pause — and the
|
|
170
171
|
* pause leaves their cards where they can find them again.
|
|
171
172
|
*
|
|
172
|
-
* So it is two documents rather than one, and a
|
|
173
|
+
* So it is two documents rather than one, and a dashboard still reads back the
|
|
173
174
|
* shape it sent. The message on a null is written here rather than left to a
|
|
174
175
|
* type error, because "expected string, received null" describes the shape and
|
|
175
176
|
* says nothing about which act the sender was reaching for.
|
|
176
177
|
*/
|
|
177
178
|
export declare const SellerNameRequestSchema: z.ZodObject<{
|
|
178
|
-
seller_name: z.ZodPipe<z.ZodString, z.ZodString
|
|
179
|
+
seller_name: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
180
|
+
seller_site: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
179
181
|
}, z.core.$strict>;
|
|
180
182
|
/**
|
|
181
183
|
* A change of the wallet that has been asked for, announced, and has not taken
|
|
@@ -183,7 +185,7 @@ export declare const SellerNameRequestSchema: z.ZodObject<{
|
|
|
183
185
|
*
|
|
184
186
|
* It exists because a replacement does not apply at once where the money is
|
|
185
187
|
* real (ADR-0019). The address a merchant is paid at is the one setting whose
|
|
186
|
-
* change redirects money, and any key of theirs reaches it — the
|
|
188
|
+
* change redirects money, and any key of theirs reaches it — the dashboard's, or
|
|
187
189
|
* one sitting in their own server's environment — so on the live deployment a
|
|
188
190
|
* replacement is told to every account of the merchant first and takes effect
|
|
189
191
|
* forty-eight hours after that. What this document says is the two facts a
|
|
@@ -285,10 +287,10 @@ export declare const RegistrationRequestSchema: z.ZodObject<{
|
|
|
285
287
|
invitation: z.ZodString;
|
|
286
288
|
}, z.core.$strict>;
|
|
287
289
|
/**
|
|
288
|
-
* What registering answers with: a merchant and the key their
|
|
290
|
+
* What registering answers with: a merchant and the key their dashboard will call
|
|
289
291
|
* as them with.
|
|
290
292
|
*
|
|
291
|
-
* The key is made for a
|
|
293
|
+
* The key is made for a dashboard rather than for the merchant's own code, and
|
|
292
294
|
* that is what the caller of this route is. So it is in no list: a merchant who
|
|
293
295
|
* has just registered has no keys of their own at all, and the first one they
|
|
294
296
|
* do have is one they ask for. No row travels beside the secret for the same
|
|
@@ -313,7 +315,7 @@ export type MerchantKeyList = z.infer<typeof MerchantKeyListSchema>;
|
|
|
313
315
|
export type IssueKeyRequest = z.infer<typeof IssueKeyRequestSchema>;
|
|
314
316
|
export type IssuedKey = z.infer<typeof IssuedKeySchema>;
|
|
315
317
|
export type DisabledKey = z.infer<typeof DisabledKeySchema>;
|
|
316
|
-
export type
|
|
317
|
-
export type
|
|
318
|
+
export type DashboardKey = z.infer<typeof DashboardKeySchema>;
|
|
319
|
+
export type ForgottenDashboardKey = z.infer<typeof ForgottenDashboardKeySchema>;
|
|
318
320
|
export type RegistrationRequest = z.infer<typeof RegistrationRequestSchema>;
|
|
319
321
|
export type RegisteredMerchant = z.infer<typeof RegisteredMerchantSchema>;
|