@atproto/pds 0.4.55 → 0.4.57
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -0
- package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.js +43 -7
- package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.js +10 -2
- package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.js +11 -0
- package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.js +7 -0
- package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/lexicon/index.d.ts +11 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +32 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +367 -18
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +390 -24
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/defs.d.ts +13 -0
- package/dist/lexicon/types/app/bsky/embed/defs.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/embed/defs.js +16 -0
- package/dist/lexicon/types/app/bsky/embed/defs.js.map +1 -0
- package/dist/lexicon/types/app/bsky/embed/images.d.ts +3 -10
- package/dist/lexicon/types/app/bsky/embed/images.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/images.js +1 -11
- package/dist/lexicon/types/app/bsky/embed/images.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts +2 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts +3 -2
- package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/recordWithMedia.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/video.d.ts +33 -0
- package/dist/lexicon/types/app/bsky/embed/video.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/embed/video.js +35 -0
- package/dist/lexicon/types/app/bsky/embed/video.js.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/post.d.ts +2 -1
- package/dist/lexicon/types/app/bsky/feed/post.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/post.js.map +1 -1
- package/dist/lexicon/types/app/bsky/video/defs.d.ts +19 -0
- package/dist/lexicon/types/app/bsky/video/defs.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/video/defs.js +16 -0
- package/dist/lexicon/types/app/bsky/video/defs.js.map +1 -0
- package/dist/lexicon/types/app/bsky/video/getJobStatus.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/video/getJobStatus.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/video/getJobStatus.js +3 -0
- package/dist/lexicon/types/app/bsky/video/getJobStatus.js.map +1 -0
- package/dist/lexicon/types/app/bsky/video/getUploadLimits.d.ts +38 -0
- package/dist/lexicon/types/app/bsky/video/getUploadLimits.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/video/getUploadLimits.js +3 -0
- package/dist/lexicon/types/app/bsky/video/getUploadLimits.js.map +1 -0
- package/dist/lexicon/types/app/bsky/video/uploadVideo.d.ts +41 -0
- package/dist/lexicon/types/app/bsky/video/uploadVideo.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/video/uploadVideo.js +3 -0
- package/dist/lexicon/types/app/bsky/video/uploadVideo.js.map +1 -0
- package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +38 -4
- package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/applyWrites.js +31 -1
- package/dist/lexicon/types/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts +5 -2
- package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/defs.d.ts +12 -0
- package/dist/lexicon/types/com/atproto/repo/defs.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/repo/defs.js +16 -0
- package/dist/lexicon/types/com/atproto/repo/defs.js.map +1 -0
- package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts +14 -2
- package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts +5 -2
- package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts +3 -0
- package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/defs.d.ts +2 -0
- package/dist/lexicon/types/tools/ozone/communication/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts +3 -0
- package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
- package/dist/read-after-write/viewer.d.ts +4 -4
- package/dist/repo/prepare.d.ts +4 -2
- package/dist/repo/prepare.d.ts.map +1 -1
- package/dist/repo/prepare.js +30 -14
- package/dist/repo/prepare.js.map +1 -1
- package/dist/repo/types.d.ts +3 -0
- package/dist/repo/types.d.ts.map +1 -1
- package/dist/repo/types.js.map +1 -1
- package/dist/sequencer/events.d.ts +2 -2
- package/package.json +4 -4
- package/src/api/com/atproto/repo/applyWrites.ts +41 -0
- package/src/api/com/atproto/repo/createRecord.ts +16 -7
- package/src/api/com/atproto/repo/deleteRecord.ts +11 -0
- package/src/api/com/atproto/repo/putRecord.ts +7 -0
- package/src/lexicon/index.ts +46 -0
- package/src/lexicon/lexicons.ts +393 -25
- package/src/lexicon/types/app/bsky/embed/defs.ts +26 -0
- package/src/lexicon/types/app/bsky/embed/images.ts +3 -21
- package/src/lexicon/types/app/bsky/embed/record.ts +2 -0
- package/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +3 -0
- package/src/lexicon/types/app/bsky/embed/video.ts +67 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/feed/post.ts +2 -0
- package/src/lexicon/types/app/bsky/video/defs.ts +32 -0
- package/src/lexicon/types/app/bsky/video/getJobStatus.ts +46 -0
- package/src/lexicon/types/app/bsky/video/getUploadLimits.ts +47 -0
- package/src/lexicon/types/app/bsky/video/uploadVideo.ts +48 -0
- package/src/lexicon/types/com/atproto/repo/applyWrites.ts +70 -3
- package/src/lexicon/types/com/atproto/repo/createRecord.ts +5 -2
- package/src/lexicon/types/com/atproto/repo/defs.ts +25 -0
- package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +13 -1
- package/src/lexicon/types/com/atproto/repo/putRecord.ts +5 -2
- package/src/lexicon/types/tools/ozone/communication/createTemplate.ts +3 -0
- package/src/lexicon/types/tools/ozone/communication/defs.ts +2 -0
- package/src/lexicon/types/tools/ozone/communication/updateTemplate.ts +3 -0
- package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
- package/src/repo/prepare.ts +31 -13
- package/src/repo/types.ts +4 -0
- package/tests/crud.test.ts +131 -14
package/dist/repo/types.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { CID } from 'multiformats/cid';
|
|
2
2
|
import { AtUri } from '@atproto/syntax';
|
3
3
|
import { WriteOpAction } from '@atproto/repo';
|
4
4
|
import { RepoRecord } from '@atproto/lexicon';
|
5
|
+
export type ValidationStatus = 'valid' | 'unknown' | undefined;
|
5
6
|
export type BlobConstraint = {
|
6
7
|
accept?: string[];
|
7
8
|
maxSize?: number;
|
@@ -18,6 +19,7 @@ export type PreparedCreate = {
|
|
18
19
|
swapCid?: CID | null;
|
19
20
|
record: RepoRecord;
|
20
21
|
blobs: PreparedBlobRef[];
|
22
|
+
validationStatus: ValidationStatus;
|
21
23
|
};
|
22
24
|
export type PreparedUpdate = {
|
23
25
|
action: WriteOpAction.Update;
|
@@ -26,6 +28,7 @@ export type PreparedUpdate = {
|
|
26
28
|
swapCid?: CID | null;
|
27
29
|
record: RepoRecord;
|
28
30
|
blobs: PreparedBlobRef[];
|
31
|
+
validationStatus: ValidationStatus;
|
29
32
|
};
|
30
33
|
export type PreparedDelete = {
|
31
34
|
action: WriteOpAction.Delete;
|
package/dist/repo/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/repo/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,cAAc,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,aAAa,CAAC,MAAM,CAAA;IAC5B,GAAG,EAAE,KAAK,CAAA;IACV,GAAG,EAAE,GAAG,CAAA;IACR,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,EAAE,eAAe,EAAE,CAAA;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/repo/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAE9D,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,cAAc,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,aAAa,CAAC,MAAM,CAAA;IAC5B,GAAG,EAAE,KAAK,CAAA;IACV,GAAG,EAAE,GAAG,CAAA;IACR,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,gBAAgB,EAAE,gBAAgB,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,aAAa,CAAC,MAAM,CAAA;IAC5B,GAAG,EAAE,KAAK,CAAA;IACV,GAAG,EAAE,GAAG,CAAA;IACR,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,gBAAgB,EAAE,gBAAgB,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,aAAa,CAAC,MAAM,CAAA;IAC5B,GAAG,EAAE,KAAK,CAAA;IACV,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,cAAc,GAAG,cAAc,CAAA;AAE5E,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAEhD,qBAAa,kBAAmB,SAAQ,KAAK;IACxB,GAAG,EAAE,GAAG;gBAAR,GAAG,EAAE,GAAG;CAG5B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IACxB,GAAG,EAAE,GAAG,GAAG,IAAI;gBAAf,GAAG,EAAE,GAAG,GAAG,IAAI;CAGnC"}
|
package/dist/repo/types.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/repo/types.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/repo/types.ts"],"names":[],"mappings":";;;AA8CA,MAAa,kBAAmB,SAAQ,KAAK;CAAG;AAAhD,gDAAgD;AAEhD,MAAa,kBAAmB,SAAQ,KAAK;IAC3C,YAAmB,GAAQ;QACzB,KAAK,CAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QAD9B;;;;mBAAO,GAAG;WAAK;IAE3B,CAAC;CACF;AAJD,gDAIC;AAED,MAAa,kBAAmB,SAAQ,KAAK;IAC3C,YAAmB,GAAe;QAChC,KAAK,CAAC,iBAAiB,GAAG,EAAE,QAAQ,EAAE,IAAI,MAAM,EAAE,CAAC,CAAA;QADzC;;;;mBAAO,GAAG;WAAY;IAElC,CAAC;CACF;AAJD,gDAIC"}
|
@@ -48,8 +48,8 @@ export declare const commitEvt: z.ZodObject<{
|
|
48
48
|
blobs: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodAny, any, any>, CID, any>, "many">;
|
49
49
|
}, "strip", z.ZodTypeAny, {
|
50
50
|
repo: string;
|
51
|
-
blobs: CID[];
|
52
51
|
rev: string;
|
52
|
+
blobs: CID[];
|
53
53
|
rebase: boolean;
|
54
54
|
tooBig: boolean;
|
55
55
|
commit: CID;
|
@@ -63,8 +63,8 @@ export declare const commitEvt: z.ZodObject<{
|
|
63
63
|
prev: CID | null;
|
64
64
|
}, {
|
65
65
|
repo: string;
|
66
|
-
blobs: any[];
|
67
66
|
rev: string;
|
67
|
+
blobs: any[];
|
68
68
|
rebase: boolean;
|
69
69
|
tooBig: boolean;
|
70
70
|
since: string | null;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.57",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -44,7 +44,7 @@
|
|
44
44
|
"uint8arrays": "3.0.0",
|
45
45
|
"zod": "^3.23.8",
|
46
46
|
"@atproto-labs/fetch-node": "0.1.0",
|
47
|
-
"@atproto/api": "^0.13.
|
47
|
+
"@atproto/api": "^0.13.6",
|
48
48
|
"@atproto/aws": "^0.2.3",
|
49
49
|
"@atproto/common": "^0.4.1",
|
50
50
|
"@atproto/crypto": "^0.4.1",
|
@@ -72,8 +72,8 @@
|
|
72
72
|
"jest": "^28.1.2",
|
73
73
|
"ts-node": "^10.8.2",
|
74
74
|
"ws": "^8.12.0",
|
75
|
-
"@atproto/api": "^0.13.
|
76
|
-
"@atproto/bsky": "^0.0.
|
75
|
+
"@atproto/api": "^0.13.6",
|
76
|
+
"@atproto/bsky": "^0.0.81",
|
77
77
|
"@atproto/lex-cli": "^0.5.0"
|
78
78
|
},
|
79
79
|
"scripts": {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { CID } from 'multiformats/cid'
|
2
2
|
import { InvalidRequestError, AuthRequiredError } from '@atproto/xrpc-server'
|
3
|
+
import { WriteOpAction } from '@atproto/repo'
|
3
4
|
import { prepareCreate, prepareDelete, prepareUpdate } from '../../../../repo'
|
4
5
|
import { Server } from '../../../../lexicon'
|
5
6
|
import {
|
@@ -7,6 +8,9 @@ import {
|
|
7
8
|
isCreate,
|
8
9
|
isUpdate,
|
9
10
|
isDelete,
|
11
|
+
CreateResult,
|
12
|
+
UpdateResult,
|
13
|
+
DeleteResult,
|
10
14
|
} from '../../../../lexicon/types/com/atproto/repo/applyWrites'
|
11
15
|
import {
|
12
16
|
BadCommitSwapError,
|
@@ -69,6 +73,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
69
73
|
throw new InvalidRequestError('Too many writes. Max: 200')
|
70
74
|
}
|
71
75
|
|
76
|
+
// @NOTE should preserve order of ts.writes for final use in response
|
72
77
|
let writes: PreparedWrite[]
|
73
78
|
try {
|
74
79
|
writes = await Promise.all(
|
@@ -125,6 +130,42 @@ export default function (server: Server, ctx: AppContext) {
|
|
125
130
|
|
126
131
|
await ctx.sequencer.sequenceCommit(did, commit, writes)
|
127
132
|
await ctx.accountManager.updateRepoRoot(did, commit.cid, commit.rev)
|
133
|
+
|
134
|
+
return {
|
135
|
+
encoding: 'application/json',
|
136
|
+
body: {
|
137
|
+
commit: {
|
138
|
+
cid: commit.cid.toString(),
|
139
|
+
rev: commit.rev,
|
140
|
+
},
|
141
|
+
results: writes.map(writeToOutputResult),
|
142
|
+
},
|
143
|
+
}
|
128
144
|
},
|
129
145
|
})
|
130
146
|
}
|
147
|
+
|
148
|
+
const writeToOutputResult = (write: PreparedWrite) => {
|
149
|
+
switch (write.action) {
|
150
|
+
case WriteOpAction.Create:
|
151
|
+
return {
|
152
|
+
$type: 'com.atproto.repo.applyWrites#createResult',
|
153
|
+
cid: write.cid.toString(),
|
154
|
+
uri: write.uri.toString(),
|
155
|
+
validationStatus: write.validationStatus,
|
156
|
+
} satisfies CreateResult
|
157
|
+
case WriteOpAction.Update:
|
158
|
+
return {
|
159
|
+
$type: 'com.atproto.repo.applyWrites#updateResult',
|
160
|
+
cid: write.cid.toString(),
|
161
|
+
uri: write.uri.toString(),
|
162
|
+
validationStatus: write.validationStatus,
|
163
|
+
} satisfies UpdateResult
|
164
|
+
case WriteOpAction.Delete:
|
165
|
+
return {
|
166
|
+
$type: 'com.atproto.repo.applyWrites#deleteResult',
|
167
|
+
} satisfies DeleteResult
|
168
|
+
default:
|
169
|
+
throw new Error(`Unrecognized action: ${write}`)
|
170
|
+
}
|
171
|
+
}
|
@@ -68,12 +68,13 @@ export default function (server: Server, ctx: AppContext) {
|
|
68
68
|
const { commit, writes } = await ctx.actorStore.transact(
|
69
69
|
did,
|
70
70
|
async (actorTxn) => {
|
71
|
-
const backlinkConflicts =
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
const backlinkConflicts =
|
72
|
+
validate !== false
|
73
|
+
? await actorTxn.record.getBacklinkConflicts(
|
74
|
+
write.uri,
|
75
|
+
write.record,
|
76
|
+
)
|
77
|
+
: []
|
77
78
|
const backlinkDeletions = backlinkConflicts.map((uri) =>
|
78
79
|
prepareDelete({
|
79
80
|
did: uri.hostname,
|
@@ -102,7 +103,15 @@ export default function (server: Server, ctx: AppContext) {
|
|
102
103
|
|
103
104
|
return {
|
104
105
|
encoding: 'application/json',
|
105
|
-
body: {
|
106
|
+
body: {
|
107
|
+
uri: write.uri.toString(),
|
108
|
+
cid: write.cid.toString(),
|
109
|
+
commit: {
|
110
|
+
cid: commit.cid.toString(),
|
111
|
+
rev: commit.rev,
|
112
|
+
},
|
113
|
+
validationStatus: write.validationStatus,
|
114
|
+
},
|
106
115
|
}
|
107
116
|
},
|
108
117
|
})
|
@@ -71,6 +71,17 @@ export default function (server: Server, ctx: AppContext) {
|
|
71
71
|
await ctx.sequencer.sequenceCommit(did, commit, [write])
|
72
72
|
await ctx.accountManager.updateRepoRoot(did, commit.cid, commit.rev)
|
73
73
|
}
|
74
|
+
return {
|
75
|
+
encoding: 'application/json',
|
76
|
+
body: {
|
77
|
+
commit: commit
|
78
|
+
? {
|
79
|
+
cid: commit.cid.toString(),
|
80
|
+
rev: commit.rev,
|
81
|
+
}
|
82
|
+
: undefined,
|
83
|
+
},
|
84
|
+
}
|
74
85
|
},
|
75
86
|
})
|
76
87
|
}
|
@@ -130,6 +130,13 @@ export default function (server: Server, ctx: AppContext) {
|
|
130
130
|
body: {
|
131
131
|
uri: write.uri.toString(),
|
132
132
|
cid: write.cid.toString(),
|
133
|
+
commit: commit
|
134
|
+
? {
|
135
|
+
cid: commit.cid.toString(),
|
136
|
+
rev: commit.rev,
|
137
|
+
}
|
138
|
+
: undefined,
|
139
|
+
validationStatus: write.validationStatus,
|
133
140
|
},
|
134
141
|
}
|
135
142
|
},
|
package/src/lexicon/index.ts
CHANGED
@@ -139,6 +139,9 @@ import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspec
|
|
139
139
|
import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
|
140
140
|
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
|
141
141
|
import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
|
142
|
+
import * as AppBskyVideoGetJobStatus from './types/app/bsky/video/getJobStatus'
|
143
|
+
import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLimits'
|
144
|
+
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo'
|
142
145
|
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount'
|
143
146
|
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData'
|
144
147
|
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf'
|
@@ -1169,6 +1172,7 @@ export class AppBskyNS {
|
|
1169
1172
|
notification: AppBskyNotificationNS
|
1170
1173
|
richtext: AppBskyRichtextNS
|
1171
1174
|
unspecced: AppBskyUnspeccedNS
|
1175
|
+
video: AppBskyVideoNS
|
1172
1176
|
|
1173
1177
|
constructor(server: Server) {
|
1174
1178
|
this._server = server
|
@@ -1180,6 +1184,7 @@ export class AppBskyNS {
|
|
1180
1184
|
this.notification = new AppBskyNotificationNS(server)
|
1181
1185
|
this.richtext = new AppBskyRichtextNS(server)
|
1182
1186
|
this.unspecced = new AppBskyUnspeccedNS(server)
|
1187
|
+
this.video = new AppBskyVideoNS(server)
|
1183
1188
|
}
|
1184
1189
|
}
|
1185
1190
|
|
@@ -1863,6 +1868,47 @@ export class AppBskyUnspeccedNS {
|
|
1863
1868
|
}
|
1864
1869
|
}
|
1865
1870
|
|
1871
|
+
export class AppBskyVideoNS {
|
1872
|
+
_server: Server
|
1873
|
+
|
1874
|
+
constructor(server: Server) {
|
1875
|
+
this._server = server
|
1876
|
+
}
|
1877
|
+
|
1878
|
+
getJobStatus<AV extends AuthVerifier>(
|
1879
|
+
cfg: ConfigOf<
|
1880
|
+
AV,
|
1881
|
+
AppBskyVideoGetJobStatus.Handler<ExtractAuth<AV>>,
|
1882
|
+
AppBskyVideoGetJobStatus.HandlerReqCtx<ExtractAuth<AV>>
|
1883
|
+
>,
|
1884
|
+
) {
|
1885
|
+
const nsid = 'app.bsky.video.getJobStatus' // @ts-ignore
|
1886
|
+
return this._server.xrpc.method(nsid, cfg)
|
1887
|
+
}
|
1888
|
+
|
1889
|
+
getUploadLimits<AV extends AuthVerifier>(
|
1890
|
+
cfg: ConfigOf<
|
1891
|
+
AV,
|
1892
|
+
AppBskyVideoGetUploadLimits.Handler<ExtractAuth<AV>>,
|
1893
|
+
AppBskyVideoGetUploadLimits.HandlerReqCtx<ExtractAuth<AV>>
|
1894
|
+
>,
|
1895
|
+
) {
|
1896
|
+
const nsid = 'app.bsky.video.getUploadLimits' // @ts-ignore
|
1897
|
+
return this._server.xrpc.method(nsid, cfg)
|
1898
|
+
}
|
1899
|
+
|
1900
|
+
uploadVideo<AV extends AuthVerifier>(
|
1901
|
+
cfg: ConfigOf<
|
1902
|
+
AV,
|
1903
|
+
AppBskyVideoUploadVideo.Handler<ExtractAuth<AV>>,
|
1904
|
+
AppBskyVideoUploadVideo.HandlerReqCtx<ExtractAuth<AV>>
|
1905
|
+
>,
|
1906
|
+
) {
|
1907
|
+
const nsid = 'app.bsky.video.uploadVideo' // @ts-ignore
|
1908
|
+
return this._server.xrpc.method(nsid, cfg)
|
1909
|
+
}
|
1910
|
+
}
|
1911
|
+
|
1866
1912
|
export class ChatNS {
|
1867
1913
|
_server: Server
|
1868
1914
|
bsky: ChatBskyNS
|