@atproto/pds 0.4.197 → 0.4.199
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 +26 -0
- package/dist/actor-store/preference/reader.d.ts.map +1 -1
- package/dist/actor-store/preference/reader.js +15 -2
- package/dist/actor-store/preference/reader.js.map +1 -1
- package/dist/actor-store/preference/transactor.d.ts.map +1 -1
- package/dist/actor-store/preference/transactor.js +3 -1
- package/dist/actor-store/preference/transactor.js.map +1 -1
- package/dist/actor-store/preference/util.d.ts +4 -0
- package/dist/actor-store/preference/util.d.ts.map +1 -1
- package/dist/actor-store/preference/util.js +20 -3
- package/dist/actor-store/preference/util.js.map +1 -1
- package/dist/lexicon/index.d.ts +21 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +52 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +812 -2
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +429 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +13 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +9 -0
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/defs.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/contact/defs.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/defs.js +34 -0
- package/dist/lexicon/types/app/bsky/contact/defs.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts +21 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts +30 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.d.ts +23 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/sendNotification.d.ts +26 -0
- package/dist/lexicon/types/app/bsky/contact/sendNotification.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/sendNotification.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/sendNotification.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts +29 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +8 -0
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/defs.js.map +1 -1
- package/package.json +14 -14
- package/src/actor-store/preference/reader.ts +27 -3
- package/src/actor-store/preference/transactor.ts +9 -7
- package/src/actor-store/preference/util.ts +21 -3
- package/src/lexicon/index.ts +114 -0
- package/src/lexicon/lexicons.ts +456 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +22 -0
- package/src/lexicon/types/app/bsky/contact/defs.ts +71 -0
- package/src/lexicon/types/app/bsky/contact/dismissMatch.ts +43 -0
- package/src/lexicon/types/app/bsky/contact/getMatches.ts +43 -0
- package/src/lexicon/types/app/bsky/contact/getSyncStatus.ts +39 -0
- package/src/lexicon/types/app/bsky/contact/importContacts.ts +49 -0
- package/src/lexicon/types/app/bsky/contact/removeData.ts +40 -0
- package/src/lexicon/types/app/bsky/contact/sendNotification.ts +44 -0
- package/src/lexicon/types/app/bsky/contact/startPhoneVerification.ts +43 -0
- package/src/lexicon/types/app/bsky/contact/verifyPhone.ts +48 -0
- package/src/lexicon/types/app/bsky/graph/defs.ts +8 -0
- package/tests/preferences.test.ts +96 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.contact.sendNotification';
|
|
7
|
+
//# sourceMappingURL=sendNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendNotification.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/contact/sendNotification.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,mCAAmC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.contact.sendNotification'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n /** The DID of who this notification comes from. */\n from: string\n /** The DID of who this notification should go to. */\n to: string\n}\n\nexport interface OutputSchema {}\n\nexport interface HandlerInput {\n encoding: 'application/json'\n body: InputSchema\n}\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type QueryParams = {};
|
|
2
|
+
export interface InputSchema {
|
|
3
|
+
/** The phone number to receive the code via SMS. */
|
|
4
|
+
phone: string;
|
|
5
|
+
}
|
|
6
|
+
export interface OutputSchema {
|
|
7
|
+
}
|
|
8
|
+
export interface HandlerInput {
|
|
9
|
+
encoding: 'application/json';
|
|
10
|
+
body: InputSchema;
|
|
11
|
+
}
|
|
12
|
+
export interface HandlerSuccess {
|
|
13
|
+
encoding: 'application/json';
|
|
14
|
+
body: OutputSchema;
|
|
15
|
+
headers?: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface HandlerError {
|
|
20
|
+
status: number;
|
|
21
|
+
message?: string;
|
|
22
|
+
error?: 'TODO';
|
|
23
|
+
}
|
|
24
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
25
|
+
//# sourceMappingURL=startPhoneVerification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startPhoneVerification.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/contact/startPhoneVerification.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAY;CAAG;AAEhC,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,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,MAAM,CAAA;CACf;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.contact.startPhoneVerification';
|
|
7
|
+
//# sourceMappingURL=startPhoneVerification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startPhoneVerification.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/contact/startPhoneVerification.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,yCAAyC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.contact.startPhoneVerification'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n /** The phone number to receive the code via SMS. */\n phone: string\n}\n\nexport interface OutputSchema {}\n\nexport interface HandlerInput {\n encoding: 'application/json'\n body: InputSchema\n}\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'TODO'\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type QueryParams = {};
|
|
2
|
+
export interface InputSchema {
|
|
3
|
+
/** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. */
|
|
4
|
+
phone: string;
|
|
5
|
+
/** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. */
|
|
6
|
+
code: string;
|
|
7
|
+
}
|
|
8
|
+
export interface OutputSchema {
|
|
9
|
+
/** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. */
|
|
10
|
+
token: string;
|
|
11
|
+
}
|
|
12
|
+
export interface HandlerInput {
|
|
13
|
+
encoding: 'application/json';
|
|
14
|
+
body: InputSchema;
|
|
15
|
+
}
|
|
16
|
+
export interface HandlerSuccess {
|
|
17
|
+
encoding: 'application/json';
|
|
18
|
+
body: OutputSchema;
|
|
19
|
+
headers?: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface HandlerError {
|
|
24
|
+
status: number;
|
|
25
|
+
message?: string;
|
|
26
|
+
error?: 'TODO';
|
|
27
|
+
}
|
|
28
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
29
|
+
//# sourceMappingURL=verifyPhone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyPhone.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/contact/verifyPhone.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,qHAAqH;IACrH,KAAK,EAAE,MAAM,CAAA;IACb,sGAAsG;IACtG,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,yGAAyG;IACzG,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,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,MAAM,CAAA;CACf;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.contact.verifyPhone';
|
|
7
|
+
//# sourceMappingURL=verifyPhone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyPhone.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/contact/verifyPhone.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8BAA8B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.contact.verifyPhone'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n /** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. */\n phone: string\n /** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. */\n code: string\n}\n\nexport interface OutputSchema {\n /** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. */\n token: string\n}\n\nexport interface HandlerInput {\n encoding: 'application/json'\n body: InputSchema\n}\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'TODO'\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -108,6 +108,14 @@ export interface Relationship {
|
|
|
108
108
|
following?: string;
|
|
109
109
|
/** if the actor is followed by this DID, contains the AT-URI of the follow record */
|
|
110
110
|
followedBy?: string;
|
|
111
|
+
/** if the actor blocks this DID, this is the AT-URI of the block record */
|
|
112
|
+
blocking?: string;
|
|
113
|
+
/** if the actor is blocked by this DID, contains the AT-URI of the block record */
|
|
114
|
+
blockedBy?: string;
|
|
115
|
+
/** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record */
|
|
116
|
+
blockingByList?: string;
|
|
117
|
+
/** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record */
|
|
118
|
+
blockedByList?: string;
|
|
111
119
|
}
|
|
112
120
|
export declare function isRelationship<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.graph.defs", "relationship">;
|
|
113
121
|
export declare function validateRelationship<V>(v: V): ValidationResult<Relationship & V>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/graph/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAQjE,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;AAC9E,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,KAAK,oBAAoB,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,KAAK,eAAe,MAAM,iBAAiB,CAAA;AAMvD,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,mCAAmC,CAAA;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,2FAEtC;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAA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S,CAAC,EAAE,MAAM,CAAA;IAClB,gGAAgG;IAChG,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,wGAAwG;IACxG,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAID,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,0FAErC;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,sCAE3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/graph/defs.ts"],"names":[],"mappings":";;;AAmCA,0CAEC;AAED,sDAEC;AAoBD,gCAEC;AAED,4CAEC;AAUD,wCAEC;AAED,oDAEC;AAmBD,8CAEC;AAED,0DAEC;AAiBD,wDAEC;AAED,oEAEC;AAuBD,8CAEC;AAED,0DAEC;AAWD,0CAEC;AAED,sDAEC;
|
|
1
|
+
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/graph/defs.ts"],"names":[],"mappings":";;;AAmCA,0CAEC;AAED,sDAEC;AAoBD,gCAEC;AAED,4CAEC;AAUD,wCAEC;AAED,oDAEC;AAmBD,8CAEC;AAED,0DAEC;AAiBD,wDAEC;AAED,oEAEC;AAuBD,8CAEC;AAED,0DAEC;AAWD,0CAEC;AAED,sDAEC;AAsBD,wCAEC;AAED,oDAEC;AAxMD,mDAA4D;AAC5D,2CAIyB;AAMzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,qBAAqB,CAAA;AAehC,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAEzC,SAAgB,eAAe,CAAI,CAAI;IACrC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,CAAA;AAC3C,CAAC;AAED,SAAgB,qBAAqB,CAAI,CAAI;IAC3C,OAAO,QAAQ,CAAoB,CAAC,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,GAAG,GAAG,EAAE,aAAa,CAAA;AAC5C,2FAA2F;AAC9E,QAAA,aAAa,GAAG,GAAG,EAAE,gBAAgB,CAAA;AAQlD,MAAM,mBAAmB,GAAG,iBAAiB,CAAA;AAE7C,SAAgB,iBAAiB,CAAI,CAAI;IACvC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAA;AAC7C,CAAC;AAED,SAAgB,uBAAuB,CAAI,CAAI;IAC7C,OAAO,QAAQ,CAAsB,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAA;AAClE,CAAC;AASD,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAEzC,SAAgB,eAAe,CAAI,CAAI;IACrC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,CAAA;AAC3C,CAAC;AAED,SAAgB,qBAAqB,CAAI,CAAI;IAC3C,OAAO,QAAQ,CAAoB,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,CAAA;AAC9D,CAAC;AAoBD,MAAM,gBAAgB,GAAG,cAAc,CAAA;AAEvC,SAAgB,cAAc,CAAI,CAAI;IACpC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC1C,CAAC;AAED,SAAgB,oBAAoB,CAAI,CAAI;IAC1C,OAAO,QAAQ,CAAmB,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC5D,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'\nimport type * as AppBskyActorDefs from '../actor/defs.js'\nimport type * as AppBskyRichtextFacet from '../richtext/facet.js'\nimport type * as AppBskyFeedDefs from '../feed/defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.graph.defs'\n\nexport interface ListViewBasic {\n $type?: 'app.bsky.graph.defs#listViewBasic'\n uri: string\n cid: string\n name: string\n purpose: ListPurpose\n avatar?: string\n listItemCount?: number\n labels?: ComAtprotoLabelDefs.Label[]\n viewer?: ListViewerState\n indexedAt?: string\n}\n\nconst hashListViewBasic = 'listViewBasic'\n\nexport function isListViewBasic<V>(v: V) {\n return is$typed(v, id, hashListViewBasic)\n}\n\nexport function validateListViewBasic<V>(v: V) {\n return validate<ListViewBasic & V>(v, id, hashListViewBasic)\n}\n\nexport interface ListView {\n $type?: 'app.bsky.graph.defs#listView'\n uri: string\n cid: string\n creator: AppBskyActorDefs.ProfileView\n name: string\n purpose: ListPurpose\n description?: string\n descriptionFacets?: AppBskyRichtextFacet.Main[]\n avatar?: string\n listItemCount?: number\n labels?: ComAtprotoLabelDefs.Label[]\n viewer?: ListViewerState\n indexedAt: string\n}\n\nconst hashListView = 'listView'\n\nexport function isListView<V>(v: V) {\n return is$typed(v, id, hashListView)\n}\n\nexport function validateListView<V>(v: V) {\n return validate<ListView & V>(v, id, hashListView)\n}\n\nexport interface ListItemView {\n $type?: 'app.bsky.graph.defs#listItemView'\n uri: string\n subject: AppBskyActorDefs.ProfileView\n}\n\nconst hashListItemView = 'listItemView'\n\nexport function isListItemView<V>(v: V) {\n return is$typed(v, id, hashListItemView)\n}\n\nexport function validateListItemView<V>(v: V) {\n return validate<ListItemView & V>(v, id, hashListItemView)\n}\n\nexport interface StarterPackView {\n $type?: 'app.bsky.graph.defs#starterPackView'\n uri: string\n cid: string\n record: { [_ in string]: unknown }\n creator: AppBskyActorDefs.ProfileViewBasic\n list?: ListViewBasic\n listItemsSample?: ListItemView[]\n feeds?: AppBskyFeedDefs.GeneratorView[]\n joinedWeekCount?: number\n joinedAllTimeCount?: number\n labels?: ComAtprotoLabelDefs.Label[]\n indexedAt: string\n}\n\nconst hashStarterPackView = 'starterPackView'\n\nexport function isStarterPackView<V>(v: V) {\n return is$typed(v, id, hashStarterPackView)\n}\n\nexport function validateStarterPackView<V>(v: V) {\n return validate<StarterPackView & V>(v, id, hashStarterPackView)\n}\n\nexport interface StarterPackViewBasic {\n $type?: 'app.bsky.graph.defs#starterPackViewBasic'\n uri: string\n cid: string\n record: { [_ in string]: unknown }\n creator: AppBskyActorDefs.ProfileViewBasic\n listItemCount?: number\n joinedWeekCount?: number\n joinedAllTimeCount?: number\n labels?: ComAtprotoLabelDefs.Label[]\n indexedAt: string\n}\n\nconst hashStarterPackViewBasic = 'starterPackViewBasic'\n\nexport function isStarterPackViewBasic<V>(v: V) {\n return is$typed(v, id, hashStarterPackViewBasic)\n}\n\nexport function validateStarterPackViewBasic<V>(v: V) {\n return validate<StarterPackViewBasic & V>(v, id, hashStarterPackViewBasic)\n}\n\nexport type ListPurpose =\n | 'app.bsky.graph.defs#modlist'\n | 'app.bsky.graph.defs#curatelist'\n | 'app.bsky.graph.defs#referencelist'\n | (string & {})\n\n/** A list of actors to apply an aggregate moderation action (mute/block) on. */\nexport const MODLIST = `${id}#modlist`\n/** A list of actors used for curation purposes such as list feeds or interaction gating. */\nexport const CURATELIST = `${id}#curatelist`\n/** A list of actors used for only for reference purposes such as within a starter pack. */\nexport const REFERENCELIST = `${id}#referencelist`\n\nexport interface ListViewerState {\n $type?: 'app.bsky.graph.defs#listViewerState'\n muted?: boolean\n blocked?: string\n}\n\nconst hashListViewerState = 'listViewerState'\n\nexport function isListViewerState<V>(v: V) {\n return is$typed(v, id, hashListViewerState)\n}\n\nexport function validateListViewerState<V>(v: V) {\n return validate<ListViewerState & V>(v, id, hashListViewerState)\n}\n\n/** indicates that a handle or DID could not be resolved */\nexport interface NotFoundActor {\n $type?: 'app.bsky.graph.defs#notFoundActor'\n actor: string\n notFound: true\n}\n\nconst hashNotFoundActor = 'notFoundActor'\n\nexport function isNotFoundActor<V>(v: V) {\n return is$typed(v, id, hashNotFoundActor)\n}\n\nexport function validateNotFoundActor<V>(v: V) {\n return validate<NotFoundActor & V>(v, id, hashNotFoundActor)\n}\n\n/** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) */\nexport interface Relationship {\n $type?: 'app.bsky.graph.defs#relationship'\n did: string\n /** if the actor follows this DID, this is the AT-URI of the follow record */\n following?: string\n /** if the actor is followed by this DID, contains the AT-URI of the follow record */\n followedBy?: string\n /** if the actor blocks this DID, this is the AT-URI of the block record */\n blocking?: string\n /** if the actor is blocked by this DID, contains the AT-URI of the block record */\n blockedBy?: string\n /** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record */\n blockingByList?: string\n /** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record */\n blockedByList?: string\n}\n\nconst hashRelationship = 'relationship'\n\nexport function isRelationship<V>(v: V) {\n return is$typed(v, id, hashRelationship)\n}\n\nexport function validateRelationship<V>(v: V) {\n return validate<Relationship & V>(v, id, hashRelationship)\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/pds",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.199",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
|
6
6
|
"keywords": [
|
|
@@ -47,25 +47,25 @@
|
|
|
47
47
|
"uint8arrays": "3.0.0",
|
|
48
48
|
"undici": "^6.19.8",
|
|
49
49
|
"zod": "^3.23.8",
|
|
50
|
-
"@atproto-labs/fetch-node": "0.2.0",
|
|
51
50
|
"@atproto-labs/simple-store": "0.3.0",
|
|
51
|
+
"@atproto-labs/fetch-node": "0.2.0",
|
|
52
52
|
"@atproto-labs/simple-store-memory": "0.1.4",
|
|
53
53
|
"@atproto-labs/simple-store-redis": "0.0.1",
|
|
54
54
|
"@atproto-labs/xrpc-utils": "0.0.24",
|
|
55
|
-
"@atproto/api": "^0.18.
|
|
55
|
+
"@atproto/api": "^0.18.6",
|
|
56
|
+
"@atproto/common": "^0.5.3",
|
|
56
57
|
"@atproto/aws": "^0.2.31",
|
|
57
|
-
"@atproto/common": "^0.5.2",
|
|
58
58
|
"@atproto/crypto": "^0.4.5",
|
|
59
59
|
"@atproto/identity": "^0.4.10",
|
|
60
|
-
"@atproto/lex-cbor": "^0.0.
|
|
61
|
-
"@atproto/lex-data": "^0.0.
|
|
62
|
-
"@atproto/lexicon": "^0.
|
|
63
|
-
"@atproto/oauth-provider": "^0.14.
|
|
60
|
+
"@atproto/lex-cbor": "^0.0.3",
|
|
61
|
+
"@atproto/lex-data": "^0.0.3",
|
|
62
|
+
"@atproto/lexicon": "^0.6.0",
|
|
63
|
+
"@atproto/oauth-provider": "^0.14.1",
|
|
64
64
|
"@atproto/oauth-scopes": "^0.3.0",
|
|
65
|
-
"@atproto/repo": "^0.8.
|
|
65
|
+
"@atproto/repo": "^0.8.12",
|
|
66
66
|
"@atproto/syntax": "^0.4.2",
|
|
67
|
-
"@atproto/xrpc": "^0.7.
|
|
68
|
-
"@atproto/xrpc-server": "^0.10.
|
|
67
|
+
"@atproto/xrpc": "^0.7.7",
|
|
68
|
+
"@atproto/xrpc-server": "^0.10.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@atproto/pds-entryway": "npm:@atproto/pds@0.3.0-entryway.3",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"ts-node": "^10.8.2",
|
|
84
84
|
"typescript": "^5.6.3",
|
|
85
85
|
"ws": "^8.12.0",
|
|
86
|
-
"@atproto/api": "^0.18.
|
|
87
|
-
"@atproto/bsky": "^0.0.
|
|
88
|
-
"@atproto/lex-cli": "^0.9.
|
|
86
|
+
"@atproto/api": "^0.18.6",
|
|
87
|
+
"@atproto/bsky": "^0.0.201",
|
|
88
|
+
"@atproto/lex-cli": "^0.9.8",
|
|
89
89
|
"@atproto/oauth-client-browser-example": "0.0.8"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ActorDb } from '../db'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
DECLARED_AGE_PREF,
|
|
4
|
+
PERSONAL_DETAILS_PREF,
|
|
5
|
+
PrefAllowedOptions,
|
|
6
|
+
getAgeFromDatestring,
|
|
7
|
+
prefAllowed,
|
|
8
|
+
} from './util'
|
|
3
9
|
|
|
4
10
|
export class PreferenceReader {
|
|
5
11
|
constructor(public db: ActorDb) {}
|
|
@@ -13,10 +19,28 @@ export class PreferenceReader {
|
|
|
13
19
|
.orderBy('id')
|
|
14
20
|
.selectAll()
|
|
15
21
|
.execute()
|
|
16
|
-
|
|
22
|
+
|
|
23
|
+
const prefs = prefsRes
|
|
17
24
|
.filter((pref) => !namespace || prefMatchNamespace(namespace, pref.name))
|
|
18
|
-
.filter((pref) => prefAllowed(pref.name, opts))
|
|
19
25
|
.map((pref) => JSON.parse(pref.valueJson) as AccountPreference)
|
|
26
|
+
const personalDetailsPref = prefs.find(
|
|
27
|
+
(pref) => pref.$type === PERSONAL_DETAILS_PREF,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
if (personalDetailsPref) {
|
|
31
|
+
if (typeof personalDetailsPref.birthDate === 'string') {
|
|
32
|
+
const age = getAgeFromDatestring(personalDetailsPref.birthDate)
|
|
33
|
+
const declaredAgePref: AccountPreference = {
|
|
34
|
+
$type: DECLARED_AGE_PREF,
|
|
35
|
+
isOverAge13: age >= 13,
|
|
36
|
+
isOverAge16: age >= 16,
|
|
37
|
+
isOverAge18: age >= 18,
|
|
38
|
+
}
|
|
39
|
+
prefs.push(declaredAgePref)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return prefs.filter((pref) => prefAllowed(pref.$type, opts))
|
|
20
44
|
}
|
|
21
45
|
}
|
|
22
46
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
PreferenceReader,
|
|
5
5
|
prefMatchNamespace,
|
|
6
6
|
} from './reader'
|
|
7
|
-
import { PrefAllowedOptions, prefAllowed } from './util'
|
|
7
|
+
import { PrefAllowedOptions, isReadOnlyPref, prefAllowed } from './util'
|
|
8
8
|
|
|
9
9
|
export class PreferenceTransactor extends PreferenceReader {
|
|
10
10
|
async putPreferences(
|
|
@@ -29,12 +29,14 @@ export class PreferenceTransactor extends PreferenceReader {
|
|
|
29
29
|
.selectFrom('account_pref')
|
|
30
30
|
.select(['id', 'name'])
|
|
31
31
|
.execute()
|
|
32
|
-
const putPrefs = values
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const putPrefs = values
|
|
33
|
+
.filter((value) => !isReadOnlyPref(value.$type))
|
|
34
|
+
.map((value) => {
|
|
35
|
+
return {
|
|
36
|
+
name: value.$type,
|
|
37
|
+
valueJson: JSON.stringify(value),
|
|
38
|
+
}
|
|
39
|
+
})
|
|
38
40
|
const allPrefIdsInNamespace = allPrefs
|
|
39
41
|
.filter((pref) => prefMatchNamespace(namespace, pref.name))
|
|
40
42
|
.filter((pref) => prefAllowed(pref.name, opts))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export const PERSONAL_DETAILS_PREF = 'app.bsky.actor.defs#personalDetailsPref'
|
|
2
|
+
export const DECLARED_AGE_PREF = 'app.bsky.actor.defs#declaredAgePref'
|
|
3
|
+
|
|
4
|
+
const FULL_ACCESS_ONLY_PREFS = new Set([PERSONAL_DETAILS_PREF])
|
|
4
5
|
|
|
5
6
|
export type PrefAllowedOptions = {
|
|
6
7
|
hasAccessFull?: boolean
|
|
@@ -16,3 +17,20 @@ export function prefAllowed(
|
|
|
16
17
|
|
|
17
18
|
return !FULL_ACCESS_ONLY_PREFS.has(prefType)
|
|
18
19
|
}
|
|
20
|
+
|
|
21
|
+
const READ_ONLY_PREFS = new Set([DECLARED_AGE_PREF])
|
|
22
|
+
|
|
23
|
+
export function isReadOnlyPref(prefType: string) {
|
|
24
|
+
return READ_ONLY_PREFS.has(prefType)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function getAgeFromDatestring(birthDate: string): number {
|
|
28
|
+
const bday = new Date(birthDate)
|
|
29
|
+
const today = new Date()
|
|
30
|
+
let age = today.getFullYear() - bday.getFullYear()
|
|
31
|
+
const m = today.getMonth() - bday.getMonth()
|
|
32
|
+
if (m < 0 || (m === 0 && today.getDate() < bday.getDate())) {
|
|
33
|
+
age--
|
|
34
|
+
}
|
|
35
|
+
return age
|
|
36
|
+
}
|
package/src/lexicon/index.ts
CHANGED
|
@@ -23,6 +23,14 @@ import * as AppBskyAgeassuranceGetState from './types/app/bsky/ageassurance/getS
|
|
|
23
23
|
import * as AppBskyBookmarkCreateBookmark from './types/app/bsky/bookmark/createBookmark.js'
|
|
24
24
|
import * as AppBskyBookmarkDeleteBookmark from './types/app/bsky/bookmark/deleteBookmark.js'
|
|
25
25
|
import * as AppBskyBookmarkGetBookmarks from './types/app/bsky/bookmark/getBookmarks.js'
|
|
26
|
+
import * as AppBskyContactDismissMatch from './types/app/bsky/contact/dismissMatch.js'
|
|
27
|
+
import * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.js'
|
|
28
|
+
import * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js'
|
|
29
|
+
import * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js'
|
|
30
|
+
import * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js'
|
|
31
|
+
import * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js'
|
|
32
|
+
import * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
|
|
33
|
+
import * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
|
|
26
34
|
import * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator.js'
|
|
27
35
|
import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.js'
|
|
28
36
|
import * as AppBskyFeedGetActorLikes from './types/app/bsky/feed/getActorLikes.js'
|
|
@@ -397,6 +405,7 @@ export class AppBskyNS {
|
|
|
397
405
|
actor: AppBskyActorNS
|
|
398
406
|
ageassurance: AppBskyAgeassuranceNS
|
|
399
407
|
bookmark: AppBskyBookmarkNS
|
|
408
|
+
contact: AppBskyContactNS
|
|
400
409
|
embed: AppBskyEmbedNS
|
|
401
410
|
feed: AppBskyFeedNS
|
|
402
411
|
graph: AppBskyGraphNS
|
|
@@ -411,6 +420,7 @@ export class AppBskyNS {
|
|
|
411
420
|
this.actor = new AppBskyActorNS(server)
|
|
412
421
|
this.ageassurance = new AppBskyAgeassuranceNS(server)
|
|
413
422
|
this.bookmark = new AppBskyBookmarkNS(server)
|
|
423
|
+
this.contact = new AppBskyContactNS(server)
|
|
414
424
|
this.embed = new AppBskyEmbedNS(server)
|
|
415
425
|
this.feed = new AppBskyFeedNS(server)
|
|
416
426
|
this.graph = new AppBskyGraphNS(server)
|
|
@@ -602,6 +612,110 @@ export class AppBskyBookmarkNS {
|
|
|
602
612
|
}
|
|
603
613
|
}
|
|
604
614
|
|
|
615
|
+
export class AppBskyContactNS {
|
|
616
|
+
_server: Server
|
|
617
|
+
|
|
618
|
+
constructor(server: Server) {
|
|
619
|
+
this._server = server
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
dismissMatch<A extends Auth = void>(
|
|
623
|
+
cfg: MethodConfigOrHandler<
|
|
624
|
+
A,
|
|
625
|
+
AppBskyContactDismissMatch.QueryParams,
|
|
626
|
+
AppBskyContactDismissMatch.HandlerInput,
|
|
627
|
+
AppBskyContactDismissMatch.HandlerOutput
|
|
628
|
+
>,
|
|
629
|
+
) {
|
|
630
|
+
const nsid = 'app.bsky.contact.dismissMatch' // @ts-ignore
|
|
631
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
getMatches<A extends Auth = void>(
|
|
635
|
+
cfg: MethodConfigOrHandler<
|
|
636
|
+
A,
|
|
637
|
+
AppBskyContactGetMatches.QueryParams,
|
|
638
|
+
AppBskyContactGetMatches.HandlerInput,
|
|
639
|
+
AppBskyContactGetMatches.HandlerOutput
|
|
640
|
+
>,
|
|
641
|
+
) {
|
|
642
|
+
const nsid = 'app.bsky.contact.getMatches' // @ts-ignore
|
|
643
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
getSyncStatus<A extends Auth = void>(
|
|
647
|
+
cfg: MethodConfigOrHandler<
|
|
648
|
+
A,
|
|
649
|
+
AppBskyContactGetSyncStatus.QueryParams,
|
|
650
|
+
AppBskyContactGetSyncStatus.HandlerInput,
|
|
651
|
+
AppBskyContactGetSyncStatus.HandlerOutput
|
|
652
|
+
>,
|
|
653
|
+
) {
|
|
654
|
+
const nsid = 'app.bsky.contact.getSyncStatus' // @ts-ignore
|
|
655
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
importContacts<A extends Auth = void>(
|
|
659
|
+
cfg: MethodConfigOrHandler<
|
|
660
|
+
A,
|
|
661
|
+
AppBskyContactImportContacts.QueryParams,
|
|
662
|
+
AppBskyContactImportContacts.HandlerInput,
|
|
663
|
+
AppBskyContactImportContacts.HandlerOutput
|
|
664
|
+
>,
|
|
665
|
+
) {
|
|
666
|
+
const nsid = 'app.bsky.contact.importContacts' // @ts-ignore
|
|
667
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
removeData<A extends Auth = void>(
|
|
671
|
+
cfg: MethodConfigOrHandler<
|
|
672
|
+
A,
|
|
673
|
+
AppBskyContactRemoveData.QueryParams,
|
|
674
|
+
AppBskyContactRemoveData.HandlerInput,
|
|
675
|
+
AppBskyContactRemoveData.HandlerOutput
|
|
676
|
+
>,
|
|
677
|
+
) {
|
|
678
|
+
const nsid = 'app.bsky.contact.removeData' // @ts-ignore
|
|
679
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
sendNotification<A extends Auth = void>(
|
|
683
|
+
cfg: MethodConfigOrHandler<
|
|
684
|
+
A,
|
|
685
|
+
AppBskyContactSendNotification.QueryParams,
|
|
686
|
+
AppBskyContactSendNotification.HandlerInput,
|
|
687
|
+
AppBskyContactSendNotification.HandlerOutput
|
|
688
|
+
>,
|
|
689
|
+
) {
|
|
690
|
+
const nsid = 'app.bsky.contact.sendNotification' // @ts-ignore
|
|
691
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
startPhoneVerification<A extends Auth = void>(
|
|
695
|
+
cfg: MethodConfigOrHandler<
|
|
696
|
+
A,
|
|
697
|
+
AppBskyContactStartPhoneVerification.QueryParams,
|
|
698
|
+
AppBskyContactStartPhoneVerification.HandlerInput,
|
|
699
|
+
AppBskyContactStartPhoneVerification.HandlerOutput
|
|
700
|
+
>,
|
|
701
|
+
) {
|
|
702
|
+
const nsid = 'app.bsky.contact.startPhoneVerification' // @ts-ignore
|
|
703
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
verifyPhone<A extends Auth = void>(
|
|
707
|
+
cfg: MethodConfigOrHandler<
|
|
708
|
+
A,
|
|
709
|
+
AppBskyContactVerifyPhone.QueryParams,
|
|
710
|
+
AppBskyContactVerifyPhone.HandlerInput,
|
|
711
|
+
AppBskyContactVerifyPhone.HandlerOutput
|
|
712
|
+
>,
|
|
713
|
+
) {
|
|
714
|
+
const nsid = 'app.bsky.contact.verifyPhone' // @ts-ignore
|
|
715
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
605
719
|
export class AppBskyEmbedNS {
|
|
606
720
|
_server: Server
|
|
607
721
|
|