@atiproto/lexicons 1.1.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 +3455 -2465
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3452 -2465
- 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 -42
- 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,185 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
import * as RepoStrongRef from '../../com/atproto/repo/strongRef.defs.js';
|
|
3
|
+
import * as AttestedSignature from './signature.defs.js';
|
|
4
|
+
declare const $nsid = "network.attested.entitlement";
|
|
5
|
+
export { $nsid };
|
|
6
|
+
type Main = {
|
|
7
|
+
$type: 'network.attested.entitlement';
|
|
8
|
+
/**
|
|
9
|
+
* DID of the entitled party. Absent (null) when marked as private.
|
|
10
|
+
*/
|
|
11
|
+
subject?: l.DidString;
|
|
12
|
+
/**
|
|
13
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
14
|
+
*/
|
|
15
|
+
entitlements?: RepoStrongRef.Main[];
|
|
16
|
+
/**
|
|
17
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
18
|
+
*/
|
|
19
|
+
payment: RepoStrongRef.Main;
|
|
20
|
+
createdAt: l.DatetimeString;
|
|
21
|
+
/**
|
|
22
|
+
* PoS attestation(s). 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 `payment`, `createdAt`, plus `subject` and `entitlements` when present. Mutating any of those fields invalidates every signature in this array.
|
|
23
|
+
*/
|
|
24
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
25
|
+
};
|
|
26
|
+
export type { Main };
|
|
27
|
+
declare const main: l.RecordSchema<"any", "network.attested.entitlement", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
|
|
28
|
+
export { main };
|
|
29
|
+
export declare const $isTypeOf: <TValue extends {
|
|
30
|
+
$type?: unknown;
|
|
31
|
+
}>(value: TValue) => value is l.TypedRecord<"network.attested.entitlement", TValue>, $build: {
|
|
32
|
+
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
33
|
+
subject?: l.DidString
|
|
34
|
+
/**
|
|
35
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
36
|
+
*/
|
|
37
|
+
| undefined;
|
|
38
|
+
createdAt: l.DatetimeString;
|
|
39
|
+
payment: RepoStrongRef.Main;
|
|
40
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
41
|
+
entitlements?: RepoStrongRef.Main[]
|
|
42
|
+
/**
|
|
43
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
44
|
+
*/
|
|
45
|
+
| undefined;
|
|
46
|
+
$type: "network.attested.entitlement";
|
|
47
|
+
};
|
|
48
|
+
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
49
|
+
subject?: l.DidString
|
|
50
|
+
/**
|
|
51
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
52
|
+
*/
|
|
53
|
+
| undefined;
|
|
54
|
+
createdAt: l.DatetimeString;
|
|
55
|
+
payment: RepoStrongRef.Main;
|
|
56
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
57
|
+
entitlements?: RepoStrongRef.Main[]
|
|
58
|
+
/**
|
|
59
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
60
|
+
*/
|
|
61
|
+
| undefined;
|
|
62
|
+
$type: "network.attested.entitlement";
|
|
63
|
+
};
|
|
64
|
+
}, $type: "network.attested.entitlement";
|
|
65
|
+
export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
66
|
+
subject?: l.DidString
|
|
67
|
+
/**
|
|
68
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
69
|
+
*/
|
|
70
|
+
| undefined;
|
|
71
|
+
createdAt: l.DatetimeString;
|
|
72
|
+
payment: RepoStrongRef.Main;
|
|
73
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
74
|
+
entitlements?: RepoStrongRef.Main[]
|
|
75
|
+
/**
|
|
76
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
77
|
+
*/
|
|
78
|
+
| undefined;
|
|
79
|
+
$type: "network.attested.entitlement";
|
|
80
|
+
}, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
81
|
+
subject?: l.DidString
|
|
82
|
+
/**
|
|
83
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
84
|
+
*/
|
|
85
|
+
| undefined;
|
|
86
|
+
createdAt: l.DatetimeString;
|
|
87
|
+
payment: RepoStrongRef.Main;
|
|
88
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
89
|
+
entitlements?: RepoStrongRef.Main[]
|
|
90
|
+
/**
|
|
91
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
92
|
+
*/
|
|
93
|
+
| undefined;
|
|
94
|
+
$type: "network.attested.entitlement";
|
|
95
|
+
}, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
96
|
+
subject?: l.DidString
|
|
97
|
+
/**
|
|
98
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
99
|
+
*/
|
|
100
|
+
| undefined;
|
|
101
|
+
createdAt: l.DatetimeString;
|
|
102
|
+
payment: RepoStrongRef.Main;
|
|
103
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
104
|
+
entitlements?: RepoStrongRef.Main[]
|
|
105
|
+
/**
|
|
106
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
107
|
+
*/
|
|
108
|
+
| undefined;
|
|
109
|
+
$type: "network.attested.entitlement";
|
|
110
|
+
}) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
111
|
+
subject?: l.DidString
|
|
112
|
+
/**
|
|
113
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
114
|
+
*/
|
|
115
|
+
| undefined;
|
|
116
|
+
createdAt: l.DatetimeString;
|
|
117
|
+
payment: RepoStrongRef.Main;
|
|
118
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
119
|
+
entitlements?: RepoStrongRef.Main[]
|
|
120
|
+
/**
|
|
121
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
122
|
+
*/
|
|
123
|
+
| undefined;
|
|
124
|
+
$type: "network.attested.entitlement";
|
|
125
|
+
}, $parse: (input: unknown, options?: l.ParseOptions) => {
|
|
126
|
+
subject?: l.DidString
|
|
127
|
+
/**
|
|
128
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
129
|
+
*/
|
|
130
|
+
| undefined;
|
|
131
|
+
createdAt: l.DatetimeString;
|
|
132
|
+
payment: RepoStrongRef.Main;
|
|
133
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
134
|
+
entitlements?: RepoStrongRef.Main[]
|
|
135
|
+
/**
|
|
136
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
137
|
+
*/
|
|
138
|
+
| undefined;
|
|
139
|
+
$type: "network.attested.entitlement";
|
|
140
|
+
}, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
141
|
+
subject?: l.DidString
|
|
142
|
+
/**
|
|
143
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
144
|
+
*/
|
|
145
|
+
| undefined;
|
|
146
|
+
createdAt: l.DatetimeString;
|
|
147
|
+
payment: RepoStrongRef.Main;
|
|
148
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
149
|
+
entitlements?: RepoStrongRef.Main[]
|
|
150
|
+
/**
|
|
151
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
152
|
+
*/
|
|
153
|
+
| undefined;
|
|
154
|
+
$type: "network.attested.entitlement";
|
|
155
|
+
}>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
156
|
+
subject?: l.DidString
|
|
157
|
+
/**
|
|
158
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
159
|
+
*/
|
|
160
|
+
| undefined;
|
|
161
|
+
createdAt: l.DatetimeString;
|
|
162
|
+
payment: RepoStrongRef.Main;
|
|
163
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
164
|
+
entitlements?: RepoStrongRef.Main[]
|
|
165
|
+
/**
|
|
166
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
167
|
+
*/
|
|
168
|
+
| undefined;
|
|
169
|
+
$type: "network.attested.entitlement";
|
|
170
|
+
}, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
171
|
+
subject?: l.DidString
|
|
172
|
+
/**
|
|
173
|
+
* Strong references to the records the subject is entitled to. Lexicon-agnostic: refs may point at any record type. Empty (or absent) when marked as private.
|
|
174
|
+
*/
|
|
175
|
+
| undefined;
|
|
176
|
+
createdAt: l.DatetimeString;
|
|
177
|
+
payment: RepoStrongRef.Main;
|
|
178
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
179
|
+
entitlements?: RepoStrongRef.Main[]
|
|
180
|
+
/**
|
|
181
|
+
* StrongRef to the `network.attested.payment` record that justified this entitlement. Entitlements reference payments; payments do not reference carts or entitlements back.
|
|
182
|
+
*/
|
|
183
|
+
| undefined;
|
|
184
|
+
$type: "network.attested.entitlement";
|
|
185
|
+
}>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
import * as RepoStrongRef from '../../../com/atproto/repo/strongRef.defs.js';
|
|
3
|
+
declare const $nsid = "network.attested.payment.initiate";
|
|
4
|
+
export { $nsid };
|
|
5
|
+
/** Broker-side checkout procedure. Creates a pending `network.attested.payment` record signed by the broker and returns a checkout URL plus a strongRef to the payment. Line item details are retained internally by the broker; they do not appear on the resulting record. */
|
|
6
|
+
declare const main: l.Procedure<"network.attested.payment.initiate", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
7
|
+
subject: l.StringSchema<{
|
|
8
|
+
readonly format: "did";
|
|
9
|
+
}>;
|
|
10
|
+
items: l.ArraySchema<l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<OneTime, OneTime>>, l.TypedRefSchema<l.TypedObjectValidator<Recurring, Recurring>>], false>>;
|
|
11
|
+
redirectUrl: l.OptionalSchema<l.StringSchema<{
|
|
12
|
+
readonly format: "uri";
|
|
13
|
+
}>>;
|
|
14
|
+
}>>, l.Payload<"application/json", l.ObjectSchema<{
|
|
15
|
+
payment: l.RefSchema<l.Validator<RepoStrongRef.Main, RepoStrongRef.Main>>;
|
|
16
|
+
checkoutUrl: l.StringSchema<{
|
|
17
|
+
readonly format: "uri";
|
|
18
|
+
}>;
|
|
19
|
+
}>>, undefined>;
|
|
20
|
+
export { main };
|
|
21
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
22
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
23
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
24
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
25
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
26
|
+
export declare const $lxm: "network.attested.payment.initiate", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
|
|
27
|
+
subject: l.StringSchema<{
|
|
28
|
+
readonly format: "did";
|
|
29
|
+
}>;
|
|
30
|
+
items: l.ArraySchema<l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<OneTime, OneTime>>, l.TypedRefSchema<l.TypedObjectValidator<Recurring, Recurring>>], false>>;
|
|
31
|
+
redirectUrl: l.OptionalSchema<l.StringSchema<{
|
|
32
|
+
readonly format: "uri";
|
|
33
|
+
}>>;
|
|
34
|
+
}>>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
35
|
+
payment: l.RefSchema<l.Validator<RepoStrongRef.Main, RepoStrongRef.Main>>;
|
|
36
|
+
checkoutUrl: l.StringSchema<{
|
|
37
|
+
readonly format: "uri";
|
|
38
|
+
}>;
|
|
39
|
+
}>>;
|
|
40
|
+
/** A one-time line item. */
|
|
41
|
+
type OneTime = {
|
|
42
|
+
$type?: 'network.attested.payment.initiate#oneTime';
|
|
43
|
+
description: string;
|
|
44
|
+
/**
|
|
45
|
+
* Line total in the smallest unit of `currency` (PoS-side quantity is already multiplied in).
|
|
46
|
+
*/
|
|
47
|
+
amount: number;
|
|
48
|
+
/**
|
|
49
|
+
* ISO 4217 currency code.
|
|
50
|
+
*/
|
|
51
|
+
currency: string;
|
|
52
|
+
};
|
|
53
|
+
export type { OneTime };
|
|
54
|
+
/** A one-time line item. */
|
|
55
|
+
declare const oneTime: l.TypedObjectSchema<"network.attested.payment.initiate#oneTime", l.Validator<OneTime, OneTime>>;
|
|
56
|
+
export { oneTime };
|
|
57
|
+
/** A recurring line item billed at a fixed interval. */
|
|
58
|
+
type Recurring = {
|
|
59
|
+
$type?: 'network.attested.payment.initiate#recurring';
|
|
60
|
+
description: string;
|
|
61
|
+
/**
|
|
62
|
+
* Per-period amount in the smallest unit of `currency`.
|
|
63
|
+
*/
|
|
64
|
+
amount: number;
|
|
65
|
+
/**
|
|
66
|
+
* ISO 4217 currency code.
|
|
67
|
+
*/
|
|
68
|
+
currency: string;
|
|
69
|
+
/**
|
|
70
|
+
* Billing cadence. Discriminated by `$type`: `#namedInterval` for the common cases (weekly / monthly / yearly), `#customInterval` for a custom number of days.
|
|
71
|
+
*/
|
|
72
|
+
interval: l.$Typed<NamedInterval> | l.$Typed<CustomInterval> | l.Unknown$TypedObject;
|
|
73
|
+
/**
|
|
74
|
+
* First billing period.
|
|
75
|
+
*/
|
|
76
|
+
billingStartDate?: l.DatetimeString;
|
|
77
|
+
};
|
|
78
|
+
export type { Recurring };
|
|
79
|
+
/** A recurring line item billed at a fixed interval. */
|
|
80
|
+
declare const recurring: l.TypedObjectSchema<"network.attested.payment.initiate#recurring", l.Validator<Recurring, Recurring>>;
|
|
81
|
+
export { recurring };
|
|
82
|
+
/** One of the well-known billing cadences. */
|
|
83
|
+
type NamedInterval = {
|
|
84
|
+
$type?: 'network.attested.payment.initiate#namedInterval';
|
|
85
|
+
value: 'weekly' | 'monthly' | 'yearly';
|
|
86
|
+
};
|
|
87
|
+
export type { NamedInterval };
|
|
88
|
+
/** One of the well-known billing cadences. */
|
|
89
|
+
declare const namedInterval: l.TypedObjectSchema<"network.attested.payment.initiate#namedInterval", l.Validator<NamedInterval, NamedInterval>>;
|
|
90
|
+
export { namedInterval };
|
|
91
|
+
/** An arbitrary number-of-days interval. Lets callers set non-standard cadences (every 14 days, every 90 days, etc.). */
|
|
92
|
+
type CustomInterval = {
|
|
93
|
+
$type?: 'network.attested.payment.initiate#customInterval';
|
|
94
|
+
/**
|
|
95
|
+
* Length of one billing period in days.
|
|
96
|
+
*/
|
|
97
|
+
days: number;
|
|
98
|
+
};
|
|
99
|
+
export type { CustomInterval };
|
|
100
|
+
/** An arbitrary number-of-days interval. Lets callers set non-standard cadences (every 14 days, every 90 days, etc.). */
|
|
101
|
+
declare const customInterval: l.TypedObjectSchema<"network.attested.payment.initiate#customInterval", l.Validator<CustomInterval, CustomInterval>>;
|
|
102
|
+
export { customInterval };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
import * as PaymentInitiate from './initiate.defs.js';
|
|
3
|
+
import * as AttestedSignature from '../signature.defs.js';
|
|
4
|
+
import * as RepoStrongRef from '../../../com/atproto/repo/strongRef.defs.js';
|
|
5
|
+
declare const $nsid = "network.attested.payment.status";
|
|
6
|
+
export { $nsid };
|
|
7
|
+
/** Look up a `network.attested.payment` record by uri. Returns a `#view`: status, broker, timestamps, and signatures are always present; private fields (`subject`, `items`, `total`, `currency`) are auto-filled by the broker only when the caller is one of the signing parties. */
|
|
8
|
+
declare const main: l.Query<"network.attested.payment.status", l.ParamsSchema<{
|
|
9
|
+
readonly uri: l.StringSchema<{
|
|
10
|
+
readonly format: "at-uri";
|
|
11
|
+
}>;
|
|
12
|
+
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
13
|
+
payment: l.RefSchema<l.Validator<View, View>>;
|
|
14
|
+
}>>, undefined>;
|
|
15
|
+
export { main };
|
|
16
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
17
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
18
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
19
|
+
export declare const $lxm: "network.attested.payment.status", $params: l.ParamsSchema<{
|
|
20
|
+
readonly uri: l.StringSchema<{
|
|
21
|
+
readonly format: "at-uri";
|
|
22
|
+
}>;
|
|
23
|
+
}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
24
|
+
payment: l.RefSchema<l.Validator<View, View>>;
|
|
25
|
+
}>>;
|
|
26
|
+
/** Hydrated view of a `network.attested.payment` record. Shape mirrors the `network.attested.payment.initiate` input plus `total`, the record's uri/cid, and signatures. Private fields (`subject`, `items`, `total`, `currency`) are auto-filled by the broker only when the caller is one of the signing parties; for other callers, the view degrades to the record's public surface. */
|
|
27
|
+
type View = {
|
|
28
|
+
$type?: 'network.attested.payment.status#view';
|
|
29
|
+
uri: l.AtUriString;
|
|
30
|
+
cid?: l.CidString;
|
|
31
|
+
/**
|
|
32
|
+
* DID of the payment recipient. Auto-filled when the caller is authorized; absent otherwise.
|
|
33
|
+
*/
|
|
34
|
+
subject?: l.DidString;
|
|
35
|
+
/**
|
|
36
|
+
* Line items as supplied to `initiate`. Auto-filled when the caller is authorized; absent otherwise.
|
|
37
|
+
*/
|
|
38
|
+
items?: (l.$Typed<PaymentInitiate.OneTime> | l.$Typed<PaymentInitiate.Recurring> | l.Unknown$TypedObject)[];
|
|
39
|
+
/**
|
|
40
|
+
* Sum of line item amounts in the smallest currency unit. Auto-filled when the caller is authorized; absent otherwise.
|
|
41
|
+
*/
|
|
42
|
+
total?: number;
|
|
43
|
+
/**
|
|
44
|
+
* ISO 4217 currency code of `total`. Auto-filled when the caller is authorized; absent otherwise.
|
|
45
|
+
*/
|
|
46
|
+
currency?: string;
|
|
47
|
+
status: 'pending' | 'completed' | 'failed' | 'refunded' | 'cancelled' | l.UnknownString;
|
|
48
|
+
broker: l.DidString;
|
|
49
|
+
createdAt: l.DatetimeString;
|
|
50
|
+
completedAt?: l.DatetimeString;
|
|
51
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
52
|
+
};
|
|
53
|
+
export type { View };
|
|
54
|
+
/** Hydrated view of a `network.attested.payment` record. Shape mirrors the `network.attested.payment.initiate` input plus `total`, the record's uri/cid, and signatures. Private fields (`subject`, `items`, `total`, `currency`) are auto-filled by the broker only when the caller is one of the signing parties; for other callers, the view degrades to the record's public surface. */
|
|
55
|
+
declare const view: l.TypedObjectSchema<"network.attested.payment.status#view", l.Validator<View, View>>;
|
|
56
|
+
export { view };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
import * as AttestedSignature from './signature.defs.js';
|
|
3
|
+
import * as RepoStrongRef from '../../com/atproto/repo/strongRef.defs.js';
|
|
4
|
+
declare const $nsid = "network.attested.payment";
|
|
5
|
+
export { $nsid };
|
|
6
|
+
type Main = {
|
|
7
|
+
$type: 'network.attested.payment';
|
|
8
|
+
/**
|
|
9
|
+
* Optional DID of the payment recipient. Absent by default; Broker expected to retain the recipient information internally. Setting this on the record makes the recipient publicly visible.
|
|
10
|
+
*/
|
|
11
|
+
subject?: l.DidString;
|
|
12
|
+
status: 'pending' | 'completed' | 'failed' | 'refunded' | 'cancelled' | l.UnknownString;
|
|
13
|
+
/**
|
|
14
|
+
* DID of the broker that issued and is settling this payment.
|
|
15
|
+
*/
|
|
16
|
+
broker: l.DidString;
|
|
17
|
+
createdAt: l.DatetimeString;
|
|
18
|
+
/**
|
|
19
|
+
* Set when `status === completed`.
|
|
20
|
+
*/
|
|
21
|
+
completedAt?: l.DatetimeString;
|
|
22
|
+
/**
|
|
23
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
24
|
+
*/
|
|
25
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
26
|
+
};
|
|
27
|
+
export type { Main };
|
|
28
|
+
declare const main: l.RecordSchema<"any", "network.attested.payment", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
|
|
29
|
+
export { main };
|
|
30
|
+
export declare const $isTypeOf: <TValue extends {
|
|
31
|
+
$type?: unknown;
|
|
32
|
+
}>(value: TValue) => value is l.TypedRecord<"network.attested.payment", TValue>, $build: {
|
|
33
|
+
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
34
|
+
broker: l.DidString;
|
|
35
|
+
subject?: l.DidString | undefined;
|
|
36
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
37
|
+
createdAt: l.DatetimeString;
|
|
38
|
+
completedAt?: l.DatetimeString
|
|
39
|
+
/**
|
|
40
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
41
|
+
*/
|
|
42
|
+
| undefined;
|
|
43
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
44
|
+
$type: "network.attested.payment";
|
|
45
|
+
};
|
|
46
|
+
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
47
|
+
broker: l.DidString;
|
|
48
|
+
subject?: l.DidString | undefined;
|
|
49
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
50
|
+
createdAt: l.DatetimeString;
|
|
51
|
+
completedAt?: l.DatetimeString
|
|
52
|
+
/**
|
|
53
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
54
|
+
*/
|
|
55
|
+
| undefined;
|
|
56
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
57
|
+
$type: "network.attested.payment";
|
|
58
|
+
};
|
|
59
|
+
}, $type: "network.attested.payment";
|
|
60
|
+
export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
61
|
+
broker: l.DidString;
|
|
62
|
+
subject?: l.DidString | undefined;
|
|
63
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
64
|
+
createdAt: l.DatetimeString;
|
|
65
|
+
completedAt?: l.DatetimeString
|
|
66
|
+
/**
|
|
67
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
68
|
+
*/
|
|
69
|
+
| undefined;
|
|
70
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
71
|
+
$type: "network.attested.payment";
|
|
72
|
+
}, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
73
|
+
broker: l.DidString;
|
|
74
|
+
subject?: l.DidString | undefined;
|
|
75
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
76
|
+
createdAt: l.DatetimeString;
|
|
77
|
+
completedAt?: l.DatetimeString
|
|
78
|
+
/**
|
|
79
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
80
|
+
*/
|
|
81
|
+
| undefined;
|
|
82
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
83
|
+
$type: "network.attested.payment";
|
|
84
|
+
}, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
85
|
+
broker: l.DidString;
|
|
86
|
+
subject?: l.DidString | undefined;
|
|
87
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
88
|
+
createdAt: l.DatetimeString;
|
|
89
|
+
completedAt?: l.DatetimeString
|
|
90
|
+
/**
|
|
91
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
92
|
+
*/
|
|
93
|
+
| undefined;
|
|
94
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
95
|
+
$type: "network.attested.payment";
|
|
96
|
+
}) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
97
|
+
broker: l.DidString;
|
|
98
|
+
subject?: l.DidString | undefined;
|
|
99
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
100
|
+
createdAt: l.DatetimeString;
|
|
101
|
+
completedAt?: l.DatetimeString
|
|
102
|
+
/**
|
|
103
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
104
|
+
*/
|
|
105
|
+
| undefined;
|
|
106
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
107
|
+
$type: "network.attested.payment";
|
|
108
|
+
}, $parse: (input: unknown, options?: l.ParseOptions) => {
|
|
109
|
+
broker: l.DidString;
|
|
110
|
+
subject?: l.DidString | undefined;
|
|
111
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
112
|
+
createdAt: l.DatetimeString;
|
|
113
|
+
completedAt?: l.DatetimeString
|
|
114
|
+
/**
|
|
115
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
116
|
+
*/
|
|
117
|
+
| undefined;
|
|
118
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
119
|
+
$type: "network.attested.payment";
|
|
120
|
+
}, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
121
|
+
broker: l.DidString;
|
|
122
|
+
subject?: l.DidString | undefined;
|
|
123
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
124
|
+
createdAt: l.DatetimeString;
|
|
125
|
+
completedAt?: l.DatetimeString
|
|
126
|
+
/**
|
|
127
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
128
|
+
*/
|
|
129
|
+
| undefined;
|
|
130
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
131
|
+
$type: "network.attested.payment";
|
|
132
|
+
}>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
133
|
+
broker: l.DidString;
|
|
134
|
+
subject?: l.DidString | undefined;
|
|
135
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
136
|
+
createdAt: l.DatetimeString;
|
|
137
|
+
completedAt?: l.DatetimeString
|
|
138
|
+
/**
|
|
139
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
140
|
+
*/
|
|
141
|
+
| undefined;
|
|
142
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
143
|
+
$type: "network.attested.payment";
|
|
144
|
+
}, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
145
|
+
broker: l.DidString;
|
|
146
|
+
subject?: l.DidString | undefined;
|
|
147
|
+
status: "pending" | "completed" | "failed" | "refunded" | "cancelled" | l.UnknownString;
|
|
148
|
+
createdAt: l.DatetimeString;
|
|
149
|
+
completedAt?: l.DatetimeString
|
|
150
|
+
/**
|
|
151
|
+
* Broker attestation(s). 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 `status`, `broker`, `createdAt`, plus `subject` and `completedAt` when present. Mutating any of those fields invalidates every signature in this array.
|
|
152
|
+
*/
|
|
153
|
+
| undefined;
|
|
154
|
+
signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
|
|
155
|
+
$type: "network.attested.payment";
|
|
156
|
+
}>;
|