@atproto/pds 0.4.27 → 0.4.29
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/dist/account-manager/helpers/account.d.ts +7 -0
- package/dist/account-manager/helpers/account.d.ts.map +1 -1
- package/dist/account-manager/helpers/account.js +9 -1
- package/dist/account-manager/helpers/account.js.map +1 -1
- package/dist/account-manager/index.d.ts +3 -1
- package/dist/account-manager/index.d.ts.map +1 -1
- package/dist/account-manager/index.js +22 -6
- package/dist/account-manager/index.js.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.js +4 -2
- package/dist/api/com/atproto/admin/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.js +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.js.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.js +2 -0
- package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.js +2 -4
- package/dist/api/com/atproto/repo/describeRepo.js.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.js +2 -1
- package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/createAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAccount.js +4 -2
- package/dist/api/com/atproto/server/createAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.js +2 -0
- package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.js +4 -3
- package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/server/util.d.ts +1 -0
- package/dist/api/com/atproto/server/util.d.ts.map +1 -1
- package/dist/api/com/atproto/server/util.js +9 -6
- package/dist/api/com/atproto/server/util.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.js +2 -8
- package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.js +2 -7
- package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.js +3 -6
- package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.js +2 -7
- package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.js +2 -7
- package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.js +2 -7
- package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.js +2 -7
- package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts +4 -0
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
- package/dist/api/com/atproto/sync/getRepoStatus.js +28 -0
- package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -0
- package/dist/api/com/atproto/sync/index.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/index.js +2 -0
- package/dist/api/com/atproto/sync/index.js.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.js +2 -8
- package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.js +13 -8
- package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.js +8 -0
- package/dist/api/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/util.d.ts +11 -0
- package/dist/api/com/atproto/sync/util.d.ts.map +1 -0
- package/dist/api/com/atproto/sync/util.js +41 -0
- package/dist/api/com/atproto/sync/util.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +4 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +105 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +185 -4
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts +42 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js +3 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js.map +1 -0
- package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +19 -4
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js +11 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/scripts/index.d.ts +4 -0
- package/dist/scripts/index.d.ts.map +1 -0
- package/dist/scripts/index.js +8 -0
- package/dist/scripts/index.js.map +1 -0
- package/dist/scripts/rebuild-repo.d.ts +3 -0
- package/dist/scripts/rebuild-repo.d.ts.map +1 -0
- package/dist/scripts/rebuild-repo.js +121 -0
- package/dist/scripts/rebuild-repo.js.map +1 -0
- package/dist/sequencer/db/schema.d.ts +1 -1
- package/dist/sequencer/db/schema.d.ts.map +1 -1
- package/dist/sequencer/events.d.ts +27 -2
- package/dist/sequencer/events.d.ts.map +1 -1
- package/dist/sequencer/events.js +35 -2
- package/dist/sequencer/events.js.map +1 -1
- package/dist/sequencer/sequencer.d.ts +8 -6
- package/dist/sequencer/sequencer.d.ts.map +1 -1
- package/dist/sequencer/sequencer.js +22 -9
- package/dist/sequencer/sequencer.js.map +1 -1
- package/package.json +4 -4
- package/src/account-manager/helpers/account.ts +8 -0
- package/src/account-manager/index.ts +19 -6
- package/src/api/com/atproto/admin/deleteAccount.ts +7 -2
- package/src/api/com/atproto/admin/updateAccountHandle.ts +1 -1
- package/src/api/com/atproto/admin/updateSubjectStatus.ts +2 -0
- package/src/api/com/atproto/identity/submitPlcOperation.ts +1 -0
- package/src/api/com/atproto/identity/updateHandle.ts +1 -1
- package/src/api/com/atproto/repo/describeRepo.ts +2 -4
- package/src/api/com/atproto/server/activateAccount.ts +2 -1
- package/src/api/com/atproto/server/createAccount.ts +6 -3
- package/src/api/com/atproto/server/deactivateAccount.ts +2 -0
- package/src/api/com/atproto/server/deleteAccount.ts +7 -3
- package/src/api/com/atproto/server/util.ts +12 -5
- package/src/api/com/atproto/sync/deprecated/getCheckout.ts +6 -8
- package/src/api/com/atproto/sync/deprecated/getHead.ts +7 -10
- package/src/api/com/atproto/sync/getBlob.ts +8 -6
- package/src/api/com/atproto/sync/getBlocks.ts +6 -7
- package/src/api/com/atproto/sync/getLatestCommit.ts +7 -10
- package/src/api/com/atproto/sync/getRecord.ts +7 -7
- package/src/api/com/atproto/sync/getRepo.ts +6 -7
- package/src/api/com/atproto/sync/getRepoStatus.ts +31 -0
- package/src/api/com/atproto/sync/index.ts +2 -0
- package/src/api/com/atproto/sync/listBlobs.ts +6 -8
- package/src/api/com/atproto/sync/listRepos.ts +13 -8
- package/src/api/com/atproto/sync/subscribeRepos.ts +7 -0
- package/src/api/com/atproto/sync/util.ts +59 -0
- package/src/index.ts +3 -2
- package/src/lexicon/index.ts +12 -0
- package/src/lexicon/lexicons.ts +193 -7
- package/src/lexicon/types/chat/bsky/convo/defs.ts +1 -1
- package/src/lexicon/types/com/atproto/sync/getBlob.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getBlocks.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +1 -1
- package/src/lexicon/types/com/atproto/sync/getRecord.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getRepo.ts +1 -0
- package/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +52 -0
- package/src/lexicon/types/com/atproto/sync/listBlobs.ts +1 -0
- package/src/lexicon/types/com/atproto/sync/listRepos.ts +3 -0
- package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +30 -3
- package/src/scripts/index.ts +5 -0
- package/src/scripts/rebuild-repo.ts +143 -0
- package/src/sequencer/db/schema.ts +1 -0
- package/src/sequencer/events.ts +47 -0
- package/src/sequencer/sequencer.ts +35 -14
- package/tests/account-deactivation.test.ts +36 -10
- package/tests/account-deletion.test.ts +10 -2
- package/tests/moderation.test.ts +2 -2
- package/tests/proxied/notif.test.ts +1 -0
- package/tests/sequencer.test.ts +2 -2
- package/tests/sync/list.test.ts +1 -0
- package/tests/sync/subscribe-repos.test.ts +224 -40
- package/tests/sync/sync.test.ts +48 -4
@@ -31,7 +31,7 @@ export interface MessageView {
|
|
31
31
|
text: string;
|
32
32
|
/** Annotations of text (mentions, URLs, hashtags, etc) */
|
33
33
|
facets?: AppBskyRichtextFacet.Main[];
|
34
|
-
embed?: AppBskyEmbedRecord.
|
34
|
+
embed?: AppBskyEmbedRecord.View | {
|
35
35
|
$type: string;
|
36
36
|
[k: string]: unknown;
|
37
37
|
};
|
@@ -23,6 +23,7 @@ export interface HandlerSuccess {
|
|
23
23
|
export interface HandlerError {
|
24
24
|
status: number;
|
25
25
|
message?: string;
|
26
|
+
error?: 'BlobNotFound' | 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
|
26
27
|
}
|
27
28
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
28
29
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getBlob.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getBlob.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAK3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAA;IACf,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"getBlob.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getBlob.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAK3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAA;IACf,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EACF,cAAc,GACd,cAAc,GACd,eAAe,GACf,eAAe,GACf,iBAAiB,CAAA;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -22,6 +22,7 @@ export interface HandlerSuccess {
|
|
22
22
|
export interface HandlerError {
|
23
23
|
status: number;
|
24
24
|
message?: string;
|
25
|
+
error?: 'BlockNotFound' | 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
|
25
26
|
}
|
26
27
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
27
28
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getBlocks.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAK3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,0BAA0B,CAAA;IACpC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"getBlocks.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAK3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,0BAA0B,CAAA;IACpC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EACF,eAAe,GACf,cAAc,GACd,eAAe,GACf,eAAe,GACf,iBAAiB,CAAA;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -24,7 +24,7 @@ export interface HandlerSuccess {
|
|
24
24
|
export interface HandlerError {
|
25
25
|
status: number;
|
26
26
|
message?: string;
|
27
|
-
error?: 'RepoNotFound';
|
27
|
+
error?: 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
|
28
28
|
}
|
29
29
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
30
30
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getLatestCommit.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getLatestCommit.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAA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AQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,cAAc,GAAG,eAAe,GAAG,eAAe,GAAG,iBAAiB,CAAA;CAC/E;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -26,6 +26,7 @@ export interface HandlerSuccess {
|
|
26
26
|
export interface HandlerError {
|
27
27
|
status: number;
|
28
28
|
message?: string;
|
29
|
+
error?: 'RecordNotFound' | 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
|
29
30
|
}
|
30
31
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
31
32
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRecord.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,OAA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AAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,0BAA0B,CAAA;IACpC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EACF,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,eAAe,GACf,iBAAiB,CAAA;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -23,6 +23,7 @@ export interface HandlerSuccess {
|
|
23
23
|
export interface HandlerError {
|
24
24
|
status: number;
|
25
25
|
message?: string;
|
26
|
+
error?: 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
|
26
27
|
}
|
27
28
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
28
29
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getRepo.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRepo.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAK3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,0BAA0B,CAAA;IACpC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"getRepo.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRepo.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAK3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,0BAA0B,CAAA;IACpC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,cAAc,GAAG,eAAe,GAAG,eAAe,GAAG,iBAAiB,CAAA;CAC/E;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import express from 'express';
|
5
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
|
6
|
+
export interface QueryParams {
|
7
|
+
/** The DID of the repo. */
|
8
|
+
did: string;
|
9
|
+
}
|
10
|
+
export type InputSchema = undefined;
|
11
|
+
export interface OutputSchema {
|
12
|
+
did: string;
|
13
|
+
active: boolean;
|
14
|
+
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
15
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
16
|
+
/** Optional field, the current rev of the repo, if active=true */
|
17
|
+
rev?: string;
|
18
|
+
[k: string]: unknown;
|
19
|
+
}
|
20
|
+
export type HandlerInput = undefined;
|
21
|
+
export interface HandlerSuccess {
|
22
|
+
encoding: 'application/json';
|
23
|
+
body: OutputSchema;
|
24
|
+
headers?: {
|
25
|
+
[key: string]: string;
|
26
|
+
};
|
27
|
+
}
|
28
|
+
export interface HandlerError {
|
29
|
+
status: number;
|
30
|
+
message?: string;
|
31
|
+
error?: 'RepoNotFound';
|
32
|
+
}
|
33
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
34
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
35
|
+
auth: HA;
|
36
|
+
params: QueryParams;
|
37
|
+
input: HandlerInput;
|
38
|
+
req: express.Request;
|
39
|
+
res: express.Response;
|
40
|
+
};
|
41
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
42
|
+
//# sourceMappingURL=getRepoStatus.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getRepoStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,OAAO,CAAA;IACf,oOAAoO;IACpO,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAClE,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,cAAc,CAAA;CACvB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getRepoStatus.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":""}
|
@@ -28,6 +28,7 @@ export interface HandlerSuccess {
|
|
28
28
|
export interface HandlerError {
|
29
29
|
status: number;
|
30
30
|
message?: string;
|
31
|
+
error?: 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
|
31
32
|
}
|
32
33
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
33
34
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listBlobs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"listBlobs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAA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AAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -40,6 +40,9 @@ export interface Repo {
|
|
40
40
|
/** Current repo commit CID */
|
41
41
|
head: string;
|
42
42
|
rev: string;
|
43
|
+
active?: boolean;
|
44
|
+
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
45
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
43
46
|
[k: string]: unknown;
|
44
47
|
}
|
45
48
|
export declare function isRepo(v: unknown): v is Repo;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IAC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,CAAA;IAClE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,IAAI,CAM5C;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEzD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":";;;AAKA,mDAA+C;AAC/C,2CAAiD;
|
1
|
+
{"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":";;;AAKA,mDAA+C;AAC/C,2CAAiD;AAqDjD,SAAgB,MAAM,CAAC,CAAU;IAC/B,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,iCAAiC,CAC9C,CAAA;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,YAAY,CAAC,CAAU;IACrC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,iCAAiC,EAAE,CAAC,CAAC,CAAA;AAChE,CAAC;AAFD,oCAEC"}
|
@@ -12,7 +12,7 @@ export interface QueryParams {
|
|
12
12
|
/** The last known event seq number to backfill from. */
|
13
13
|
cursor?: number;
|
14
14
|
}
|
15
|
-
export type OutputSchema = Commit | Identity | Handle | Migrate | Tombstone | Info | {
|
15
|
+
export type OutputSchema = Commit | Identity | Account | Handle | Migrate | Tombstone | Info | {
|
16
16
|
$type: string;
|
17
17
|
[k: string]: unknown;
|
18
18
|
};
|
@@ -58,11 +58,26 @@ export interface Identity {
|
|
58
58
|
seq: number;
|
59
59
|
did: string;
|
60
60
|
time: string;
|
61
|
+
/** The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. */
|
62
|
+
handle?: string;
|
61
63
|
[k: string]: unknown;
|
62
64
|
}
|
63
65
|
export declare function isIdentity(v: unknown): v is Identity;
|
64
66
|
export declare function validateIdentity(v: unknown): ValidationResult;
|
65
|
-
/** Represents
|
67
|
+
/** Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active. */
|
68
|
+
export interface Account {
|
69
|
+
seq: number;
|
70
|
+
did: string;
|
71
|
+
time: string;
|
72
|
+
/** Indicates that the account has a repository which can be fetched from the host that emitted this event. */
|
73
|
+
active: boolean;
|
74
|
+
/** If active=false, this optional field indicates a reason for why the account is not active. */
|
75
|
+
status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {});
|
76
|
+
[k: string]: unknown;
|
77
|
+
}
|
78
|
+
export declare function isAccount(v: unknown): v is Account;
|
79
|
+
export declare function validateAccount(v: unknown): ValidationResult;
|
80
|
+
/** DEPRECATED -- Use #identity event instead */
|
66
81
|
export interface Handle {
|
67
82
|
seq: number;
|
68
83
|
did: string;
|
@@ -72,7 +87,7 @@ export interface Handle {
|
|
72
87
|
}
|
73
88
|
export declare function isHandle(v: unknown): v is Handle;
|
74
89
|
export declare function validateHandle(v: unknown): ValidationResult;
|
75
|
-
/**
|
90
|
+
/** DEPRECATED -- Use #account event instead */
|
76
91
|
export interface Migrate {
|
77
92
|
seq: number;
|
78
93
|
did: string;
|
@@ -82,7 +97,7 @@ export interface Migrate {
|
|
82
97
|
}
|
83
98
|
export declare function isMigrate(v: unknown): v is Migrate;
|
84
99
|
export declare function validateMigrate(v: unknown): ValidationResult;
|
85
|
-
/**
|
100
|
+
/** DEPRECATED -- Use #account event instead */
|
86
101
|
export interface Tombstone {
|
87
102
|
seq: number;
|
88
103
|
did: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sub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A;IACf,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,8BAA8B;IAC9B,MAAM,EAAE,GAAG,CAAA;IACX,qHAAqH;IACrH,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACjB,gJAAgJ;IAChJ,GAAG,EAAE,MAAM,CAAA;IACX,kEAAkE;IAClE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,oFAAoF;IACpF,MAAM,EAAE,UAAU,CAAA;IAClB,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,KAAK,EAAE,GAAG,EAAE,CAAA;IACZ,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAMhD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE3D;AAED,mMAAmM;AACnM,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,QAAQ,CAMpD;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE7D;AAED,
|
1
|
+
{"version":3,"file":"subscribeRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAG5D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;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E,OAAO,GAAG,CAAC,IAAI,IAAI,CAM5C;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEzD;AAED,0DAA0D;AAC1D,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,GAAG,EAAE,GAAG,GAAG,IAAI,CAAA;IACf,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAMhD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE3D"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.validateRepoOp = exports.isRepoOp = exports.validateInfo = exports.isInfo = exports.validateTombstone = exports.isTombstone = exports.validateMigrate = exports.isMigrate = exports.validateHandle = exports.isHandle = exports.validateIdentity = exports.isIdentity = exports.validateCommit = exports.isCommit = void 0;
|
3
|
+
exports.validateRepoOp = exports.isRepoOp = exports.validateInfo = exports.isInfo = exports.validateTombstone = exports.isTombstone = exports.validateMigrate = exports.isMigrate = exports.validateHandle = exports.isHandle = exports.validateAccount = exports.isAccount = exports.validateIdentity = exports.isIdentity = exports.validateCommit = exports.isCommit = void 0;
|
4
4
|
const lexicons_1 = require("../../../../lexicons");
|
5
5
|
const util_1 = require("../../../../util");
|
6
6
|
function isCommit(v) {
|
@@ -23,6 +23,16 @@ function validateIdentity(v) {
|
|
23
23
|
return lexicons_1.lexicons.validate('com.atproto.sync.subscribeRepos#identity', v);
|
24
24
|
}
|
25
25
|
exports.validateIdentity = validateIdentity;
|
26
|
+
function isAccount(v) {
|
27
|
+
return ((0, util_1.isObj)(v) &&
|
28
|
+
(0, util_1.hasProp)(v, '$type') &&
|
29
|
+
v.$type === 'com.atproto.sync.subscribeRepos#account');
|
30
|
+
}
|
31
|
+
exports.isAccount = isAccount;
|
32
|
+
function validateAccount(v) {
|
33
|
+
return lexicons_1.lexicons.validate('com.atproto.sync.subscribeRepos#account', v);
|
34
|
+
}
|
35
|
+
exports.validateAccount = validateAccount;
|
26
36
|
function isHandle(v) {
|
27
37
|
return ((0, util_1.isObj)(v) &&
|
28
38
|
(0, util_1.hasProp)(v, '$type') &&
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;;AAIA,mDAA+C;AAC/C,2CAAiD;
|
1
|
+
{"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;;AAIA,mDAA+C;AAC/C,2CAAiD;AA0DjD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,wCAAwC,CACrD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,wCAEC;AAYD,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,0CAA0C,CACvD,CAAA;AACH,CAAC;AAND,gCAMC;AAED,SAAgB,gBAAgB,CAAC,CAAU;IACzC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,0C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;AAED,SAAgB,iBAAiB,CAAC,CAAU;IAC1C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,2CAA2C,EAAE,CAAC,CAAC,CAAA;AAC1E,CAAC;AAFD,8CAEC;AAQD,SAAgB,MAAM,CAAC,CAAU;IAC/B,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,sCAAsC,CACnD,CAAA;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,YAAY,CAAC,CAAU;IACrC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAA;AACrE,CAAC;AAFD,oCAEC;AAWD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,wCAAwC,CACrD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,wCAEC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;CAEnB,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.scripts = void 0;
|
4
|
+
const rebuild_repo_1 = require("./rebuild-repo");
|
5
|
+
exports.scripts = {
|
6
|
+
'rebuild-repo': rebuild_repo_1.rebuildRepo,
|
7
|
+
};
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE/B,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE,0BAAW;CAC5B,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rebuild-repo.d.ts","sourceRoot":"","sources":["../../src/scripts/rebuild-repo.ts"],"names":[],"mappings":"AAaA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,eAAO,MAAM,WAAW,QAAe,UAAU,QAAQ,MAAM,EAAE,kBAiEhE,CAAA"}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.rebuildRepo = void 0;
|
7
|
+
const promises_1 = __importDefault(require("node:readline/promises"));
|
8
|
+
const cid_1 = require("multiformats/cid");
|
9
|
+
const repo_1 = require("@atproto/repo");
|
10
|
+
const syntax_1 = require("@atproto/syntax");
|
11
|
+
const common_1 = require("@atproto/common");
|
12
|
+
const rebuildRepo = async (ctx, args) => {
|
13
|
+
const did = args[0];
|
14
|
+
if (!did || !did.startsWith('did:')) {
|
15
|
+
throw new Error('Expected DID as argument');
|
16
|
+
}
|
17
|
+
const memoryStore = new repo_1.MemoryBlockstore();
|
18
|
+
const rev = common_1.TID.nextStr();
|
19
|
+
const commit = await ctx.actorStore.transact(did, async (store) => {
|
20
|
+
const [records, existingCids] = await Promise.all([
|
21
|
+
listAllRecords(store),
|
22
|
+
listExistingBlocks(store),
|
23
|
+
]);
|
24
|
+
let mst = await repo_1.MST.create(memoryStore);
|
25
|
+
for (const record of records) {
|
26
|
+
mst = await mst.add(record.path, record.cid);
|
27
|
+
}
|
28
|
+
const newBlocks = new repo_1.BlockMap();
|
29
|
+
for await (const node of mst.walk()) {
|
30
|
+
if (node.isTree()) {
|
31
|
+
const pointer = await node.getPointer();
|
32
|
+
if (!existingCids.has(pointer)) {
|
33
|
+
const serialized = await node.serialize();
|
34
|
+
newBlocks.set(serialized.cid, serialized.bytes);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
const mstCids = await mst.allCids();
|
39
|
+
const toDelete = new repo_1.CidSet(existingCids.toList()).subtractSet(mstCids);
|
40
|
+
const newCommit = await (0, repo_1.signCommit)({
|
41
|
+
did,
|
42
|
+
version: 3,
|
43
|
+
rev,
|
44
|
+
prev: null,
|
45
|
+
data: await mst.getPointer(),
|
46
|
+
}, store.repo.signingKey);
|
47
|
+
const commitCid = await newBlocks.add(newCommit);
|
48
|
+
console.log('Record count: ', records.length);
|
49
|
+
console.log('Existing blocks: ', existingCids.toList().length);
|
50
|
+
console.log('Deleting blocks:', toDelete.toList().length);
|
51
|
+
console.log('Adding blocks: ', newBlocks.size);
|
52
|
+
const shouldContinue = await promptContinue();
|
53
|
+
if (!shouldContinue) {
|
54
|
+
throw new Error('Aborted');
|
55
|
+
}
|
56
|
+
await store.repo.storage.deleteMany(toDelete.toList());
|
57
|
+
await store.repo.storage.putMany(newBlocks, rev);
|
58
|
+
await store.repo.storage.updateRoot(commitCid, rev);
|
59
|
+
return {
|
60
|
+
cid: commitCid,
|
61
|
+
rev,
|
62
|
+
since: null,
|
63
|
+
prev: null,
|
64
|
+
newBlocks,
|
65
|
+
removedCids: toDelete,
|
66
|
+
};
|
67
|
+
});
|
68
|
+
await ctx.accountManager.updateRepoRoot(did, commit.cid, rev);
|
69
|
+
await ctx.sequencer.sequenceCommit(did, commit, []);
|
70
|
+
};
|
71
|
+
exports.rebuildRepo = rebuildRepo;
|
72
|
+
const listExistingBlocks = async (store) => {
|
73
|
+
const cids = new repo_1.CidSet();
|
74
|
+
let cursor = '';
|
75
|
+
while (cursor !== undefined) {
|
76
|
+
const res = await store.db.db
|
77
|
+
.selectFrom('repo_block')
|
78
|
+
.select('cid')
|
79
|
+
.where('cid', '>', cursor)
|
80
|
+
.orderBy('cid', 'asc')
|
81
|
+
.limit(1000)
|
82
|
+
.execute();
|
83
|
+
for (const row of res) {
|
84
|
+
cids.add(cid_1.CID.parse(row.cid));
|
85
|
+
}
|
86
|
+
cursor = res.at(-1)?.cid;
|
87
|
+
}
|
88
|
+
return cids;
|
89
|
+
};
|
90
|
+
const listAllRecords = async (store) => {
|
91
|
+
const records = [];
|
92
|
+
let cursor = '';
|
93
|
+
while (cursor !== undefined) {
|
94
|
+
const res = await store.db.db
|
95
|
+
.selectFrom('record')
|
96
|
+
.select(['uri', 'cid'])
|
97
|
+
.where('uri', '>', cursor)
|
98
|
+
.orderBy('uri', 'asc')
|
99
|
+
.limit(1000)
|
100
|
+
.execute();
|
101
|
+
for (const row of res) {
|
102
|
+
const parsed = new syntax_1.AtUri(row.uri);
|
103
|
+
records.push({
|
104
|
+
uri: row.uri,
|
105
|
+
path: (0, repo_1.formatDataKey)(parsed.collection, parsed.rkey),
|
106
|
+
cid: cid_1.CID.parse(row.cid),
|
107
|
+
});
|
108
|
+
}
|
109
|
+
cursor = res.at(-1)?.uri;
|
110
|
+
}
|
111
|
+
return records;
|
112
|
+
};
|
113
|
+
const promptContinue = async () => {
|
114
|
+
const rl = promises_1.default.createInterface({
|
115
|
+
input: process.stdin,
|
116
|
+
output: process.stdout,
|
117
|
+
});
|
118
|
+
const answer = await rl.question('Continue? y/n ');
|
119
|
+
return answer === '';
|
120
|
+
};
|
121
|
+
//# sourceMappingURL=rebuild-repo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rebuild-repo.js","sourceRoot":"","sources":["../../src/scripts/rebuild-repo.ts"],"names":[],"mappings":";;;;;;AAAA,sEAA6C;AAC7C,0CAAsC;AACtC,wCAOsB;AACtB,4CAAuC;AACvC,4CAAqC;AAI9B,MAAM,WAAW,GAAG,KAAK,EAAE,GAAe,EAAE,IAAc,EAAE,EAAE;IACnE,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CA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ated, GeneratedAlways, Insertable, Selectable } from 'kysely';
|
2
|
-
export type RepoSeqEventType = 'append' | 'rebase' | 'handle' | 'migrate' | 'identity' | 'tombstone';
|
2
|
+
export type RepoSeqEventType = 'append' | 'rebase' | 'handle' | 'migrate' | 'identity' | 'account' | 'tombstone';
|
3
3
|
export interface RepoSeq {
|
4
4
|
seq: GeneratedAlways<number>;
|
5
5
|
did: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/sequencer/db/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAE3E,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,WAAW,CAAA;AAEf,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,gBAAgB,CAAA;IAC3B,KAAK,EAAE,UAAU,CAAA;IACjB,WAAW,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;AAC/C,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/sequencer/db/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAE3E,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,WAAW,CAAA;AAEf,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,gBAAgB,CAAA;IAC3B,KAAK,EAAE,UAAU,CAAA;IACjB,WAAW,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;AAC/C,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
@@ -3,9 +3,11 @@ import { CommitData } from '@atproto/repo';
|
|
3
3
|
import { PreparedWrite } from '../repo';
|
4
4
|
import { CID } from 'multiformats/cid';
|
5
5
|
import { RepoSeqInsert } from './db';
|
6
|
+
import { AccountStatus } from '../account-manager';
|
6
7
|
export declare const formatSeqCommit: (did: string, commitData: CommitData, writes: PreparedWrite[]) => Promise<RepoSeqInsert>;
|
7
8
|
export declare const formatSeqHandleUpdate: (did: string, handle: string) => Promise<RepoSeqInsert>;
|
8
|
-
export declare const formatSeqIdentityEvt: (did: string) => Promise<RepoSeqInsert>;
|
9
|
+
export declare const formatSeqIdentityEvt: (did: string, handle?: string) => Promise<RepoSeqInsert>;
|
10
|
+
export declare const formatSeqAccountEvt: (did: string, status: AccountStatus) => Promise<RepoSeqInsert>;
|
9
11
|
export declare const formatSeqTombstone: (did: string) => Promise<RepoSeqInsert>;
|
10
12
|
export declare const commitEvtOp: z.ZodObject<{
|
11
13
|
action: z.ZodUnion<[z.ZodLiteral<"create">, z.ZodLiteral<"update">, z.ZodLiteral<"delete">]>;
|
@@ -89,12 +91,29 @@ export declare const handleEvt: z.ZodObject<{
|
|
89
91
|
export type HandleEvt = z.infer<typeof handleEvt>;
|
90
92
|
export declare const identityEvt: z.ZodObject<{
|
91
93
|
did: z.ZodString;
|
94
|
+
handle: z.ZodOptional<z.ZodString>;
|
92
95
|
}, "strip", z.ZodTypeAny, {
|
93
96
|
did: string;
|
97
|
+
handle?: string | undefined;
|
94
98
|
}, {
|
95
99
|
did: string;
|
100
|
+
handle?: string | undefined;
|
96
101
|
}>;
|
97
102
|
export type IdentityEvt = z.infer<typeof identityEvt>;
|
103
|
+
export declare const accountEvt: z.ZodObject<{
|
104
|
+
did: z.ZodString;
|
105
|
+
active: z.ZodBoolean;
|
106
|
+
status: z.ZodOptional<z.ZodEnum<[AccountStatus.Takendown, AccountStatus.Suspended, AccountStatus.Deleted, AccountStatus.Deactivated]>>;
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
108
|
+
did: string;
|
109
|
+
active: boolean;
|
110
|
+
status?: AccountStatus.Takendown | AccountStatus.Suspended | AccountStatus.Deleted | AccountStatus.Deactivated | undefined;
|
111
|
+
}, {
|
112
|
+
did: string;
|
113
|
+
active: boolean;
|
114
|
+
status?: AccountStatus.Takendown | AccountStatus.Suspended | AccountStatus.Deleted | AccountStatus.Deactivated | undefined;
|
115
|
+
}>;
|
116
|
+
export type AccountEvt = z.infer<typeof accountEvt>;
|
98
117
|
export declare const tombstoneEvt: z.ZodObject<{
|
99
118
|
did: z.ZodString;
|
100
119
|
}, "strip", z.ZodTypeAny, {
|
@@ -121,12 +140,18 @@ type TypedIdentityEvt = {
|
|
121
140
|
time: string;
|
122
141
|
evt: IdentityEvt;
|
123
142
|
};
|
143
|
+
type TypedAccountEvt = {
|
144
|
+
type: 'account';
|
145
|
+
seq: number;
|
146
|
+
time: string;
|
147
|
+
evt: AccountEvt;
|
148
|
+
};
|
124
149
|
type TypedTombstoneEvt = {
|
125
150
|
type: 'tombstone';
|
126
151
|
seq: number;
|
127
152
|
time: string;
|
128
153
|
evt: TombstoneEvt;
|
129
154
|
};
|
130
|
-
export type SeqEvt = TypedCommitEvt | TypedHandleEvt | TypedIdentityEvt | TypedTombstoneEvt;
|
155
|
+
export type SeqEvt = TypedCommitEvt | TypedHandleEvt | TypedIdentityEvt | TypedAccountEvt | TypedTombstoneEvt;
|
131
156
|
export {};
|
132
157
|
//# sourceMappingURL=events.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAIL,UAAU,EAEX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAIL,UAAU,EAEX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,eAAO,MAAM,eAAe,QACrB,MAAM,cACC,UAAU,UACd,aAAa,EAAE,KACtB,QAAQ,aAAa,CAgDvB,CAAA;AAED,eAAO,MAAM,qBAAqB,QAC3B,MAAM,UACH,MAAM,KACb,QAAQ,aAAa,CAWvB,CAAA;AAED,eAAO,MAAM,oBAAoB,QAC1B,MAAM,WACF,MAAM,KACd,QAAQ,aAAa,CAavB,CAAA;AAED,eAAO,MAAM,mBAAmB,QACzB,MAAM,UACH,aAAa,KACpB,QAAQ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