@atproto/lex-client 0.0.4 → 0.0.6

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 (103) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/agent.d.ts +10 -9
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +3 -0
  5. package/dist/agent.js.map +1 -1
  6. package/dist/client.d.ts +51 -113
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +38 -42
  9. package/dist/client.js.map +1 -1
  10. package/dist/errors.d.ts +82 -0
  11. package/dist/errors.d.ts.map +1 -0
  12. package/dist/errors.js +132 -0
  13. package/dist/errors.js.map +1 -0
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/lexicons/com/atproto/repo/createRecord.defs.d.ts +7 -7
  19. package/dist/lexicons/com/atproto/repo/createRecord.defs.d.ts.map +1 -1
  20. package/dist/lexicons/com/atproto/repo/createRecord.defs.js +8 -12
  21. package/dist/lexicons/com/atproto/repo/createRecord.defs.js.map +1 -1
  22. package/dist/lexicons/com/atproto/repo/deleteRecord.defs.d.ts +7 -7
  23. package/dist/lexicons/com/atproto/repo/deleteRecord.defs.d.ts.map +1 -1
  24. package/dist/lexicons/com/atproto/repo/deleteRecord.defs.js +8 -12
  25. package/dist/lexicons/com/atproto/repo/deleteRecord.defs.js.map +1 -1
  26. package/dist/lexicons/com/atproto/repo/getRecord.defs.d.ts +5 -6
  27. package/dist/lexicons/com/atproto/repo/getRecord.defs.d.ts.map +1 -1
  28. package/dist/lexicons/com/atproto/repo/getRecord.defs.js +6 -10
  29. package/dist/lexicons/com/atproto/repo/getRecord.defs.js.map +1 -1
  30. package/dist/lexicons/com/atproto/repo/listRecords.defs.d.ts +5 -6
  31. package/dist/lexicons/com/atproto/repo/listRecords.defs.d.ts.map +1 -1
  32. package/dist/lexicons/com/atproto/repo/listRecords.defs.js +5 -8
  33. package/dist/lexicons/com/atproto/repo/listRecords.defs.js.map +1 -1
  34. package/dist/lexicons/com/atproto/repo/putRecord.defs.d.ts +7 -7
  35. package/dist/lexicons/com/atproto/repo/putRecord.defs.d.ts.map +1 -1
  36. package/dist/lexicons/com/atproto/repo/putRecord.defs.js +8 -12
  37. package/dist/lexicons/com/atproto/repo/putRecord.defs.js.map +1 -1
  38. package/dist/lexicons/com/atproto/repo/uploadBlob.defs.d.ts +7 -7
  39. package/dist/lexicons/com/atproto/repo/uploadBlob.defs.d.ts.map +1 -1
  40. package/dist/lexicons/com/atproto/repo/uploadBlob.defs.js +6 -9
  41. package/dist/lexicons/com/atproto/repo/uploadBlob.defs.js.map +1 -1
  42. package/dist/lexicons/com/atproto/sync/getBlob.d.ts +3 -0
  43. package/dist/lexicons/com/atproto/sync/getBlob.d.ts.map +1 -0
  44. package/dist/lexicons/com/atproto/sync/getBlob.defs.d.ts +25 -0
  45. package/dist/lexicons/com/atproto/sync/getBlob.defs.d.ts.map +1 -0
  46. package/dist/lexicons/com/atproto/sync/getBlob.defs.js +27 -0
  47. package/dist/lexicons/com/atproto/sync/getBlob.defs.js.map +1 -0
  48. package/dist/lexicons/com/atproto/sync/getBlob.js +10 -0
  49. package/dist/lexicons/com/atproto/sync/getBlob.js.map +1 -0
  50. package/dist/lexicons/com/atproto/sync.d.ts +2 -0
  51. package/dist/lexicons/com/atproto/sync.d.ts.map +1 -0
  52. package/dist/lexicons/com/atproto/sync.js +9 -0
  53. package/dist/lexicons/com/atproto/sync.js.map +1 -0
  54. package/dist/lexicons/com/atproto.d.ts +1 -0
  55. package/dist/lexicons/com/atproto.d.ts.map +1 -1
  56. package/dist/lexicons/com/atproto.js +2 -1
  57. package/dist/lexicons/com/atproto.js.map +1 -1
  58. package/dist/lexicons.d.ts +2 -0
  59. package/dist/lexicons.d.ts.map +1 -0
  60. package/dist/lexicons.js +6 -0
  61. package/dist/lexicons.js.map +1 -0
  62. package/dist/response.d.ts +25 -8
  63. package/dist/response.d.ts.map +1 -1
  64. package/dist/response.js +123 -10
  65. package/dist/response.js.map +1 -1
  66. package/dist/types.d.ts +18 -4
  67. package/dist/types.d.ts.map +1 -1
  68. package/dist/types.js +0 -4
  69. package/dist/types.js.map +1 -1
  70. package/dist/util.d.ts +14 -0
  71. package/dist/util.d.ts.map +1 -0
  72. package/dist/util.js +65 -0
  73. package/dist/util.js.map +1 -0
  74. package/dist/xrpc.d.ts +35 -32
  75. package/dist/xrpc.d.ts.map +1 -1
  76. package/dist/xrpc.js +116 -124
  77. package/dist/xrpc.js.map +1 -1
  78. package/package.json +10 -10
  79. package/src/agent.ts +18 -14
  80. package/src/client.ts +135 -114
  81. package/src/errors.ts +206 -0
  82. package/src/index.ts +1 -1
  83. package/src/lexicons/com/atproto/repo/createRecord.defs.ts +31 -36
  84. package/src/lexicons/com/atproto/repo/deleteRecord.defs.ts +27 -32
  85. package/src/lexicons/com/atproto/repo/getRecord.defs.ts +12 -17
  86. package/src/lexicons/com/atproto/repo/listRecords.defs.ts +13 -15
  87. package/src/lexicons/com/atproto/repo/putRecord.defs.ts +32 -37
  88. package/src/lexicons/com/atproto/repo/uploadBlob.defs.ts +13 -15
  89. package/src/lexicons/com/atproto/sync/getBlob.defs.ts +37 -0
  90. package/src/lexicons/com/atproto/sync/getBlob.ts +6 -0
  91. package/src/lexicons/com/atproto/sync.ts +5 -0
  92. package/src/lexicons/com/atproto.ts +1 -0
  93. package/src/lexicons.ts +1 -0
  94. package/src/response.ts +201 -15
  95. package/src/types.ts +26 -5
  96. package/src/util.ts +84 -0
  97. package/src/xrpc.ts +220 -232
  98. package/tsconfig.tests.json +4 -7
  99. package/dist/error.d.ts +0 -66
  100. package/dist/error.d.ts.map +0 -1
  101. package/dist/error.js +0 -100
  102. package/dist/error.js.map +0 -1
  103. package/src/error.ts +0 -145
@@ -9,50 +9,45 @@ const $nsid = 'com.atproto.repo.createRecord'
9
9
 
10
10
  export { $nsid }
11
11
 
12
- /**
13
- * Create a single new repository record. Requires auth, implemented by PDS.
14
- */
12
+ /** Create a single new repository record. Requires auth, implemented by PDS. */
15
13
  const main =
16
14
  /*#__PURE__*/
17
15
  l.procedure(
18
16
  $nsid,
19
- /*#__PURE__*/ l.params({}),
20
- /*#__PURE__*/ l.payload(
21
- 'application/json',
22
- /*#__PURE__*/ l.object({
23
- repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
24
- collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
25
- rkey: /*#__PURE__*/ l.optional(
26
- /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
27
- ),
28
- validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
29
- record: /*#__PURE__*/ l.unknownObject(),
30
- swapCommit: /*#__PURE__*/ l.optional(
31
- /*#__PURE__*/ l.string({ format: 'cid' }),
32
- ),
33
- }),
34
- ),
35
- /*#__PURE__*/ l.payload(
36
- 'application/json',
37
- /*#__PURE__*/ l.object({
38
- uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
39
- cid: /*#__PURE__*/ l.string({ format: 'cid' }),
40
- commit: /*#__PURE__*/ l.optional(
41
- /*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
42
- (() => RepoDefs.commitMeta) as any,
43
- ),
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.unknownObject(),
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,
44
36
  ),
45
- validationStatus: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
46
- }),
47
- ),
37
+ ),
38
+ validationStatus: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
39
+ }),
48
40
  ['InvalidSwap'],
49
41
  )
50
42
  export { main }
51
43
 
52
- export const $params = /*#__PURE__*/ main.parameters,
44
+ export type Params = l.InferMethodParams<typeof main>
45
+ export type Input = l.InferMethodInput<typeof main>
46
+ export type InputBody = l.InferMethodInputBody<typeof main>
47
+ export type Output = l.InferMethodOutput<typeof main>
48
+ export type OutputBody = l.InferMethodOutputBody<typeof main>
49
+
50
+ export const $lxm = /*#__PURE__*/ main.nsid,
51
+ $params = /*#__PURE__*/ main.parameters,
53
52
  $input = /*#__PURE__*/ main.input,
54
53
  $output = /*#__PURE__*/ main.output
55
-
56
- export type Params = l.InferProcedureParameters<typeof main>
57
- export type Input = l.InferProcedureInputBody<typeof main>
58
- export type Output = l.InferProcedureOutputBody<typeof main>
@@ -9,46 +9,41 @@ const $nsid = 'com.atproto.repo.deleteRecord'
9
9
 
10
10
  export { $nsid }
11
11
 
12
- /**
13
- * Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.
14
- */
12
+ /** Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. */
15
13
  const main =
16
14
  /*#__PURE__*/
17
15
  l.procedure(
18
16
  $nsid,
19
- /*#__PURE__*/ l.params({}),
20
- /*#__PURE__*/ l.payload(
21
- 'application/json',
22
- /*#__PURE__*/ l.object({
23
- repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
24
- collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
25
- rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),
26
- swapRecord: /*#__PURE__*/ l.optional(
27
- /*#__PURE__*/ l.string({ format: 'cid' }),
28
- ),
29
- swapCommit: /*#__PURE__*/ l.optional(
30
- /*#__PURE__*/ l.string({ format: 'cid' }),
31
- ),
32
- }),
33
- ),
34
- /*#__PURE__*/ l.payload(
35
- 'application/json',
36
- /*#__PURE__*/ l.object({
37
- commit: /*#__PURE__*/ l.optional(
38
- /*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
39
- (() => RepoDefs.commitMeta) as any,
40
- ),
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,
41
33
  ),
42
- }),
43
- ),
34
+ ),
35
+ }),
44
36
  ['InvalidSwap'],
45
37
  )
46
38
  export { main }
47
39
 
48
- export const $params = /*#__PURE__*/ main.parameters,
40
+ export type Params = l.InferMethodParams<typeof main>
41
+ export type Input = l.InferMethodInput<typeof main>
42
+ export type InputBody = l.InferMethodInputBody<typeof main>
43
+ export type Output = l.InferMethodOutput<typeof main>
44
+ export type OutputBody = l.InferMethodOutputBody<typeof main>
45
+
46
+ export const $lxm = /*#__PURE__*/ main.nsid,
47
+ $params = /*#__PURE__*/ main.parameters,
49
48
  $input = /*#__PURE__*/ main.input,
50
49
  $output = /*#__PURE__*/ main.output
51
-
52
- export type Params = l.InferProcedureParameters<typeof main>
53
- export type Input = l.InferProcedureInputBody<typeof main>
54
- export type Output = l.InferProcedureOutputBody<typeof main>
@@ -8,9 +8,7 @@ const $nsid = 'com.atproto.repo.getRecord'
8
8
 
9
9
  export { $nsid }
10
10
 
11
- /**
12
- * Get a single record from a repository. Does not require auth.
13
- */
11
+ /** Get a single record from a repository. Does not require auth. */
14
12
  const main =
15
13
  /*#__PURE__*/
16
14
  l.query(
@@ -21,22 +19,19 @@ const main =
21
19
  rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),
22
20
  cid: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'cid' })),
23
21
  }),
24
- /*#__PURE__*/ l.payload(
25
- 'application/json',
26
- /*#__PURE__*/ l.object({
27
- uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
28
- cid: /*#__PURE__*/ l.optional(
29
- /*#__PURE__*/ l.string({ format: 'cid' }),
30
- ),
31
- value: /*#__PURE__*/ l.unknownObject(),
32
- }),
33
- ),
22
+ /*#__PURE__*/ l.jsonPayload({
23
+ uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
24
+ cid: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'cid' })),
25
+ value: /*#__PURE__*/ l.unknownObject(),
26
+ }),
34
27
  ['RecordNotFound'],
35
28
  )
36
29
  export { main }
37
30
 
38
- export const $params = main.parameters,
39
- $output = main.output
31
+ export type Params = l.InferMethodParams<typeof main>
32
+ export type Output = l.InferMethodOutput<typeof main>
33
+ export type OutputBody = l.InferMethodOutputBody<typeof main>
40
34
 
41
- export type Params = l.InferQueryParameters<typeof main>
42
- export type Output = l.InferQueryOutputBody<typeof main>
35
+ export const $lxm = /*#__PURE__*/ main.nsid,
36
+ $params = main.parameters,
37
+ $output = main.output
@@ -8,9 +8,7 @@ const $nsid = 'com.atproto.repo.listRecords'
8
8
 
9
9
  export { $nsid }
10
10
 
11
- /**
12
- * List a range of records in a repository, matching a specific collection. Does not require auth.
13
- */
11
+ /** List a range of records in a repository, matching a specific collection. Does not require auth. */
14
12
  const main =
15
13
  /*#__PURE__*/
16
14
  l.query(
@@ -24,23 +22,23 @@ const main =
24
22
  cursor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
25
23
  reverse: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
26
24
  }),
27
- /*#__PURE__*/ l.payload(
28
- 'application/json',
29
- /*#__PURE__*/ l.object({
30
- cursor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
31
- records: /*#__PURE__*/ l.array(
32
- /*#__PURE__*/ l.ref<Def$0>((() => def$0) as any),
33
- ),
34
- }),
35
- ),
25
+ /*#__PURE__*/ l.jsonPayload({
26
+ cursor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
27
+ records: /*#__PURE__*/ l.array(
28
+ /*#__PURE__*/ l.ref<Def$0>((() => def$0) as any),
29
+ ),
30
+ }),
36
31
  )
37
32
  export { main }
38
33
 
39
- export const $params = main.parameters,
34
+ export type Params = l.InferMethodParams<typeof main>
35
+ export type Output = l.InferMethodOutput<typeof main>
36
+ export type OutputBody = l.InferMethodOutputBody<typeof main>
37
+
38
+ export const $lxm = /*#__PURE__*/ main.nsid,
39
+ $params = main.parameters,
40
40
  $output = main.output
41
41
 
42
- export type Params = l.InferQueryParameters<typeof main>
43
- export type Output = l.InferQueryOutputBody<typeof main>
44
42
  type Def$0 = {
45
43
  $type?: 'com.atproto.repo.listRecords#record'
46
44
  uri: l.AtUriString
@@ -9,51 +9,46 @@ const $nsid = 'com.atproto.repo.putRecord'
9
9
 
10
10
  export { $nsid }
11
11
 
12
- /**
13
- * Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.
14
- */
12
+ /** Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. */
15
13
  const main =
16
14
  /*#__PURE__*/
17
15
  l.procedure(
18
16
  $nsid,
19
- /*#__PURE__*/ l.params({}),
20
- /*#__PURE__*/ l.payload(
21
- 'application/json',
22
- /*#__PURE__*/ l.object({
23
- repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
24
- collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
25
- rkey: /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
26
- validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
27
- record: /*#__PURE__*/ l.unknownObject(),
28
- swapRecord: /*#__PURE__*/ l.optional(
29
- /*#__PURE__*/ l.nullable(/*#__PURE__*/ l.string({ format: 'cid' })),
30
- ),
31
- swapCommit: /*#__PURE__*/ l.optional(
32
- /*#__PURE__*/ l.string({ format: 'cid' }),
33
- ),
34
- }),
35
- ),
36
- /*#__PURE__*/ l.payload(
37
- 'application/json',
38
- /*#__PURE__*/ l.object({
39
- uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
40
- cid: /*#__PURE__*/ l.string({ format: 'cid' }),
41
- commit: /*#__PURE__*/ l.optional(
42
- /*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(
43
- (() => RepoDefs.commitMeta) as any,
44
- ),
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.unknownObject(),
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,
45
37
  ),
46
- validationStatus: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
47
- }),
48
- ),
38
+ ),
39
+ validationStatus: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
40
+ }),
49
41
  ['InvalidSwap'],
50
42
  )
51
43
  export { main }
52
44
 
53
- export const $params = /*#__PURE__*/ main.parameters,
45
+ export type Params = l.InferMethodParams<typeof main>
46
+ export type Input = l.InferMethodInput<typeof main>
47
+ export type InputBody = l.InferMethodInputBody<typeof main>
48
+ export type Output = l.InferMethodOutput<typeof main>
49
+ export type OutputBody = l.InferMethodOutputBody<typeof main>
50
+
51
+ export const $lxm = /*#__PURE__*/ main.nsid,
52
+ $params = /*#__PURE__*/ main.parameters,
54
53
  $input = /*#__PURE__*/ main.input,
55
54
  $output = /*#__PURE__*/ main.output
56
-
57
- export type Params = l.InferProcedureParameters<typeof main>
58
- export type Input = l.InferProcedureInputBody<typeof main>
59
- export type Output = l.InferProcedureOutputBody<typeof main>
@@ -8,28 +8,26 @@ const $nsid = 'com.atproto.repo.uploadBlob'
8
8
 
9
9
  export { $nsid }
10
10
 
11
- /**
12
- * 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.
13
- */
11
+ /** 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. */
14
12
  const main =
15
13
  /*#__PURE__*/
16
14
  l.procedure(
17
15
  $nsid,
18
- /*#__PURE__*/ l.params({}),
16
+ /*#__PURE__*/ l.params(),
19
17
  /*#__PURE__*/ l.payload('*/*'),
20
- /*#__PURE__*/ l.payload(
21
- 'application/json',
22
- /*#__PURE__*/ l.object({
23
- blob: /*#__PURE__*/ l.blob({ allowLegacy: false }),
24
- }),
25
- ),
18
+ /*#__PURE__*/ l.jsonPayload({
19
+ blob: /*#__PURE__*/ l.blob({ allowLegacy: false }),
20
+ }),
26
21
  )
27
22
  export { main }
28
23
 
29
- export const $params = /*#__PURE__*/ main.parameters,
24
+ export type Params = l.InferMethodParams<typeof main>
25
+ export type Input = l.InferMethodInput<typeof main>
26
+ export type InputBody = l.InferMethodInputBody<typeof main>
27
+ export type Output = l.InferMethodOutput<typeof main>
28
+ export type OutputBody = l.InferMethodOutputBody<typeof main>
29
+
30
+ export const $lxm = /*#__PURE__*/ main.nsid,
31
+ $params = /*#__PURE__*/ main.parameters,
30
32
  $input = /*#__PURE__*/ main.input,
31
33
  $output = /*#__PURE__*/ main.output
32
-
33
- export type Params = l.InferProcedureParameters<typeof main>
34
- export type Input = l.InferProcedureInputBody<typeof main>
35
- export type Output = l.InferProcedureOutputBody<typeof main>
@@ -0,0 +1,37 @@
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
+ /** Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. */
12
+ const main =
13
+ /*#__PURE__*/
14
+ l.query(
15
+ $nsid,
16
+ /*#__PURE__*/ l.params({
17
+ did: /*#__PURE__*/ l.string({ format: 'did' }),
18
+ cid: /*#__PURE__*/ l.string({ format: 'cid' }),
19
+ }),
20
+ /*#__PURE__*/ l.payload('*/*'),
21
+ [
22
+ 'BlobNotFound',
23
+ 'RepoNotFound',
24
+ 'RepoTakendown',
25
+ 'RepoSuspended',
26
+ 'RepoDeactivated',
27
+ ],
28
+ )
29
+ export { main }
30
+
31
+ export type Params = l.InferMethodParams<typeof main>
32
+ export type Output = l.InferMethodOutput<typeof main>
33
+ export type OutputBody = l.InferMethodOutputBody<typeof main>
34
+
35
+ export const $lxm = /*#__PURE__*/ main.nsid,
36
+ $params = main.parameters,
37
+ $output = main.output
@@ -0,0 +1,6 @@
1
+ /*
2
+ * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
+ */
4
+
5
+ export * from './getBlob.defs.js'
6
+ export * as $defs from './getBlob.defs.js'
@@ -0,0 +1,5 @@
1
+ /*
2
+ * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
3
+ */
4
+
5
+ export * as getBlob from './sync/getBlob.js'
@@ -3,3 +3,4 @@
3
3
  */
4
4
 
5
5
  export * as repo from './atproto/repo.js'
6
+ export * as sync from './atproto/sync.js'
@@ -0,0 +1 @@
1
+ export * as com from './lexicons/com.js'