@atproto/lex-client 0.1.0 → 0.1.2
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/CHANGELOG.md +19 -0
- package/dist/client.d.ts +79 -25
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +56 -24
- package/dist/client.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/applyWrites.d.ts +3 -0
- package/dist/lexicons/com/atproto/repo/applyWrites.d.ts.map +1 -0
- package/dist/lexicons/com/atproto/repo/applyWrites.defs.d.ts +100 -0
- package/dist/lexicons/com/atproto/repo/applyWrites.defs.d.ts.map +1 -0
- package/dist/lexicons/com/atproto/repo/applyWrites.defs.js +81 -0
- package/dist/lexicons/com/atproto/repo/applyWrites.defs.js.map +1 -0
- package/dist/lexicons/com/atproto/repo/applyWrites.js +6 -0
- package/dist/lexicons/com/atproto/repo/applyWrites.js.map +1 -0
- package/dist/lexicons/com/atproto/repo/createRecord.d.ts +1 -1
- package/dist/lexicons/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/createRecord.defs.d.ts +16 -13
- package/dist/lexicons/com/atproto/repo/createRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/createRecord.defs.js +10 -10
- package/dist/lexicons/com/atproto/repo/createRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/createRecord.js +1 -1
- package/dist/lexicons/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/defs.d.ts +0 -1
- package/dist/lexicons/com/atproto/repo/defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/defs.js +0 -1
- package/dist/lexicons/com/atproto/repo/defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.d.ts +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.defs.d.ts +16 -13
- package/dist/lexicons/com/atproto/repo/deleteRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.defs.js +10 -10
- package/dist/lexicons/com/atproto/repo/deleteRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.js +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.d.ts +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.defs.d.ts +13 -11
- package/dist/lexicons/com/atproto/repo/getRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.defs.js +7 -9
- package/dist/lexicons/com/atproto/repo/getRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.js +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.d.ts +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.defs.d.ts +13 -11
- package/dist/lexicons/com/atproto/repo/listRecords.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.defs.js +7 -9
- package/dist/lexicons/com/atproto/repo/listRecords.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.js +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.d.ts +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.defs.d.ts +16 -13
- package/dist/lexicons/com/atproto/repo/putRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.defs.js +10 -10
- package/dist/lexicons/com/atproto/repo/putRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.js +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.d.ts +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.defs.d.ts +11 -8
- package/dist/lexicons/com/atproto/repo/uploadBlob.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.defs.js +7 -7
- package/dist/lexicons/com/atproto/repo/uploadBlob.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.js +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.js.map +1 -1
- package/dist/lexicons/com/atproto/repo.d.ts +2 -1
- package/dist/lexicons/com/atproto/repo.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo.js +2 -1
- package/dist/lexicons/com/atproto/repo.js.map +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.d.ts +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.defs.d.ts +11 -9
- package/dist/lexicons/com/atproto/sync/getBlob.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.defs.js +6 -8
- package/dist/lexicons/com/atproto/sync/getBlob.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.js +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.js.map +1 -1
- package/dist/types.d.ts +2 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/util.d.ts +9 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +23 -0
- package/dist/util.js.map +1 -1
- package/dist/write-operation-builder.d.ts +19 -0
- package/dist/write-operation-builder.d.ts.map +1 -0
- package/dist/write-operation-builder.js +35 -0
- package/dist/write-operation-builder.js.map +1 -0
- package/dist/xrpc.d.ts.map +1 -1
- package/dist/xrpc.js +5 -2
- package/dist/xrpc.js.map +1 -1
- package/package.json +4 -4
- package/src/client.ts +122 -82
- package/src/lexicons/com/atproto/repo/applyWrites.defs.ts +201 -0
- package/src/lexicons/com/atproto/repo/applyWrites.ts +6 -0
- package/src/lexicons/com/atproto/repo/createRecord.defs.ts +43 -46
- package/src/lexicons/com/atproto/repo/createRecord.ts +1 -1
- package/src/lexicons/com/atproto/repo/defs.ts +0 -1
- package/src/lexicons/com/atproto/repo/deleteRecord.defs.ts +37 -40
- package/src/lexicons/com/atproto/repo/deleteRecord.ts +1 -1
- package/src/lexicons/com/atproto/repo/getRecord.defs.ts +23 -26
- package/src/lexicons/com/atproto/repo/getRecord.ts +1 -1
- package/src/lexicons/com/atproto/repo/listRecords.defs.ts +30 -32
- package/src/lexicons/com/atproto/repo/listRecords.ts +1 -1
- package/src/lexicons/com/atproto/repo/putRecord.defs.ts +44 -47
- package/src/lexicons/com/atproto/repo/putRecord.ts +1 -1
- package/src/lexicons/com/atproto/repo/uploadBlob.defs.ts +21 -23
- package/src/lexicons/com/atproto/repo/uploadBlob.ts +1 -1
- package/src/lexicons/com/atproto/repo.ts +2 -1
- package/src/lexicons/com/atproto/sync/getBlob.defs.ts +23 -26
- package/src/lexicons/com/atproto/sync/getBlob.ts +1 -1
- package/src/types.ts +6 -10
- package/src/util.ts +48 -1
- package/src/write-operation-builder.ts +110 -0
- package/src/xrpc.ts +5 -5
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { l } from '@atproto/lex-schema'
|
|
6
|
+
import * as RepoDefs from './defs.defs.js'
|
|
7
|
+
|
|
8
|
+
const $nsid = 'com.atproto.repo.applyWrites'
|
|
9
|
+
|
|
10
|
+
export { $nsid }
|
|
11
|
+
|
|
12
|
+
export const $params = /*#__PURE__*/ l.params()
|
|
13
|
+
|
|
14
|
+
export type $Params = l.InferOutput<typeof $params>
|
|
15
|
+
|
|
16
|
+
export const $input = /*#__PURE__*/ l.jsonPayload({
|
|
17
|
+
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
18
|
+
validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
19
|
+
writes: /*#__PURE__*/ l.array(
|
|
20
|
+
/*#__PURE__*/ l.typedUnion(
|
|
21
|
+
[
|
|
22
|
+
/*#__PURE__*/ l.typedRef<Create>((() => create) as any),
|
|
23
|
+
/*#__PURE__*/ l.typedRef<Update>((() => update) as any),
|
|
24
|
+
/*#__PURE__*/ l.typedRef<Delete$0>((() => delete$0) as any),
|
|
25
|
+
],
|
|
26
|
+
true,
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
swapCommit: /*#__PURE__*/ l.optional(
|
|
30
|
+
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
31
|
+
),
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>
|
|
35
|
+
export type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>
|
|
36
|
+
|
|
37
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
38
|
+
commit: /*#__PURE__*/ l.optional(
|
|
39
|
+
/*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
|
|
40
|
+
(() => RepoDefs.commitMeta) as any,
|
|
41
|
+
),
|
|
42
|
+
),
|
|
43
|
+
results: /*#__PURE__*/ l.optional(
|
|
44
|
+
/*#__PURE__*/ l.array(
|
|
45
|
+
/*#__PURE__*/ l.typedUnion(
|
|
46
|
+
[
|
|
47
|
+
/*#__PURE__*/ l.typedRef<CreateResult>((() => createResult) as any),
|
|
48
|
+
/*#__PURE__*/ l.typedRef<UpdateResult>((() => updateResult) as any),
|
|
49
|
+
/*#__PURE__*/ l.typedRef<DeleteResult>((() => deleteResult) as any),
|
|
50
|
+
],
|
|
51
|
+
true,
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
),
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
|
|
58
|
+
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
|
|
59
|
+
typeof $output,
|
|
60
|
+
B
|
|
61
|
+
>
|
|
62
|
+
|
|
63
|
+
/** Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. */
|
|
64
|
+
const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [
|
|
65
|
+
'InvalidSwap',
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
export { main }
|
|
69
|
+
|
|
70
|
+
export const $lxm = $nsid
|
|
71
|
+
|
|
72
|
+
/** Operation which creates a new record. */
|
|
73
|
+
type Create = {
|
|
74
|
+
$type?: 'com.atproto.repo.applyWrites#create'
|
|
75
|
+
collection: l.NsidString
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.
|
|
79
|
+
*/
|
|
80
|
+
rkey?: l.RecordKeyString
|
|
81
|
+
value: l.LexMap
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type { Create }
|
|
85
|
+
|
|
86
|
+
/** Operation which creates a new record. */
|
|
87
|
+
const create = /*#__PURE__*/ l.typedObject<Create>(
|
|
88
|
+
$nsid,
|
|
89
|
+
'create',
|
|
90
|
+
/*#__PURE__*/ l.object({
|
|
91
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
92
|
+
rkey: /*#__PURE__*/ l.optional(
|
|
93
|
+
/*#__PURE__*/ l.string({ maxLength: 512, format: 'record-key' }),
|
|
94
|
+
),
|
|
95
|
+
value: /*#__PURE__*/ l.lexMap(),
|
|
96
|
+
}),
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
export { create }
|
|
100
|
+
|
|
101
|
+
/** Operation which updates an existing record. */
|
|
102
|
+
type Update = {
|
|
103
|
+
$type?: 'com.atproto.repo.applyWrites#update'
|
|
104
|
+
collection: l.NsidString
|
|
105
|
+
rkey: l.RecordKeyString
|
|
106
|
+
value: l.LexMap
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type { Update }
|
|
110
|
+
|
|
111
|
+
/** Operation which updates an existing record. */
|
|
112
|
+
const update = /*#__PURE__*/ l.typedObject<Update>(
|
|
113
|
+
$nsid,
|
|
114
|
+
'update',
|
|
115
|
+
/*#__PURE__*/ l.object({
|
|
116
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
117
|
+
rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),
|
|
118
|
+
value: /*#__PURE__*/ l.lexMap(),
|
|
119
|
+
}),
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
export { update }
|
|
123
|
+
|
|
124
|
+
/** Operation which deletes an existing record. */
|
|
125
|
+
type Delete$0 = {
|
|
126
|
+
$type?: 'com.atproto.repo.applyWrites#delete'
|
|
127
|
+
collection: l.NsidString
|
|
128
|
+
rkey: l.RecordKeyString
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type { Delete$0 as Delete }
|
|
132
|
+
|
|
133
|
+
/** Operation which deletes an existing record. */
|
|
134
|
+
const delete$0 = /*#__PURE__*/ l.typedObject<Delete$0>(
|
|
135
|
+
$nsid,
|
|
136
|
+
'delete',
|
|
137
|
+
/*#__PURE__*/ l.object({
|
|
138
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
139
|
+
rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),
|
|
140
|
+
}),
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
export { delete$0 as 'delete' }
|
|
144
|
+
|
|
145
|
+
type CreateResult = {
|
|
146
|
+
$type?: 'com.atproto.repo.applyWrites#createResult'
|
|
147
|
+
uri: l.AtUriString
|
|
148
|
+
cid: l.CidString
|
|
149
|
+
validationStatus?: 'valid' | 'unknown' | l.UnknownString
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export type { CreateResult }
|
|
153
|
+
|
|
154
|
+
const createResult = /*#__PURE__*/ l.typedObject<CreateResult>(
|
|
155
|
+
$nsid,
|
|
156
|
+
'createResult',
|
|
157
|
+
/*#__PURE__*/ l.object({
|
|
158
|
+
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
159
|
+
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
160
|
+
validationStatus: /*#__PURE__*/ l.optional(
|
|
161
|
+
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
162
|
+
),
|
|
163
|
+
}),
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
export { createResult }
|
|
167
|
+
|
|
168
|
+
type UpdateResult = {
|
|
169
|
+
$type?: 'com.atproto.repo.applyWrites#updateResult'
|
|
170
|
+
uri: l.AtUriString
|
|
171
|
+
cid: l.CidString
|
|
172
|
+
validationStatus?: 'valid' | 'unknown' | l.UnknownString
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type { UpdateResult }
|
|
176
|
+
|
|
177
|
+
const updateResult = /*#__PURE__*/ l.typedObject<UpdateResult>(
|
|
178
|
+
$nsid,
|
|
179
|
+
'updateResult',
|
|
180
|
+
/*#__PURE__*/ l.object({
|
|
181
|
+
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
182
|
+
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
183
|
+
validationStatus: /*#__PURE__*/ l.optional(
|
|
184
|
+
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
185
|
+
),
|
|
186
|
+
}),
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
export { updateResult }
|
|
190
|
+
|
|
191
|
+
type DeleteResult = { $type?: 'com.atproto.repo.applyWrites#deleteResult' }
|
|
192
|
+
|
|
193
|
+
export type { DeleteResult }
|
|
194
|
+
|
|
195
|
+
const deleteResult = /*#__PURE__*/ l.typedObject<DeleteResult>(
|
|
196
|
+
$nsid,
|
|
197
|
+
'deleteResult',
|
|
198
|
+
/*#__PURE__*/ l.object({}),
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
export { deleteResult }
|
|
@@ -9,53 +9,50 @@ const $nsid = 'com.atproto.repo.createRecord'
|
|
|
9
9
|
|
|
10
10
|
export { $nsid }
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
const main =
|
|
14
|
-
/*#__PURE__*/
|
|
15
|
-
l.procedure(
|
|
16
|
-
$nsid,
|
|
17
|
-
/*#__PURE__*/ l.params(),
|
|
18
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
19
|
-
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
20
|
-
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
21
|
-
rkey: /*#__PURE__*/ l.optional(
|
|
22
|
-
/*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
|
|
23
|
-
),
|
|
24
|
-
validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
25
|
-
record: /*#__PURE__*/ l.lexMap(),
|
|
26
|
-
swapCommit: /*#__PURE__*/ l.optional(
|
|
27
|
-
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
28
|
-
),
|
|
29
|
-
}),
|
|
30
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
31
|
-
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
32
|
-
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
33
|
-
commit: /*#__PURE__*/ l.optional(
|
|
34
|
-
/*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
|
|
35
|
-
(() => RepoDefs.commitMeta) as any,
|
|
36
|
-
),
|
|
37
|
-
),
|
|
38
|
-
validationStatus: /*#__PURE__*/ l.optional(
|
|
39
|
-
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
40
|
-
),
|
|
41
|
-
}),
|
|
42
|
-
['InvalidSwap'],
|
|
43
|
-
)
|
|
44
|
-
export { main }
|
|
12
|
+
export const $params = /*#__PURE__*/ l.params()
|
|
45
13
|
|
|
46
|
-
export type $Params = l.
|
|
47
|
-
|
|
48
|
-
export
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
14
|
+
export type $Params = l.InferOutput<typeof $params>
|
|
15
|
+
|
|
16
|
+
export const $input = /*#__PURE__*/ l.jsonPayload({
|
|
17
|
+
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
18
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
19
|
+
rkey: /*#__PURE__*/ l.optional(
|
|
20
|
+
/*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
|
|
21
|
+
),
|
|
22
|
+
validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
23
|
+
record: /*#__PURE__*/ l.lexMap(),
|
|
24
|
+
swapCommit: /*#__PURE__*/ l.optional(
|
|
25
|
+
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
26
|
+
),
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
export type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>
|
|
30
|
+
export type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>
|
|
31
|
+
|
|
32
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
33
|
+
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
34
|
+
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
35
|
+
commit: /*#__PURE__*/ l.optional(
|
|
36
|
+
/*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
|
|
37
|
+
(() => RepoDefs.commitMeta) as any,
|
|
38
|
+
),
|
|
39
|
+
),
|
|
40
|
+
validationStatus: /*#__PURE__*/ l.optional(
|
|
41
|
+
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
42
|
+
),
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
|
|
46
|
+
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
|
|
47
|
+
typeof $output,
|
|
55
48
|
B
|
|
56
49
|
>
|
|
57
50
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
/** Create a single new repository record. Requires auth, implemented by PDS. */
|
|
52
|
+
const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [
|
|
53
|
+
'InvalidSwap',
|
|
54
|
+
])
|
|
55
|
+
|
|
56
|
+
export { main }
|
|
57
|
+
|
|
58
|
+
export const $lxm = $nsid
|
|
@@ -9,47 +9,44 @@ const $nsid = 'com.atproto.repo.deleteRecord'
|
|
|
9
9
|
|
|
10
10
|
export { $nsid }
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
const main =
|
|
14
|
-
/*#__PURE__*/
|
|
15
|
-
l.procedure(
|
|
16
|
-
$nsid,
|
|
17
|
-
/*#__PURE__*/ l.params(),
|
|
18
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
19
|
-
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
20
|
-
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
21
|
-
rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),
|
|
22
|
-
swapRecord: /*#__PURE__*/ l.optional(
|
|
23
|
-
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
24
|
-
),
|
|
25
|
-
swapCommit: /*#__PURE__*/ l.optional(
|
|
26
|
-
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
27
|
-
),
|
|
28
|
-
}),
|
|
29
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
30
|
-
commit: /*#__PURE__*/ l.optional(
|
|
31
|
-
/*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
|
|
32
|
-
(() => RepoDefs.commitMeta) as any,
|
|
33
|
-
),
|
|
34
|
-
),
|
|
35
|
-
}),
|
|
36
|
-
['InvalidSwap'],
|
|
37
|
-
)
|
|
38
|
-
export { main }
|
|
12
|
+
export const $params = /*#__PURE__*/ l.params()
|
|
39
13
|
|
|
40
|
-
export type $Params = l.
|
|
41
|
-
|
|
42
|
-
export
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
14
|
+
export type $Params = l.InferOutput<typeof $params>
|
|
15
|
+
|
|
16
|
+
export const $input = /*#__PURE__*/ l.jsonPayload({
|
|
17
|
+
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
18
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
19
|
+
rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),
|
|
20
|
+
swapRecord: /*#__PURE__*/ l.optional(
|
|
21
|
+
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
22
|
+
),
|
|
23
|
+
swapCommit: /*#__PURE__*/ l.optional(
|
|
24
|
+
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
25
|
+
),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
export type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>
|
|
29
|
+
export type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>
|
|
30
|
+
|
|
31
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
32
|
+
commit: /*#__PURE__*/ l.optional(
|
|
33
|
+
/*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
|
|
34
|
+
(() => RepoDefs.commitMeta) as any,
|
|
35
|
+
),
|
|
36
|
+
),
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
|
|
40
|
+
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
|
|
41
|
+
typeof $output,
|
|
49
42
|
B
|
|
50
43
|
>
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
/** Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. */
|
|
46
|
+
const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [
|
|
47
|
+
'InvalidSwap',
|
|
48
|
+
])
|
|
49
|
+
|
|
50
|
+
export { main }
|
|
51
|
+
|
|
52
|
+
export const $lxm = $nsid
|
|
@@ -8,33 +8,30 @@ const $nsid = 'com.atproto.repo.getRecord'
|
|
|
8
8
|
|
|
9
9
|
export { $nsid }
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/*#__PURE__*/
|
|
14
|
-
l.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
value: /*#__PURE__*/ l.lexMap(),
|
|
26
|
-
}),
|
|
27
|
-
['RecordNotFound'],
|
|
28
|
-
)
|
|
29
|
-
export { main }
|
|
11
|
+
export const $params = /*#__PURE__*/ l.params({
|
|
12
|
+
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
13
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
14
|
+
rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),
|
|
15
|
+
cid: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'cid' })),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export type $Params = l.InferOutput<typeof $params>
|
|
19
|
+
|
|
20
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
21
|
+
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
22
|
+
cid: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'cid' })),
|
|
23
|
+
value: /*#__PURE__*/ l.lexMap(),
|
|
24
|
+
})
|
|
30
25
|
|
|
31
|
-
export type $
|
|
32
|
-
export type $
|
|
33
|
-
|
|
34
|
-
typeof main,
|
|
26
|
+
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
|
|
27
|
+
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
|
|
28
|
+
typeof $output,
|
|
35
29
|
B
|
|
36
30
|
>
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
/** Get a single record from a repository. Does not require auth. */
|
|
33
|
+
const main = /*#__PURE__*/ l.query($nsid, $params, $output, ['RecordNotFound'])
|
|
34
|
+
|
|
35
|
+
export { main }
|
|
36
|
+
|
|
37
|
+
export const $lxm = $nsid
|
|
@@ -8,42 +8,40 @@ const $nsid = 'com.atproto.repo.listRecords'
|
|
|
8
8
|
|
|
9
9
|
export { $nsid }
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/*#__PURE__*/
|
|
14
|
-
l.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
),
|
|
33
|
-
}),
|
|
34
|
-
)
|
|
35
|
-
export { main }
|
|
11
|
+
export const $params = /*#__PURE__*/ l.params({
|
|
12
|
+
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
13
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
14
|
+
limit: /*#__PURE__*/ l.optional(
|
|
15
|
+
/*#__PURE__*/ l.withDefault(
|
|
16
|
+
/*#__PURE__*/ l.integer({ minimum: 1, maximum: 100 }),
|
|
17
|
+
50,
|
|
18
|
+
),
|
|
19
|
+
),
|
|
20
|
+
cursor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
|
|
21
|
+
reverse: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
export type $Params = l.InferOutput<typeof $params>
|
|
25
|
+
|
|
26
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
27
|
+
cursor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
|
|
28
|
+
records: /*#__PURE__*/ l.array(
|
|
29
|
+
/*#__PURE__*/ l.ref<Record$0>((() => record$0) as any),
|
|
30
|
+
),
|
|
31
|
+
})
|
|
36
32
|
|
|
37
|
-
export type $
|
|
38
|
-
export type $
|
|
39
|
-
|
|
40
|
-
typeof main,
|
|
33
|
+
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
|
|
34
|
+
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
|
|
35
|
+
typeof $output,
|
|
41
36
|
B
|
|
42
37
|
>
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
/** List a range of records in a repository, matching a specific collection. Does not require auth. */
|
|
40
|
+
const main = /*#__PURE__*/ l.query($nsid, $params, $output)
|
|
41
|
+
|
|
42
|
+
export { main }
|
|
43
|
+
|
|
44
|
+
export const $lxm = $nsid
|
|
47
45
|
|
|
48
46
|
type Record$0 = {
|
|
49
47
|
$type?: 'com.atproto.repo.listRecords#record'
|
|
@@ -9,54 +9,51 @@ const $nsid = 'com.atproto.repo.putRecord'
|
|
|
9
9
|
|
|
10
10
|
export { $nsid }
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
const main =
|
|
14
|
-
/*#__PURE__*/
|
|
15
|
-
l.procedure(
|
|
16
|
-
$nsid,
|
|
17
|
-
/*#__PURE__*/ l.params(),
|
|
18
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
19
|
-
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
20
|
-
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
21
|
-
rkey: /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
|
|
22
|
-
validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
23
|
-
record: /*#__PURE__*/ l.lexMap(),
|
|
24
|
-
swapRecord: /*#__PURE__*/ l.optional(
|
|
25
|
-
/*#__PURE__*/ l.nullable(/*#__PURE__*/ l.string({ format: 'cid' })),
|
|
26
|
-
),
|
|
27
|
-
swapCommit: /*#__PURE__*/ l.optional(
|
|
28
|
-
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
29
|
-
),
|
|
30
|
-
}),
|
|
31
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
32
|
-
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
33
|
-
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
34
|
-
commit: /*#__PURE__*/ l.optional(
|
|
35
|
-
/*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
|
|
36
|
-
(() => RepoDefs.commitMeta) as any,
|
|
37
|
-
),
|
|
38
|
-
),
|
|
39
|
-
validationStatus: /*#__PURE__*/ l.optional(
|
|
40
|
-
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
41
|
-
),
|
|
42
|
-
}),
|
|
43
|
-
['InvalidSwap'],
|
|
44
|
-
)
|
|
45
|
-
export { main }
|
|
12
|
+
export const $params = /*#__PURE__*/ l.params()
|
|
46
13
|
|
|
47
|
-
export type $Params = l.
|
|
48
|
-
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
14
|
+
export type $Params = l.InferOutput<typeof $params>
|
|
15
|
+
|
|
16
|
+
export const $input = /*#__PURE__*/ l.jsonPayload({
|
|
17
|
+
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
18
|
+
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
19
|
+
rkey: /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
|
|
20
|
+
validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
21
|
+
record: /*#__PURE__*/ l.lexMap(),
|
|
22
|
+
swapRecord: /*#__PURE__*/ l.optional(
|
|
23
|
+
/*#__PURE__*/ l.nullable(/*#__PURE__*/ l.string({ format: 'cid' })),
|
|
24
|
+
),
|
|
25
|
+
swapCommit: /*#__PURE__*/ l.optional(
|
|
26
|
+
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
27
|
+
),
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>
|
|
31
|
+
export type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>
|
|
32
|
+
|
|
33
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
34
|
+
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
35
|
+
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
36
|
+
commit: /*#__PURE__*/ l.optional(
|
|
37
|
+
/*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
|
|
38
|
+
(() => RepoDefs.commitMeta) as any,
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
validationStatus: /*#__PURE__*/ l.optional(
|
|
42
|
+
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
43
|
+
),
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
|
|
47
|
+
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
|
|
48
|
+
typeof $output,
|
|
56
49
|
B
|
|
57
50
|
>
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
/** Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. */
|
|
53
|
+
const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [
|
|
54
|
+
'InvalidSwap',
|
|
55
|
+
])
|
|
56
|
+
|
|
57
|
+
export { main }
|
|
58
|
+
|
|
59
|
+
export const $lxm = $nsid
|