@atproto/pds 0.4.162 → 0.4.163
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 +7 -0
- package/dist/lexicon/index.d.ts +4 -4
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +8 -8
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +254 -254
- package/dist/lexicon/lexicons.js +134 -134
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.d.ts +6 -6
- package/dist/lexicon/types/com/atproto/temp/checkHandleAvailability.d.ts.map +1 -0
- package/dist/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.js +1 -1
- package/dist/lexicon/types/com/atproto/temp/checkHandleAvailability.js.map +1 -0
- package/package.json +6 -6
- package/src/lexicon/index.ts +24 -24
- package/src/lexicon/lexicons.ts +143 -143
- package/src/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.ts +4 -4
- package/tests/crud.test.ts +7 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/checkHandleAvailability.d.ts.map +0 -1
- package/dist/lexicon/types/app/bsky/unspecced/checkHandleAvailability.js.map +0 -1
package/dist/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.d.ts
RENAMED
@@ -35,24 +35,24 @@ export interface HandlerError {
|
|
35
35
|
export type HandlerOutput = HandlerError | HandlerSuccess;
|
36
36
|
/** Indicates the provided handle is available. */
|
37
37
|
export interface ResultAvailable {
|
38
|
-
$type?: '
|
38
|
+
$type?: 'com.atproto.temp.checkHandleAvailability#resultAvailable';
|
39
39
|
}
|
40
|
-
export declare function isResultAvailable<V>(v: V): v is import("../../../../util").$TypedObject<V, "
|
40
|
+
export declare function isResultAvailable<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.temp.checkHandleAvailability", "resultAvailable">;
|
41
41
|
export declare function validateResultAvailable<V>(v: V): ValidationResult<ResultAvailable & V>;
|
42
42
|
/** Indicates the provided handle is unavailable and gives suggestions of available handles. */
|
43
43
|
export interface ResultUnavailable {
|
44
|
-
$type?: '
|
44
|
+
$type?: 'com.atproto.temp.checkHandleAvailability#resultUnavailable';
|
45
45
|
/** List of suggested handles based on the provided inputs. */
|
46
46
|
suggestions: Suggestion[];
|
47
47
|
}
|
48
|
-
export declare function isResultUnavailable<V>(v: V): v is import("../../../../util").$TypedObject<V, "
|
48
|
+
export declare function isResultUnavailable<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.temp.checkHandleAvailability", "resultUnavailable">;
|
49
49
|
export declare function validateResultUnavailable<V>(v: V): ValidationResult<ResultUnavailable & V>;
|
50
50
|
export interface Suggestion {
|
51
|
-
$type?: '
|
51
|
+
$type?: 'com.atproto.temp.checkHandleAvailability#suggestion';
|
52
52
|
handle: string;
|
53
53
|
/** Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics. */
|
54
54
|
method: string;
|
55
55
|
}
|
56
|
-
export declare function isSuggestion<V>(v: V): v is import("../../../../util").$TypedObject<V, "
|
56
|
+
export declare function isSuggestion<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.temp.checkHandleAvailability", "suggestion">;
|
57
57
|
export declare function validateSuggestion<V>(v: V): ValidationResult<Suggestion & V>;
|
58
58
|
//# sourceMappingURL=checkHandleAvailability.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checkHandleAvailability.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/temp/checkHandleAvailability.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AAMzB,MAAM,MAAM,WAAW,GAAG;IACxB,8FAA8F;IAC9F,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EACF,MAAM,CAAC,eAAe,CAAC,GACvB,MAAM,CAAC,iBAAiB,CAAC,GACzB;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CACtB;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,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,CAAA;AAEzD,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,0DAA0D,CAAA;CACnE;AAID,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,kHAExC;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,yCAE9C;AAED,+FAA+F;AAC/F,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,4DAA4D,CAAA;IACpE,8DAA8D;IAC9D,WAAW,EAAE,UAAU,EAAE,CAAA;CAC1B;AAID,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,oHAE1C;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,2CAEhD;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,qDAAqD,CAAA;IAC7D,MAAM,EAAE,MAAM,CAAA;IACd,6GAA6G;IAC7G,MAAM,EAAE,MAAM,CAAA;CACf;AAID,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,6GAEnC;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,oCAEzC"}
|
package/dist/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.js
RENAMED
@@ -9,7 +9,7 @@ exports.validateSuggestion = validateSuggestion;
|
|
9
9
|
const lexicons_1 = require("../../../../lexicons");
|
10
10
|
const util_1 = require("../../../../util");
|
11
11
|
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
12
|
-
const id = '
|
12
|
+
const id = 'com.atproto.temp.checkHandleAvailability';
|
13
13
|
const hashResultAvailable = 'resultAvailable';
|
14
14
|
function isResultAvailable(v) {
|
15
15
|
return is$typed(v, id, hashResultAvailable);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checkHandleAvailability.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/temp/checkHandleAvailability.ts"],"names":[],"mappings":";;AA0DA,8CAEC;AAED,0DAEC;AAWD,kDAEC;AAED,8DAEC;AAWD,oCAEC;AAED,gDAEC;AA7FD,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,0CAA0C,CAAA;AA0CrD,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,qBAAqB,GAAG,mBAAmB,CAAA;AAEjD,SAAgB,mBAAmB,CAAI,CAAI;IACzC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAA;AAC/C,CAAC;AAED,SAAgB,yBAAyB,CAAI,CAAI;IAC/C,OAAO,QAAQ,CAAwB,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAA;AACtE,CAAC;AASD,MAAM,cAAc,GAAG,YAAY,CAAA;AAEnC,SAAgB,YAAY,CAAI,CAAI;IAClC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,CAAA;AACxC,CAAC;AAED,SAAgB,kBAAkB,CAAI,CAAI;IACxC,OAAO,QAAQ,CAAiB,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,CAAA;AACxD,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.163",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"zod": "^3.23.8",
|
50
50
|
"@atproto-labs/fetch-node": "0.1.9",
|
51
51
|
"@atproto-labs/xrpc-utils": "0.0.17",
|
52
|
-
"@atproto/api": "^0.
|
52
|
+
"@atproto/api": "^0.16.0",
|
53
53
|
"@atproto/aws": "^0.2.25",
|
54
54
|
"@atproto/common": "^0.4.11",
|
55
55
|
"@atproto/crypto": "^0.4.4",
|
@@ -77,10 +77,10 @@
|
|
77
77
|
"ts-node": "^10.8.2",
|
78
78
|
"typescript": "^5.6.3",
|
79
79
|
"ws": "^8.12.0",
|
80
|
-
"@atproto/api": "^0.
|
81
|
-
"@atproto/bsky": "^0.0.
|
82
|
-
"@atproto/dev-env": "^0.3.
|
83
|
-
"@atproto/lex-cli": "^0.9.
|
80
|
+
"@atproto/api": "^0.16.0",
|
81
|
+
"@atproto/bsky": "^0.0.175",
|
82
|
+
"@atproto/dev-env": "^0.3.158",
|
83
|
+
"@atproto/lex-cli": "^0.9.1",
|
84
84
|
"@atproto/oauth-client-browser-example": "0.0.5"
|
85
85
|
},
|
86
86
|
"scripts": {
|
package/src/lexicon/index.ts
CHANGED
@@ -89,6 +89,7 @@ import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOf
|
|
89
89
|
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl.js'
|
90
90
|
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos.js'
|
91
91
|
import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle.js'
|
92
|
+
import * as ComAtprotoTempCheckHandleAvailability from './types/com/atproto/temp/checkHandleAvailability.js'
|
92
93
|
import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue.js'
|
93
94
|
import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels.js'
|
94
95
|
import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification.js'
|
@@ -109,8 +110,8 @@ import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGene
|
|
109
110
|
import * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton.js'
|
110
111
|
import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes.js'
|
111
112
|
import * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed.js'
|
112
|
-
import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
|
113
113
|
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js'
|
114
|
+
import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
|
114
115
|
import * as AppBskyFeedGetQuotes from './types/app/bsky/feed/getQuotes.js'
|
115
116
|
import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy.js'
|
116
117
|
import * as AppBskyFeedGetSuggestedFeeds from './types/app/bsky/feed/getSuggestedFeeds.js'
|
@@ -149,7 +150,6 @@ import * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notificat
|
|
149
150
|
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js'
|
150
151
|
import * as AppBskyNotificationUnregisterPush from './types/app/bsky/notification/unregisterPush.js'
|
151
152
|
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
152
|
-
import * as AppBskyUnspeccedCheckHandleAvailability from './types/app/bsky/unspecced/checkHandleAvailability.js'
|
153
153
|
import * as AppBskyUnspeccedGetAgeAssuranceState from './types/app/bsky/unspecced/getAgeAssuranceState.js'
|
154
154
|
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
155
155
|
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
@@ -1356,6 +1356,18 @@ export class ComAtprotoTempNS {
|
|
1356
1356
|
return this._server.xrpc.method(nsid, cfg)
|
1357
1357
|
}
|
1358
1358
|
|
1359
|
+
checkHandleAvailability<A extends Auth = void>(
|
1360
|
+
cfg: MethodConfigOrHandler<
|
1361
|
+
A,
|
1362
|
+
ComAtprotoTempCheckHandleAvailability.QueryParams,
|
1363
|
+
ComAtprotoTempCheckHandleAvailability.HandlerInput,
|
1364
|
+
ComAtprotoTempCheckHandleAvailability.HandlerOutput
|
1365
|
+
>,
|
1366
|
+
) {
|
1367
|
+
const nsid = 'com.atproto.temp.checkHandleAvailability' // @ts-ignore
|
1368
|
+
return this._server.xrpc.method(nsid, cfg)
|
1369
|
+
}
|
1370
|
+
|
1359
1371
|
checkSignupQueue<A extends Auth = void>(
|
1360
1372
|
cfg: MethodConfigOrHandler<
|
1361
1373
|
A,
|
@@ -1656,27 +1668,27 @@ export class AppBskyFeedNS {
|
|
1656
1668
|
return this._server.xrpc.method(nsid, cfg)
|
1657
1669
|
}
|
1658
1670
|
|
1659
|
-
|
1671
|
+
getPostThread<A extends Auth = void>(
|
1660
1672
|
cfg: MethodConfigOrHandler<
|
1661
1673
|
A,
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1674
|
+
AppBskyFeedGetPostThread.QueryParams,
|
1675
|
+
AppBskyFeedGetPostThread.HandlerInput,
|
1676
|
+
AppBskyFeedGetPostThread.HandlerOutput
|
1665
1677
|
>,
|
1666
1678
|
) {
|
1667
|
-
const nsid = 'app.bsky.feed.
|
1679
|
+
const nsid = 'app.bsky.feed.getPostThread' // @ts-ignore
|
1668
1680
|
return this._server.xrpc.method(nsid, cfg)
|
1669
1681
|
}
|
1670
1682
|
|
1671
|
-
|
1683
|
+
getPosts<A extends Auth = void>(
|
1672
1684
|
cfg: MethodConfigOrHandler<
|
1673
1685
|
A,
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1686
|
+
AppBskyFeedGetPosts.QueryParams,
|
1687
|
+
AppBskyFeedGetPosts.HandlerInput,
|
1688
|
+
AppBskyFeedGetPosts.HandlerOutput
|
1677
1689
|
>,
|
1678
1690
|
) {
|
1679
|
-
const nsid = 'app.bsky.feed.
|
1691
|
+
const nsid = 'app.bsky.feed.getPosts' // @ts-ignore
|
1680
1692
|
return this._server.xrpc.method(nsid, cfg)
|
1681
1693
|
}
|
1682
1694
|
|
@@ -2176,18 +2188,6 @@ export class AppBskyUnspeccedNS {
|
|
2176
2188
|
this._server = server
|
2177
2189
|
}
|
2178
2190
|
|
2179
|
-
checkHandleAvailability<A extends Auth = void>(
|
2180
|
-
cfg: MethodConfigOrHandler<
|
2181
|
-
A,
|
2182
|
-
AppBskyUnspeccedCheckHandleAvailability.QueryParams,
|
2183
|
-
AppBskyUnspeccedCheckHandleAvailability.HandlerInput,
|
2184
|
-
AppBskyUnspeccedCheckHandleAvailability.HandlerOutput
|
2185
|
-
>,
|
2186
|
-
) {
|
2187
|
-
const nsid = 'app.bsky.unspecced.checkHandleAvailability' // @ts-ignore
|
2188
|
-
return this._server.xrpc.method(nsid, cfg)
|
2189
|
-
}
|
2190
|
-
|
2191
2191
|
getAgeAssuranceState<A extends Auth = void>(
|
2192
2192
|
cfg: MethodConfigOrHandler<
|
2193
2193
|
A,
|
package/src/lexicon/lexicons.ts
CHANGED
@@ -4449,6 +4449,104 @@ export const schemaDict = {
|
|
4449
4449
|
},
|
4450
4450
|
},
|
4451
4451
|
},
|
4452
|
+
ComAtprotoTempCheckHandleAvailability: {
|
4453
|
+
lexicon: 1,
|
4454
|
+
id: 'com.atproto.temp.checkHandleAvailability',
|
4455
|
+
defs: {
|
4456
|
+
main: {
|
4457
|
+
type: 'query',
|
4458
|
+
description:
|
4459
|
+
'Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.',
|
4460
|
+
parameters: {
|
4461
|
+
type: 'params',
|
4462
|
+
required: ['handle'],
|
4463
|
+
properties: {
|
4464
|
+
handle: {
|
4465
|
+
type: 'string',
|
4466
|
+
format: 'handle',
|
4467
|
+
description:
|
4468
|
+
'Tentative handle. Will be checked for availability or used to build handle suggestions.',
|
4469
|
+
},
|
4470
|
+
email: {
|
4471
|
+
type: 'string',
|
4472
|
+
description:
|
4473
|
+
'User-provided email. Might be used to build handle suggestions.',
|
4474
|
+
},
|
4475
|
+
birthDate: {
|
4476
|
+
type: 'string',
|
4477
|
+
format: 'datetime',
|
4478
|
+
description:
|
4479
|
+
'User-provided birth date. Might be used to build handle suggestions.',
|
4480
|
+
},
|
4481
|
+
},
|
4482
|
+
},
|
4483
|
+
output: {
|
4484
|
+
encoding: 'application/json',
|
4485
|
+
schema: {
|
4486
|
+
type: 'object',
|
4487
|
+
required: ['handle', 'result'],
|
4488
|
+
properties: {
|
4489
|
+
handle: {
|
4490
|
+
type: 'string',
|
4491
|
+
format: 'handle',
|
4492
|
+
description: 'Echo of the input handle.',
|
4493
|
+
},
|
4494
|
+
result: {
|
4495
|
+
type: 'union',
|
4496
|
+
refs: [
|
4497
|
+
'lex:com.atproto.temp.checkHandleAvailability#resultAvailable',
|
4498
|
+
'lex:com.atproto.temp.checkHandleAvailability#resultUnavailable',
|
4499
|
+
],
|
4500
|
+
},
|
4501
|
+
},
|
4502
|
+
},
|
4503
|
+
},
|
4504
|
+
errors: [
|
4505
|
+
{
|
4506
|
+
name: 'InvalidEmail',
|
4507
|
+
description: 'An invalid email was provided.',
|
4508
|
+
},
|
4509
|
+
],
|
4510
|
+
},
|
4511
|
+
resultAvailable: {
|
4512
|
+
type: 'object',
|
4513
|
+
description: 'Indicates the provided handle is available.',
|
4514
|
+
properties: {},
|
4515
|
+
},
|
4516
|
+
resultUnavailable: {
|
4517
|
+
type: 'object',
|
4518
|
+
description:
|
4519
|
+
'Indicates the provided handle is unavailable and gives suggestions of available handles.',
|
4520
|
+
required: ['suggestions'],
|
4521
|
+
properties: {
|
4522
|
+
suggestions: {
|
4523
|
+
type: 'array',
|
4524
|
+
description:
|
4525
|
+
'List of suggested handles based on the provided inputs.',
|
4526
|
+
items: {
|
4527
|
+
type: 'ref',
|
4528
|
+
ref: 'lex:com.atproto.temp.checkHandleAvailability#suggestion',
|
4529
|
+
},
|
4530
|
+
},
|
4531
|
+
},
|
4532
|
+
},
|
4533
|
+
suggestion: {
|
4534
|
+
type: 'object',
|
4535
|
+
required: ['handle', 'method'],
|
4536
|
+
properties: {
|
4537
|
+
handle: {
|
4538
|
+
type: 'string',
|
4539
|
+
format: 'handle',
|
4540
|
+
},
|
4541
|
+
method: {
|
4542
|
+
type: 'string',
|
4543
|
+
description:
|
4544
|
+
'Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics.',
|
4545
|
+
},
|
4546
|
+
},
|
4547
|
+
},
|
4548
|
+
},
|
4549
|
+
},
|
4452
4550
|
ComAtprotoTempCheckSignupQueue: {
|
4453
4551
|
lexicon: 1,
|
4454
4552
|
id: 'com.atproto.temp.checkSignupQueue',
|
@@ -7282,48 +7380,6 @@ export const schemaDict = {
|
|
7282
7380
|
},
|
7283
7381
|
},
|
7284
7382
|
},
|
7285
|
-
AppBskyFeedGetPosts: {
|
7286
|
-
lexicon: 1,
|
7287
|
-
id: 'app.bsky.feed.getPosts',
|
7288
|
-
defs: {
|
7289
|
-
main: {
|
7290
|
-
type: 'query',
|
7291
|
-
description:
|
7292
|
-
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
7293
|
-
parameters: {
|
7294
|
-
type: 'params',
|
7295
|
-
required: ['uris'],
|
7296
|
-
properties: {
|
7297
|
-
uris: {
|
7298
|
-
type: 'array',
|
7299
|
-
description: 'List of post AT-URIs to return hydrated views for.',
|
7300
|
-
items: {
|
7301
|
-
type: 'string',
|
7302
|
-
format: 'at-uri',
|
7303
|
-
},
|
7304
|
-
maxLength: 25,
|
7305
|
-
},
|
7306
|
-
},
|
7307
|
-
},
|
7308
|
-
output: {
|
7309
|
-
encoding: 'application/json',
|
7310
|
-
schema: {
|
7311
|
-
type: 'object',
|
7312
|
-
required: ['posts'],
|
7313
|
-
properties: {
|
7314
|
-
posts: {
|
7315
|
-
type: 'array',
|
7316
|
-
items: {
|
7317
|
-
type: 'ref',
|
7318
|
-
ref: 'lex:app.bsky.feed.defs#postView',
|
7319
|
-
},
|
7320
|
-
},
|
7321
|
-
},
|
7322
|
-
},
|
7323
|
-
},
|
7324
|
-
},
|
7325
|
-
},
|
7326
|
-
},
|
7327
7383
|
AppBskyFeedGetPostThread: {
|
7328
7384
|
lexicon: 1,
|
7329
7385
|
id: 'app.bsky.feed.getPostThread',
|
@@ -7388,6 +7444,48 @@ export const schemaDict = {
|
|
7388
7444
|
},
|
7389
7445
|
},
|
7390
7446
|
},
|
7447
|
+
AppBskyFeedGetPosts: {
|
7448
|
+
lexicon: 1,
|
7449
|
+
id: 'app.bsky.feed.getPosts',
|
7450
|
+
defs: {
|
7451
|
+
main: {
|
7452
|
+
type: 'query',
|
7453
|
+
description:
|
7454
|
+
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
7455
|
+
parameters: {
|
7456
|
+
type: 'params',
|
7457
|
+
required: ['uris'],
|
7458
|
+
properties: {
|
7459
|
+
uris: {
|
7460
|
+
type: 'array',
|
7461
|
+
description: 'List of post AT-URIs to return hydrated views for.',
|
7462
|
+
items: {
|
7463
|
+
type: 'string',
|
7464
|
+
format: 'at-uri',
|
7465
|
+
},
|
7466
|
+
maxLength: 25,
|
7467
|
+
},
|
7468
|
+
},
|
7469
|
+
},
|
7470
|
+
output: {
|
7471
|
+
encoding: 'application/json',
|
7472
|
+
schema: {
|
7473
|
+
type: 'object',
|
7474
|
+
required: ['posts'],
|
7475
|
+
properties: {
|
7476
|
+
posts: {
|
7477
|
+
type: 'array',
|
7478
|
+
items: {
|
7479
|
+
type: 'ref',
|
7480
|
+
ref: 'lex:app.bsky.feed.defs#postView',
|
7481
|
+
},
|
7482
|
+
},
|
7483
|
+
},
|
7484
|
+
},
|
7485
|
+
},
|
7486
|
+
},
|
7487
|
+
},
|
7488
|
+
},
|
7391
7489
|
AppBskyFeedGetQuotes: {
|
7392
7490
|
lexicon: 1,
|
7393
7491
|
id: 'app.bsky.feed.getQuotes',
|
@@ -10511,104 +10609,6 @@ export const schemaDict = {
|
|
10511
10609
|
},
|
10512
10610
|
},
|
10513
10611
|
},
|
10514
|
-
AppBskyUnspeccedCheckHandleAvailability: {
|
10515
|
-
lexicon: 1,
|
10516
|
-
id: 'app.bsky.unspecced.checkHandleAvailability',
|
10517
|
-
defs: {
|
10518
|
-
main: {
|
10519
|
-
type: 'query',
|
10520
|
-
description:
|
10521
|
-
'Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.',
|
10522
|
-
parameters: {
|
10523
|
-
type: 'params',
|
10524
|
-
required: ['handle'],
|
10525
|
-
properties: {
|
10526
|
-
handle: {
|
10527
|
-
type: 'string',
|
10528
|
-
format: 'handle',
|
10529
|
-
description:
|
10530
|
-
'Tentative handle. Will be checked for availability or used to build handle suggestions.',
|
10531
|
-
},
|
10532
|
-
email: {
|
10533
|
-
type: 'string',
|
10534
|
-
description:
|
10535
|
-
'User-provided email. Might be used to build handle suggestions.',
|
10536
|
-
},
|
10537
|
-
birthDate: {
|
10538
|
-
type: 'string',
|
10539
|
-
format: 'datetime',
|
10540
|
-
description:
|
10541
|
-
'User-provided birth date. Might be used to build handle suggestions.',
|
10542
|
-
},
|
10543
|
-
},
|
10544
|
-
},
|
10545
|
-
output: {
|
10546
|
-
encoding: 'application/json',
|
10547
|
-
schema: {
|
10548
|
-
type: 'object',
|
10549
|
-
required: ['handle', 'result'],
|
10550
|
-
properties: {
|
10551
|
-
handle: {
|
10552
|
-
type: 'string',
|
10553
|
-
format: 'handle',
|
10554
|
-
description: 'Echo of the input handle.',
|
10555
|
-
},
|
10556
|
-
result: {
|
10557
|
-
type: 'union',
|
10558
|
-
refs: [
|
10559
|
-
'lex:app.bsky.unspecced.checkHandleAvailability#resultAvailable',
|
10560
|
-
'lex:app.bsky.unspecced.checkHandleAvailability#resultUnavailable',
|
10561
|
-
],
|
10562
|
-
},
|
10563
|
-
},
|
10564
|
-
},
|
10565
|
-
},
|
10566
|
-
errors: [
|
10567
|
-
{
|
10568
|
-
name: 'InvalidEmail',
|
10569
|
-
description: 'An invalid email was provided.',
|
10570
|
-
},
|
10571
|
-
],
|
10572
|
-
},
|
10573
|
-
resultAvailable: {
|
10574
|
-
type: 'object',
|
10575
|
-
description: 'Indicates the provided handle is available.',
|
10576
|
-
properties: {},
|
10577
|
-
},
|
10578
|
-
resultUnavailable: {
|
10579
|
-
type: 'object',
|
10580
|
-
description:
|
10581
|
-
'Indicates the provided handle is unavailable and gives suggestions of available handles.',
|
10582
|
-
required: ['suggestions'],
|
10583
|
-
properties: {
|
10584
|
-
suggestions: {
|
10585
|
-
type: 'array',
|
10586
|
-
description:
|
10587
|
-
'List of suggested handles based on the provided inputs.',
|
10588
|
-
items: {
|
10589
|
-
type: 'ref',
|
10590
|
-
ref: 'lex:app.bsky.unspecced.checkHandleAvailability#suggestion',
|
10591
|
-
},
|
10592
|
-
},
|
10593
|
-
},
|
10594
|
-
},
|
10595
|
-
suggestion: {
|
10596
|
-
type: 'object',
|
10597
|
-
required: ['handle', 'method'],
|
10598
|
-
properties: {
|
10599
|
-
handle: {
|
10600
|
-
type: 'string',
|
10601
|
-
format: 'handle',
|
10602
|
-
},
|
10603
|
-
method: {
|
10604
|
-
type: 'string',
|
10605
|
-
description:
|
10606
|
-
'Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics.',
|
10607
|
-
},
|
10608
|
-
},
|
10609
|
-
},
|
10610
|
-
},
|
10611
|
-
},
|
10612
10612
|
AppBskyUnspeccedDefs: {
|
10613
10613
|
lexicon: 1,
|
10614
10614
|
id: 'app.bsky.unspecced.defs',
|
@@ -17745,6 +17745,8 @@ export const ids = {
|
|
17745
17745
|
ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
|
17746
17746
|
ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
|
17747
17747
|
ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle',
|
17748
|
+
ComAtprotoTempCheckHandleAvailability:
|
17749
|
+
'com.atproto.temp.checkHandleAvailability',
|
17748
17750
|
ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue',
|
17749
17751
|
ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels',
|
17750
17752
|
ComAtprotoTempRequestPhoneVerification:
|
@@ -17777,8 +17779,8 @@ export const ids = {
|
|
17777
17779
|
AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
|
17778
17780
|
AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
|
17779
17781
|
AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
|
17780
|
-
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
17781
17782
|
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
17783
|
+
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
17782
17784
|
AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
|
17783
17785
|
AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
|
17784
17786
|
AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
|
@@ -17839,8 +17841,6 @@ export const ids = {
|
|
17839
17841
|
AppBskyNotificationUnregisterPush: 'app.bsky.notification.unregisterPush',
|
17840
17842
|
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
|
17841
17843
|
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
|
17842
|
-
AppBskyUnspeccedCheckHandleAvailability:
|
17843
|
-
'app.bsky.unspecced.checkHandleAvailability',
|
17844
17844
|
AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
|
17845
17845
|
AppBskyUnspeccedGetAgeAssuranceState:
|
17846
17846
|
'app.bsky.unspecced.getAgeAssuranceState',
|
package/src/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.ts
RENAMED
@@ -12,7 +12,7 @@ import {
|
|
12
12
|
|
13
13
|
const is$typed = _is$typed,
|
14
14
|
validate = _validate
|
15
|
-
const id = '
|
15
|
+
const id = 'com.atproto.temp.checkHandleAvailability'
|
16
16
|
|
17
17
|
export type QueryParams = {
|
18
18
|
/** Tentative handle. Will be checked for availability or used to build handle suggestions. */
|
@@ -51,7 +51,7 @@ export type HandlerOutput = HandlerError | HandlerSuccess
|
|
51
51
|
|
52
52
|
/** Indicates the provided handle is available. */
|
53
53
|
export interface ResultAvailable {
|
54
|
-
$type?: '
|
54
|
+
$type?: 'com.atproto.temp.checkHandleAvailability#resultAvailable'
|
55
55
|
}
|
56
56
|
|
57
57
|
const hashResultAvailable = 'resultAvailable'
|
@@ -66,7 +66,7 @@ export function validateResultAvailable<V>(v: V) {
|
|
66
66
|
|
67
67
|
/** Indicates the provided handle is unavailable and gives suggestions of available handles. */
|
68
68
|
export interface ResultUnavailable {
|
69
|
-
$type?: '
|
69
|
+
$type?: 'com.atproto.temp.checkHandleAvailability#resultUnavailable'
|
70
70
|
/** List of suggested handles based on the provided inputs. */
|
71
71
|
suggestions: Suggestion[]
|
72
72
|
}
|
@@ -82,7 +82,7 @@ export function validateResultUnavailable<V>(v: V) {
|
|
82
82
|
}
|
83
83
|
|
84
84
|
export interface Suggestion {
|
85
|
-
$type?: '
|
85
|
+
$type?: 'com.atproto.temp.checkHandleAvailability#suggestion'
|
86
86
|
handle: string
|
87
87
|
/** Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics. */
|
88
88
|
method: string
|
package/tests/crud.test.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import assert from 'node:assert'
|
2
2
|
import fs from 'node:fs/promises'
|
3
|
-
import { AtpAgent } from '@atproto/api'
|
3
|
+
import { AppBskyFeedPostRecord, AtpAgent } from '@atproto/api'
|
4
4
|
import { TID, cidForCbor, ui8ToArrayBuffer } from '@atproto/common'
|
5
5
|
import { TestNetworkNoAppView } from '@atproto/dev-env'
|
6
6
|
import { BlobRef } from '@atproto/lexicon'
|
@@ -247,7 +247,9 @@ describe('crud operations', () => {
|
|
247
247
|
})
|
248
248
|
|
249
249
|
it('in forwards order', async () => {
|
250
|
-
const results = (
|
250
|
+
const results = (
|
251
|
+
results: Awaited<ReturnType<AppBskyFeedPostRecord['list']>>[],
|
252
|
+
) => results.flatMap((res) => res.records)
|
251
253
|
const paginator = async (cursor?: string) => {
|
252
254
|
const res = await agent.app.bsky.feed.post.list({
|
253
255
|
repo: aliceAgent.accountDid,
|
@@ -271,7 +273,9 @@ describe('crud operations', () => {
|
|
271
273
|
})
|
272
274
|
|
273
275
|
it('in reverse order', async () => {
|
274
|
-
const results = (
|
276
|
+
const results = (
|
277
|
+
results: Awaited<ReturnType<AppBskyFeedPostRecord['list']>>[],
|
278
|
+
) => results.flatMap((res) => res.records)
|
275
279
|
const paginator = async (cursor?: string) => {
|
276
280
|
const res = await agent.app.bsky.feed.post.list({
|
277
281
|
repo: aliceAgent.accountDid,
|