@atiproto/lexicons 1.0.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3459 -2459
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3456 -2459
- package/dist/index.mjs.map +1 -1
- package/dist/lexicons/com/atiproto/authCreateCart.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authCreateCart.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/authCreatePayment.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authCreatePayment.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/authReadCart.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authReadCart.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/authReadEntitlements.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authReadEntitlements.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/authReadPayments.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authReadPayments.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/authReadPublic.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authReadPublic.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/authReadRecipient.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authReadRecipient.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/authWriteProfile.d.ts +2 -0
- package/dist/lexicons/com/atiproto/authWriteProfile.defs.d.ts +5 -0
- package/dist/lexicons/com/atiproto/cart.defs.d.ts +277 -112
- package/dist/lexicons/com/atiproto/item.defs.d.ts +97 -202
- package/dist/lexicons/com/atiproto/payment/cart/checkout.d.ts +2 -0
- package/dist/lexicons/com/atiproto/payment/cart/checkout.defs.d.ts +69 -0
- package/dist/lexicons/com/atiproto/payment/cart/create.defs.d.ts +11 -21
- package/dist/lexicons/com/atiproto/payment/cart/get.defs.d.ts +7 -39
- package/dist/lexicons/com/atiproto/payment/cart/list.defs.d.ts +17 -20
- package/dist/lexicons/com/atiproto/payment/cart/put.defs.d.ts +3 -13
- package/dist/lexicons/com/atiproto/payment/cart.d.ts +1 -1
- package/dist/lexicons/com/atiproto/payment/item/create.defs.d.ts +19 -53
- package/dist/lexicons/com/atiproto/payment/item/get.defs.d.ts +5 -17
- package/dist/lexicons/com/atiproto/payment/item/list.defs.d.ts +1 -7
- package/dist/lexicons/com/atiproto/payment/item/put.defs.d.ts +1 -1
- package/dist/lexicons/com/atiproto/payment/item.d.ts +0 -1
- package/dist/lexicons/com/atiproto/payment/subscription/cancel.defs.d.ts +1 -7
- package/dist/lexicons/com/atiproto/payment/subscription/create.defs.d.ts +22 -45
- package/dist/lexicons/com/atiproto/payment/subscription/get.defs.d.ts +5 -11
- package/dist/lexicons/com/atiproto/payment/subscription/list.defs.d.ts +7 -1
- package/dist/lexicons/com/atiproto/payment/subscription/put.defs.d.ts +1 -1
- package/dist/lexicons/com/atiproto/payment/subscription.d.ts +0 -1
- package/dist/lexicons/com/atiproto/payment.d.ts +0 -1
- package/dist/lexicons/com/atiproto/profile.defs.d.ts +26 -143
- package/dist/lexicons/com/atiproto/recipient/payment/cart/get.defs.d.ts +7 -33
- package/dist/lexicons/com/atiproto/recipient/payment/cart/list.defs.d.ts +23 -20
- package/dist/lexicons/com/atiproto/recipient/payment/item/get.defs.d.ts +5 -17
- package/dist/lexicons/com/atiproto/recipient/payment/item/list.defs.d.ts +3 -3
- package/dist/lexicons/com/atiproto/recipient/payment/item.d.ts +0 -1
- package/dist/lexicons/com/atiproto/recipient/payment/subscription/get.defs.d.ts +5 -11
- package/dist/lexicons/com/atiproto/recipient/payment/subscription/list.defs.d.ts +13 -1
- package/dist/lexicons/com/atiproto/recipient/payment/subscription.d.ts +0 -1
- package/dist/lexicons/com/atiproto/recipient/profile/get.defs.d.ts +39 -19
- package/dist/lexicons/com/atiproto/repo/item/count.defs.d.ts +3 -9
- package/dist/lexicons/com/atiproto/repo/profile/get.defs.d.ts +6 -0
- package/dist/lexicons/com/atiproto/repo/subscription/count.defs.d.ts +5 -5
- package/dist/lexicons/com/atiproto/subscription.defs.d.ts +90 -157
- package/dist/lexicons/com/atiproto.d.ts +8 -2
- package/dist/lexicons/com/atproto/repo/strongRef.d.ts +2 -0
- package/dist/lexicons/com/atproto/repo/strongRef.defs.d.ts +56 -0
- package/dist/lexicons/com/atproto/repo.d.ts +1 -0
- package/dist/lexicons/com/atproto.d.ts +1 -0
- package/dist/lexicons/com.d.ts +1 -0
- package/dist/lexicons/index.d.ts +1 -0
- package/dist/lexicons/network/attested/entitlement.d.ts +2 -0
- package/dist/lexicons/network/attested/entitlement.defs.d.ts +185 -0
- package/dist/lexicons/network/attested/payment/initiate.d.ts +2 -0
- package/dist/lexicons/network/attested/payment/initiate.defs.d.ts +102 -0
- package/dist/lexicons/network/attested/payment/status.d.ts +2 -0
- package/dist/lexicons/network/attested/payment/status.defs.d.ts +56 -0
- package/dist/lexicons/network/attested/payment.d.ts +4 -0
- package/dist/lexicons/network/attested/payment.defs.d.ts +156 -0
- package/dist/lexicons/network/attested/proof.d.ts +2 -0
- package/dist/lexicons/network/attested/proof.defs.d.ts +172 -0
- package/dist/lexicons/network/attested/signature.d.ts +2 -0
- package/dist/lexicons/network/attested/signature.defs.d.ts +230 -0
- package/dist/lexicons/network/attested/verify.d.ts +2 -0
- package/dist/lexicons/network/attested/verify.defs.d.ts +41 -0
- package/dist/lexicons/network/attested.d.ts +5 -0
- package/dist/lexicons/network.d.ts +1 -0
- package/dist/schemas.d.ts +2 -0
- package/package.json +6 -2
- package/dist/lexicons/com/atiproto/payment/cart/clone.d.ts +0 -2
- package/dist/lexicons/com/atiproto/payment/cart/clone.defs.d.ts +0 -54
- package/dist/lexicons/com/atiproto/payment/item/validate.d.ts +0 -2
- package/dist/lexicons/com/atiproto/payment/item/validate.defs.d.ts +0 -50
- package/dist/lexicons/com/atiproto/payment/list.d.ts +0 -2
- package/dist/lexicons/com/atiproto/payment/list.defs.d.ts +0 -32
- package/dist/lexicons/com/atiproto/payment/subscription/validate.d.ts +0 -2
- package/dist/lexicons/com/atiproto/payment/subscription/validate.defs.d.ts +0 -44
- package/dist/lexicons/com/atiproto/recipient/payment/item/validate.d.ts +0 -2
- package/dist/lexicons/com/atiproto/recipient/payment/item/validate.defs.d.ts +0 -50
- package/dist/lexicons/com/atiproto/recipient/payment/subscription/validate.d.ts +0 -2
- package/dist/lexicons/com/atiproto/recipient/payment/subscription/validate.defs.d.ts +0 -44
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authCreateCart";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authCreateCart", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authCreatePayment";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authCreatePayment", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authReadCart";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authReadCart", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authReadEntitlements";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authReadEntitlements", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authReadPayments";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authReadPayments", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authReadPublic";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authReadPublic", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authReadRecipient";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authReadRecipient", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.authWriteProfile";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
declare const main: l.PermissionSet<"com.atiproto.authWriteProfile", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
|
|
5
|
+
export { main };
|
|
@@ -1,184 +1,349 @@
|
|
|
1
1
|
import { l } from '@atproto/lex';
|
|
2
|
+
import * as RepoStrongRef from '../atproto/repo/strongRef.defs.js';
|
|
3
|
+
import * as AttestedSignature from '../../network/attested/signature.defs.js';
|
|
2
4
|
declare const $nsid = "com.atiproto.cart";
|
|
3
5
|
export { $nsid };
|
|
4
|
-
/** A record representing a shopping cart for items/subscriptions */
|
|
5
6
|
type Main = {
|
|
6
7
|
$type: 'com.atiproto.cart';
|
|
7
|
-
items: CartItem[];
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* DID of the recipient. Absent (null) when marked as private.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
subject?: l.DidString;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
items: RepoStrongRef.Main[];
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* ISO 4217 currency code.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
currency: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Total amount in the smallest unit of `currency`.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
total?: number;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
status: 'open' | 'expired' | 'abandoned' | 'pending' | 'completed' | 'failed' | 'refunded' | 'cancelled' | 'fulfilled' | l.UnknownString;
|
|
28
|
+
createdAt?: l.DatetimeString;
|
|
29
|
+
expiresAt?: l.DatetimeString;
|
|
30
|
+
completedAt?: l.DatetimeString;
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
32
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
30
33
|
*/
|
|
31
|
-
|
|
34
|
+
payment?: RepoStrongRef.Main;
|
|
35
|
+
/**
|
|
36
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
37
|
+
*/
|
|
38
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
32
39
|
};
|
|
33
40
|
export type { Main };
|
|
34
|
-
/** A record representing a shopping cart for items/subscriptions */
|
|
35
41
|
declare const main: l.RecordSchema<"any", "com.atiproto.cart", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
|
|
36
42
|
export { main };
|
|
37
43
|
export declare const $isTypeOf: <TValue extends {
|
|
38
44
|
$type?: unknown;
|
|
39
45
|
}>(value: TValue) => value is l.TypedRecord<"com.atiproto.cart", TValue>, $build: {
|
|
40
46
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
41
|
-
|
|
47
|
+
subject?: l.DidString
|
|
48
|
+
/**
|
|
49
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
50
|
+
*/
|
|
51
|
+
| undefined;
|
|
52
|
+
items: RepoStrongRef.Main[];
|
|
42
53
|
currency: string;
|
|
43
|
-
total
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
total?: number
|
|
55
|
+
/**
|
|
56
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
57
|
+
*/
|
|
58
|
+
| undefined;
|
|
59
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
60
|
+
createdAt?: l.DatetimeString | undefined;
|
|
61
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
62
|
+
completedAt?: l.DatetimeString
|
|
63
|
+
/**
|
|
64
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
65
|
+
*/
|
|
66
|
+
| undefined;
|
|
67
|
+
payment?: RepoStrongRef.Main
|
|
68
|
+
/**
|
|
69
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
70
|
+
*/
|
|
71
|
+
| undefined;
|
|
72
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
48
73
|
$type: "com.atiproto.cart";
|
|
49
74
|
};
|
|
50
75
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
51
|
-
|
|
76
|
+
subject?: l.DidString
|
|
77
|
+
/**
|
|
78
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
79
|
+
*/
|
|
80
|
+
| undefined;
|
|
81
|
+
items: RepoStrongRef.Main[];
|
|
52
82
|
currency: string;
|
|
53
|
-
total
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
83
|
+
total?: number
|
|
84
|
+
/**
|
|
85
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
86
|
+
*/
|
|
87
|
+
| undefined;
|
|
88
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
89
|
+
createdAt?: l.DatetimeString | undefined;
|
|
90
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
91
|
+
completedAt?: l.DatetimeString
|
|
92
|
+
/**
|
|
93
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
94
|
+
*/
|
|
95
|
+
| undefined;
|
|
96
|
+
payment?: RepoStrongRef.Main
|
|
97
|
+
/**
|
|
98
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
99
|
+
*/
|
|
100
|
+
| undefined;
|
|
101
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
58
102
|
$type: "com.atiproto.cart";
|
|
59
103
|
};
|
|
60
104
|
}, $type: "com.atiproto.cart";
|
|
61
105
|
export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
62
|
-
|
|
106
|
+
subject?: l.DidString
|
|
107
|
+
/**
|
|
108
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
109
|
+
*/
|
|
110
|
+
| undefined;
|
|
111
|
+
items: RepoStrongRef.Main[];
|
|
63
112
|
currency: string;
|
|
64
|
-
total
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
113
|
+
total?: number
|
|
114
|
+
/**
|
|
115
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
116
|
+
*/
|
|
117
|
+
| undefined;
|
|
118
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
119
|
+
createdAt?: l.DatetimeString | undefined;
|
|
120
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
121
|
+
completedAt?: l.DatetimeString
|
|
122
|
+
/**
|
|
123
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
124
|
+
*/
|
|
125
|
+
| undefined;
|
|
126
|
+
payment?: RepoStrongRef.Main
|
|
127
|
+
/**
|
|
128
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
129
|
+
*/
|
|
130
|
+
| undefined;
|
|
131
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
69
132
|
$type: "com.atiproto.cart";
|
|
70
133
|
}, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
71
|
-
|
|
134
|
+
subject?: l.DidString
|
|
135
|
+
/**
|
|
136
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
137
|
+
*/
|
|
138
|
+
| undefined;
|
|
139
|
+
items: RepoStrongRef.Main[];
|
|
72
140
|
currency: string;
|
|
73
|
-
total
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
141
|
+
total?: number
|
|
142
|
+
/**
|
|
143
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
144
|
+
*/
|
|
145
|
+
| undefined;
|
|
146
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
147
|
+
createdAt?: l.DatetimeString | undefined;
|
|
148
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
149
|
+
completedAt?: l.DatetimeString
|
|
150
|
+
/**
|
|
151
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
152
|
+
*/
|
|
153
|
+
| undefined;
|
|
154
|
+
payment?: RepoStrongRef.Main
|
|
155
|
+
/**
|
|
156
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
157
|
+
*/
|
|
158
|
+
| undefined;
|
|
159
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
78
160
|
$type: "com.atiproto.cart";
|
|
79
161
|
}, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
80
|
-
|
|
162
|
+
subject?: l.DidString
|
|
163
|
+
/**
|
|
164
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
165
|
+
*/
|
|
166
|
+
| undefined;
|
|
167
|
+
items: RepoStrongRef.Main[];
|
|
81
168
|
currency: string;
|
|
82
|
-
total
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
169
|
+
total?: number
|
|
170
|
+
/**
|
|
171
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
172
|
+
*/
|
|
173
|
+
| undefined;
|
|
174
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
175
|
+
createdAt?: l.DatetimeString | undefined;
|
|
176
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
177
|
+
completedAt?: l.DatetimeString
|
|
178
|
+
/**
|
|
179
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
180
|
+
*/
|
|
181
|
+
| undefined;
|
|
182
|
+
payment?: RepoStrongRef.Main
|
|
183
|
+
/**
|
|
184
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
185
|
+
*/
|
|
186
|
+
| undefined;
|
|
187
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
87
188
|
$type: "com.atiproto.cart";
|
|
88
189
|
}) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
89
|
-
|
|
190
|
+
subject?: l.DidString
|
|
191
|
+
/**
|
|
192
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
193
|
+
*/
|
|
194
|
+
| undefined;
|
|
195
|
+
items: RepoStrongRef.Main[];
|
|
90
196
|
currency: string;
|
|
91
|
-
total
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
197
|
+
total?: number
|
|
198
|
+
/**
|
|
199
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
200
|
+
*/
|
|
201
|
+
| undefined;
|
|
202
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
203
|
+
createdAt?: l.DatetimeString | undefined;
|
|
204
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
205
|
+
completedAt?: l.DatetimeString
|
|
206
|
+
/**
|
|
207
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
208
|
+
*/
|
|
209
|
+
| undefined;
|
|
210
|
+
payment?: RepoStrongRef.Main
|
|
211
|
+
/**
|
|
212
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
213
|
+
*/
|
|
214
|
+
| undefined;
|
|
215
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
96
216
|
$type: "com.atiproto.cart";
|
|
97
217
|
}, $parse: (input: unknown, options?: l.ParseOptions) => {
|
|
98
|
-
|
|
218
|
+
subject?: l.DidString
|
|
219
|
+
/**
|
|
220
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
221
|
+
*/
|
|
222
|
+
| undefined;
|
|
223
|
+
items: RepoStrongRef.Main[];
|
|
99
224
|
currency: string;
|
|
100
|
-
total
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
225
|
+
total?: number
|
|
226
|
+
/**
|
|
227
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
228
|
+
*/
|
|
229
|
+
| undefined;
|
|
230
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
231
|
+
createdAt?: l.DatetimeString | undefined;
|
|
232
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
233
|
+
completedAt?: l.DatetimeString
|
|
234
|
+
/**
|
|
235
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
236
|
+
*/
|
|
237
|
+
| undefined;
|
|
238
|
+
payment?: RepoStrongRef.Main
|
|
239
|
+
/**
|
|
240
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
241
|
+
*/
|
|
242
|
+
| undefined;
|
|
243
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
105
244
|
$type: "com.atiproto.cart";
|
|
106
245
|
}, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
107
|
-
|
|
246
|
+
subject?: l.DidString
|
|
247
|
+
/**
|
|
248
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
249
|
+
*/
|
|
250
|
+
| undefined;
|
|
251
|
+
items: RepoStrongRef.Main[];
|
|
108
252
|
currency: string;
|
|
109
|
-
total
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
253
|
+
total?: number
|
|
254
|
+
/**
|
|
255
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
256
|
+
*/
|
|
257
|
+
| undefined;
|
|
258
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
259
|
+
createdAt?: l.DatetimeString | undefined;
|
|
260
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
261
|
+
completedAt?: l.DatetimeString
|
|
262
|
+
/**
|
|
263
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
264
|
+
*/
|
|
265
|
+
| undefined;
|
|
266
|
+
payment?: RepoStrongRef.Main
|
|
267
|
+
/**
|
|
268
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
269
|
+
*/
|
|
270
|
+
| undefined;
|
|
271
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
114
272
|
$type: "com.atiproto.cart";
|
|
115
273
|
}>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
completedAt?: l.DatetimeString | undefined;
|
|
123
|
-
$type: "com.atiproto.cart";
|
|
124
|
-
}, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
125
|
-
items: CartItem[];
|
|
274
|
+
subject?: l.DidString
|
|
275
|
+
/**
|
|
276
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
277
|
+
*/
|
|
278
|
+
| undefined;
|
|
279
|
+
items: RepoStrongRef.Main[];
|
|
126
280
|
currency: string;
|
|
127
|
-
total
|
|
128
|
-
status: "open" | "completed" | "expired" | "abandoned";
|
|
129
|
-
createdAt: l.DatetimeString;
|
|
130
|
-
expiresAt: l.DatetimeString;
|
|
131
|
-
completedAt?: l.DatetimeString | undefined;
|
|
132
|
-
$type: "com.atiproto.cart";
|
|
133
|
-
}>;
|
|
134
|
-
/** View of a cart record for use in API responses */
|
|
135
|
-
type View = {
|
|
136
|
-
$type?: 'com.atiproto.cart#view';
|
|
281
|
+
total?: number
|
|
137
282
|
/**
|
|
138
|
-
*
|
|
283
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
139
284
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
285
|
+
| undefined;
|
|
286
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
287
|
+
createdAt?: l.DatetimeString | undefined;
|
|
288
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
289
|
+
completedAt?: l.DatetimeString
|
|
142
290
|
/**
|
|
143
|
-
*
|
|
291
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
144
292
|
*/
|
|
145
|
-
|
|
293
|
+
| undefined;
|
|
294
|
+
payment?: RepoStrongRef.Main
|
|
146
295
|
/**
|
|
147
|
-
*
|
|
296
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
148
297
|
*/
|
|
149
|
-
|
|
298
|
+
| undefined;
|
|
299
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
300
|
+
$type: "com.atiproto.cart";
|
|
301
|
+
}, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
302
|
+
subject?: l.DidString
|
|
150
303
|
/**
|
|
151
|
-
* Cart
|
|
304
|
+
* Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
|
|
152
305
|
*/
|
|
153
|
-
|
|
306
|
+
| undefined;
|
|
307
|
+
items: RepoStrongRef.Main[];
|
|
308
|
+
currency: string;
|
|
309
|
+
total?: number
|
|
154
310
|
/**
|
|
155
|
-
*
|
|
311
|
+
* Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
|
|
156
312
|
*/
|
|
157
|
-
|
|
313
|
+
| undefined;
|
|
314
|
+
status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
|
|
315
|
+
createdAt?: l.DatetimeString | undefined;
|
|
316
|
+
expiresAt?: l.DatetimeString | undefined;
|
|
317
|
+
completedAt?: l.DatetimeString
|
|
158
318
|
/**
|
|
159
|
-
*
|
|
319
|
+
* StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
|
|
160
320
|
*/
|
|
161
|
-
|
|
321
|
+
| undefined;
|
|
322
|
+
payment?: RepoStrongRef.Main
|
|
162
323
|
/**
|
|
163
|
-
*
|
|
324
|
+
* Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
|
|
164
325
|
*/
|
|
326
|
+
| undefined;
|
|
327
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
|
|
328
|
+
$type: "com.atiproto.cart";
|
|
329
|
+
}>;
|
|
330
|
+
/** Hydrated cart view returned by PoS get endpoints. */
|
|
331
|
+
type View = {
|
|
332
|
+
$type?: 'com.atiproto.cart#view';
|
|
333
|
+
uri: l.AtUriString;
|
|
334
|
+
cid?: l.CidString;
|
|
335
|
+
subject?: l.DidString;
|
|
336
|
+
items: RepoStrongRef.Main[];
|
|
337
|
+
currency: string;
|
|
338
|
+
total?: number;
|
|
339
|
+
status: 'open' | 'expired' | 'abandoned' | 'pending' | 'completed' | 'failed' | 'refunded' | 'cancelled' | 'fulfilled' | l.UnknownString;
|
|
340
|
+
createdAt?: l.DatetimeString;
|
|
341
|
+
expiresAt?: l.DatetimeString;
|
|
165
342
|
completedAt?: l.DatetimeString;
|
|
343
|
+
payment?: RepoStrongRef.Main;
|
|
344
|
+
signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
166
345
|
};
|
|
167
346
|
export type { View };
|
|
168
|
-
/**
|
|
347
|
+
/** Hydrated cart view returned by PoS get endpoints. */
|
|
169
348
|
declare const view: l.TypedObjectSchema<"com.atiproto.cart#view", l.Validator<View, View>>;
|
|
170
349
|
export { view };
|
|
171
|
-
type CartItem = {
|
|
172
|
-
$type?: 'com.atiproto.cart#cartItem';
|
|
173
|
-
/**
|
|
174
|
-
* Type of cart item: item or subscription
|
|
175
|
-
*/
|
|
176
|
-
type: 'com.atiproto.item' | 'com.atiproto.subscription';
|
|
177
|
-
/**
|
|
178
|
-
* AT-URI for item on record
|
|
179
|
-
*/
|
|
180
|
-
recordUri: l.AtUriString;
|
|
181
|
-
};
|
|
182
|
-
export type { CartItem };
|
|
183
|
-
declare const cartItem: l.TypedObjectSchema<"com.atiproto.cart#cartItem", l.Validator<CartItem, CartItem>>;
|
|
184
|
-
export { cartItem };
|