@atproto/lex-client 0.1.5 → 0.2.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/agent.d.ts +1 -1
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js.map +1 -1
  5. package/dist/client.d.ts +42 -21
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +97 -16
  8. package/dist/client.js.map +1 -1
  9. package/dist/errors.d.ts +6 -4
  10. package/dist/errors.d.ts.map +1 -1
  11. package/dist/errors.js +3 -3
  12. package/dist/errors.js.map +1 -1
  13. package/dist/response.d.ts +3 -2
  14. package/dist/response.d.ts.map +1 -1
  15. package/dist/response.js +2 -1
  16. package/dist/response.js.map +1 -1
  17. package/dist/types.d.ts +1 -1
  18. package/dist/types.d.ts.map +1 -1
  19. package/dist/types.js.map +1 -1
  20. package/dist/util.d.ts +6 -2
  21. package/dist/util.d.ts.map +1 -1
  22. package/dist/util.js +25 -0
  23. package/dist/util.js.map +1 -1
  24. package/dist/write-operation-builder.d.ts +3 -2
  25. package/dist/write-operation-builder.d.ts.map +1 -1
  26. package/dist/write-operation-builder.js +2 -2
  27. package/dist/write-operation-builder.js.map +1 -1
  28. package/dist/xrpc.d.ts +8 -6
  29. package/dist/xrpc.d.ts.map +1 -1
  30. package/dist/xrpc.js +1 -1
  31. package/dist/xrpc.js.map +1 -1
  32. package/package.json +11 -14
  33. package/src/agent.test.ts +0 -216
  34. package/src/agent.ts +0 -186
  35. package/src/client.ts +0 -1086
  36. package/src/errors.test.ts +0 -626
  37. package/src/errors.ts +0 -570
  38. package/src/index.ts +0 -6
  39. package/src/lexicons/com/atproto/repo/applyWrites.defs.ts +0 -201
  40. package/src/lexicons/com/atproto/repo/applyWrites.ts +0 -6
  41. package/src/lexicons/com/atproto/repo/createRecord.defs.ts +0 -58
  42. package/src/lexicons/com/atproto/repo/createRecord.ts +0 -6
  43. package/src/lexicons/com/atproto/repo/defs.defs.ts +0 -28
  44. package/src/lexicons/com/atproto/repo/defs.ts +0 -5
  45. package/src/lexicons/com/atproto/repo/deleteRecord.defs.ts +0 -52
  46. package/src/lexicons/com/atproto/repo/deleteRecord.ts +0 -6
  47. package/src/lexicons/com/atproto/repo/getRecord.defs.ts +0 -37
  48. package/src/lexicons/com/atproto/repo/getRecord.ts +0 -6
  49. package/src/lexicons/com/atproto/repo/listRecords.defs.ts +0 -65
  50. package/src/lexicons/com/atproto/repo/listRecords.ts +0 -6
  51. package/src/lexicons/com/atproto/repo/putRecord.defs.ts +0 -59
  52. package/src/lexicons/com/atproto/repo/putRecord.ts +0 -6
  53. package/src/lexicons/com/atproto/repo/uploadBlob.defs.ts +0 -35
  54. package/src/lexicons/com/atproto/repo/uploadBlob.ts +0 -6
  55. package/src/lexicons/com/atproto/repo.ts +0 -12
  56. package/src/lexicons/com/atproto/sync/getBlob.defs.ts +0 -37
  57. package/src/lexicons/com/atproto/sync/getBlob.ts +0 -6
  58. package/src/lexicons/com/atproto/sync.ts +0 -5
  59. package/src/lexicons/com/atproto.ts +0 -6
  60. package/src/lexicons/com.ts +0 -5
  61. package/src/lexicons/index.ts +0 -5
  62. package/src/response.bench.ts +0 -113
  63. package/src/response.ts +0 -366
  64. package/src/types.ts +0 -71
  65. package/src/util.test.ts +0 -333
  66. package/src/util.ts +0 -182
  67. package/src/write-operation-builder.ts +0 -110
  68. package/src/www-authenticate.test.ts +0 -227
  69. package/src/www-authenticate.ts +0 -101
  70. package/src/xrpc.test.ts +0 -1450
  71. package/src/xrpc.ts +0 -446
  72. package/tsconfig.build.json +0 -12
  73. package/tsconfig.json +0 -7
  74. package/tsconfig.tests.json +0 -8
@@ -1,201 +0,0 @@
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 }
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './applyWrites.defs.js'
6
- export { main as default } from './applyWrites.defs.js'
@@ -1,58 +0,0 @@
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.createRecord'
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
- 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,
48
- B
49
- >
50
-
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
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './createRecord.defs.js'
6
- export { main as default } from './createRecord.defs.js'
@@ -1,28 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- import { l } from '@atproto/lex-schema'
6
-
7
- const $nsid = 'com.atproto.repo.defs'
8
-
9
- export { $nsid }
10
-
11
- type CommitMeta = {
12
- $type?: 'com.atproto.repo.defs#commitMeta'
13
- cid: l.CidString
14
- rev: l.TidString
15
- }
16
-
17
- export type { CommitMeta }
18
-
19
- const commitMeta = /*#__PURE__*/ l.typedObject<CommitMeta>(
20
- $nsid,
21
- 'commitMeta',
22
- /*#__PURE__*/ l.object({
23
- cid: /*#__PURE__*/ l.string({ format: 'cid' }),
24
- rev: /*#__PURE__*/ l.string({ format: 'tid' }),
25
- }),
26
- )
27
-
28
- export { commitMeta }
@@ -1,5 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './defs.defs.js'
@@ -1,52 +0,0 @@
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.deleteRecord'
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
- 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,
42
- B
43
- >
44
-
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
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './deleteRecord.defs.js'
6
- export { main as default } from './deleteRecord.defs.js'
@@ -1,37 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- import { l } from '@atproto/lex-schema'
6
-
7
- const $nsid = 'com.atproto.repo.getRecord'
8
-
9
- export { $nsid }
10
-
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
- })
25
-
26
- export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
27
- export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
28
- typeof $output,
29
- B
30
- >
31
-
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
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './getRecord.defs.js'
6
- export { main as default } from './getRecord.defs.js'
@@ -1,65 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- import { l } from '@atproto/lex-schema'
6
-
7
- const $nsid = 'com.atproto.repo.listRecords'
8
-
9
- export { $nsid }
10
-
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
- })
32
-
33
- export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
34
- export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
35
- typeof $output,
36
- B
37
- >
38
-
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
45
-
46
- type Record$0 = {
47
- $type?: 'com.atproto.repo.listRecords#record'
48
- uri: l.AtUriString
49
- cid: l.CidString
50
- value: l.LexMap
51
- }
52
-
53
- export type { Record$0 as Record }
54
-
55
- const record$0 = /*#__PURE__*/ l.typedObject<Record$0>(
56
- $nsid,
57
- 'record',
58
- /*#__PURE__*/ l.object({
59
- uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
60
- cid: /*#__PURE__*/ l.string({ format: 'cid' }),
61
- value: /*#__PURE__*/ l.lexMap(),
62
- }),
63
- )
64
-
65
- export { record$0 as record }
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './listRecords.defs.js'
6
- export { main as default } from './listRecords.defs.js'
@@ -1,59 +0,0 @@
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.putRecord'
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
- 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,
49
- B
50
- >
51
-
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
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './putRecord.defs.js'
6
- export { main as default } from './putRecord.defs.js'
@@ -1,35 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- import { l } from '@atproto/lex-schema'
6
-
7
- const $nsid = 'com.atproto.repo.uploadBlob'
8
-
9
- export { $nsid }
10
-
11
- export const $params = /*#__PURE__*/ l.params()
12
-
13
- export type $Params = l.InferOutput<typeof $params>
14
-
15
- export const $input = /*#__PURE__*/ l.payload('*/*')
16
-
17
- export type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>
18
- export type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>
19
-
20
- export const $output = /*#__PURE__*/ l.jsonPayload({
21
- blob: /*#__PURE__*/ l.blob(),
22
- })
23
-
24
- export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
25
- export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
26
- typeof $output,
27
- B
28
- >
29
-
30
- /** Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. */
31
- const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output)
32
-
33
- export { main }
34
-
35
- export const $lxm = $nsid
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './uploadBlob.defs.js'
6
- export { main as default } from './uploadBlob.defs.js'
@@ -1,12 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * as applyWrites from './repo/applyWrites.js'
6
- export * as deleteRecord from './repo/deleteRecord.js'
7
- export * as getRecord from './repo/getRecord.js'
8
- export * as listRecords from './repo/listRecords.js'
9
- export * as putRecord from './repo/putRecord.js'
10
- export * as uploadBlob from './repo/uploadBlob.js'
11
- export * as createRecord from './repo/createRecord.js'
12
- export * as defs from './repo/defs.js'
@@ -1,37 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- import { l } from '@atproto/lex-schema'
6
-
7
- const $nsid = 'com.atproto.sync.getBlob'
8
-
9
- export { $nsid }
10
-
11
- export const $params = /*#__PURE__*/ l.params({
12
- did: /*#__PURE__*/ l.string({ format: 'did' }),
13
- cid: /*#__PURE__*/ l.string({ format: 'cid' }),
14
- })
15
-
16
- export type $Params = l.InferOutput<typeof $params>
17
-
18
- export const $output = /*#__PURE__*/ l.payload('*/*')
19
-
20
- export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
21
- export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
22
- typeof $output,
23
- B
24
- >
25
-
26
- /** Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. */
27
- const main = /*#__PURE__*/ l.query($nsid, $params, $output, [
28
- 'BlobNotFound',
29
- 'RepoNotFound',
30
- 'RepoTakendown',
31
- 'RepoSuspended',
32
- 'RepoDeactivated',
33
- ])
34
-
35
- export { main }
36
-
37
- export const $lxm = $nsid
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * from './getBlob.defs.js'
6
- export { main as default } from './getBlob.defs.js'
@@ -1,5 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * as getBlob from './sync/getBlob.js'
@@ -1,6 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * as repo from './atproto/repo.js'
6
- export * as sync from './atproto/sync.js'
@@ -1,5 +0,0 @@
1
- /*
2
- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
- */
4
-
5
- export * as atproto from './com/atproto.js'