@atproto/lex-client 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/CHANGELOG.md +13 -0
- package/dist/client.d.ts +52 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +38 -16
- 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.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/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/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/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/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/uploadBlob.defs.d.ts +6 -3
- 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.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.defs.d.ts +10 -8
- 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/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 +88 -45
- package/src/lexicons/com/atproto/repo/applyWrites.defs.ts +197 -0
- package/src/lexicons/com/atproto/repo/applyWrites.ts +6 -0
- package/src/lexicons/com/atproto/repo/createRecord.defs.ts +30 -36
- package/src/lexicons/com/atproto/repo/deleteRecord.defs.ts +24 -30
- package/src/lexicons/com/atproto/repo/getRecord.defs.ts +14 -21
- package/src/lexicons/com/atproto/repo/listRecords.defs.ts +21 -28
- package/src/lexicons/com/atproto/repo/putRecord.defs.ts +31 -37
- package/src/lexicons/com/atproto/repo/uploadBlob.defs.ts +8 -13
- package/src/lexicons/com/atproto/repo.ts +2 -1
- package/src/lexicons/com/atproto/sync/getBlob.defs.ts +14 -21
- 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
|
@@ -2,8 +2,9 @@ import { l } from '@atproto/lex-schema';
|
|
|
2
2
|
import * as RepoDefs from './defs.defs.js';
|
|
3
3
|
declare const $nsid = "com.atproto.repo.putRecord";
|
|
4
4
|
export { $nsid };
|
|
5
|
-
|
|
6
|
-
declare const
|
|
5
|
+
export declare const $lxm = "com.atproto.repo.putRecord";
|
|
6
|
+
export declare const $params: l.ParamsSchema<{}>;
|
|
7
|
+
export declare const $input: l.Payload<"application/json", l.ObjectSchema<{
|
|
7
8
|
repo: l.StringSchema<{
|
|
8
9
|
readonly format: "at-identifier";
|
|
9
10
|
}>;
|
|
@@ -22,7 +23,8 @@ declare const main: l.Procedure<"com.atproto.repo.putRecord", l.ParamsSchema<{}>
|
|
|
22
23
|
swapCommit: l.OptionalSchema<l.StringSchema<{
|
|
23
24
|
readonly format: "cid";
|
|
24
25
|
}>>;
|
|
25
|
-
}
|
|
26
|
+
}>>;
|
|
27
|
+
export declare const $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
26
28
|
uri: l.StringSchema<{
|
|
27
29
|
readonly format: "at-uri";
|
|
28
30
|
}>;
|
|
@@ -33,14 +35,9 @@ declare const main: l.Procedure<"com.atproto.repo.putRecord", l.ParamsSchema<{}>
|
|
|
33
35
|
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
34
36
|
knownValues: ["valid", "unknown"];
|
|
35
37
|
}>>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
40
|
-
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
41
|
-
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
42
|
-
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
43
|
-
export declare const $lxm: "com.atproto.repo.putRecord", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
|
|
38
|
+
}>>;
|
|
39
|
+
/** Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. */
|
|
40
|
+
declare const main: l.Procedure<"com.atproto.repo.putRecord", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
44
41
|
repo: l.StringSchema<{
|
|
45
42
|
readonly format: "at-identifier";
|
|
46
43
|
}>;
|
|
@@ -59,7 +56,7 @@ export declare const $lxm: "com.atproto.repo.putRecord", $params: l.ParamsSchema
|
|
|
59
56
|
swapCommit: l.OptionalSchema<l.StringSchema<{
|
|
60
57
|
readonly format: "cid";
|
|
61
58
|
}>>;
|
|
62
|
-
}>>,
|
|
59
|
+
}>>, l.Payload<"application/json", l.ObjectSchema<{
|
|
63
60
|
uri: l.StringSchema<{
|
|
64
61
|
readonly format: "at-uri";
|
|
65
62
|
}>;
|
|
@@ -70,5 +67,11 @@ export declare const $lxm: "com.atproto.repo.putRecord", $params: l.ParamsSchema
|
|
|
70
67
|
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
71
68
|
knownValues: ["valid", "unknown"];
|
|
72
69
|
}>>;
|
|
73
|
-
}
|
|
70
|
+
}>>, readonly ["InvalidSwap"]>;
|
|
71
|
+
export { main };
|
|
72
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
73
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
74
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
75
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
76
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
74
77
|
//# sourceMappingURL=putRecord.defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"putRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,QAAA,MAAM,KAAK,+BAA+B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,uGAAuG;AACvG,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"putRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,QAAA,MAAM,KAAK,+BAA+B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,eAAO,MAAM,IAAI,+BAAQ,CAAA;AACzB,eAAO,MAAM,OAAO,oBAA2B,CAAA;AAC/C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;GAYjB,CAAA;AACF,eAAO,MAAM,OAAO;;;;;;;;;;;GAWlB,CAAA;AACF,uGAAuG;AACvG,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAER,CAAA;AAEF,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,gBAAgB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,oBAAoB,CAC/D,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA"}
|
|
@@ -5,12 +5,9 @@ import { l } from '@atproto/lex-schema';
|
|
|
5
5
|
import * as RepoDefs from './defs.defs.js';
|
|
6
6
|
const $nsid = 'com.atproto.repo.putRecord';
|
|
7
7
|
export { $nsid };
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
/*#__PURE__*/
|
|
11
|
-
l.procedure($nsid,
|
|
12
|
-
/*#__PURE__*/ l.params(),
|
|
13
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
8
|
+
export const $lxm = $nsid;
|
|
9
|
+
export const $params = /*#__PURE__*/ l.params();
|
|
10
|
+
export const $input = /*#__PURE__*/ l.jsonPayload({
|
|
14
11
|
repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),
|
|
15
12
|
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
16
13
|
rkey: /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
|
|
@@ -20,15 +17,18 @@ l.procedure($nsid,
|
|
|
20
17
|
/*#__PURE__*/ l.nullable(/*#__PURE__*/ l.string({ format: 'cid' }))),
|
|
21
18
|
swapCommit: /*#__PURE__*/ l.optional(
|
|
22
19
|
/*#__PURE__*/ l.string({ format: 'cid' })),
|
|
23
|
-
})
|
|
24
|
-
/*#__PURE__*/ l.jsonPayload({
|
|
20
|
+
});
|
|
21
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
25
22
|
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
26
23
|
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
27
24
|
commit: /*#__PURE__*/ l.optional(
|
|
28
25
|
/*#__PURE__*/ l.ref((() => RepoDefs.commitMeta))),
|
|
29
26
|
validationStatus: /*#__PURE__*/ l.optional(
|
|
30
27
|
/*#__PURE__*/ l.string()),
|
|
31
|
-
})
|
|
28
|
+
});
|
|
29
|
+
/** Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. */
|
|
30
|
+
const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [
|
|
31
|
+
'InvalidSwap',
|
|
32
|
+
]);
|
|
32
33
|
export { main };
|
|
33
|
-
export const $lxm = /*#__PURE__*/ main.nsid, $params = /*#__PURE__*/ main.parameters, $input = /*#__PURE__*/ main.input, $output = /*#__PURE__*/ main.output;
|
|
34
34
|
//# sourceMappingURL=putRecord.defs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"putRecord.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,MAAM,KAAK,GAAG,4BAA4B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,
|
|
1
|
+
{"version":3,"file":"putRecord.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAE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AE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9C,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IAC9B,aAAa,CAAC,CAAC,CAAC,GAAG,CACjB,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAQ,CACnC,CACF;IACD,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IACxC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAyC,CAChE;CACF,CAAC,CAAA;AACF,uGAAuG;AACvG,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IACtE,aAAa;CACd,CAAC,CAAA;AAEF,OAAO,EAAE,IAAI,EAAE,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\nimport * as RepoDefs from './defs.defs.js'\n\nconst $nsid = 'com.atproto.repo.putRecord'\n\nexport { $nsid }\n\nexport const $lxm = $nsid\nexport const $params = /*#__PURE__*/ l.params()\nexport const $input = /*#__PURE__*/ l.jsonPayload({\n repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),\n collection: /*#__PURE__*/ l.string({ format: 'nsid' }),\n rkey: /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),\n validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),\n record: /*#__PURE__*/ l.lexMap(),\n swapRecord: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.nullable(/*#__PURE__*/ l.string({ format: 'cid' })),\n ),\n swapCommit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string({ format: 'cid' }),\n ),\n})\nexport const $output = /*#__PURE__*/ l.jsonPayload({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n commit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(\n (() => RepoDefs.commitMeta) as any,\n ),\n ),\n validationStatus: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),\n ),\n})\n/** Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. */\nconst main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [\n 'InvalidSwap',\n])\n\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>\nexport type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<\n typeof main,\n B\n>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n"]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { l } from '@atproto/lex-schema';
|
|
2
2
|
declare const $nsid = "com.atproto.repo.uploadBlob";
|
|
3
3
|
export { $nsid };
|
|
4
|
+
export declare const $lxm = "com.atproto.repo.uploadBlob";
|
|
5
|
+
export declare const $params: l.ParamsSchema<{}>;
|
|
6
|
+
export declare const $input: l.Payload<"*/*", undefined>;
|
|
7
|
+
export declare const $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
8
|
+
blob: l.BlobSchema<{}>;
|
|
9
|
+
}>>;
|
|
4
10
|
/** 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. */
|
|
5
11
|
declare const main: l.Procedure<"com.atproto.repo.uploadBlob", l.ParamsSchema<{}>, l.Payload<"*/*", undefined>, l.Payload<"application/json", l.ObjectSchema<{
|
|
6
12
|
blob: l.BlobSchema<{}>;
|
|
@@ -11,7 +17,4 @@ export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
|
11
17
|
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
12
18
|
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
13
19
|
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
14
|
-
export declare const $lxm: "com.atproto.repo.uploadBlob", $params: l.ParamsSchema<{}>, $input: l.Payload<"*/*", undefined>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
15
|
-
blob: l.BlobSchema<{}>;
|
|
16
|
-
}>>;
|
|
17
20
|
//# sourceMappingURL=uploadBlob.defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,gCAAgC,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,gRAAgR;AAChR,QAAA,MAAM,IAAI;;
|
|
1
|
+
{"version":3,"file":"uploadBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,gCAAgC,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,eAAO,MAAM,IAAI,gCAAQ,CAAA;AACzB,eAAO,MAAM,OAAO,oBAA2B,CAAA;AAC/C,eAAO,MAAM,MAAM,6BAAiC,CAAA;AACpD,eAAO,MAAM,OAAO;;GAElB,CAAA;AACF,gRAAgR;AAChR,QAAA,MAAM,IAAI;;eAA6D,CAAA;AAEvE,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,gBAAgB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,oBAAoB,CAC/D,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA"}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import { l } from '@atproto/lex-schema';
|
|
5
5
|
const $nsid = 'com.atproto.repo.uploadBlob';
|
|
6
6
|
export { $nsid };
|
|
7
|
+
export const $lxm = $nsid;
|
|
8
|
+
export const $params = /*#__PURE__*/ l.params();
|
|
9
|
+
export const $input = /*#__PURE__*/ l.payload('*/*');
|
|
10
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
11
|
+
blob: /*#__PURE__*/ l.blob(),
|
|
12
|
+
});
|
|
7
13
|
/** 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. */
|
|
8
|
-
const main =
|
|
9
|
-
/*#__PURE__*/
|
|
10
|
-
l.procedure($nsid,
|
|
11
|
-
/*#__PURE__*/ l.params(),
|
|
12
|
-
/*#__PURE__*/ l.payload('*/*'),
|
|
13
|
-
/*#__PURE__*/ l.jsonPayload({ blob: /*#__PURE__*/ l.blob() }));
|
|
14
|
+
const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output);
|
|
14
15
|
export { main };
|
|
15
|
-
export const $lxm = /*#__PURE__*/ main.nsid, $params = /*#__PURE__*/ main.parameters, $input = /*#__PURE__*/ main.input, $output = /*#__PURE__*/ main.output;
|
|
16
16
|
//# sourceMappingURL=uploadBlob.defs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,MAAM,KAAK,GAAG,6BAA6B,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,
|
|
1
|
+
{"version":3,"file":"uploadBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,MAAM,KAAK,GAAG,6BAA6B,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAA;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAA;AAC/C,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IACjD,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE;CAC7B,CAAC,CAAA;AACF,gRAAgR;AAChR,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;AAEvE,OAAO,EAAE,IAAI,EAAE,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\n\nconst $nsid = 'com.atproto.repo.uploadBlob'\n\nexport { $nsid }\n\nexport const $lxm = $nsid\nexport const $params = /*#__PURE__*/ l.params()\nexport const $input = /*#__PURE__*/ l.payload('*/*')\nexport const $output = /*#__PURE__*/ l.jsonPayload({\n blob: /*#__PURE__*/ l.blob(),\n})\n/** 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. */\nconst main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output)\n\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>\nexport type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<\n typeof main,\n B\n>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * as
|
|
1
|
+
export * as applyWrites from './repo/applyWrites.js';
|
|
2
2
|
export * as deleteRecord from './repo/deleteRecord.js';
|
|
3
3
|
export * as getRecord from './repo/getRecord.js';
|
|
4
4
|
export * as listRecords from './repo/listRecords.js';
|
|
5
5
|
export * as putRecord from './repo/putRecord.js';
|
|
6
6
|
export * as uploadBlob from './repo/uploadBlob.js';
|
|
7
|
+
export * as createRecord from './repo/createRecord.js';
|
|
7
8
|
export * as defs from './repo/defs.js';
|
|
8
9
|
//# sourceMappingURL=repo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../../../src/lexicons/com/atproto/repo.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../../../src/lexicons/com/atproto/repo.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
export * as
|
|
4
|
+
export * as applyWrites from './repo/applyWrites.js';
|
|
5
5
|
export * as deleteRecord from './repo/deleteRecord.js';
|
|
6
6
|
export * as getRecord from './repo/getRecord.js';
|
|
7
7
|
export * as listRecords from './repo/listRecords.js';
|
|
8
8
|
export * as putRecord from './repo/putRecord.js';
|
|
9
9
|
export * as uploadBlob from './repo/uploadBlob.js';
|
|
10
|
+
export * as createRecord from './repo/createRecord.js';
|
|
10
11
|
export * as defs from './repo/defs.js';
|
|
11
12
|
//# sourceMappingURL=repo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.js","sourceRoot":"","sources":["../../../../src/lexicons/com/atproto/repo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"repo.js","sourceRoot":"","sources":["../../../../src/lexicons/com/atproto/repo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as applyWrites from './repo/applyWrites.js'\nexport * as deleteRecord from './repo/deleteRecord.js'\nexport * as getRecord from './repo/getRecord.js'\nexport * as listRecords from './repo/listRecords.js'\nexport * as putRecord from './repo/putRecord.js'\nexport * as uploadBlob from './repo/uploadBlob.js'\nexport * as createRecord from './repo/createRecord.js'\nexport * as defs from './repo/defs.js'\n"]}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { l } from '@atproto/lex-schema';
|
|
2
2
|
declare const $nsid = "com.atproto.sync.getBlob";
|
|
3
3
|
export { $nsid };
|
|
4
|
+
export declare const $lxm = "com.atproto.sync.getBlob";
|
|
5
|
+
export declare const $params: l.ParamsSchema<{
|
|
6
|
+
readonly did: l.StringSchema<{
|
|
7
|
+
readonly format: "did";
|
|
8
|
+
}>;
|
|
9
|
+
readonly cid: l.StringSchema<{
|
|
10
|
+
readonly format: "cid";
|
|
11
|
+
}>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const $output: l.Payload<"*/*", undefined>;
|
|
4
14
|
/** Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. */
|
|
5
15
|
declare const main: l.Query<"com.atproto.sync.getBlob", l.ParamsSchema<{
|
|
6
16
|
readonly did: l.StringSchema<{
|
|
@@ -14,12 +24,4 @@ export { main };
|
|
|
14
24
|
export type $Params = l.InferMethodParams<typeof main>;
|
|
15
25
|
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
16
26
|
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
17
|
-
export declare const $lxm: "com.atproto.sync.getBlob", $params: l.ParamsSchema<{
|
|
18
|
-
readonly did: l.StringSchema<{
|
|
19
|
-
readonly format: "did";
|
|
20
|
-
}>;
|
|
21
|
-
readonly cid: l.StringSchema<{
|
|
22
|
-
readonly format: "cid";
|
|
23
|
-
}>;
|
|
24
|
-
}>, $output: l.Payload<"*/*", undefined>;
|
|
25
27
|
//# sourceMappingURL=getBlob.defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,6BAA6B,CAAA;AAExC,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,2IAA2I;AAC3I,QAAA,MAAM,IAAI;;;;;;;
|
|
1
|
+
{"version":3,"file":"getBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,6BAA6B,CAAA;AAExC,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,eAAO,MAAM,IAAI,6BAAQ,CAAA;AACzB,eAAO,MAAM,OAAO;;;;;;;EAGlB,CAAA;AACF,eAAO,MAAM,OAAO,6BAAiC,CAAA;AACrD,2IAA2I;AAC3I,QAAA,MAAM,IAAI;;;;;;;gIAMR,CAAA;AAEF,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA"}
|
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
import { l } from '@atproto/lex-schema';
|
|
5
5
|
const $nsid = 'com.atproto.sync.getBlob';
|
|
6
6
|
export { $nsid };
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
/*#__PURE__*/
|
|
10
|
-
l.query($nsid,
|
|
11
|
-
/*#__PURE__*/ l.params({
|
|
7
|
+
export const $lxm = $nsid;
|
|
8
|
+
export const $params = /*#__PURE__*/ l.params({
|
|
12
9
|
did: /*#__PURE__*/ l.string({ format: 'did' }),
|
|
13
10
|
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
14
|
-
})
|
|
15
|
-
/*#__PURE__*/ l.payload('*/*')
|
|
11
|
+
});
|
|
12
|
+
export const $output = /*#__PURE__*/ l.payload('*/*');
|
|
13
|
+
/** Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. */
|
|
14
|
+
const main = /*#__PURE__*/ l.query($nsid, $params, $output, [
|
|
16
15
|
'BlobNotFound',
|
|
17
16
|
'RepoNotFound',
|
|
18
17
|
'RepoTakendown',
|
|
@@ -20,5 +19,4 @@ l.query($nsid,
|
|
|
20
19
|
'RepoDeactivated',
|
|
21
20
|
]);
|
|
22
21
|
export { main };
|
|
23
|
-
export const $lxm = /*#__PURE__*/ main.nsid, $params = main.parameters, $output = main.output;
|
|
24
22
|
//# sourceMappingURL=getBlob.defs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,MAAM,KAAK,GAAG,0BAA0B,CAAA;AAExC,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,
|
|
1
|
+
{"version":3,"file":"getBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,MAAM,KAAK,GAAG,0BAA0B,CAAA;AAExC,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAA;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5C,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9C,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;CAC/C,CAAC,CAAA;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACrD,2IAA2I;AAC3I,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;IAC1D,cAAc;IACd,cAAc;IACd,eAAe;IACf,eAAe;IACf,iBAAiB;CAClB,CAAC,CAAA;AAEF,OAAO,EAAE,IAAI,EAAE,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\n\nconst $nsid = 'com.atproto.sync.getBlob'\n\nexport { $nsid }\n\nexport const $lxm = $nsid\nexport const $params = /*#__PURE__*/ l.params({\n did: /*#__PURE__*/ l.string({ format: 'did' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n})\nexport const $output = /*#__PURE__*/ l.payload('*/*')\n/** Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. */\nconst main = /*#__PURE__*/ l.query($nsid, $params, $output, [\n 'BlobNotFound',\n 'RepoNotFound',\n 'RepoTakendown',\n 'RepoSuspended',\n 'RepoDeactivated',\n])\n\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -42,15 +42,11 @@ export type Service = `${DidString}#${DidServiceIdentifier}`;
|
|
|
42
42
|
* const file: BinaryBodyInit = fileInput.files[0]
|
|
43
43
|
* await client.xrpc(uploadMethod, { body: file })
|
|
44
44
|
* ```
|
|
45
|
-
*
|
|
46
|
-
* @note Uint8Array is parameterized with ArrayBuffer (not ArrayBufferLike)
|
|
47
|
-
* because fetch's BodyInit requires ArrayBuffer-backed views —
|
|
48
|
-
* SharedArrayBuffer is not supported for network I/O.
|
|
49
45
|
*/
|
|
50
|
-
export type BinaryBodyInit =
|
|
46
|
+
export type BinaryBodyInit = string | Blob | Uint8Array | ArrayBuffer | ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>;
|
|
51
47
|
export type EncodingString = `${string}/${string}`;
|
|
52
48
|
export declare function isEncodingString(contentType: string): contentType is EncodingString;
|
|
53
|
-
export type XrpcUnknownResponsePayload<TBinary extends BinaryBodyInit = Uint8Array
|
|
49
|
+
export type XrpcUnknownResponsePayload<TBinary extends BinaryBodyInit = Uint8Array> = {
|
|
54
50
|
encoding: EncodingString;
|
|
55
51
|
body: LexValue | TBinary;
|
|
56
52
|
};
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;AAElD;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,aAAa,CAAA;AAEpE;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,GAAG,GAAG,SAAS,IAAI,oBAAoB,EAAE,CAAA;AAE5D
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;AAElD;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,aAAa,CAAA;AAEpE;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,GAAG,GAAG,SAAS,IAAI,oBAAoB,EAAE,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,IAAI,GACJ,UAAU,GACV,WAAW,GACX,cAAc,CAAC,UAAU,CAAC,GAC1B,aAAa,CAAC,UAAU,CAAC,CAAA;AAE7B,MAAM,MAAM,cAAc,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAA;AAElD,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,GAClB,WAAW,IAAI,cAAc,CAE/B;AAED,MAAM,MAAM,0BAA0B,CACpC,OAAO,SAAS,cAAc,GAAG,UAAU,IACzC;IACF,QAAQ,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAA;CACzB,CAAA"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA2DA,MAAM,UAAU,gBAAgB,CAC9B,WAAmB;IAEnB,OAAO,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAClC,CAAC","sourcesContent":["import { DidString, LexValue, UnknownString } from '@atproto/lex-schema'\n\nexport type { DidString, LexValue, UnknownString }\n\n/**\n * Service identifier fragment for DID service endpoints.\n *\n * Common values include 'atproto_labeler' for labeling services,\n * or custom service identifiers.\n */\nexport type DidServiceIdentifier = 'atproto_labeler' | UnknownString\n\n/**\n * A full service proxy identifier combining a DID with a service fragment.\n *\n * Used to route requests through a specific service endpoint.\n *\n * @example\n * ```typescript\n * const service: Service = 'did:web:api.bsky.app#bsky_appview'\n * ```\n */\nexport type Service = `${DidString}#${DidServiceIdentifier}`\n\n/**\n * Valid input types for binary request bodies.\n *\n * These types can be used as the body for procedures that expect\n * non-JSON content (e.g., blob uploads, binary data).\n *\n * @example Uploading a blob\n * ```typescript\n * const imageData: BinaryBodyInit = new Uint8Array(buffer)\n * await client.uploadBlob(imageData, { encoding: 'image/png' })\n * ```\n *\n * @example Streaming upload\n * ```typescript\n * const stream: BinaryBodyInit = someReadableStream\n * await client.xrpc(uploadMethod, { body: stream })\n * ```\n *\n * @example File upload in browser\n * ```typescript\n * const fileInput = document.querySelector('input[type=\"file\"]') as HTMLInputElement\n * const file: BinaryBodyInit = fileInput.files[0]\n * await client.xrpc(uploadMethod, { body: file })\n * ```\n */\nexport type BinaryBodyInit =\n | string\n | Blob\n | Uint8Array\n | ArrayBuffer\n | ReadableStream<Uint8Array>\n | AsyncIterable<Uint8Array>\n\nexport type EncodingString = `${string}/${string}`\n\nexport function isEncodingString(\n contentType: string,\n): contentType is EncodingString {\n return contentType.includes('/')\n}\n\nexport type XrpcUnknownResponsePayload<\n TBinary extends BinaryBodyInit = Uint8Array,\n> = {\n encoding: EncodingString\n body: LexValue | TBinary\n}\n"]}
|
package/dist/util.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InferRecordKey, LexiconRecordKey, RecordSchema } from '@atproto/lex-schema';
|
|
1
2
|
import type { DidString, Service } from './types.js';
|
|
2
3
|
export declare function applyDefaults<TDefaults extends Record<string, unknown>, TOptions extends {
|
|
3
4
|
[K in keyof TDefaults]?: TDefaults[K];
|
|
@@ -13,6 +14,7 @@ export declare function applyDefaults<TDefaults extends Record<string, unknown>,
|
|
|
13
14
|
*/
|
|
14
15
|
export declare function isBlobLike(value: unknown): value is Blob;
|
|
15
16
|
export declare function isAsyncIterable<T>(value: T): value is unknown extends T ? T & AsyncIterable<unknown> : Extract<T, AsyncIterable<any>>;
|
|
17
|
+
export declare function asUint8ArrayArrayBuffer(bytes: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
16
18
|
export type XrpcRequestHeadersOptions = {
|
|
17
19
|
/** Additional HTTP headers to include in the request. */
|
|
18
20
|
headers?: HeadersInit;
|
|
@@ -34,4 +36,11 @@ export type XrpcRequestHeadersOptions = {
|
|
|
34
36
|
export declare function buildXrpcRequestHeaders(options: XrpcRequestHeadersOptions): Headers;
|
|
35
37
|
export declare function toReadableStream(data: AsyncIterable<Uint8Array>): ReadableStream<Uint8Array>;
|
|
36
38
|
export declare function toReadableStreamPonyfill(data: AsyncIterable<Uint8Array>): ReadableStream<Uint8Array>;
|
|
39
|
+
export type RecordKeyOptions<T extends RecordSchema, AlsoOptionalWhenRecordKeyIs extends LexiconRecordKey = never> = T['key'] extends `literal:${string}` | AlsoOptionalWhenRecordKeyIs ? {
|
|
40
|
+
rkey?: InferRecordKey<T>;
|
|
41
|
+
} : {
|
|
42
|
+
rkey: InferRecordKey<T>;
|
|
43
|
+
};
|
|
44
|
+
export declare function getDefaultRecordKey<const T extends RecordSchema>(schema: T): undefined | InferRecordKey<T>;
|
|
45
|
+
export declare function getLiteralRecordKey<const T extends RecordSchema>(schema: T): InferRecordKey<T>;
|
|
37
46
|
//# sourceMappingURL=util.d.ts.map
|
package/dist/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpD,wBAAgB,aAAa,CAC3B,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzC,QAAQ,SAAS;KACd,CAAC,IAAI,MAAM,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;CACtC,EACD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAY9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAexD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,CAAC,GACP,KAAK,IAAI,OAAO,SAAS,CAAC,GACzB,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,GAC1B,OAAO,CAAC,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,CAIjC;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,yDAAyD;IACzD,OAAO,CAAC,EAAE,WAAW,CAAA;IAErB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;IAE9B,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAiBT;AAED,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AC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAiBT;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,GAC9B,cAAc,CAAC,UAAU,CAAC,CAU5B;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,GAC9B,cAAc,CAAC,UAAU,CAAC,CAmB5B;AAED,MAAM,MAAM,gBAAgB,CAC1B,CAAC,SAAS,YAAY,EACtB,2BAA2B,SAAS,gBAAgB,GAAG,KAAK,IAC1D,CAAC,CAAC,KAAK,CAAC,SAAS,WAAW,MAAM,EAAE,GAAG,2BAA2B,GAClE;IAAE,IAAI,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;CAAE,CAAA;AAE/B,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,EAC9D,MAAM,EAAE,CAAC,GACR,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAM/B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,EAC9D,MAAM,EAAE,CAAC,GACR,cAAc,CAAC,CAAC,CAAC,CAQnB"}
|
package/dist/util.js
CHANGED
|
@@ -37,6 +37,15 @@ export function isBlobLike(value) {
|
|
|
37
37
|
export function isAsyncIterable(value) {
|
|
38
38
|
return (value != null && typeof value[Symbol.asyncIterator] === 'function');
|
|
39
39
|
}
|
|
40
|
+
export function asUint8ArrayArrayBuffer(bytes) {
|
|
41
|
+
// If the Uint8Array is already backed by a non-shared ArrayBuffer, we can use
|
|
42
|
+
// it directly.
|
|
43
|
+
if (bytes.buffer instanceof ArrayBuffer) {
|
|
44
|
+
return bytes;
|
|
45
|
+
}
|
|
46
|
+
// Otherwise, we need to create a new ArrayBuffer and copy the data.
|
|
47
|
+
return new Uint8Array(bytes);
|
|
48
|
+
}
|
|
40
49
|
/**
|
|
41
50
|
* Builds HTTP headers for AT Protocol requests.
|
|
42
51
|
*
|
|
@@ -91,4 +100,18 @@ export function toReadableStreamPonyfill(data) {
|
|
|
91
100
|
},
|
|
92
101
|
});
|
|
93
102
|
}
|
|
103
|
+
export function getDefaultRecordKey(schema) {
|
|
104
|
+
// Let the server generate the TID
|
|
105
|
+
if (schema.key === 'tid')
|
|
106
|
+
return undefined;
|
|
107
|
+
if (schema.key === 'any')
|
|
108
|
+
return undefined;
|
|
109
|
+
return getLiteralRecordKey(schema);
|
|
110
|
+
}
|
|
111
|
+
export function getLiteralRecordKey(schema) {
|
|
112
|
+
if (schema.key.startsWith('literal:')) {
|
|
113
|
+
return schema.key.slice(8);
|
|
114
|
+
}
|
|
115
|
+
throw new TypeError(`An "rkey" must be provided for record key type "${schema.key}" (${schema.$type})`);
|
|
116
|
+
}
|
|
94
117
|
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,aAAa,CAK3B,OAAiB,EAAE,QAAmB;IACtC,MAAM,QAAQ,GAAuB,EAAE,GAAG,OAAO,EAAE,CAAA;IAEnD,6EAA6E;IAC7E,8DAA8D;IAC9D,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAA8B,EAAE,CAAC;QACrE,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YAC/B,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;QAC/B,CAAC;IACH,CAAC;IAED,OAAO,QAAgC,CAAA;AACzC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M,EAAE,EAAE,CAAA;YAC1B,QAAQ,GAAG,SAAS,CAAA;QACtB,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AASD,MAAM,UAAU,mBAAmB,CACjC,MAAS;IAET,kCAAkC;IAClC,IAAI,MAAM,CAAC,GAAG,KAAK,KAAK;QAAE,OAAO,SAAS,CAAA;IAC1C,IAAI,MAAM,CAAC,GAAG,KAAK,KAAK;QAAE,OAAO,SAAS,CAAA;IAE1C,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAA;AACpC,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,MAAS;IAET,IAAI,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACtC,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAsB,CAAA;IACjD,CAAC;IAED,MAAM,IAAI,SAAS,CACjB,mDAAmD,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,GAAG,CACnF,CAAA;AACH,CAAC","sourcesContent":["import {\n InferRecordKey,\n LexiconRecordKey,\n RecordSchema,\n} from '@atproto/lex-schema'\nimport type { DidString, Service } from './types.js'\n\nexport function applyDefaults<\n TDefaults extends Record<string, unknown>,\n TOptions extends {\n [K in keyof TDefaults]?: TDefaults[K]\n },\n>(options: TOptions, defaults: TDefaults): TOptions & TDefaults {\n const combined: Partial<TDefaults> = { ...options }\n\n // @NOTE We make sure that options with an explicit `undefined` value get the\n // default, since spreading doesn't override with `undefined`.\n for (const key of Object.keys(defaults) as (keyof typeof defaults)[]) {\n if (options[key] === undefined) {\n combined[key] = defaults[key]\n }\n }\n\n return combined as TOptions & TDefaults\n}\n\n/**\n * Type guard to check if a value is {@link Blob}-like.\n *\n * Handles both native Blobs and polyfilled Blob implementations\n * (e.g., fetch-blob from node-fetch).\n *\n * @param value - The value to check\n * @returns `true` if the value is a Blob or Blob-like object\n */\nexport function isBlobLike(value: unknown): value is Blob {\n if (value == null) return false\n if (typeof value !== 'object') return false\n if (typeof Blob === 'function' && value instanceof Blob) return true\n\n // Support for Blobs provided by libraries that don't use the native Blob\n // (e.g. fetch-blob from node-fetch).\n // https://github.com/node-fetch/fetch-blob/blob/a1a182e5978811407bef4ea1632b517567dda01f/index.js#L233-L244\n\n const tag = (value as any)[Symbol.toStringTag]\n if (tag === 'Blob' || tag === 'File') {\n return 'stream' in value && typeof value.stream === 'function'\n }\n\n return false\n}\n\nexport function isAsyncIterable<T>(\n value: T,\n): value is unknown extends T\n ? T & AsyncIterable<unknown>\n : Extract<T, AsyncIterable<any>> {\n return (\n value != null && typeof (value as any)[Symbol.asyncIterator] === 'function'\n )\n}\n\nexport function asUint8ArrayArrayBuffer(\n bytes: Uint8Array,\n): Uint8Array<ArrayBuffer> {\n // If the Uint8Array is already backed by a non-shared ArrayBuffer, we can use\n // it directly.\n if (bytes.buffer instanceof ArrayBuffer) {\n return bytes as Uint8Array<ArrayBuffer>\n }\n\n // Otherwise, we need to create a new ArrayBuffer and copy the data.\n return new Uint8Array(bytes)\n}\n\nexport type XrpcRequestHeadersOptions = {\n /** Additional HTTP headers to include in the request. */\n headers?: HeadersInit\n\n /** Labeler DIDs to request labels from for content moderation. */\n labelers?: Iterable<DidString>\n\n /** Service proxy identifier for routing requests through a specific service. */\n service?: Service\n}\n\n/**\n * Builds HTTP headers for AT Protocol requests.\n *\n * Adds the following headers when applicable:\n * - `atproto-proxy`: Service routing header (if service is specified)\n * - `atproto-accept-labelers`: Comma-separated list of labeler DIDs\n *\n * @see {@link XrpcRequestHeadersOptions}\n * @returns A new Headers object with AT Protocol headers added\n */\nexport function buildXrpcRequestHeaders(\n options: XrpcRequestHeadersOptions,\n): Headers {\n const headers = new Headers(options?.headers)\n\n if (options.service && !headers.has('atproto-proxy')) {\n headers.set('atproto-proxy', options.service)\n }\n\n if (options.labelers) {\n headers.set(\n 'atproto-accept-labelers',\n [...options.labelers, headers.get('atproto-accept-labelers')?.trim()]\n .filter(Boolean)\n .join(', '),\n )\n }\n\n return headers\n}\n\nexport function toReadableStream(\n data: AsyncIterable<Uint8Array>,\n): ReadableStream<Uint8Array> {\n // Use the native ReadableStream.from() if available.\n\n /* v8 ignore next -- @preserve */\n if ('from' in ReadableStream && typeof ReadableStream.from === 'function') {\n return ReadableStream.from(data)\n }\n\n /* v8 ignore next -- @preserve */\n return toReadableStreamPonyfill(data)\n}\n\nexport function toReadableStreamPonyfill(\n data: AsyncIterable<Uint8Array>,\n): ReadableStream<Uint8Array> {\n let iterator: AsyncIterator<Uint8Array> | undefined\n return new ReadableStream<Uint8Array>({\n async pull(controller) {\n try {\n iterator ??= data[Symbol.asyncIterator]()\n const result = await iterator!.next()\n if (result.done) controller.close()\n else controller.enqueue(result.value)\n } catch (err) {\n controller.error(err)\n iterator = undefined\n }\n },\n async cancel() {\n await iterator?.return?.()\n iterator = undefined\n },\n })\n}\n\nexport type RecordKeyOptions<\n T extends RecordSchema,\n AlsoOptionalWhenRecordKeyIs extends LexiconRecordKey = never,\n> = T['key'] extends `literal:${string}` | AlsoOptionalWhenRecordKeyIs\n ? { rkey?: InferRecordKey<T> }\n : { rkey: InferRecordKey<T> }\n\nexport function getDefaultRecordKey<const T extends RecordSchema>(\n schema: T,\n): undefined | InferRecordKey<T> {\n // Let the server generate the TID\n if (schema.key === 'tid') return undefined\n if (schema.key === 'any') return undefined\n\n return getLiteralRecordKey(schema)\n}\n\nexport function getLiteralRecordKey<const T extends RecordSchema>(\n schema: T,\n): InferRecordKey<T> {\n if (schema.key.startsWith('literal:')) {\n return schema.key.slice(8) as InferRecordKey<T>\n }\n\n throw new TypeError(\n `An \"rkey\" must be provided for record key type \"${schema.key}\" (${schema.$type})`,\n )\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { $Typed, InferInput, Main, RecordSchema, Restricted } from '@atproto/lex-schema';
|
|
2
|
+
import { com } from './lexicons/index.js';
|
|
3
|
+
import { RecordKeyOptions } from './util.js';
|
|
4
|
+
export type WriteOperation = $Typed<com.atproto.repo.applyWrites.Create> | $Typed<com.atproto.repo.applyWrites.Update> | $Typed<com.atproto.repo.applyWrites.Delete>;
|
|
5
|
+
export type WriteOperationCreateOptions<T extends RecordSchema> = RecordKeyOptions<T, 'tid' | 'any'>;
|
|
6
|
+
export type WriteOperationUpdateOptions<T extends RecordSchema> = RecordKeyOptions<T>;
|
|
7
|
+
export type WriteOperationDeleteOptions<T extends RecordSchema> = RecordKeyOptions<T>;
|
|
8
|
+
export type WriteOperationsFactory = (helper: WriteOperationHelper) => Iterable<WriteOperation>;
|
|
9
|
+
export declare class WriteOperationHelper {
|
|
10
|
+
private constructor();
|
|
11
|
+
create<const T extends RecordSchema>(ns: NonNullable<unknown> extends WriteOperationCreateOptions<T> ? Main<T> : Restricted<'This record type requires an "options" argument'>, input: Omit<InferInput<T>, '$type'>): $Typed<com.atproto.repo.applyWrites.Create>;
|
|
12
|
+
create<const T extends RecordSchema>(ns: Main<T>, input: Omit<InferInput<T>, '$type'>, options: WriteOperationCreateOptions<T>): $Typed<com.atproto.repo.applyWrites.Create>;
|
|
13
|
+
update<const T extends RecordSchema>(ns: NonNullable<unknown> extends WriteOperationUpdateOptions<T> ? Main<T> : Restricted<'This record type requires an "options" argument'>, input: Omit<InferInput<T>, '$type'>): $Typed<com.atproto.repo.applyWrites.Update>;
|
|
14
|
+
update<const T extends RecordSchema>(ns: Main<T>, input: Omit<InferInput<T>, '$type'>, options: WriteOperationUpdateOptions<T>): $Typed<com.atproto.repo.applyWrites.Update>;
|
|
15
|
+
delete<const T extends RecordSchema>(ns: NonNullable<unknown> extends WriteOperationDeleteOptions<T> ? Main<T> : Restricted<'This record type requires an "options" argument'>): $Typed<com.atproto.repo.applyWrites.Delete>;
|
|
16
|
+
delete<const T extends RecordSchema>(ns: Main<T>, options: WriteOperationDeleteOptions<T>): $Typed<com.atproto.repo.applyWrites.Delete>;
|
|
17
|
+
static build(factory: WriteOperationsFactory): WriteOperation[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=write-operation-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-operation-builder.d.ts","sourceRoot":"","sources":["../src/write-operation-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,UAAU,EAEX,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AACzC,OAAO,EACL,gBAAgB,EAGjB,MAAM,WAAW,CAAA;AAElB,MAAM,MAAM,cAAc,GACtB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAC3C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAC3C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;AAE/C,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,YAAY,IAC5D,gBAAgB,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,CAAA;AAEpC,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,YAAY,IAC5D,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAErB,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,YAAY,IAC5D,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAErB,MAAM,MAAM,sBAAsB,GAAG,CACnC,MAAM,EAAE,oBAAoB,KACzB,QAAQ,CAAC,cAAc,CAAC,CAAA;AAE7B,qBAAa,oBAAoB;IAC/B,OAAO;IAEP,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,EACjC,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,2BAA2B,CAAC,CAAC,CAAC,GAC3D,IAAI,CAAC,CAAC,CAAC,GACP,UAAU,CAAC,iDAAiD,CAAC,EACjE,KAAK,EAAE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,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IAC9C,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,EACjC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,EACX,OAAO,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IAY9C,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,sBAAsB,GAAG,cAAc,EAAE;CAGhE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { getMain, } from '@atproto/lex-schema';
|
|
2
|
+
import { com } from './lexicons/index.js';
|
|
3
|
+
import { getDefaultRecordKey, getLiteralRecordKey, } from './util.js';
|
|
4
|
+
export class WriteOperationHelper {
|
|
5
|
+
constructor() { }
|
|
6
|
+
create(ns, input, options = {}) {
|
|
7
|
+
const schema = getMain(ns);
|
|
8
|
+
const value = schema.build(input);
|
|
9
|
+
return com.atproto.repo.applyWrites.create.$build({
|
|
10
|
+
collection: schema.$type,
|
|
11
|
+
value,
|
|
12
|
+
rkey: options?.rkey ?? getDefaultRecordKey(schema),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
update(ns, input, options = {}) {
|
|
16
|
+
const schema = getMain(ns);
|
|
17
|
+
const value = schema.build(input);
|
|
18
|
+
return com.atproto.repo.applyWrites.update.$build({
|
|
19
|
+
collection: schema.$type,
|
|
20
|
+
value,
|
|
21
|
+
rkey: options?.rkey ?? getLiteralRecordKey(schema),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
delete(ns, options = {}) {
|
|
25
|
+
const schema = getMain(ns);
|
|
26
|
+
return com.atproto.repo.applyWrites.delete.$build({
|
|
27
|
+
collection: schema.$type,
|
|
28
|
+
rkey: options?.rkey ?? getLiteralRecordKey(schema),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
static build(factory) {
|
|
32
|
+
return Array.from(factory(new WriteOperationHelper()));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=write-operation-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-operation-builder.js","sourceRoot":"","sources":["../src/write-operation-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,OAAO,GACR,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AACzC,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,WAAW,CAAA;AAoBlB,MAAM,OAAO,oBAAoB;IAC/B,gBAAuB,CAAC;IAaxB,MAAM,CACJ,EAAW,EACX,KAAmC,EACnC,UAA0C,EAAoC;QAE9E,MAAM,MAAM,GAAM,OAAO,CAAC,EAAE,CAAC,CAAA;QAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACjC,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;YAChD,UAAU,EAAE,MAAM,CAAC,KAAK;YACxB,KAAK;YACL,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC;SACnD,CAAC,CAAA;IACJ,CAAC;IAaD,MAAM,CACJ,EAAW,EACX,KAAmC,EACnC,UAA0C,EAAoC;QAE9E,MAAM,MAAM,GAAM,OAAO,CAAC,EAAE,CAAC,CAAA;QAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACjC,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;YAChD,UAAU,EAAE,MAAM,CAAC,KAAK;YACxB,KAAK;YACL,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC;SACnD,CAAC,CAAA;IACJ,CAAC;IAWD,MAAM,CACJ,EAAW,EACX,UAA0C,EAAoC;QAE9E,MAAM,MAAM,GAAM,OAAO,CAAC,EAAE,CAAC,CAAA;QAC7B,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;YAChD,UAAU,EAAE,MAAM,CAAC,KAAK;YACxB,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC;SACnD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAA+B;QAC1C,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC,CAAA;IACxD,CAAC;CACF","sourcesContent":["import {\n $Typed,\n InferInput,\n Main,\n RecordSchema,\n Restricted,\n getMain,\n} from '@atproto/lex-schema'\nimport { com } from './lexicons/index.js'\nimport {\n RecordKeyOptions,\n getDefaultRecordKey,\n getLiteralRecordKey,\n} from './util.js'\n\nexport type WriteOperation =\n | $Typed<com.atproto.repo.applyWrites.Create>\n | $Typed<com.atproto.repo.applyWrites.Update>\n | $Typed<com.atproto.repo.applyWrites.Delete>\n\nexport type WriteOperationCreateOptions<T extends RecordSchema> =\n RecordKeyOptions<T, 'tid' | 'any'>\n\nexport type WriteOperationUpdateOptions<T extends RecordSchema> =\n RecordKeyOptions<T>\n\nexport type WriteOperationDeleteOptions<T extends RecordSchema> =\n RecordKeyOptions<T>\n\nexport type WriteOperationsFactory = (\n helper: WriteOperationHelper,\n) => Iterable<WriteOperation>\n\nexport class WriteOperationHelper {\n private constructor() {}\n\n create<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends WriteOperationCreateOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<InferInput<T>, '$type'>,\n ): $Typed<com.atproto.repo.applyWrites.Create>\n create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationCreateOptions<T>,\n ): $Typed<com.atproto.repo.applyWrites.Create>\n create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationCreateOptions<T> = {} as WriteOperationCreateOptions<T>,\n ): $Typed<com.atproto.repo.applyWrites.Create> {\n const schema: T = getMain(ns)\n const value = schema.build(input)\n return com.atproto.repo.applyWrites.create.$build({\n collection: schema.$type,\n value,\n rkey: options?.rkey ?? getDefaultRecordKey(schema),\n })\n }\n\n update<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends WriteOperationUpdateOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<InferInput<T>, '$type'>,\n ): $Typed<com.atproto.repo.applyWrites.Update>\n update<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationUpdateOptions<T>,\n ): $Typed<com.atproto.repo.applyWrites.Update>\n update<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationUpdateOptions<T> = {} as WriteOperationUpdateOptions<T>,\n ): $Typed<com.atproto.repo.applyWrites.Update> {\n const schema: T = getMain(ns)\n const value = schema.build(input)\n return com.atproto.repo.applyWrites.update.$build({\n collection: schema.$type,\n value,\n rkey: options?.rkey ?? getLiteralRecordKey(schema),\n })\n }\n\n delete<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends WriteOperationDeleteOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n ): $Typed<com.atproto.repo.applyWrites.Delete>\n delete<const T extends RecordSchema>(\n ns: Main<T>,\n options: WriteOperationDeleteOptions<T>,\n ): $Typed<com.atproto.repo.applyWrites.Delete>\n delete<const T extends RecordSchema>(\n ns: Main<T>,\n options: WriteOperationDeleteOptions<T> = {} as WriteOperationDeleteOptions<T>,\n ): $Typed<com.atproto.repo.applyWrites.Delete> {\n const schema: T = getMain(ns)\n return com.atproto.repo.applyWrites.delete.$build({\n collection: schema.$type,\n rkey: options?.rkey ?? getLiteralRecordKey(schema),\n })\n }\n\n static build(factory: WriteOperationsFactory): WriteOperation[] {\n return Array.from(factory(new WriteOperationHelper()))\n }\n}\n"]}
|
package/dist/xrpc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xrpc.d.ts","sourceRoot":"","sources":["../src/xrpc.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,IAAI,EAEJ,MAAM,EAEN,SAAS,EACT,KAAK,EACL,UAAU,EACV,YAAY,EAEb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,YAAY,EAAc,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAiC,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EACL,yBAAyB,
|
|
1
|
+
{"version":3,"file":"xrpc.d.ts","sourceRoot":"","sources":["../src/xrpc.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,IAAI,EAEJ,MAAM,EAEN,SAAS,EACT,KAAK,EACL,UAAU,EACV,YAAY,EAEb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,YAAY,EAAc,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAiC,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EACL,yBAAyB,EAM1B,MAAM,WAAW,CAAA;AAElB;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,SAAS,GAA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