@atiproto/lexicons 0.1.0 → 0.1.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.js +2940 -19
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2919 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lexicons/com/atiproto/profile.defs.d.ts +10 -10
- package/dist/lexicons/com/atiproto/subscription.defs.d.ts +20 -20
- package/dist/lexicons/com/atiproto/tip.defs.d.ts +40 -40
- package/package.json +6 -3
- package/dist/lexicons/com/atiproto/account/cart/clone.defs.js +0 -58
- package/dist/lexicons/com/atiproto/account/cart/clone.js +0 -44
- package/dist/lexicons/com/atiproto/account/cart/create.defs.js +0 -54
- package/dist/lexicons/com/atiproto/account/cart/create.js +0 -44
- package/dist/lexicons/com/atiproto/account/cart/get.defs.js +0 -56
- package/dist/lexicons/com/atiproto/account/cart/get.js +0 -44
- package/dist/lexicons/com/atiproto/account/cart/list.defs.js +0 -56
- package/dist/lexicons/com/atiproto/account/cart/list.js +0 -44
- package/dist/lexicons/com/atiproto/account/cart/put.defs.js +0 -53
- package/dist/lexicons/com/atiproto/account/cart/put.js +0 -44
- package/dist/lexicons/com/atiproto/account/cart.js +0 -44
- package/dist/lexicons/com/atiproto/account/profile/get.defs.js +0 -53
- package/dist/lexicons/com/atiproto/account/profile/get.js +0 -44
- package/dist/lexicons/com/atiproto/account/profile/put.defs.js +0 -57
- package/dist/lexicons/com/atiproto/account/profile/put.js +0 -44
- package/dist/lexicons/com/atiproto/account/profile.js +0 -41
- package/dist/lexicons/com/atiproto/account.js +0 -41
- package/dist/lexicons/com/atiproto/cart.defs.js +0 -27
- package/dist/lexicons/com/atiproto/cart.js +0 -44
- package/dist/lexicons/com/atiproto/feed/list.defs.js +0 -54
- package/dist/lexicons/com/atiproto/feed/list.js +0 -44
- package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.js +0 -51
- package/dist/lexicons/com/atiproto/feed/subscription/cancel.js +0 -44
- package/dist/lexicons/com/atiproto/feed/subscription/create.defs.js +0 -59
- package/dist/lexicons/com/atiproto/feed/subscription/create.js +0 -44
- package/dist/lexicons/com/atiproto/feed/subscription/get.defs.js +0 -51
- package/dist/lexicons/com/atiproto/feed/subscription/get.js +0 -44
- package/dist/lexicons/com/atiproto/feed/subscription/list.defs.js +0 -55
- package/dist/lexicons/com/atiproto/feed/subscription/list.js +0 -44
- package/dist/lexicons/com/atiproto/feed/subscription/put.defs.js +0 -53
- package/dist/lexicons/com/atiproto/feed/subscription/put.js +0 -44
- package/dist/lexicons/com/atiproto/feed/subscription.js +0 -44
- package/dist/lexicons/com/atiproto/feed/tip/create.defs.js +0 -62
- package/dist/lexicons/com/atiproto/feed/tip/create.js +0 -44
- package/dist/lexicons/com/atiproto/feed/tip/get.defs.js +0 -51
- package/dist/lexicons/com/atiproto/feed/tip/get.js +0 -44
- package/dist/lexicons/com/atiproto/feed/tip/list.defs.js +0 -50
- package/dist/lexicons/com/atiproto/feed/tip/list.js +0 -44
- package/dist/lexicons/com/atiproto/feed/tip/put.defs.js +0 -53
- package/dist/lexicons/com/atiproto/feed/tip/put.js +0 -44
- package/dist/lexicons/com/atiproto/feed/tip.js +0 -43
- package/dist/lexicons/com/atiproto/feed.js +0 -42
- package/dist/lexicons/com/atiproto/profile.defs.js +0 -20
- package/dist/lexicons/com/atiproto/profile.js +0 -44
- package/dist/lexicons/com/atiproto/repo/profile/get.defs.js +0 -50
- package/dist/lexicons/com/atiproto/repo/profile/get.js +0 -44
- package/dist/lexicons/com/atiproto/repo/profile.js +0 -40
- package/dist/lexicons/com/atiproto/repo/subscription/search.defs.js +0 -59
- package/dist/lexicons/com/atiproto/repo/subscription/search.js +0 -44
- package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.js +0 -22
- package/dist/lexicons/com/atiproto/repo/subscription/validate.js +0 -44
- package/dist/lexicons/com/atiproto/repo/subscription.js +0 -41
- package/dist/lexicons/com/atiproto/repo/tip/search.defs.js +0 -59
- package/dist/lexicons/com/atiproto/repo/tip/search.js +0 -44
- package/dist/lexicons/com/atiproto/repo/tip/validate.defs.js +0 -23
- package/dist/lexicons/com/atiproto/repo/tip/validate.js +0 -44
- package/dist/lexicons/com/atiproto/repo/tip.js +0 -41
- package/dist/lexicons/com/atiproto/repo.js +0 -42
- package/dist/lexicons/com/atiproto/subscription.defs.js +0 -24
- package/dist/lexicons/com/atiproto/subscription.js +0 -44
- package/dist/lexicons/com/atiproto/tip.defs.js +0 -29
- package/dist/lexicons/com/atiproto/tip.js +0 -44
- package/dist/lexicons/com/atiproto.js +0 -46
- package/dist/lexicons/com.js +0 -40
- package/dist/lexicons/index.js +0 -40
- package/dist/schemas/account/cart/clone.json +0 -75
- package/dist/schemas/account/cart/create.json +0 -52
- package/dist/schemas/account/cart/get.json +0 -66
- package/dist/schemas/account/cart/list.json +0 -73
- package/dist/schemas/account/cart/put.json +0 -47
- package/dist/schemas/account/profile/get.json +0 -42
- package/dist/schemas/account/profile/put.json +0 -68
- package/dist/schemas/cart.json +0 -74
- package/dist/schemas/feed/list.json +0 -49
- package/dist/schemas/feed/subscription/cancel.json +0 -48
- package/dist/schemas/feed/subscription/create.json +0 -76
- package/dist/schemas/feed/subscription/get.json +0 -45
- package/dist/schemas/feed/subscription/list.json +0 -64
- package/dist/schemas/feed/subscription/put.json +0 -47
- package/dist/schemas/feed/tip/create.json +0 -87
- package/dist/schemas/feed/tip/get.json +0 -45
- package/dist/schemas/feed/tip/list.json +0 -49
- package/dist/schemas/feed/tip/put.json +0 -47
- package/dist/schemas/profile.json +0 -39
- package/dist/schemas/repo/profile/get.json +0 -40
- package/dist/schemas/repo/subscription/search.json +0 -67
- package/dist/schemas/repo/subscription/validate.json +0 -55
- package/dist/schemas/repo/tip/search.json +0 -67
- package/dist/schemas/repo/tip/validate.json +0 -60
- package/dist/schemas/subscription.json +0 -67
- package/dist/schemas/tip.json +0 -57
- package/dist/schemas.js +0 -60
|
@@ -49,11 +49,11 @@ export declare const $isTypeOf: <TValue extends {
|
|
|
49
49
|
$type?: unknown;
|
|
50
50
|
}>(value: TValue) => value is l.TypedRecord<"com.atiproto.subscription", TValue>, $build: {
|
|
51
51
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
52
|
-
subject: l.DidString;
|
|
53
|
-
amount: number;
|
|
54
52
|
currency: string;
|
|
55
53
|
status: string;
|
|
56
54
|
createdAt: l.DatetimeString;
|
|
55
|
+
subject: l.DidString;
|
|
56
|
+
amount: number;
|
|
57
57
|
interval: string;
|
|
58
58
|
billingStartDate: l.DatetimeString;
|
|
59
59
|
cancelledAt?: l.DatetimeString
|
|
@@ -69,11 +69,11 @@ export declare const $isTypeOf: <TValue extends {
|
|
|
69
69
|
$type: "com.atiproto.subscription";
|
|
70
70
|
};
|
|
71
71
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
72
|
-
subject: l.DidString;
|
|
73
|
-
amount: number;
|
|
74
72
|
currency: string;
|
|
75
73
|
status: string;
|
|
76
74
|
createdAt: l.DatetimeString;
|
|
75
|
+
subject: l.DidString;
|
|
76
|
+
amount: number;
|
|
77
77
|
interval: string;
|
|
78
78
|
billingStartDate: l.DatetimeString;
|
|
79
79
|
cancelledAt?: l.DatetimeString
|
|
@@ -90,11 +90,11 @@ export declare const $isTypeOf: <TValue extends {
|
|
|
90
90
|
};
|
|
91
91
|
}, $type: "com.atiproto.subscription";
|
|
92
92
|
export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
93
|
-
subject: l.DidString;
|
|
94
|
-
amount: number;
|
|
95
93
|
currency: string;
|
|
96
94
|
status: string;
|
|
97
95
|
createdAt: l.DatetimeString;
|
|
96
|
+
subject: l.DidString;
|
|
97
|
+
amount: number;
|
|
98
98
|
interval: string;
|
|
99
99
|
billingStartDate: l.DatetimeString;
|
|
100
100
|
cancelledAt?: l.DatetimeString
|
|
@@ -109,11 +109,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
109
109
|
| undefined;
|
|
110
110
|
$type: "com.atiproto.subscription";
|
|
111
111
|
}, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
112
|
-
subject: l.DidString;
|
|
113
|
-
amount: number;
|
|
114
112
|
currency: string;
|
|
115
113
|
status: string;
|
|
116
114
|
createdAt: l.DatetimeString;
|
|
115
|
+
subject: l.DidString;
|
|
116
|
+
amount: number;
|
|
117
117
|
interval: string;
|
|
118
118
|
billingStartDate: l.DatetimeString;
|
|
119
119
|
cancelledAt?: l.DatetimeString
|
|
@@ -128,11 +128,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
128
128
|
| undefined;
|
|
129
129
|
$type: "com.atiproto.subscription";
|
|
130
130
|
}, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
131
|
-
subject: l.DidString;
|
|
132
|
-
amount: number;
|
|
133
131
|
currency: string;
|
|
134
132
|
status: string;
|
|
135
133
|
createdAt: l.DatetimeString;
|
|
134
|
+
subject: l.DidString;
|
|
135
|
+
amount: number;
|
|
136
136
|
interval: string;
|
|
137
137
|
billingStartDate: l.DatetimeString;
|
|
138
138
|
cancelledAt?: l.DatetimeString
|
|
@@ -147,11 +147,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
147
147
|
| undefined;
|
|
148
148
|
$type: "com.atiproto.subscription";
|
|
149
149
|
}) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
150
|
-
subject: l.DidString;
|
|
151
|
-
amount: number;
|
|
152
150
|
currency: string;
|
|
153
151
|
status: string;
|
|
154
152
|
createdAt: l.DatetimeString;
|
|
153
|
+
subject: l.DidString;
|
|
154
|
+
amount: number;
|
|
155
155
|
interval: string;
|
|
156
156
|
billingStartDate: l.DatetimeString;
|
|
157
157
|
cancelledAt?: l.DatetimeString
|
|
@@ -166,11 +166,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
166
166
|
| undefined;
|
|
167
167
|
$type: "com.atiproto.subscription";
|
|
168
168
|
}, $parse: (input: unknown, options?: l.ParseOptions) => {
|
|
169
|
-
subject: l.DidString;
|
|
170
|
-
amount: number;
|
|
171
169
|
currency: string;
|
|
172
170
|
status: string;
|
|
173
171
|
createdAt: l.DatetimeString;
|
|
172
|
+
subject: l.DidString;
|
|
173
|
+
amount: number;
|
|
174
174
|
interval: string;
|
|
175
175
|
billingStartDate: l.DatetimeString;
|
|
176
176
|
cancelledAt?: l.DatetimeString
|
|
@@ -185,11 +185,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
185
185
|
| undefined;
|
|
186
186
|
$type: "com.atiproto.subscription";
|
|
187
187
|
}, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
188
|
-
subject: l.DidString;
|
|
189
|
-
amount: number;
|
|
190
188
|
currency: string;
|
|
191
189
|
status: string;
|
|
192
190
|
createdAt: l.DatetimeString;
|
|
191
|
+
subject: l.DidString;
|
|
192
|
+
amount: number;
|
|
193
193
|
interval: string;
|
|
194
194
|
billingStartDate: l.DatetimeString;
|
|
195
195
|
cancelledAt?: l.DatetimeString
|
|
@@ -204,11 +204,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
204
204
|
| undefined;
|
|
205
205
|
$type: "com.atiproto.subscription";
|
|
206
206
|
}>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
207
|
-
subject: l.DidString;
|
|
208
|
-
amount: number;
|
|
209
207
|
currency: string;
|
|
210
208
|
status: string;
|
|
211
209
|
createdAt: l.DatetimeString;
|
|
210
|
+
subject: l.DidString;
|
|
211
|
+
amount: number;
|
|
212
212
|
interval: string;
|
|
213
213
|
billingStartDate: l.DatetimeString;
|
|
214
214
|
cancelledAt?: l.DatetimeString
|
|
@@ -223,11 +223,11 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
|
|
|
223
223
|
| undefined;
|
|
224
224
|
$type: "com.atiproto.subscription";
|
|
225
225
|
}, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
226
|
-
subject: l.DidString;
|
|
227
|
-
amount: number;
|
|
228
226
|
currency: string;
|
|
229
227
|
status: string;
|
|
230
228
|
createdAt: l.DatetimeString;
|
|
229
|
+
subject: l.DidString;
|
|
230
|
+
amount: number;
|
|
231
231
|
interval: string;
|
|
232
232
|
billingStartDate: l.DatetimeString;
|
|
233
233
|
cancelledAt?: l.DatetimeString
|
|
@@ -45,186 +45,186 @@ export declare const $isTypeOf: <TValue extends {
|
|
|
45
45
|
$type?: unknown;
|
|
46
46
|
}>(value: TValue) => value is l.TypedRecord<"com.atiproto.tip", TValue>, $build: {
|
|
47
47
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
48
|
-
subject: l.DidString;
|
|
49
48
|
recordUri?: l.AtUriString
|
|
50
49
|
/**
|
|
51
50
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
52
51
|
*/
|
|
53
52
|
| undefined;
|
|
54
|
-
amount: number;
|
|
55
53
|
currency: string;
|
|
56
54
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
55
|
+
createdAt: l.DatetimeString;
|
|
56
|
+
completedAt?: l.DatetimeString | undefined;
|
|
57
|
+
subject: l.DidString;
|
|
58
|
+
amount: number;
|
|
57
59
|
message?: string
|
|
58
60
|
/**
|
|
59
61
|
* Creation timestamp
|
|
60
62
|
*/
|
|
61
63
|
| undefined;
|
|
62
|
-
createdAt: l.DatetimeString;
|
|
63
|
-
completedAt?: l.DatetimeString | undefined;
|
|
64
64
|
$type: "com.atiproto.tip";
|
|
65
65
|
};
|
|
66
66
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
67
|
-
subject: l.DidString;
|
|
68
67
|
recordUri?: l.AtUriString
|
|
69
68
|
/**
|
|
70
69
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
71
70
|
*/
|
|
72
71
|
| undefined;
|
|
73
|
-
amount: number;
|
|
74
72
|
currency: string;
|
|
75
73
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
74
|
+
createdAt: l.DatetimeString;
|
|
75
|
+
completedAt?: l.DatetimeString | undefined;
|
|
76
|
+
subject: l.DidString;
|
|
77
|
+
amount: number;
|
|
76
78
|
message?: string
|
|
77
79
|
/**
|
|
78
80
|
* Creation timestamp
|
|
79
81
|
*/
|
|
80
82
|
| undefined;
|
|
81
|
-
createdAt: l.DatetimeString;
|
|
82
|
-
completedAt?: l.DatetimeString | undefined;
|
|
83
83
|
$type: "com.atiproto.tip";
|
|
84
84
|
};
|
|
85
85
|
}, $type: "com.atiproto.tip";
|
|
86
86
|
export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
87
|
-
subject: l.DidString;
|
|
88
87
|
recordUri?: l.AtUriString
|
|
89
88
|
/**
|
|
90
89
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
91
90
|
*/
|
|
92
91
|
| undefined;
|
|
93
|
-
amount: number;
|
|
94
92
|
currency: string;
|
|
95
93
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
94
|
+
createdAt: l.DatetimeString;
|
|
95
|
+
completedAt?: l.DatetimeString | undefined;
|
|
96
|
+
subject: l.DidString;
|
|
97
|
+
amount: number;
|
|
96
98
|
message?: string
|
|
97
99
|
/**
|
|
98
100
|
* Creation timestamp
|
|
99
101
|
*/
|
|
100
102
|
| undefined;
|
|
101
|
-
createdAt: l.DatetimeString;
|
|
102
|
-
completedAt?: l.DatetimeString | undefined;
|
|
103
103
|
$type: "com.atiproto.tip";
|
|
104
104
|
}, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
105
|
-
subject: l.DidString;
|
|
106
105
|
recordUri?: l.AtUriString
|
|
107
106
|
/**
|
|
108
107
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
109
108
|
*/
|
|
110
109
|
| undefined;
|
|
111
|
-
amount: number;
|
|
112
110
|
currency: string;
|
|
113
111
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
112
|
+
createdAt: l.DatetimeString;
|
|
113
|
+
completedAt?: l.DatetimeString | undefined;
|
|
114
|
+
subject: l.DidString;
|
|
115
|
+
amount: number;
|
|
114
116
|
message?: string
|
|
115
117
|
/**
|
|
116
118
|
* Creation timestamp
|
|
117
119
|
*/
|
|
118
120
|
| undefined;
|
|
119
|
-
createdAt: l.DatetimeString;
|
|
120
|
-
completedAt?: l.DatetimeString | undefined;
|
|
121
121
|
$type: "com.atiproto.tip";
|
|
122
122
|
}, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
123
|
-
subject: l.DidString;
|
|
124
123
|
recordUri?: l.AtUriString
|
|
125
124
|
/**
|
|
126
125
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
127
126
|
*/
|
|
128
127
|
| undefined;
|
|
129
|
-
amount: number;
|
|
130
128
|
currency: string;
|
|
131
129
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
130
|
+
createdAt: l.DatetimeString;
|
|
131
|
+
completedAt?: l.DatetimeString | undefined;
|
|
132
|
+
subject: l.DidString;
|
|
133
|
+
amount: number;
|
|
132
134
|
message?: string
|
|
133
135
|
/**
|
|
134
136
|
* Creation timestamp
|
|
135
137
|
*/
|
|
136
138
|
| undefined;
|
|
137
|
-
createdAt: l.DatetimeString;
|
|
138
|
-
completedAt?: l.DatetimeString | undefined;
|
|
139
139
|
$type: "com.atiproto.tip";
|
|
140
140
|
}) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
141
|
-
subject: l.DidString;
|
|
142
141
|
recordUri?: l.AtUriString
|
|
143
142
|
/**
|
|
144
143
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
145
144
|
*/
|
|
146
145
|
| undefined;
|
|
147
|
-
amount: number;
|
|
148
146
|
currency: string;
|
|
149
147
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
148
|
+
createdAt: l.DatetimeString;
|
|
149
|
+
completedAt?: l.DatetimeString | undefined;
|
|
150
|
+
subject: l.DidString;
|
|
151
|
+
amount: number;
|
|
150
152
|
message?: string
|
|
151
153
|
/**
|
|
152
154
|
* Creation timestamp
|
|
153
155
|
*/
|
|
154
156
|
| undefined;
|
|
155
|
-
createdAt: l.DatetimeString;
|
|
156
|
-
completedAt?: l.DatetimeString | undefined;
|
|
157
157
|
$type: "com.atiproto.tip";
|
|
158
158
|
}, $parse: (input: unknown, options?: l.ParseOptions) => {
|
|
159
|
-
subject: l.DidString;
|
|
160
159
|
recordUri?: l.AtUriString
|
|
161
160
|
/**
|
|
162
161
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
163
162
|
*/
|
|
164
163
|
| undefined;
|
|
165
|
-
amount: number;
|
|
166
164
|
currency: string;
|
|
167
165
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
166
|
+
createdAt: l.DatetimeString;
|
|
167
|
+
completedAt?: l.DatetimeString | undefined;
|
|
168
|
+
subject: l.DidString;
|
|
169
|
+
amount: number;
|
|
168
170
|
message?: string
|
|
169
171
|
/**
|
|
170
172
|
* Creation timestamp
|
|
171
173
|
*/
|
|
172
174
|
| undefined;
|
|
173
|
-
createdAt: l.DatetimeString;
|
|
174
|
-
completedAt?: l.DatetimeString | undefined;
|
|
175
175
|
$type: "com.atiproto.tip";
|
|
176
176
|
}, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
177
|
-
subject: l.DidString;
|
|
178
177
|
recordUri?: l.AtUriString
|
|
179
178
|
/**
|
|
180
179
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
181
180
|
*/
|
|
182
181
|
| undefined;
|
|
183
|
-
amount: number;
|
|
184
182
|
currency: string;
|
|
185
183
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
184
|
+
createdAt: l.DatetimeString;
|
|
185
|
+
completedAt?: l.DatetimeString | undefined;
|
|
186
|
+
subject: l.DidString;
|
|
187
|
+
amount: number;
|
|
186
188
|
message?: string
|
|
187
189
|
/**
|
|
188
190
|
* Creation timestamp
|
|
189
191
|
*/
|
|
190
192
|
| undefined;
|
|
191
|
-
createdAt: l.DatetimeString;
|
|
192
|
-
completedAt?: l.DatetimeString | undefined;
|
|
193
193
|
$type: "com.atiproto.tip";
|
|
194
194
|
}>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
195
|
-
subject: l.DidString;
|
|
196
195
|
recordUri?: l.AtUriString
|
|
197
196
|
/**
|
|
198
197
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
199
198
|
*/
|
|
200
199
|
| undefined;
|
|
201
|
-
amount: number;
|
|
202
200
|
currency: string;
|
|
203
201
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
202
|
+
createdAt: l.DatetimeString;
|
|
203
|
+
completedAt?: l.DatetimeString | undefined;
|
|
204
|
+
subject: l.DidString;
|
|
205
|
+
amount: number;
|
|
204
206
|
message?: string
|
|
205
207
|
/**
|
|
206
208
|
* Creation timestamp
|
|
207
209
|
*/
|
|
208
210
|
| undefined;
|
|
209
|
-
createdAt: l.DatetimeString;
|
|
210
|
-
completedAt?: l.DatetimeString | undefined;
|
|
211
211
|
$type: "com.atiproto.tip";
|
|
212
212
|
}, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
213
|
-
subject: l.DidString;
|
|
214
213
|
recordUri?: l.AtUriString
|
|
215
214
|
/**
|
|
216
215
|
* Tip amount in cents (0 when recipient allows zero tips)
|
|
217
216
|
*/
|
|
218
217
|
| undefined;
|
|
219
|
-
amount: number;
|
|
220
218
|
currency: string;
|
|
221
219
|
status: "pending" | "authorized" | "completed" | "failed" | "refunded";
|
|
220
|
+
createdAt: l.DatetimeString;
|
|
221
|
+
completedAt?: l.DatetimeString | undefined;
|
|
222
|
+
subject: l.DidString;
|
|
223
|
+
amount: number;
|
|
222
224
|
message?: string
|
|
223
225
|
/**
|
|
224
226
|
* Creation timestamp
|
|
225
227
|
*/
|
|
226
228
|
| undefined;
|
|
227
|
-
createdAt: l.DatetimeString;
|
|
228
|
-
completedAt?: l.DatetimeString | undefined;
|
|
229
229
|
$type: "com.atiproto.tip";
|
|
230
230
|
}>;
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atiproto/lexicons",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "ATProto lexicon types and utilities",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
10
|
"source": "./src/index.ts",
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js"
|
|
12
14
|
}
|
|
13
15
|
},
|
|
14
16
|
"files": [
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
],
|
|
17
19
|
"scripts": {
|
|
18
20
|
"build:lexicons": "lex build --lexicons ./src/schemas --out ./src/lexicons --clear --indexFile",
|
|
19
|
-
"build": "npm run build:lexicons && tsc",
|
|
21
|
+
"build": "npm run build:lexicons && tsup && tsc --emitDeclarationOnly --declaration --composite false --incremental false",
|
|
20
22
|
"prepack": "npm run build",
|
|
21
23
|
"test": "echo \"No tests yet\" && exit 0"
|
|
22
24
|
},
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
},
|
|
27
29
|
"devDependencies": {
|
|
28
30
|
"@atproto/lexicon": "^0.6.2",
|
|
31
|
+
"tsup": "^8.5.1",
|
|
29
32
|
"typescript": "^6.0.2"
|
|
30
33
|
}
|
|
31
34
|
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.$output = exports.$input = exports.$params = exports.$lxm = exports.main = exports.$nsid = void 0;
|
|
40
|
-
const lex_1 = require("@atproto/lex");
|
|
41
|
-
const AtiprotoCart = __importStar(require("../../cart.defs.js"));
|
|
42
|
-
const AtiprotoTip = __importStar(require("../../tip.defs.js"));
|
|
43
|
-
const AtiprotoSubscription = __importStar(require("../../subscription.defs.js"));
|
|
44
|
-
const $nsid = 'com.atiproto.account.cart.clone';
|
|
45
|
-
exports.$nsid = $nsid;
|
|
46
|
-
/** Clone an existing cart, creating new tip and subscription records. Useful for reopening expired carts or repeating tips. */
|
|
47
|
-
const main = lex_1.l.procedure($nsid, lex_1.l.params(), lex_1.l.jsonPayload({
|
|
48
|
-
uri: lex_1.l.string({ format: 'at-uri' }),
|
|
49
|
-
redirectUrl: lex_1.l.optional(lex_1.l.string({ format: 'uri' })),
|
|
50
|
-
}), lex_1.l.jsonPayload({
|
|
51
|
-
cart: lex_1.l.ref((() => AtiprotoCart.main)),
|
|
52
|
-
cartUri: lex_1.l.string({ format: 'at-uri' }),
|
|
53
|
-
checkoutUrl: lex_1.l.string({ format: 'uri' }),
|
|
54
|
-
tips: lex_1.l.array(lex_1.l.ref((() => AtiprotoTip.main))),
|
|
55
|
-
subscriptions: lex_1.l.array(lex_1.l.ref((() => AtiprotoSubscription.main))),
|
|
56
|
-
}));
|
|
57
|
-
exports.main = main;
|
|
58
|
-
exports.$lxm = main.nsid, exports.$params = main.parameters, exports.$input = main.input, exports.$output = main.output;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
-
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.$defs = void 0;
|
|
43
|
-
__exportStar(require("./clone.defs.js"), exports);
|
|
44
|
-
exports.$defs = __importStar(require("./clone.defs.js"));
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.$output = exports.$input = exports.$params = exports.$lxm = exports.main = exports.$nsid = void 0;
|
|
40
|
-
const lex_1 = require("@atproto/lex");
|
|
41
|
-
const AtiprotoCart = __importStar(require("../../cart.defs.js"));
|
|
42
|
-
const $nsid = 'com.atiproto.account.cart.create';
|
|
43
|
-
exports.$nsid = $nsid;
|
|
44
|
-
/** Create a new empty cart */
|
|
45
|
-
const main = lex_1.l.procedure($nsid, lex_1.l.params(), lex_1.l.jsonPayload({
|
|
46
|
-
currency: lex_1.l.string(),
|
|
47
|
-
redirectUrl: lex_1.l.optional(lex_1.l.string({ format: 'uri' })),
|
|
48
|
-
}), lex_1.l.jsonPayload({
|
|
49
|
-
cart: lex_1.l.ref((() => AtiprotoCart.main)),
|
|
50
|
-
cartUri: lex_1.l.string({ format: 'at-uri' }),
|
|
51
|
-
checkoutUrl: lex_1.l.string({ format: 'uri' }),
|
|
52
|
-
}));
|
|
53
|
-
exports.main = main;
|
|
54
|
-
exports.$lxm = main.nsid, exports.$params = main.parameters, exports.$input = main.input, exports.$output = main.output;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
-
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.$defs = void 0;
|
|
43
|
-
__exportStar(require("./create.defs.js"), exports);
|
|
44
|
-
exports.$defs = __importStar(require("./create.defs.js"));
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.$output = exports.$params = exports.$lxm = exports.main = exports.$nsid = void 0;
|
|
40
|
-
const lex_1 = require("@atproto/lex");
|
|
41
|
-
const AtiprotoCart = __importStar(require("../../cart.defs.js"));
|
|
42
|
-
const AtiprotoTip = __importStar(require("../../tip.defs.js"));
|
|
43
|
-
const AtiprotoSubscription = __importStar(require("../../subscription.defs.js"));
|
|
44
|
-
const $nsid = 'com.atiproto.account.cart.get';
|
|
45
|
-
exports.$nsid = $nsid;
|
|
46
|
-
/** Get a specific cart by URI, including resolved tip and subscription records */
|
|
47
|
-
const main = lex_1.l.query($nsid, lex_1.l.params({ uri: lex_1.l.string({ format: 'at-uri' }) }), lex_1.l.jsonPayload({
|
|
48
|
-
uri: lex_1.l.string({ format: 'at-uri' }),
|
|
49
|
-
cid: lex_1.l.optional(lex_1.l.string({ format: 'cid' })),
|
|
50
|
-
cart: lex_1.l.ref((() => AtiprotoCart.main)),
|
|
51
|
-
checkoutUrl: lex_1.l.optional(lex_1.l.string({ format: 'uri' })),
|
|
52
|
-
tips: lex_1.l.array(lex_1.l.ref((() => AtiprotoTip.main))),
|
|
53
|
-
subscriptions: lex_1.l.array(lex_1.l.ref((() => AtiprotoSubscription.main))),
|
|
54
|
-
}));
|
|
55
|
-
exports.main = main;
|
|
56
|
-
exports.$lxm = main.nsid, exports.$params = main.parameters, exports.$output = main.output;
|