@atproto/bsky 0.0.32 → 0.0.33
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/index.js +315 -242
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/lexicons.d.ts +27 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/admin/updateAccountPassword.d.ts +26 -0
- package/package.json +5 -5
- package/src/lexicon/index.ts +12 -0
- package/src/lexicon/lexicons.ts +31 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +2 -0
- package/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts +39 -0
package/dist/lexicon/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRep
|
|
|
20
20
|
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail';
|
|
21
21
|
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail';
|
|
22
22
|
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle';
|
|
23
|
+
import * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword';
|
|
23
24
|
import * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate';
|
|
24
25
|
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus';
|
|
25
26
|
import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials';
|
|
@@ -192,6 +193,7 @@ export declare class ComAtprotoAdminNS {
|
|
|
192
193
|
sendEmail<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminSendEmail.Handler<ExtractAuth<AV>>, ComAtprotoAdminSendEmail.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
193
194
|
updateAccountEmail<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateAccountEmail.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateAccountEmail.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
194
195
|
updateAccountHandle<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateAccountHandle.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateAccountHandle.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
196
|
+
updateAccountPassword<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateAccountPassword.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateAccountPassword.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
195
197
|
updateCommunicationTemplate<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateCommunicationTemplate.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateCommunicationTemplate.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
196
198
|
updateSubjectStatus<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateSubjectStatus.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateSubjectStatus.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
197
199
|
}
|
|
@@ -1695,6 +1695,32 @@ export declare const schemaDict: {
|
|
|
1695
1695
|
};
|
|
1696
1696
|
};
|
|
1697
1697
|
};
|
|
1698
|
+
ComAtprotoAdminUpdateAccountPassword: {
|
|
1699
|
+
lexicon: number;
|
|
1700
|
+
id: string;
|
|
1701
|
+
defs: {
|
|
1702
|
+
main: {
|
|
1703
|
+
type: string;
|
|
1704
|
+
description: string;
|
|
1705
|
+
input: {
|
|
1706
|
+
encoding: string;
|
|
1707
|
+
schema: {
|
|
1708
|
+
type: string;
|
|
1709
|
+
required: string[];
|
|
1710
|
+
properties: {
|
|
1711
|
+
did: {
|
|
1712
|
+
type: string;
|
|
1713
|
+
format: string;
|
|
1714
|
+
};
|
|
1715
|
+
password: {
|
|
1716
|
+
type: string;
|
|
1717
|
+
};
|
|
1718
|
+
};
|
|
1719
|
+
};
|
|
1720
|
+
};
|
|
1721
|
+
};
|
|
1722
|
+
};
|
|
1723
|
+
};
|
|
1698
1724
|
ComAtprotoAdminUpdateCommunicationTemplate: {
|
|
1699
1725
|
lexicon: number;
|
|
1700
1726
|
id: string;
|
|
@@ -8205,6 +8231,7 @@ export declare const ids: {
|
|
|
8205
8231
|
ComAtprotoAdminSendEmail: string;
|
|
8206
8232
|
ComAtprotoAdminUpdateAccountEmail: string;
|
|
8207
8233
|
ComAtprotoAdminUpdateAccountHandle: string;
|
|
8234
|
+
ComAtprotoAdminUpdateAccountPassword: string;
|
|
8208
8235
|
ComAtprotoAdminUpdateCommunicationTemplate: string;
|
|
8209
8236
|
ComAtprotoAdminUpdateSubjectStatus: string;
|
|
8210
8237
|
ComAtprotoIdentityGetRecommendedDidCredentials: string;
|
|
@@ -54,7 +54,7 @@ export interface ViewerState {
|
|
|
54
54
|
}
|
|
55
55
|
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
56
56
|
export declare function validateViewerState(v: unknown): ValidationResult;
|
|
57
|
-
export type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | PersonalDetailsPref | FeedViewPref | ThreadViewPref | InterestsPref | {
|
|
57
|
+
export type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | PersonalDetailsPref | FeedViewPref | ThreadViewPref | InterestsPref | MutedWordsPref | HiddenPostsPref | {
|
|
58
58
|
$type: string;
|
|
59
59
|
[k: string]: unknown;
|
|
60
60
|
})[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
did: string;
|
|
7
|
+
password: string;
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface HandlerInput {
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
body: InputSchema;
|
|
13
|
+
}
|
|
14
|
+
export interface HandlerError {
|
|
15
|
+
status: number;
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
export type HandlerOutput = HandlerError | void;
|
|
19
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
20
|
+
auth: HA;
|
|
21
|
+
params: QueryParams;
|
|
22
|
+
input: HandlerInput;
|
|
23
|
+
req: express.Request;
|
|
24
|
+
res: express.Response;
|
|
25
|
+
};
|
|
26
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/bsky",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of app.bsky App View (Bluesky API)",
|
|
6
6
|
"keywords": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"sharp": "^0.32.6",
|
|
41
41
|
"typed-emitter": "^2.1.0",
|
|
42
42
|
"uint8arrays": "3.0.0",
|
|
43
|
-
"@atproto/api": "^0.10.
|
|
43
|
+
"@atproto/api": "^0.10.1",
|
|
44
44
|
"@atproto/common": "^0.3.3",
|
|
45
45
|
"@atproto/crypto": "^0.3.0",
|
|
46
46
|
"@atproto/identity": "^0.3.2",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"@types/pg": "^8.6.6",
|
|
61
61
|
"@types/qs": "^6.9.7",
|
|
62
62
|
"axios": "^0.27.2",
|
|
63
|
-
"@atproto/api": "^0.10.
|
|
64
|
-
"@atproto/dev-env": "^0.2.
|
|
63
|
+
"@atproto/api": "^0.10.1",
|
|
64
|
+
"@atproto/dev-env": "^0.2.33",
|
|
65
65
|
"@atproto/lex-cli": "^0.3.0",
|
|
66
|
-
"@atproto/pds": "^0.4.
|
|
66
|
+
"@atproto/pds": "^0.4.1",
|
|
67
67
|
"@atproto/xrpc": "^0.4.1"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
package/src/lexicon/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRep
|
|
|
30
30
|
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
|
|
31
31
|
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
|
|
32
32
|
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
33
|
+
import * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword'
|
|
33
34
|
import * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate'
|
|
34
35
|
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
|
|
35
36
|
import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials'
|
|
@@ -444,6 +445,17 @@ export class ComAtprotoAdminNS {
|
|
|
444
445
|
return this._server.xrpc.method(nsid, cfg)
|
|
445
446
|
}
|
|
446
447
|
|
|
448
|
+
updateAccountPassword<AV extends AuthVerifier>(
|
|
449
|
+
cfg: ConfigOf<
|
|
450
|
+
AV,
|
|
451
|
+
ComAtprotoAdminUpdateAccountPassword.Handler<ExtractAuth<AV>>,
|
|
452
|
+
ComAtprotoAdminUpdateAccountPassword.HandlerReqCtx<ExtractAuth<AV>>
|
|
453
|
+
>,
|
|
454
|
+
) {
|
|
455
|
+
const nsid = 'com.atproto.admin.updateAccountPassword' // @ts-ignore
|
|
456
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
457
|
+
}
|
|
458
|
+
|
|
447
459
|
updateCommunicationTemplate<AV extends AuthVerifier>(
|
|
448
460
|
cfg: ConfigOf<
|
|
449
461
|
AV,
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -1863,6 +1863,33 @@ export const schemaDict = {
|
|
|
1863
1863
|
},
|
|
1864
1864
|
},
|
|
1865
1865
|
},
|
|
1866
|
+
ComAtprotoAdminUpdateAccountPassword: {
|
|
1867
|
+
lexicon: 1,
|
|
1868
|
+
id: 'com.atproto.admin.updateAccountPassword',
|
|
1869
|
+
defs: {
|
|
1870
|
+
main: {
|
|
1871
|
+
type: 'procedure',
|
|
1872
|
+
description:
|
|
1873
|
+
'Update the password for a user account as an administrator.',
|
|
1874
|
+
input: {
|
|
1875
|
+
encoding: 'application/json',
|
|
1876
|
+
schema: {
|
|
1877
|
+
type: 'object',
|
|
1878
|
+
required: ['did', 'password'],
|
|
1879
|
+
properties: {
|
|
1880
|
+
did: {
|
|
1881
|
+
type: 'string',
|
|
1882
|
+
format: 'did',
|
|
1883
|
+
},
|
|
1884
|
+
password: {
|
|
1885
|
+
type: 'string',
|
|
1886
|
+
},
|
|
1887
|
+
},
|
|
1888
|
+
},
|
|
1889
|
+
},
|
|
1890
|
+
},
|
|
1891
|
+
},
|
|
1892
|
+
},
|
|
1866
1893
|
ComAtprotoAdminUpdateCommunicationTemplate: {
|
|
1867
1894
|
lexicon: 1,
|
|
1868
1895
|
id: 'com.atproto.admin.updateCommunicationTemplate',
|
|
@@ -5075,6 +5102,8 @@ export const schemaDict = {
|
|
|
5075
5102
|
'lex:app.bsky.actor.defs#feedViewPref',
|
|
5076
5103
|
'lex:app.bsky.actor.defs#threadViewPref',
|
|
5077
5104
|
'lex:app.bsky.actor.defs#interestsPref',
|
|
5105
|
+
'lex:app.bsky.actor.defs#mutedWordsPref',
|
|
5106
|
+
'lex:app.bsky.actor.defs#hiddenPostsPref',
|
|
5078
5107
|
],
|
|
5079
5108
|
},
|
|
5080
5109
|
},
|
|
@@ -8860,6 +8889,8 @@ export const ids = {
|
|
|
8860
8889
|
ComAtprotoAdminSendEmail: 'com.atproto.admin.sendEmail',
|
|
8861
8890
|
ComAtprotoAdminUpdateAccountEmail: 'com.atproto.admin.updateAccountEmail',
|
|
8862
8891
|
ComAtprotoAdminUpdateAccountHandle: 'com.atproto.admin.updateAccountHandle',
|
|
8892
|
+
ComAtprotoAdminUpdateAccountPassword:
|
|
8893
|
+
'com.atproto.admin.updateAccountPassword',
|
|
8863
8894
|
ComAtprotoAdminUpdateCommunicationTemplate:
|
|
8864
8895
|
'com.atproto.admin.updateCommunicationTemplate',
|
|
8865
8896
|
ComAtprotoAdminUpdateSubjectStatus: 'com.atproto.admin.updateSubjectStatus',
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
did: string
|
|
15
|
+
password: string
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface HandlerInput {
|
|
20
|
+
encoding: 'application/json'
|
|
21
|
+
body: InputSchema
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface HandlerError {
|
|
25
|
+
status: number
|
|
26
|
+
message?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type HandlerOutput = HandlerError | void
|
|
30
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
31
|
+
auth: HA
|
|
32
|
+
params: QueryParams
|
|
33
|
+
input: HandlerInput
|
|
34
|
+
req: express.Request
|
|
35
|
+
res: express.Response
|
|
36
|
+
}
|
|
37
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
38
|
+
ctx: HandlerReqCtx<HA>,
|
|
39
|
+
) => Promise<HandlerOutput> | HandlerOutput
|