@atiproto/lexicons 0.3.0 → 0.5.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/index.js +1855 -1050
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1855 -1050
- package/dist/index.mjs.map +1 -1
- package/dist/lexicons/com/atiproto/account/cart/clone.defs.d.ts +6 -6
- package/dist/lexicons/com/atiproto/account/cart/create.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/account/cart/get.defs.d.ts +6 -6
- package/dist/lexicons/com/atiproto/account/cart/list.defs.d.ts +1 -1
- package/dist/lexicons/com/atiproto/account/profile/get.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/account/profile/put.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/account/subscription/get.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/subscription/get.defs.d.ts +29 -0
- package/dist/lexicons/com/atiproto/account/subscription/list.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/subscription/list.defs.d.ts +31 -0
- package/dist/lexicons/com/atiproto/account/subscription/validate.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/subscription/validate.defs.d.ts +44 -0
- package/dist/lexicons/com/atiproto/account/subscription.d.ts +3 -0
- package/dist/lexicons/com/atiproto/account/tip/get.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/tip/get.defs.d.ts +35 -0
- package/dist/lexicons/com/atiproto/account/tip/list.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/tip/list.defs.d.ts +43 -0
- package/dist/lexicons/com/atiproto/account/tip/validate.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/tip/validate.defs.d.ts +50 -0
- package/dist/lexicons/com/atiproto/account/tip.d.ts +3 -0
- package/dist/lexicons/com/atiproto/account.d.ts +2 -0
- package/dist/lexicons/com/atiproto/cart.defs.d.ts +33 -0
- package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/feed/subscription/create.defs.d.ts +6 -4
- package/dist/lexicons/com/atiproto/feed/subscription/get.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/feed/subscription/list.defs.d.ts +1 -1
- package/dist/lexicons/com/atiproto/feed/subscription/validate.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/subscription/validate.defs.d.ts +44 -0
- package/dist/lexicons/com/atiproto/feed/subscription.d.ts +1 -0
- package/dist/lexicons/com/atiproto/feed/tip/create.defs.d.ts +6 -4
- package/dist/lexicons/com/atiproto/feed/tip/get.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/feed/tip/list.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/feed/tip/validate.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/tip/validate.defs.d.ts +50 -0
- package/dist/lexicons/com/atiproto/feed/tip.d.ts +1 -0
- package/dist/lexicons/com/atiproto/profile.defs.d.ts +28 -0
- package/dist/lexicons/com/atiproto/repo/profile/get.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/repo/subscription/count.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/subscription/count.defs.d.ts +42 -0
- package/dist/lexicons/com/atiproto/repo/subscription/search.defs.d.ts +1 -1
- package/dist/lexicons/com/atiproto/repo/subscription.d.ts +1 -2
- package/dist/lexicons/com/atiproto/repo/tip/count.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/tip/count.defs.d.ts +48 -0
- package/dist/lexicons/com/atiproto/repo/tip/search.defs.d.ts +1 -1
- package/dist/lexicons/com/atiproto/repo/tip.d.ts +1 -2
- package/dist/lexicons/com/atiproto/subscription.defs.d.ts +44 -0
- package/dist/lexicons/com/atiproto/tip.defs.d.ts +91 -11
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ declare const main: l.Query<"com.atiproto.feed.tip.get", l.ParamsSchema<{
|
|
|
14
14
|
cid: l.StringSchema<{
|
|
15
15
|
readonly format: "cid";
|
|
16
16
|
}>;
|
|
17
|
-
value: l.RefSchema<l.Validator<AtiprotoTip.
|
|
17
|
+
value: l.RefSchema<l.Validator<AtiprotoTip.View, AtiprotoTip.View>>;
|
|
18
18
|
}>>, undefined>;
|
|
19
19
|
export { main };
|
|
20
20
|
export type $Params = l.InferMethodParams<typeof main>;
|
|
@@ -31,5 +31,5 @@ export declare const $lxm: "com.atiproto.feed.tip.get", $params: l.ParamsSchema<
|
|
|
31
31
|
cid: l.StringSchema<{
|
|
32
32
|
readonly format: "cid";
|
|
33
33
|
}>;
|
|
34
|
-
value: l.RefSchema<l.Validator<AtiprotoTip.
|
|
34
|
+
value: l.RefSchema<l.Validator<AtiprotoTip.View, AtiprotoTip.View>>;
|
|
35
35
|
}>>;
|
|
@@ -4,7 +4,7 @@ declare const $nsid = "com.atiproto.feed.tip.list";
|
|
|
4
4
|
export { $nsid };
|
|
5
5
|
/** List tips for the authenticated user */
|
|
6
6
|
declare const main: l.Query<"com.atiproto.feed.tip.list", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
7
|
-
records: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoTip.
|
|
7
|
+
records: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoTip.View, AtiprotoTip.View>>>;
|
|
8
8
|
cursor: l.OptionalSchema<l.StringSchema<{
|
|
9
9
|
readonly maxLength: 512;
|
|
10
10
|
}>>;
|
|
@@ -14,7 +14,7 @@ export type $Params = l.InferMethodParams<typeof main>;
|
|
|
14
14
|
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
15
15
|
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
16
16
|
export declare const $lxm: "com.atiproto.feed.tip.list", $params: l.ParamsSchema<{}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
17
|
-
records: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoTip.
|
|
17
|
+
records: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoTip.View, AtiprotoTip.View>>>;
|
|
18
18
|
cursor: l.OptionalSchema<l.StringSchema<{
|
|
19
19
|
readonly maxLength: 512;
|
|
20
20
|
}>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.feed.tip.validate";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
/** Validate that the authenticated user (as the sender) has completed tip payment(s). Looks up by tipUri (a specific tip record), recordUri (sums all tips for that record), or subject (recipient DID). These are mutually exclusive and resolved in that order. */
|
|
5
|
+
declare const main: l.Query<"com.atiproto.feed.tip.validate", l.ParamsSchema<{
|
|
6
|
+
readonly tipUri: l.OptionalSchema<l.StringSchema<{
|
|
7
|
+
readonly format: "at-uri";
|
|
8
|
+
}>>;
|
|
9
|
+
readonly recordUri: l.OptionalSchema<l.StringSchema<{
|
|
10
|
+
readonly format: "at-uri";
|
|
11
|
+
}>>;
|
|
12
|
+
readonly subject: l.OptionalSchema<l.StringSchema<{
|
|
13
|
+
readonly format: "did";
|
|
14
|
+
}>>;
|
|
15
|
+
readonly amount: l.OptionalSchema<l.IntegerSchema>;
|
|
16
|
+
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
17
|
+
valid: l.BooleanSchema;
|
|
18
|
+
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
19
|
+
currency: l.OptionalSchema<l.StringSchema<{
|
|
20
|
+
readonly maxLength: 3;
|
|
21
|
+
}>>;
|
|
22
|
+
reason: l.OptionalSchema<l.StringSchema<{
|
|
23
|
+
readonly maxLength: 1024;
|
|
24
|
+
}>>;
|
|
25
|
+
}>>, undefined>;
|
|
26
|
+
export { main };
|
|
27
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
28
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
29
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
30
|
+
export declare const $lxm: "com.atiproto.feed.tip.validate", $params: l.ParamsSchema<{
|
|
31
|
+
readonly tipUri: l.OptionalSchema<l.StringSchema<{
|
|
32
|
+
readonly format: "at-uri";
|
|
33
|
+
}>>;
|
|
34
|
+
readonly recordUri: l.OptionalSchema<l.StringSchema<{
|
|
35
|
+
readonly format: "at-uri";
|
|
36
|
+
}>>;
|
|
37
|
+
readonly subject: l.OptionalSchema<l.StringSchema<{
|
|
38
|
+
readonly format: "did";
|
|
39
|
+
}>>;
|
|
40
|
+
readonly amount: l.OptionalSchema<l.IntegerSchema>;
|
|
41
|
+
}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
42
|
+
valid: l.BooleanSchema;
|
|
43
|
+
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
44
|
+
currency: l.OptionalSchema<l.StringSchema<{
|
|
45
|
+
readonly maxLength: 3;
|
|
46
|
+
}>>;
|
|
47
|
+
reason: l.OptionalSchema<l.StringSchema<{
|
|
48
|
+
readonly maxLength: 1024;
|
|
49
|
+
}>>;
|
|
50
|
+
}>>;
|
|
@@ -226,3 +226,31 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
226
226
|
updatedAt?: l.DatetimeString | undefined;
|
|
227
227
|
$type: "com.atiproto.profile";
|
|
228
228
|
}>;
|
|
229
|
+
/** View of a user's profile settings for use in API responses */
|
|
230
|
+
type View = {
|
|
231
|
+
$type?: 'com.atiproto.profile#view';
|
|
232
|
+
/**
|
|
233
|
+
* Whether user accepts tips (default: true)
|
|
234
|
+
*/
|
|
235
|
+
acceptsTips?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Whether user accepts subscriptions (default: true)
|
|
238
|
+
*/
|
|
239
|
+
acceptsSubscriptions?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Opt out of payment receipt DMs (default: false)
|
|
242
|
+
*/
|
|
243
|
+
disableReceiptNotifications?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Creation timestamp
|
|
246
|
+
*/
|
|
247
|
+
createdAt: l.DatetimeString;
|
|
248
|
+
/**
|
|
249
|
+
* Last update timestamp
|
|
250
|
+
*/
|
|
251
|
+
updatedAt?: l.DatetimeString;
|
|
252
|
+
};
|
|
253
|
+
export type { View };
|
|
254
|
+
/** View of a user's profile settings for use in API responses */
|
|
255
|
+
declare const view: l.TypedObjectSchema<"com.atiproto.profile#view", l.Validator<View, View>>;
|
|
256
|
+
export { view };
|
|
@@ -11,7 +11,7 @@ declare const main: l.Query<"com.atiproto.repo.profile.get", l.ParamsSchema<{
|
|
|
11
11
|
did: l.StringSchema<{
|
|
12
12
|
readonly format: "did";
|
|
13
13
|
}>;
|
|
14
|
-
profile: l.RefSchema<l.Validator<AtiprotoProfile.
|
|
14
|
+
profile: l.RefSchema<l.Validator<AtiprotoProfile.View, AtiprotoProfile.View>>;
|
|
15
15
|
}>>, undefined>;
|
|
16
16
|
export { main };
|
|
17
17
|
export type $Params = l.InferMethodParams<typeof main>;
|
|
@@ -25,5 +25,5 @@ export declare const $lxm: "com.atiproto.repo.profile.get", $params: l.ParamsSch
|
|
|
25
25
|
did: l.StringSchema<{
|
|
26
26
|
readonly format: "did";
|
|
27
27
|
}>;
|
|
28
|
-
profile: l.RefSchema<l.Validator<AtiprotoProfile.
|
|
28
|
+
profile: l.RefSchema<l.Validator<AtiprotoProfile.View, AtiprotoProfile.View>>;
|
|
29
29
|
}>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.repo.subscription.count";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
/** Count active subscriptions. If subject is provided, counts subscriptions received by that DID. If omitted, counts subscriptions the authenticated user has active (as the subscriber). Optionally filtered by a start/end datetime window (matching billingStartDate). When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts. */
|
|
5
|
+
declare const main: l.Query<"com.atiproto.repo.subscription.count", l.ParamsSchema<{
|
|
6
|
+
readonly subject: l.OptionalSchema<l.StringSchema<{
|
|
7
|
+
readonly format: "did";
|
|
8
|
+
}>>;
|
|
9
|
+
readonly startDate: l.OptionalSchema<l.StringSchema<{
|
|
10
|
+
readonly format: "datetime";
|
|
11
|
+
}>>;
|
|
12
|
+
readonly endDate: l.OptionalSchema<l.StringSchema<{
|
|
13
|
+
readonly format: "datetime";
|
|
14
|
+
}>>;
|
|
15
|
+
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
16
|
+
count: l.IntegerSchema;
|
|
17
|
+
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
18
|
+
currency: l.OptionalSchema<l.StringSchema<{
|
|
19
|
+
readonly maxLength: 3;
|
|
20
|
+
}>>;
|
|
21
|
+
}>>, undefined>;
|
|
22
|
+
export { main };
|
|
23
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
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: "com.atiproto.repo.subscription.count", $params: l.ParamsSchema<{
|
|
27
|
+
readonly subject: l.OptionalSchema<l.StringSchema<{
|
|
28
|
+
readonly format: "did";
|
|
29
|
+
}>>;
|
|
30
|
+
readonly startDate: l.OptionalSchema<l.StringSchema<{
|
|
31
|
+
readonly format: "datetime";
|
|
32
|
+
}>>;
|
|
33
|
+
readonly endDate: l.OptionalSchema<l.StringSchema<{
|
|
34
|
+
readonly format: "datetime";
|
|
35
|
+
}>>;
|
|
36
|
+
}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
37
|
+
count: l.IntegerSchema;
|
|
38
|
+
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
39
|
+
currency: l.OptionalSchema<l.StringSchema<{
|
|
40
|
+
readonly maxLength: 3;
|
|
41
|
+
}>>;
|
|
42
|
+
}>>;
|
|
@@ -41,7 +41,7 @@ type SubscriptionResponse = {
|
|
|
41
41
|
* AT-URI of the subscription record
|
|
42
42
|
*/
|
|
43
43
|
uri: l.AtUriString;
|
|
44
|
-
record: AtiprotoSubscription.
|
|
44
|
+
record: AtiprotoSubscription.View;
|
|
45
45
|
};
|
|
46
46
|
export type { SubscriptionResponse };
|
|
47
47
|
declare const subscriptionResponse: l.TypedObjectSchema<"com.atiproto.repo.subscription.search#subscriptionResponse", l.Validator<SubscriptionResponse, SubscriptionResponse>>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as validate from './subscription/validate.js';
|
|
1
|
+
export * as count from './subscription/count.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
declare const $nsid = "com.atiproto.repo.tip.count";
|
|
3
|
+
export { $nsid };
|
|
4
|
+
/** Count active (completed) tips. If recordUri is provided, counts tips for that record. If subject is provided, counts tips received by that DID. If neither is provided, counts tips sent by the authenticated user. Optionally filtered by a start/end datetime window. When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts. */
|
|
5
|
+
declare const main: l.Query<"com.atiproto.repo.tip.count", l.ParamsSchema<{
|
|
6
|
+
readonly recordUri: l.OptionalSchema<l.StringSchema<{
|
|
7
|
+
readonly format: "at-uri";
|
|
8
|
+
}>>;
|
|
9
|
+
readonly subject: l.OptionalSchema<l.StringSchema<{
|
|
10
|
+
readonly format: "did";
|
|
11
|
+
}>>;
|
|
12
|
+
readonly startDate: l.OptionalSchema<l.StringSchema<{
|
|
13
|
+
readonly format: "datetime";
|
|
14
|
+
}>>;
|
|
15
|
+
readonly endDate: l.OptionalSchema<l.StringSchema<{
|
|
16
|
+
readonly format: "datetime";
|
|
17
|
+
}>>;
|
|
18
|
+
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
19
|
+
count: l.IntegerSchema;
|
|
20
|
+
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
21
|
+
currency: l.OptionalSchema<l.StringSchema<{
|
|
22
|
+
readonly maxLength: 3;
|
|
23
|
+
}>>;
|
|
24
|
+
}>>, undefined>;
|
|
25
|
+
export { main };
|
|
26
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
27
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
28
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
29
|
+
export declare const $lxm: "com.atiproto.repo.tip.count", $params: l.ParamsSchema<{
|
|
30
|
+
readonly recordUri: l.OptionalSchema<l.StringSchema<{
|
|
31
|
+
readonly format: "at-uri";
|
|
32
|
+
}>>;
|
|
33
|
+
readonly subject: l.OptionalSchema<l.StringSchema<{
|
|
34
|
+
readonly format: "did";
|
|
35
|
+
}>>;
|
|
36
|
+
readonly startDate: l.OptionalSchema<l.StringSchema<{
|
|
37
|
+
readonly format: "datetime";
|
|
38
|
+
}>>;
|
|
39
|
+
readonly endDate: l.OptionalSchema<l.StringSchema<{
|
|
40
|
+
readonly format: "datetime";
|
|
41
|
+
}>>;
|
|
42
|
+
}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
43
|
+
count: l.IntegerSchema;
|
|
44
|
+
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
45
|
+
currency: l.OptionalSchema<l.StringSchema<{
|
|
46
|
+
readonly maxLength: 3;
|
|
47
|
+
}>>;
|
|
48
|
+
}>>;
|
|
@@ -41,7 +41,7 @@ type TipResponse = {
|
|
|
41
41
|
* AT-URI of the tip record
|
|
42
42
|
*/
|
|
43
43
|
uri: l.AtUriString;
|
|
44
|
-
record: AtiprotoTip.
|
|
44
|
+
record: AtiprotoTip.View;
|
|
45
45
|
};
|
|
46
46
|
export type { TipResponse };
|
|
47
47
|
declare const tipResponse: l.TypedObjectSchema<"com.atiproto.repo.tip.search#tipResponse", l.Validator<TipResponse, TipResponse>>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as validate from './tip/validate.js';
|
|
1
|
+
export * as count from './tip/count.js';
|
|
@@ -242,3 +242,47 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
242
242
|
| undefined;
|
|
243
243
|
$type: "com.atiproto.subscription";
|
|
244
244
|
}>;
|
|
245
|
+
/** View of a subscription record for use in API responses */
|
|
246
|
+
type View = {
|
|
247
|
+
$type?: 'com.atiproto.subscription#view';
|
|
248
|
+
/**
|
|
249
|
+
* DID of the user being subscribed to
|
|
250
|
+
*/
|
|
251
|
+
subject?: l.DidString;
|
|
252
|
+
/**
|
|
253
|
+
* Subscription amount in cents (0 for free subscriptions)
|
|
254
|
+
*/
|
|
255
|
+
amount: number;
|
|
256
|
+
/**
|
|
257
|
+
* ISO 4217 currency code
|
|
258
|
+
*/
|
|
259
|
+
currency: string;
|
|
260
|
+
/**
|
|
261
|
+
* Billing interval
|
|
262
|
+
*/
|
|
263
|
+
interval: 'monthly' | 'yearly';
|
|
264
|
+
/**
|
|
265
|
+
* Subscription status
|
|
266
|
+
*/
|
|
267
|
+
status: 'pending' | 'active' | 'past_due' | 'cancelled' | 'expired';
|
|
268
|
+
/**
|
|
269
|
+
* First billing period, can be used to determine recurrence
|
|
270
|
+
*/
|
|
271
|
+
billingStartDate: l.DatetimeString;
|
|
272
|
+
/**
|
|
273
|
+
* Cancellation timestamp
|
|
274
|
+
*/
|
|
275
|
+
cancelledAt?: l.DatetimeString;
|
|
276
|
+
/**
|
|
277
|
+
* Date until which the subscriber retains access after cancellation
|
|
278
|
+
*/
|
|
279
|
+
accessUntil?: l.DatetimeString;
|
|
280
|
+
/**
|
|
281
|
+
* Creation timestamp
|
|
282
|
+
*/
|
|
283
|
+
createdAt: l.DatetimeString;
|
|
284
|
+
};
|
|
285
|
+
export type { View };
|
|
286
|
+
/** View of a subscription record for use in API responses */
|
|
287
|
+
declare const view: l.TypedObjectSchema<"com.atiproto.subscription#view", l.Validator<View, View>>;
|
|
288
|
+
export { view };
|
|
@@ -7,7 +7,7 @@ type Main = {
|
|
|
7
7
|
/**
|
|
8
8
|
* DID of the user receiving the tip
|
|
9
9
|
*/
|
|
10
|
-
subject
|
|
10
|
+
subject?: l.DidString;
|
|
11
11
|
/**
|
|
12
12
|
* AT-URI of specific record being tipped
|
|
13
13
|
*/
|
|
@@ -54,7 +54,11 @@ export declare const $isTypeOf: <TValue extends {
|
|
|
54
54
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
55
55
|
createdAt: l.DatetimeString;
|
|
56
56
|
completedAt?: l.DatetimeString | undefined;
|
|
57
|
-
subject
|
|
57
|
+
subject?: l.DidString
|
|
58
|
+
/**
|
|
59
|
+
* AT-URI of specific record being tipped
|
|
60
|
+
*/
|
|
61
|
+
| undefined;
|
|
58
62
|
amount: number;
|
|
59
63
|
message?: string
|
|
60
64
|
/**
|
|
@@ -73,7 +77,11 @@ export declare const $isTypeOf: <TValue extends {
|
|
|
73
77
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
74
78
|
createdAt: l.DatetimeString;
|
|
75
79
|
completedAt?: l.DatetimeString | undefined;
|
|
76
|
-
subject
|
|
80
|
+
subject?: l.DidString
|
|
81
|
+
/**
|
|
82
|
+
* AT-URI of specific record being tipped
|
|
83
|
+
*/
|
|
84
|
+
| undefined;
|
|
77
85
|
amount: number;
|
|
78
86
|
message?: string
|
|
79
87
|
/**
|
|
@@ -93,7 +101,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
93
101
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
94
102
|
createdAt: l.DatetimeString;
|
|
95
103
|
completedAt?: l.DatetimeString | undefined;
|
|
96
|
-
subject
|
|
104
|
+
subject?: l.DidString
|
|
105
|
+
/**
|
|
106
|
+
* AT-URI of specific record being tipped
|
|
107
|
+
*/
|
|
108
|
+
| undefined;
|
|
97
109
|
amount: number;
|
|
98
110
|
message?: string
|
|
99
111
|
/**
|
|
@@ -111,7 +123,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
111
123
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
112
124
|
createdAt: l.DatetimeString;
|
|
113
125
|
completedAt?: l.DatetimeString | undefined;
|
|
114
|
-
subject
|
|
126
|
+
subject?: l.DidString
|
|
127
|
+
/**
|
|
128
|
+
* AT-URI of specific record being tipped
|
|
129
|
+
*/
|
|
130
|
+
| undefined;
|
|
115
131
|
amount: number;
|
|
116
132
|
message?: string
|
|
117
133
|
/**
|
|
@@ -129,7 +145,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
129
145
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
130
146
|
createdAt: l.DatetimeString;
|
|
131
147
|
completedAt?: l.DatetimeString | undefined;
|
|
132
|
-
subject
|
|
148
|
+
subject?: l.DidString
|
|
149
|
+
/**
|
|
150
|
+
* AT-URI of specific record being tipped
|
|
151
|
+
*/
|
|
152
|
+
| undefined;
|
|
133
153
|
amount: number;
|
|
134
154
|
message?: string
|
|
135
155
|
/**
|
|
@@ -147,7 +167,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
147
167
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
148
168
|
createdAt: l.DatetimeString;
|
|
149
169
|
completedAt?: l.DatetimeString | undefined;
|
|
150
|
-
subject
|
|
170
|
+
subject?: l.DidString
|
|
171
|
+
/**
|
|
172
|
+
* AT-URI of specific record being tipped
|
|
173
|
+
*/
|
|
174
|
+
| undefined;
|
|
151
175
|
amount: number;
|
|
152
176
|
message?: string
|
|
153
177
|
/**
|
|
@@ -165,7 +189,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
165
189
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
166
190
|
createdAt: l.DatetimeString;
|
|
167
191
|
completedAt?: l.DatetimeString | undefined;
|
|
168
|
-
subject
|
|
192
|
+
subject?: l.DidString
|
|
193
|
+
/**
|
|
194
|
+
* AT-URI of specific record being tipped
|
|
195
|
+
*/
|
|
196
|
+
| undefined;
|
|
169
197
|
amount: number;
|
|
170
198
|
message?: string
|
|
171
199
|
/**
|
|
@@ -183,7 +211,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
183
211
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
184
212
|
createdAt: l.DatetimeString;
|
|
185
213
|
completedAt?: l.DatetimeString | undefined;
|
|
186
|
-
subject
|
|
214
|
+
subject?: l.DidString
|
|
215
|
+
/**
|
|
216
|
+
* AT-URI of specific record being tipped
|
|
217
|
+
*/
|
|
218
|
+
| undefined;
|
|
187
219
|
amount: number;
|
|
188
220
|
message?: string
|
|
189
221
|
/**
|
|
@@ -201,7 +233,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
201
233
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
202
234
|
createdAt: l.DatetimeString;
|
|
203
235
|
completedAt?: l.DatetimeString | undefined;
|
|
204
|
-
subject
|
|
236
|
+
subject?: l.DidString
|
|
237
|
+
/**
|
|
238
|
+
* AT-URI of specific record being tipped
|
|
239
|
+
*/
|
|
240
|
+
| undefined;
|
|
205
241
|
amount: number;
|
|
206
242
|
message?: string
|
|
207
243
|
/**
|
|
@@ -219,7 +255,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
219
255
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
220
256
|
createdAt: l.DatetimeString;
|
|
221
257
|
completedAt?: l.DatetimeString | undefined;
|
|
222
|
-
subject
|
|
258
|
+
subject?: l.DidString
|
|
259
|
+
/**
|
|
260
|
+
* AT-URI of specific record being tipped
|
|
261
|
+
*/
|
|
262
|
+
| undefined;
|
|
223
263
|
amount: number;
|
|
224
264
|
message?: string
|
|
225
265
|
/**
|
|
@@ -228,3 +268,43 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
228
268
|
| undefined;
|
|
229
269
|
$type: "com.atiproto.tip";
|
|
230
270
|
}>;
|
|
271
|
+
/** View of a tip record for use in API responses */
|
|
272
|
+
type View = {
|
|
273
|
+
$type?: 'com.atiproto.tip#view';
|
|
274
|
+
/**
|
|
275
|
+
* DID of the user receiving the tip
|
|
276
|
+
*/
|
|
277
|
+
subject?: l.DidString;
|
|
278
|
+
/**
|
|
279
|
+
* AT-URI of specific record being tipped
|
|
280
|
+
*/
|
|
281
|
+
recordUri?: l.AtUriString;
|
|
282
|
+
/**
|
|
283
|
+
* Tip amount in cents (0 when recipient allows zero tips)
|
|
284
|
+
*/
|
|
285
|
+
amount: number;
|
|
286
|
+
/**
|
|
287
|
+
* ISO 4217 currency code
|
|
288
|
+
*/
|
|
289
|
+
currency: string;
|
|
290
|
+
/**
|
|
291
|
+
* Tip status
|
|
292
|
+
*/
|
|
293
|
+
status: 'pending' | 'authorized' | 'completed' | 'failed' | 'refunded';
|
|
294
|
+
/**
|
|
295
|
+
* Optional message (max 500 chars)
|
|
296
|
+
*/
|
|
297
|
+
message?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Creation timestamp
|
|
300
|
+
*/
|
|
301
|
+
createdAt: l.DatetimeString;
|
|
302
|
+
/**
|
|
303
|
+
* Completion timestamp
|
|
304
|
+
*/
|
|
305
|
+
completedAt?: l.DatetimeString;
|
|
306
|
+
};
|
|
307
|
+
export type { View };
|
|
308
|
+
/** View of a tip record for use in API responses */
|
|
309
|
+
declare const view: l.TypedObjectSchema<"com.atiproto.tip#view", l.Validator<View, View>>;
|
|
310
|
+
export { view };
|