@atproto/dev-env 0.5.4 → 0.5.5
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 +14 -0
- package/dist/moderator-client.d.ts +7 -3
- package/dist/moderator-client.d.ts.map +1 -1
- package/dist/moderator-client.js.map +1 -1
- package/dist/seed/client.d.ts +9 -3
- package/dist/seed/client.d.ts.map +1 -1
- package/dist/seed/client.js +1 -0
- package/dist/seed/client.js.map +1 -1
- package/package.json +4 -4
- package/src/moderator-client.ts +16 -2
- package/src/seed/client.ts +21 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atproto/dev-env
|
|
2
2
|
|
|
3
|
+
## 0.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4941](https://github.com/bluesky-social/atproto/pull/4941) [`682e325`](https://github.com/bluesky-social/atproto/commit/682e325b2bce62216d034a8f5b9429f485b9360d) Thanks [@gcwill70](https://github.com/gcwill70)! - Allow conversations to be reported in ozone
|
|
8
|
+
|
|
9
|
+
This change extends ozone's moderation system to handle conversation reporting alongside existing reporting subject types.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`8a9e757`](https://github.com/bluesky-social/atproto/commit/8a9e7578eb0f6afcb460061550e435ea9ed125ff), [`682e325`](https://github.com/bluesky-social/atproto/commit/682e325b2bce62216d034a8f5b9429f485b9360d), [`cf6a8a5`](https://github.com/bluesky-social/atproto/commit/cf6a8a50a990d8759d076778f0f90800005b48c0), [`0ac21bb`](https://github.com/bluesky-social/atproto/commit/0ac21bbf6db0bcb745adecf064eded1452be02de), [`47c71fc`](https://github.com/bluesky-social/atproto/commit/47c71fcc157258c2f5dbe43ba2b27a5af7856341), [`3cb2a41`](https://github.com/bluesky-social/atproto/commit/3cb2a41157a2bd7783f3fc1a06c4c811d9c541e6), [`3affdd5`](https://github.com/bluesky-social/atproto/commit/3affdd5eeee30b09cbb7a92e8296a6cda55022a3)]:
|
|
12
|
+
- @atproto/api@0.20.7
|
|
13
|
+
- @atproto/ozone@0.2.0
|
|
14
|
+
- @atproto/bsky@0.0.236
|
|
15
|
+
- @atproto/pds@0.5.1
|
|
16
|
+
|
|
3
17
|
## 0.5.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AtpAgent, ToolsOzoneModerationDefs, ToolsOzoneModerationEmitEvent as EmitModerationEvent, ToolsOzoneModerationGetReporterStats as _GetReporterStats, // includes types for getReporterStats()
|
|
1
|
+
import { $Typed, AtpAgent, ChatBskyConvoDefs, ComAtprotoAdminDefs, ComAtprotoRepoStrongRef, ToolsOzoneModerationDefs, ToolsOzoneModerationEmitEvent as EmitModerationEvent, ToolsOzoneModerationGetReporterStats as _GetReporterStats, // includes types for getReporterStats()
|
|
2
2
|
ToolsOzoneModerationQueryEvents as QueryModerationEvents, ToolsOzoneModerationQueryStatuses as QueryModerationStatuses, ToolsOzoneReportQueryReports as QueryModerationReports, ToolsOzoneSettingRemoveOptions, ToolsOzoneSettingUpsertOption } from '@atproto/api';
|
|
3
3
|
import { TestOzone } from './ozone.js';
|
|
4
4
|
type TakeActionInput = EmitModerationEvent.InputSchema;
|
|
@@ -17,7 +17,9 @@ export declare class ModeratorClient {
|
|
|
17
17
|
queryReports(input: QueryReportsParams, role?: ModLevel): Promise<QueryModerationReports.OutputSchema>;
|
|
18
18
|
emitEvent(opts: {
|
|
19
19
|
event: TakeActionInput['event'];
|
|
20
|
-
subject:
|
|
20
|
+
subject: $Typed<ComAtprotoAdminDefs.RepoRef> | $Typed<ComAtprotoRepoStrongRef.Main> | $Typed<ChatBskyConvoDefs.MessageRef> | $Typed<ChatBskyConvoDefs.ConvoRef> | {
|
|
21
|
+
$type: string;
|
|
22
|
+
};
|
|
21
23
|
subjectBlobCids?: TakeActionInput['subjectBlobCids'];
|
|
22
24
|
reason?: string;
|
|
23
25
|
createdBy?: string;
|
|
@@ -34,7 +36,9 @@ export declare class ModeratorClient {
|
|
|
34
36
|
modTool?: ToolsOzoneModerationDefs.ModTool;
|
|
35
37
|
}, role?: ModLevel): Promise<ToolsOzoneModerationDefs.ModEventView>;
|
|
36
38
|
performTakedown(opts: {
|
|
37
|
-
subject:
|
|
39
|
+
subject: $Typed<ComAtprotoAdminDefs.RepoRef> | $Typed<ComAtprotoRepoStrongRef.Main> | $Typed<ChatBskyConvoDefs.MessageRef> | $Typed<ChatBskyConvoDefs.ConvoRef> | {
|
|
40
|
+
$type: string;
|
|
41
|
+
};
|
|
38
42
|
subjectBlobCids?: TakeActionInput['subjectBlobCids'];
|
|
39
43
|
durationInHours?: number;
|
|
40
44
|
acknowledgeAccountSubjects?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderator-client.d.ts","sourceRoot":"","sources":["../src/moderator-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,wBAAwB,EACxB,6BAA6B,IAAI,mBAAmB,EACpD,oCAAoC,IAAI,iBAAiB,EAAE,wCAAwC;AACnG,+BAA+B,IAAI,qBAAqB,EACxD,iCAAiC,IAAI,uBAAuB,EAC5D,4BAA4B,IAAI,sBAAsB,EACtD,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtC,KAAK,eAAe,GAAG,mBAAmB,CAAC,WAAW,CAAA;AACtD,KAAK,mBAAmB,GAAG,uBAAuB,CAAC,WAAW,CAAA;AAC9D,KAAK,iBAAiB,GAAG,qBAAqB,CAAC,WAAW,CAAA;AAC1D,KAAK,kBAAkB,GAAG,sBAAsB,CAAC,WAAW,CAAA;AAC5D,KAAK,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAA;AAEhD,qBAAa,eAAe;IAEP,KAAK,EAAE,SAAS;IADnC,KAAK,EAAE,QAAQ,CAA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C,aAAa,CACjE,MAAM,EACN;YACE,QAAQ,EAAE,kBAAkB;YAC5B,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAClC,mCAAmC,EACnC,UAAU,CACX;SACF,CACF,CAAA;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAA;QAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAA;QAC1D,MAAM,YAAY,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACpD,CAAC;CACF","sourcesContent":["import {\n AtpAgent,\n ToolsOzoneModerationDefs,\n ToolsOzoneModerationEmitEvent as EmitModerationEvent,\n ToolsOzoneModerationGetReporterStats as _GetReporterStats, // includes types for getReporterStats()\n ToolsOzoneModerationQueryEvents as QueryModerationEvents,\n ToolsOzoneModerationQueryStatuses as QueryModerationStatuses,\n ToolsOzoneReportQueryReports as QueryModerationReports,\n ToolsOzoneSettingRemoveOptions,\n ToolsOzoneSettingUpsertOption,\n} from '@atproto/api'\nimport { TestOzone } from './ozone.js'\n\ntype TakeActionInput = EmitModerationEvent.InputSchema\ntype QueryStatusesParams = QueryModerationStatuses.QueryParams\ntype QueryEventsParams = QueryModerationEvents.QueryParams\ntype QueryReportsParams = QueryModerationReports.QueryParams\ntype ModLevel = 'admin' | 'moderator' | 'triage'\n\nexport class ModeratorClient {\n agent: AtpAgent\n constructor(public ozone: TestOzone) {\n this.agent = ozone.getAgent()\n }\n\n async getEvent(id: number, role?: ModLevel) {\n const result = await this.agent.tools.ozone.moderation.getEvent(\n { id },\n {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.getEvent',\n role,\n ),\n },\n )\n return result.data\n }\n\n async queryStatuses(input: QueryStatusesParams, role?: ModLevel) {\n const result = await this.agent.tools.ozone.moderation.queryStatuses(\n input,\n {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.queryStatuses',\n role,\n ),\n },\n )\n return result.data\n }\n\n async getReporterStats(dids: string[]) {\n const result = await this.agent.tools.ozone.moderation.getReporterStats(\n { dids },\n {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.getReporterStats',\n 'admin',\n ),\n },\n )\n return result.data\n }\n\n async queryEvents(input: QueryEventsParams, role?: ModLevel) {\n const result = await this.agent.tools.ozone.moderation.queryEvents(input, {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.queryEvents',\n role,\n ),\n })\n return result.data\n }\n\n async queryReports(input: QueryReportsParams, role?: ModLevel) {\n const result = await this.agent.tools.ozone.report.queryReports(input, {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.report.queryReports',\n role,\n ),\n })\n return result.data\n }\n\n async emitEvent(\n opts: {\n event: TakeActionInput['event']\n subject: TakeActionInput['subject']\n subjectBlobCids?: TakeActionInput['subjectBlobCids']\n reason?: string\n createdBy?: string\n meta?: unknown\n modTool?: ToolsOzoneModerationDefs.ModTool\n externalId?: string\n reportAction?: TakeActionInput['reportAction']\n },\n role?: ModLevel,\n ) {\n const {\n event,\n subject,\n subjectBlobCids,\n createdBy = 'did:example:admin',\n modTool,\n externalId,\n reportAction,\n } = opts\n const result = await this.agent.tools.ozone.moderation.emitEvent(\n {\n event,\n subject,\n subjectBlobCids,\n createdBy,\n modTool,\n externalId,\n reportAction,\n },\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.emitEvent',\n role,\n ),\n },\n )\n return result.data\n }\n\n async reverseAction(\n opts: {\n id: number\n subject: TakeActionInput['subject']\n reason?: string\n createdBy?: string\n modTool?: ToolsOzoneModerationDefs.ModTool\n },\n role?: ModLevel,\n ) {\n const {\n subject,\n reason = 'X',\n createdBy = 'did:example:admin',\n modTool,\n } = opts\n const result = await this.agent.tools.ozone.moderation.emitEvent(\n {\n subject,\n event: {\n $type: 'tools.ozone.moderation.defs#modEventReverseTakedown',\n comment: reason,\n },\n createdBy,\n modTool,\n },\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.emitEvent',\n role,\n ),\n },\n )\n return result.data\n }\n\n async performTakedown(\n opts: {\n subject: TakeActionInput['subject']\n subjectBlobCids?: TakeActionInput['subjectBlobCids']\n durationInHours?: number\n acknowledgeAccountSubjects?: boolean\n reason?: string\n policies?: string[]\n },\n role?: ModLevel,\n ) {\n const { durationInHours, acknowledgeAccountSubjects, policies, ...rest } =\n opts\n return this.emitEvent(\n {\n event: {\n $type: 'tools.ozone.moderation.defs#modEventTakedown',\n acknowledgeAccountSubjects,\n durationInHours,\n policies,\n },\n ...rest,\n },\n role,\n )\n }\n\n async performReverseTakedown(\n opts: {\n subject: TakeActionInput['subject']\n subjectBlobCids?: TakeActionInput['subjectBlobCids']\n reason?: string\n },\n role?: ModLevel,\n ) {\n return this.emitEvent(\n {\n event: {\n $type: 'tools.ozone.moderation.defs#modEventReverseTakedown',\n },\n ...opts,\n },\n role,\n )\n }\n\n async upsertSettingOption(\n setting: ToolsOzoneSettingUpsertOption.InputSchema,\n callerRole: 'admin' | 'moderator' | 'triage' = 'admin',\n ) {\n const { data } = await this.agent.tools.ozone.setting.upsertOption(\n setting,\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.setting.upsertOption',\n callerRole,\n ),\n },\n )\n\n return data\n }\n\n async removeSettingOptions(\n params: ToolsOzoneSettingRemoveOptions.InputSchema,\n callerRole: 'admin' | 'moderator' | 'triage' = 'admin',\n ) {\n const { data } = await this.agent.tools.ozone.setting.removeOptions(\n params,\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.setting.removeOptions',\n callerRole,\n ),\n },\n )\n\n return data\n }\n\n async computeStats() {\n const db = this.ozone.ctx.db\n const statsService = this.ozone.ctx.reportStatsService(db)\n await statsService.materializeAll({ force: true })\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"moderator-client.js","sourceRoot":"","sources":["../src/moderator-client.ts"],"names":[],"mappings":"AAuBA,MAAM,OAAO,eAAe;IAE1B,YAAmB,KAAgB;QAAhB,UAAK,GAAL,KAAK,CAAW;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU,EAAE,IAAe;QACxC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAC7D,EAAE,EAAE,EAAE,EACN;YACE,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAClC,iCAAiC,EACjC,IAAI,CACL;SACF,CACF,CAAA;QACD,OAAO,MAAM,CAAC,IAAI,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAA0B,EAAE,IAAe;QAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAClE,KAAK,EACL;YACE,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAClC,sCAAsC,EACtC,IAAI,CACL;SACF,CACF,CAAA;QACD,OAAO,MAAM,CAAC,IAAI,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,IAAc;QACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CACrE,EAAE,IAAI,EAAE,EACR;YACE,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAClC,yCAAyC,EACzC,OAAO,CACR;SACF,CACF,CAAA;QACD,OAAO,MAAM,CAAC,IAAI,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,K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kCAAkC,EAClC,UAAU,CACX;SACF,CACF,CAAA;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,MAAkD,EAClD,aAA+C,OAAO;QAEtD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CACjE,MAAM,EACN;YACE,QAAQ,EAAE,kBAAkB;YAC5B,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAClC,mCAAmC,EACnC,UAAU,CACX;SACF,CACF,CAAA;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAA;QAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAA;QAC1D,MAAM,YAAY,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACpD,CAAC;CACF","sourcesContent":["import {\n $Typed,\n AtpAgent,\n ChatBskyConvoDefs,\n ComAtprotoAdminDefs,\n ComAtprotoRepoStrongRef,\n ToolsOzoneModerationDefs,\n ToolsOzoneModerationEmitEvent as EmitModerationEvent,\n ToolsOzoneModerationGetReporterStats as _GetReporterStats, // includes types for getReporterStats()\n ToolsOzoneModerationQueryEvents as QueryModerationEvents,\n ToolsOzoneModerationQueryStatuses as QueryModerationStatuses,\n ToolsOzoneReportQueryReports as QueryModerationReports,\n ToolsOzoneSettingRemoveOptions,\n ToolsOzoneSettingUpsertOption,\n} from '@atproto/api'\nimport { TestOzone } from './ozone.js'\n\ntype TakeActionInput = EmitModerationEvent.InputSchema\ntype QueryStatusesParams = QueryModerationStatuses.QueryParams\ntype QueryEventsParams = QueryModerationEvents.QueryParams\ntype QueryReportsParams = QueryModerationReports.QueryParams\ntype ModLevel = 'admin' | 'moderator' | 'triage'\n\nexport class ModeratorClient {\n agent: AtpAgent\n constructor(public ozone: TestOzone) {\n this.agent = ozone.getAgent()\n }\n\n async getEvent(id: number, role?: ModLevel) {\n const result = await this.agent.tools.ozone.moderation.getEvent(\n { id },\n {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.getEvent',\n role,\n ),\n },\n )\n return result.data\n }\n\n async queryStatuses(input: QueryStatusesParams, role?: ModLevel) {\n const result = await this.agent.tools.ozone.moderation.queryStatuses(\n input,\n {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.queryStatuses',\n role,\n ),\n },\n )\n return result.data\n }\n\n async getReporterStats(dids: string[]) {\n const result = await this.agent.tools.ozone.moderation.getReporterStats(\n { dids },\n {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.getReporterStats',\n 'admin',\n ),\n },\n )\n return result.data\n }\n\n async queryEvents(input: QueryEventsParams, role?: ModLevel) {\n const result = await this.agent.tools.ozone.moderation.queryEvents(input, {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.queryEvents',\n role,\n ),\n })\n return result.data\n }\n\n async queryReports(input: QueryReportsParams, role?: ModLevel) {\n const result = await this.agent.tools.ozone.report.queryReports(input, {\n headers: await this.ozone.modHeaders(\n 'tools.ozone.report.queryReports',\n role,\n ),\n })\n return result.data\n }\n\n async emitEvent(\n opts: {\n event: TakeActionInput['event']\n subject:\n | $Typed<ComAtprotoAdminDefs.RepoRef>\n | $Typed<ComAtprotoRepoStrongRef.Main>\n | $Typed<ChatBskyConvoDefs.MessageRef>\n | $Typed<ChatBskyConvoDefs.ConvoRef>\n | { $type: string }\n subjectBlobCids?: TakeActionInput['subjectBlobCids']\n reason?: string\n createdBy?: string\n meta?: unknown\n modTool?: ToolsOzoneModerationDefs.ModTool\n externalId?: string\n reportAction?: TakeActionInput['reportAction']\n },\n role?: ModLevel,\n ) {\n const {\n event,\n subject,\n subjectBlobCids,\n createdBy = 'did:example:admin',\n modTool,\n externalId,\n reportAction,\n } = opts\n const result = await this.agent.tools.ozone.moderation.emitEvent(\n {\n event,\n subject,\n subjectBlobCids,\n createdBy,\n modTool,\n externalId,\n reportAction,\n },\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.emitEvent',\n role,\n ),\n },\n )\n return result.data\n }\n\n async reverseAction(\n opts: {\n id: number\n subject: TakeActionInput['subject']\n reason?: string\n createdBy?: string\n modTool?: ToolsOzoneModerationDefs.ModTool\n },\n role?: ModLevel,\n ) {\n const {\n subject,\n reason = 'X',\n createdBy = 'did:example:admin',\n modTool,\n } = opts\n const result = await this.agent.tools.ozone.moderation.emitEvent(\n {\n subject,\n event: {\n $type: 'tools.ozone.moderation.defs#modEventReverseTakedown',\n comment: reason,\n },\n createdBy,\n modTool,\n },\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.moderation.emitEvent',\n role,\n ),\n },\n )\n return result.data\n }\n\n async performTakedown(\n opts: {\n subject:\n | $Typed<ComAtprotoAdminDefs.RepoRef>\n | $Typed<ComAtprotoRepoStrongRef.Main>\n | $Typed<ChatBskyConvoDefs.MessageRef>\n | $Typed<ChatBskyConvoDefs.ConvoRef>\n | { $type: string }\n subjectBlobCids?: TakeActionInput['subjectBlobCids']\n durationInHours?: number\n acknowledgeAccountSubjects?: boolean\n reason?: string\n policies?: string[]\n },\n role?: ModLevel,\n ) {\n const { durationInHours, acknowledgeAccountSubjects, policies, ...rest } =\n opts\n return this.emitEvent(\n {\n event: {\n $type: 'tools.ozone.moderation.defs#modEventTakedown',\n acknowledgeAccountSubjects,\n durationInHours,\n policies,\n },\n ...rest,\n },\n role,\n )\n }\n\n async performReverseTakedown(\n opts: {\n subject: TakeActionInput['subject']\n subjectBlobCids?: TakeActionInput['subjectBlobCids']\n reason?: string\n },\n role?: ModLevel,\n ) {\n return this.emitEvent(\n {\n event: {\n $type: 'tools.ozone.moderation.defs#modEventReverseTakedown',\n },\n ...opts,\n },\n role,\n )\n }\n\n async upsertSettingOption(\n setting: ToolsOzoneSettingUpsertOption.InputSchema,\n callerRole: 'admin' | 'moderator' | 'triage' = 'admin',\n ) {\n const { data } = await this.agent.tools.ozone.setting.upsertOption(\n setting,\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.setting.upsertOption',\n callerRole,\n ),\n },\n )\n\n return data\n }\n\n async removeSettingOptions(\n params: ToolsOzoneSettingRemoveOptions.InputSchema,\n callerRole: 'admin' | 'moderator' | 'triage' = 'admin',\n ) {\n const { data } = await this.agent.tools.ozone.setting.removeOptions(\n params,\n {\n encoding: 'application/json',\n headers: await this.ozone.modHeaders(\n 'tools.ozone.setting.removeOptions',\n callerRole,\n ),\n },\n )\n\n return data\n }\n\n async computeStats() {\n const db = this.ozone.ctx.db\n const statsService = this.ozone.ctx.reportStatsService(db)\n await statsService.materializeAll({ force: true })\n }\n}\n"]}
|
package/dist/seed/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CID } from 'multiformats/cid';
|
|
2
|
-
import { AppBskyActorProfile, AppBskyFeedLike, AppBskyFeedPost, AppBskyFeedRepost, AppBskyGraphBlock, AppBskyGraphFollow, AppBskyGraphList, AppBskyGraphVerification, AppBskyRichtextFacet, AtpAgent, ComAtprotoModerationCreateReport } from '@atproto/api';
|
|
2
|
+
import { $Typed, AppBskyActorProfile, AppBskyFeedLike, AppBskyFeedPost, AppBskyFeedRepost, AppBskyGraphBlock, AppBskyGraphFollow, AppBskyGraphList, AppBskyGraphVerification, AppBskyRichtextFacet, AtpAgent, ChatBskyConvoDefs, ComAtprotoAdminDefs, ComAtprotoModerationCreateReport, ComAtprotoRepoStrongRef } from '@atproto/api';
|
|
3
3
|
import { CidString, Client } from '@atproto/lex';
|
|
4
4
|
import { BlobRef } from '@atproto/lexicon';
|
|
5
5
|
import { AtUri, AtUriString, DidString } from '@atproto/syntax';
|
|
@@ -135,10 +135,16 @@ export declare class SeedClient<Network extends TestNetworkNoAppView = TestNetwo
|
|
|
135
135
|
rmFromList(by: string, subject: string, list: RecordRef): Promise<void>;
|
|
136
136
|
createReport(opts: {
|
|
137
137
|
reasonType: ComAtprotoModerationCreateReport.InputSchema['reasonType'];
|
|
138
|
-
subject:
|
|
138
|
+
subject: $Typed<ComAtprotoAdminDefs.RepoRef> | $Typed<ComAtprotoRepoStrongRef.Main> | $Typed<ChatBskyConvoDefs.MessageRef> | $Typed<ChatBskyConvoDefs.ConvoRef> | {
|
|
139
|
+
$type: string;
|
|
140
|
+
};
|
|
139
141
|
reason?: string;
|
|
140
142
|
reportedBy: string;
|
|
141
|
-
}): Promise<ComAtprotoModerationCreateReport.OutputSchema
|
|
143
|
+
}): Promise<ComAtprotoModerationCreateReport.OutputSchema & {
|
|
144
|
+
subject: $Typed<ComAtprotoAdminDefs.RepoRef> | $Typed<ComAtprotoRepoStrongRef.Main> | $Typed<ChatBskyConvoDefs.MessageRef> | $Typed<ChatBskyConvoDefs.ConvoRef> | {
|
|
145
|
+
$type: string;
|
|
146
|
+
};
|
|
147
|
+
}>;
|
|
142
148
|
verify(by: string, subject: string, handle: string, displayName: string, overrides?: Partial<AppBskyGraphVerification.Record>): Promise<AtUri>;
|
|
143
149
|
unverify(by: string, subject: string): Promise<void>;
|
|
144
150
|
getHeaders(did: string): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/seed/client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,QAAQ,EACR,gCAAgC,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/seed/client.ts"],"names":[],"mappings":"AAGA,O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CAAC,YAAY,CAAC,CAAA;QACtE,OAAO,EACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,GACnC,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,GACpC,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,GACpC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAClC;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;QACrB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,OAAO,CACT,gCAAgC,CAAC,YAAY,GAAG;QAC9C,OAAO,EACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,GACnC,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,GACpC,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,GACpC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAClC;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KACtB,CACF;IAYK,MAAM,CACV,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC;IAkBhD,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAa1C,UAAU,CAAC,GAAG,EAAE,MAAM;;;IAItB,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;;;CAG9B"}
|
package/dist/seed/client.js
CHANGED
|
@@ -325,6 +325,7 @@ export class SeedClient {
|
|
|
325
325
|
await this.agent.app.bsky.graph.listitem.delete({ repo: by, rkey: foundItem.uri.rkey }, this.getHeaders(by));
|
|
326
326
|
delete foundList.items[subject];
|
|
327
327
|
}
|
|
328
|
+
// override public signature to add support for convos and messages
|
|
328
329
|
async createReport(opts) {
|
|
329
330
|
const { reasonType, subject, reason, reportedBy } = opts;
|
|
330
331
|
const result = await this.agent.com.atproto.moderation.createReport({ reasonType, subject, reason }, {
|
package/dist/seed/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/seed/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAgBtC,OAAO,EAAE,KAAK,EAA0B,MAAM,iBAAiB,CAAA;AAG/D,sDAAsD;AACtD,iEAAiE;AAEjE,IAAI,UAAkC,CAAA;AAEtC,mEAAmE;AACnE,mEAAmE;AACnE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAC9B,SAAS,EACT,qCAAqC,CACtC,CAAA;AAOD,MAAM,OAAO,SAAS;IAIpB,YAAY,GAAmB,EAAE,GAAiB;QAChD,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;QACpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;IACtC,CAAC;IAED,IAAI,GAAG;QACL,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;YACxB,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;SACzB,CAAA;IACH,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;IAC5B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,E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D,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;QAChD,CAAC;QAED,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CACjD,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACrC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CACpB,CAAA;QACD,OAAO,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAA;IACxC,CAAC;IAED,UAAU,CAAC,GAAW;QACpB,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAA;IAC5D,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAW;QAC3B,OAAO,EAAE,aAAa,EAAE,UAAU,GAAG,EAAE,EAAE,CAAA;IAC3C,CAAC;CACF","sourcesContent":["import fs from 'node:fs/promises'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { CID } from 'multiformats/cid'\nimport {\n AppBskyActorProfile,\n AppBskyFeedLike,\n AppBskyFeedPost,\n AppBskyFeedRepost,\n AppBskyGraphBlock,\n AppBskyGraphFollow,\n AppBskyGraphList,\n AppBskyGraphVerification,\n AppBskyRichtextFacet,\n AtpAgent,\n ComAtprotoModerationCreateReport,\n} from '@atproto/api'\nimport { CidString, Client } from '@atproto/lex'\nimport { BlobRef } from '@atproto/lexicon'\nimport { AtUri, AtUriString, DidString } from '@atproto/syntax'\nimport { TestNetworkNoAppView } from '../network-no-appview.js'\n\n// Makes it simple to create data via the XRPC client,\n// and keeps track of all created data in memory for convenience.\n\nlet AVATAR_IMG: Uint8Array | undefined\n\n// AVATAR_PATH is defined in a non-CWD-dependant way, so this works\n// for any consumer of this package, even outside the atproto repo.\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\nconst AVATAR_PATH = path.resolve(\n __dirname,\n '../../assets/key-portrait-small.jpg',\n)\n\nexport type ImageRef = {\n image: BlobRef\n alt: string\n}\n\nexport class RecordRef {\n uri: AtUri\n cid: CID\n\n constructor(uri: AtUri | string, cid: CID | string) {\n this.uri = new AtUri(uri.toString())\n this.cid = CID.parse(cid.toString())\n }\n\n get raw(): { uri: AtUriString; cid: CidString } {\n return {\n uri: this.uri.toString(),\n cid: this.cid.toString(),\n }\n }\n\n get uriStr(): AtUriString {\n return this.uri.toString()\n }\n\n get cidStr(): CidString {\n return this.cid.toString()\n }\n}\n\nexport class SeedClient<\n Network extends TestNetworkNoAppView = TestNetworkNoAppView,\n> {\n accounts: Record<\n string,\n {\n did: DidString\n accessJwt: string\n refreshJwt: string\n handle: string\n email: string\n password: string\n }\n >\n profiles: Record<\n string,\n {\n displayName: string\n description: string\n avatar: { cid: string; mimeType: string }\n joinedViaStarterPack: RecordRef | undefined\n ref: RecordRef\n }\n >\n follows: Record<string, Record<string, RecordRef>>\n blocks: Record<string, Record<string, RecordRef>>\n mutes: Record<string, Set<string>>\n posts: Record<\n string,\n { text: string; ref: RecordRef; images: ImageRef[]; quote?: RecordRef }[]\n >\n likes: Record<string, Record<string, AtUri>>\n replies: Record<\n string,\n { text: string; ref: RecordRef; images: ImageRef[] }[]\n >\n reposts: Record<string, RecordRef[]>\n lists: Record<\n string,\n Record<string, { ref: RecordRef; items: Record<string, RecordRef> }>\n >\n feedgens: Record<\n string,\n Record<string, { ref: RecordRef; items: Record<string, RecordRef> }>\n >\n starterpacks: Record<\n string,\n Record<\n string,\n {\n ref: RecordRef\n name: string\n list: RecordRef\n feeds: string[]\n }\n >\n >\n\n verifications: Record<string, Record<string, AtUri>>\n\n dids: Record<string, DidString>\n\n constructor(\n public network: Network,\n public agent: AtpAgent,\n public client: Client,\n ) {\n this.accounts = {}\n this.profiles = {}\n this.follows = {}\n this.blocks = {}\n this.mutes = {}\n this.posts = {}\n this.likes = {}\n this.replies = {}\n this.reposts = {}\n this.lists = {}\n this.feedgens = {}\n this.starterpacks = {}\n this.verifications = {}\n this.dids = {}\n }\n\n async createAccount(\n shortName: string,\n params: {\n handle: string\n email: string\n password: string\n inviteCode?: string\n },\n ) {\n const { data: account } =\n await this.agent.com.atproto.server.createAccount(params)\n const did = account.did as DidString\n this.dids[shortName] = did\n this.accounts[account.did] = {\n ...account,\n did,\n email: params.email,\n password: params.password,\n }\n return this.accounts[account.did]\n }\n\n async updateHandle(by: string, handle: string) {\n await this.agent.com.atproto.identity.updateHandle(\n { handle },\n { encoding: 'application/json', headers: this.getHeaders(by) },\n )\n }\n\n async createProfile(\n by: string,\n displayName: string,\n description: string,\n selfLabels?: string[],\n joinedViaStarterPack?: RecordRef,\n overrides?: Partial<AppBskyActorProfile.Record>,\n ): Promise<{\n displayName: string\n description: string\n avatar: { cid: string; mimeType: string }\n ref: RecordRef\n joinedViaStarterPack?: RecordRef\n }> {\n AVATAR_IMG ??= await fs.readFile(AVATAR_PATH)\n\n let avatarBlob\n {\n const res = await this.agent.com.atproto.repo.uploadBlob(AVATAR_IMG, {\n encoding: 'image/jpeg',\n headers: this.getHeaders(by),\n } as any)\n avatarBlob = res.data.blob\n }\n\n {\n const res = await this.agent.app.bsky.actor.profile.create(\n { repo: by },\n {\n displayName,\n description,\n avatar: avatarBlob,\n labels: selfLabels\n ? {\n $type: 'com.atproto.label.defs#selfLabels',\n values: selfLabels.map((val) => ({ val })),\n }\n : undefined,\n joinedViaStarterPack: joinedViaStarterPack?.raw,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.profiles[by] = {\n displayName,\n description,\n avatar: avatarBlob,\n joinedViaStarterPack,\n ref: new RecordRef(res.uri, res.cid),\n }\n }\n return this.profiles[by]\n }\n\n async updateProfile(by: string, record: Record<string, unknown>) {\n const res = await this.agent.com.atproto.repo.putRecord(\n {\n repo: by,\n collection: 'app.bsky.actor.profile',\n rkey: 'self',\n record,\n },\n { headers: this.getHeaders(by), encoding: 'application/json' },\n )\n this.profiles[by] = {\n ...(this.profiles[by] ?? {}),\n ...record,\n ref: new RecordRef(res.data.uri, res.data.cid),\n }\n return this.profiles[by]\n }\n\n async follow(\n from: string,\n to: string,\n overrides?: Partial<AppBskyGraphFollow.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.follow.create(\n { repo: from },\n {\n subject: to,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(from),\n )\n this.follows[from] ??= {}\n this.follows[from][to] = new RecordRef(res.uri, res.cid)\n return this.follows[from][to]\n }\n\n async unfollow(from: string, to: string) {\n const follow = this.follows[from][to]\n if (!follow) {\n throw new Error('follow does not exist')\n }\n await this.agent.app.bsky.graph.follow.delete(\n { repo: from, rkey: follow.uri.rkey },\n this.getHeaders(from),\n )\n delete this.follows[from][to]\n }\n\n async block(\n from: string,\n to: string,\n overrides?: Partial<AppBskyGraphBlock.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.block.create(\n { repo: from },\n {\n subject: to,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(from),\n )\n this.blocks[from] ??= {}\n this.blocks[from][to] = new RecordRef(res.uri, res.cid)\n return this.blocks[from][to]\n }\n\n async unblock(from: string, to: string) {\n const block = this.blocks[from][to]\n if (!block) {\n throw new Error('block does not exist')\n }\n await this.agent.app.bsky.graph.block.delete(\n { repo: from, rkey: block.uri.rkey },\n this.getHeaders(from),\n )\n delete this.blocks[from][to]\n }\n\n async mute(from: string, to: string) {\n await this.agent.app.bsky.graph.muteActor(\n {\n actor: to,\n },\n { headers: this.getHeaders(from) },\n )\n this.mutes[from] ??= new Set()\n this.mutes[from].add(to)\n return this.mutes[from][to]\n }\n\n async post(\n by: string,\n text: string,\n facets?: AppBskyRichtextFacet.Main[],\n images?: ImageRef[],\n quote?: RecordRef,\n overrides?: Partial<AppBskyFeedPost.Record>,\n ) {\n const imageEmbed = images && {\n $type: 'app.bsky.embed.images',\n images,\n }\n const recordEmbed = quote && {\n record: { uri: quote.uriStr, cid: quote.cidStr },\n }\n const embed =\n imageEmbed && recordEmbed\n ? {\n $type: 'app.bsky.embed.recordWithMedia',\n record: recordEmbed,\n media: imageEmbed,\n }\n : recordEmbed\n ? { $type: 'app.bsky.embed.record', ...recordEmbed }\n : imageEmbed\n const res = await this.agent.app.bsky.feed.post.create(\n { repo: by },\n {\n text: text,\n facets,\n embed,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.posts[by] ??= []\n const post = {\n text,\n ref: new RecordRef(res.uri, res.cid),\n images: images ?? [],\n quote,\n }\n this.posts[by].push(post)\n return post\n }\n\n async deletePost(by: string, uri: AtUri) {\n await this.agent.app.bsky.feed.post.delete(\n {\n repo: by,\n rkey: uri.rkey,\n },\n this.getHeaders(by),\n )\n }\n\n async uploadFile(\n by: string,\n filePath: string,\n encoding: string,\n ): Promise<ImageRef> {\n const file = await fs.readFile(filePath)\n const res = await this.agent.com.atproto.repo.uploadBlob(file, {\n headers: this.getHeaders(by),\n encoding,\n } as any)\n return { image: res.data.blob, alt: filePath }\n }\n\n async like(\n by: string,\n subject: RecordRef,\n overrides?: Partial<AppBskyFeedLike.Record>,\n ) {\n const res = await this.agent.app.bsky.feed.like.create(\n { repo: by },\n {\n subject: subject.raw,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.likes[by] ??= {}\n this.likes[by][subject.uriStr] = new AtUri(res.uri)\n return this.likes[by][subject.uriStr]\n }\n\n async reply(\n by: string,\n root: RecordRef,\n parent: RecordRef,\n text: string,\n facets?: AppBskyRichtextFacet.Main[],\n images?: ImageRef[],\n overrides?: Partial<AppBskyFeedPost.Record>,\n ) {\n const embed = images\n ? {\n $type: 'app.bsky.embed.images',\n images,\n }\n : undefined\n const res = await this.agent.app.bsky.feed.post.create(\n { repo: by },\n {\n text: text,\n reply: {\n root: root.raw,\n parent: parent.raw,\n },\n facets,\n embed,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.replies[by] ??= []\n const reply = {\n text,\n ref: new RecordRef(res.uri, res.cid),\n images: images ?? [],\n }\n this.replies[by].push(reply)\n return reply\n }\n\n async repost(\n by: string,\n subject: RecordRef,\n overrides?: Partial<AppBskyFeedRepost.Record>,\n ) {\n const res = await this.agent.app.bsky.feed.repost.create(\n { repo: by },\n {\n subject: subject.raw,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.reposts[by] ??= []\n const repost = new RecordRef(res.uri, res.cid)\n this.reposts[by].push(repost)\n return repost\n }\n\n async createList(\n by: string,\n name: string,\n purpose: 'mod' | 'curate' | 'reference',\n overrides?: Partial<AppBskyGraphList.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.list.create(\n { repo: by },\n {\n name,\n purpose:\n purpose === 'mod'\n ? 'app.bsky.graph.defs#modlist'\n : purpose === 'curate'\n ? 'app.bsky.graph.defs#curatelist'\n : 'app.bsky.graph.defs#referencelist',\n createdAt: new Date().toISOString(),\n ...(overrides || {}),\n },\n this.getHeaders(by),\n )\n this.lists[by] ??= {}\n const ref = new RecordRef(res.uri, res.cid)\n this.lists[by][ref.uriStr] = {\n ref: ref,\n items: {},\n }\n return ref\n }\n\n async createFeedGen(by: string, feedDid: string, name: string) {\n const res = await this.agent.app.bsky.feed.generator.create(\n { repo: by },\n {\n did: feedDid,\n displayName: name,\n createdAt: new Date().toISOString(),\n },\n this.getHeaders(by),\n )\n this.feedgens[by] ??= {}\n const ref = new RecordRef(res.uri, res.cid)\n this.feedgens[by][ref.uriStr] = {\n ref: ref,\n items: {},\n }\n return ref\n }\n\n async createStarterPack(\n by: string,\n name: string,\n actors: string[],\n feeds?: string[],\n ) {\n const list = await this.createList(by, 'n/a', 'reference')\n for (const did of actors) {\n await this.addToList(by, did, list)\n }\n const res = await this.agent.app.bsky.graph.starterpack.create(\n { repo: by },\n {\n name,\n list: list.uriStr,\n feeds: feeds?.map((uri) => ({ uri })),\n createdAt: new Date().toISOString(),\n },\n this.getHeaders(by),\n )\n this.starterpacks[by] ??= {}\n const ref = new RecordRef(res.uri, res.cid)\n this.starterpacks[by][ref.uriStr] = {\n ref: ref,\n list,\n feeds: feeds ?? [],\n name,\n }\n return ref\n }\n\n async addToList(by: string, subject: string, list: RecordRef) {\n const res = await this.agent.app.bsky.graph.listitem.create(\n { repo: by },\n { subject, list: list.uriStr, createdAt: new Date().toISOString() },\n this.getHeaders(by),\n )\n const ref = new RecordRef(res.uri, res.cid)\n const found = (this.lists[by] ?? {})[list.uriStr]\n if (found) {\n found.items[subject] = ref\n }\n return ref\n }\n\n async rmFromList(by: string, subject: string, list: RecordRef) {\n const foundList = (this.lists[by] ?? {})[list.uriStr] ?? {}\n if (!foundList) return\n const foundItem = foundList.items[subject]\n if (!foundItem) return\n await this.agent.app.bsky.graph.listitem.delete(\n { repo: by, rkey: foundItem.uri.rkey },\n this.getHeaders(by),\n )\n delete foundList.items[subject]\n }\n\n async createReport(opts: {\n reasonType: ComAtprotoModerationCreateReport.InputSchema['reasonType']\n subject: ComAtprotoModerationCreateReport.InputSchema['subject']\n reason?: string\n reportedBy: string\n }) {\n const { reasonType, subject, reason, reportedBy } = opts\n const result = await this.agent.com.atproto.moderation.createReport(\n { reasonType, subject, reason },\n {\n encoding: 'application/json',\n headers: this.getHeaders(reportedBy),\n },\n )\n return result.data\n }\n\n async verify(\n by: string,\n subject: string,\n handle: string,\n displayName: string,\n overrides?: Partial<AppBskyGraphVerification.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.verification.create(\n { repo: by },\n {\n subject,\n createdAt: new Date().toISOString(),\n handle,\n displayName,\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.verifications[by] ??= {}\n this.verifications[by][subject] = new AtUri(res.uri)\n return this.verifications[by][subject]\n }\n\n async unverify(by: string, subject: string) {\n const verification = this.verifications[by]?.[subject]\n if (!verification) {\n throw new Error('verification does not exist')\n }\n\n await this.agent.app.bsky.graph.verification.delete(\n { repo: by, rkey: verification.rkey },\n this.getHeaders(by),\n )\n delete this.verifications[by][subject]\n }\n\n getHeaders(did: string) {\n return SeedClient.getHeaders(this.accounts[did].accessJwt)\n }\n\n static getHeaders(jwt: string) {\n return { authorization: `Bearer ${jwt}` }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/seed/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAoBtC,OAAO,EAAE,KAAK,EAA0B,MAAM,iBAAiB,CAAA;AAG/D,sDAAsD;AACtD,iEAAiE;AAEjE,IAAI,UAAkC,CAAA;AAEtC,mEAAmE;AACnE,mEAAmE;AACnE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAC9B,SAAS,EACT,qCAAqC,CACtC,CAAA;AAOD,MAAM,OAAO,SAAS;IAIpB,YAAY,GAAmB,EAAE,GAAiB;QAChD,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;QACpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;IACtC,CAAC;IAED,IAAI,GAAG;QACL,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;YACxB,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;SACzB,CAAA;IACH,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,Q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,EAAE,OAAe;QACxC,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAA;QACtD,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;QAChD,CAAC;QAED,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CACjD,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACrC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CACpB,CAAA;QACD,OAAO,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAA;IACxC,CAAC;IAED,UAAU,CAAC,GAAW;QACpB,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAA;IAC5D,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAW;QAC3B,OAAO,EAAE,aAAa,EAAE,UAAU,GAAG,EAAE,EAAE,CAAA;IAC3C,CAAC;CACF","sourcesContent":["import fs from 'node:fs/promises'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { CID } from 'multiformats/cid'\nimport {\n $Typed,\n AppBskyActorProfile,\n AppBskyFeedLike,\n AppBskyFeedPost,\n AppBskyFeedRepost,\n AppBskyGraphBlock,\n AppBskyGraphFollow,\n AppBskyGraphList,\n AppBskyGraphVerification,\n AppBskyRichtextFacet,\n AtpAgent,\n ChatBskyConvoDefs,\n ComAtprotoAdminDefs,\n ComAtprotoModerationCreateReport,\n ComAtprotoRepoStrongRef,\n} from '@atproto/api'\nimport { CidString, Client } from '@atproto/lex'\nimport { BlobRef } from '@atproto/lexicon'\nimport { AtUri, AtUriString, DidString } from '@atproto/syntax'\nimport { TestNetworkNoAppView } from '../network-no-appview.js'\n\n// Makes it simple to create data via the XRPC client,\n// and keeps track of all created data in memory for convenience.\n\nlet AVATAR_IMG: Uint8Array | undefined\n\n// AVATAR_PATH is defined in a non-CWD-dependant way, so this works\n// for any consumer of this package, even outside the atproto repo.\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\nconst AVATAR_PATH = path.resolve(\n __dirname,\n '../../assets/key-portrait-small.jpg',\n)\n\nexport type ImageRef = {\n image: BlobRef\n alt: string\n}\n\nexport class RecordRef {\n uri: AtUri\n cid: CID\n\n constructor(uri: AtUri | string, cid: CID | string) {\n this.uri = new AtUri(uri.toString())\n this.cid = CID.parse(cid.toString())\n }\n\n get raw(): { uri: AtUriString; cid: CidString } {\n return {\n uri: this.uri.toString(),\n cid: this.cid.toString(),\n }\n }\n\n get uriStr(): AtUriString {\n return this.uri.toString()\n }\n\n get cidStr(): CidString {\n return this.cid.toString()\n }\n}\n\nexport class SeedClient<\n Network extends TestNetworkNoAppView = TestNetworkNoAppView,\n> {\n accounts: Record<\n string,\n {\n did: DidString\n accessJwt: string\n refreshJwt: string\n handle: string\n email: string\n password: string\n }\n >\n profiles: Record<\n string,\n {\n displayName: string\n description: string\n avatar: { cid: string; mimeType: string }\n joinedViaStarterPack: RecordRef | undefined\n ref: RecordRef\n }\n >\n follows: Record<string, Record<string, RecordRef>>\n blocks: Record<string, Record<string, RecordRef>>\n mutes: Record<string, Set<string>>\n posts: Record<\n string,\n { text: string; ref: RecordRef; images: ImageRef[]; quote?: RecordRef }[]\n >\n likes: Record<string, Record<string, AtUri>>\n replies: Record<\n string,\n { text: string; ref: RecordRef; images: ImageRef[] }[]\n >\n reposts: Record<string, RecordRef[]>\n lists: Record<\n string,\n Record<string, { ref: RecordRef; items: Record<string, RecordRef> }>\n >\n feedgens: Record<\n string,\n Record<string, { ref: RecordRef; items: Record<string, RecordRef> }>\n >\n starterpacks: Record<\n string,\n Record<\n string,\n {\n ref: RecordRef\n name: string\n list: RecordRef\n feeds: string[]\n }\n >\n >\n\n verifications: Record<string, Record<string, AtUri>>\n\n dids: Record<string, DidString>\n\n constructor(\n public network: Network,\n public agent: AtpAgent,\n public client: Client,\n ) {\n this.accounts = {}\n this.profiles = {}\n this.follows = {}\n this.blocks = {}\n this.mutes = {}\n this.posts = {}\n this.likes = {}\n this.replies = {}\n this.reposts = {}\n this.lists = {}\n this.feedgens = {}\n this.starterpacks = {}\n this.verifications = {}\n this.dids = {}\n }\n\n async createAccount(\n shortName: string,\n params: {\n handle: string\n email: string\n password: string\n inviteCode?: string\n },\n ) {\n const { data: account } =\n await this.agent.com.atproto.server.createAccount(params)\n const did = account.did as DidString\n this.dids[shortName] = did\n this.accounts[account.did] = {\n ...account,\n did,\n email: params.email,\n password: params.password,\n }\n return this.accounts[account.did]\n }\n\n async updateHandle(by: string, handle: string) {\n await this.agent.com.atproto.identity.updateHandle(\n { handle },\n { encoding: 'application/json', headers: this.getHeaders(by) },\n )\n }\n\n async createProfile(\n by: string,\n displayName: string,\n description: string,\n selfLabels?: string[],\n joinedViaStarterPack?: RecordRef,\n overrides?: Partial<AppBskyActorProfile.Record>,\n ): Promise<{\n displayName: string\n description: string\n avatar: { cid: string; mimeType: string }\n ref: RecordRef\n joinedViaStarterPack?: RecordRef\n }> {\n AVATAR_IMG ??= await fs.readFile(AVATAR_PATH)\n\n let avatarBlob\n {\n const res = await this.agent.com.atproto.repo.uploadBlob(AVATAR_IMG, {\n encoding: 'image/jpeg',\n headers: this.getHeaders(by),\n } as any)\n avatarBlob = res.data.blob\n }\n\n {\n const res = await this.agent.app.bsky.actor.profile.create(\n { repo: by },\n {\n displayName,\n description,\n avatar: avatarBlob,\n labels: selfLabels\n ? {\n $type: 'com.atproto.label.defs#selfLabels',\n values: selfLabels.map((val) => ({ val })),\n }\n : undefined,\n joinedViaStarterPack: joinedViaStarterPack?.raw,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.profiles[by] = {\n displayName,\n description,\n avatar: avatarBlob,\n joinedViaStarterPack,\n ref: new RecordRef(res.uri, res.cid),\n }\n }\n return this.profiles[by]\n }\n\n async updateProfile(by: string, record: Record<string, unknown>) {\n const res = await this.agent.com.atproto.repo.putRecord(\n {\n repo: by,\n collection: 'app.bsky.actor.profile',\n rkey: 'self',\n record,\n },\n { headers: this.getHeaders(by), encoding: 'application/json' },\n )\n this.profiles[by] = {\n ...(this.profiles[by] ?? {}),\n ...record,\n ref: new RecordRef(res.data.uri, res.data.cid),\n }\n return this.profiles[by]\n }\n\n async follow(\n from: string,\n to: string,\n overrides?: Partial<AppBskyGraphFollow.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.follow.create(\n { repo: from },\n {\n subject: to,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(from),\n )\n this.follows[from] ??= {}\n this.follows[from][to] = new RecordRef(res.uri, res.cid)\n return this.follows[from][to]\n }\n\n async unfollow(from: string, to: string) {\n const follow = this.follows[from][to]\n if (!follow) {\n throw new Error('follow does not exist')\n }\n await this.agent.app.bsky.graph.follow.delete(\n { repo: from, rkey: follow.uri.rkey },\n this.getHeaders(from),\n )\n delete this.follows[from][to]\n }\n\n async block(\n from: string,\n to: string,\n overrides?: Partial<AppBskyGraphBlock.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.block.create(\n { repo: from },\n {\n subject: to,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(from),\n )\n this.blocks[from] ??= {}\n this.blocks[from][to] = new RecordRef(res.uri, res.cid)\n return this.blocks[from][to]\n }\n\n async unblock(from: string, to: string) {\n const block = this.blocks[from][to]\n if (!block) {\n throw new Error('block does not exist')\n }\n await this.agent.app.bsky.graph.block.delete(\n { repo: from, rkey: block.uri.rkey },\n this.getHeaders(from),\n )\n delete this.blocks[from][to]\n }\n\n async mute(from: string, to: string) {\n await this.agent.app.bsky.graph.muteActor(\n {\n actor: to,\n },\n { headers: this.getHeaders(from) },\n )\n this.mutes[from] ??= new Set()\n this.mutes[from].add(to)\n return this.mutes[from][to]\n }\n\n async post(\n by: string,\n text: string,\n facets?: AppBskyRichtextFacet.Main[],\n images?: ImageRef[],\n quote?: RecordRef,\n overrides?: Partial<AppBskyFeedPost.Record>,\n ) {\n const imageEmbed = images && {\n $type: 'app.bsky.embed.images',\n images,\n }\n const recordEmbed = quote && {\n record: { uri: quote.uriStr, cid: quote.cidStr },\n }\n const embed =\n imageEmbed && recordEmbed\n ? {\n $type: 'app.bsky.embed.recordWithMedia',\n record: recordEmbed,\n media: imageEmbed,\n }\n : recordEmbed\n ? { $type: 'app.bsky.embed.record', ...recordEmbed }\n : imageEmbed\n const res = await this.agent.app.bsky.feed.post.create(\n { repo: by },\n {\n text: text,\n facets,\n embed,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.posts[by] ??= []\n const post = {\n text,\n ref: new RecordRef(res.uri, res.cid),\n images: images ?? [],\n quote,\n }\n this.posts[by].push(post)\n return post\n }\n\n async deletePost(by: string, uri: AtUri) {\n await this.agent.app.bsky.feed.post.delete(\n {\n repo: by,\n rkey: uri.rkey,\n },\n this.getHeaders(by),\n )\n }\n\n async uploadFile(\n by: string,\n filePath: string,\n encoding: string,\n ): Promise<ImageRef> {\n const file = await fs.readFile(filePath)\n const res = await this.agent.com.atproto.repo.uploadBlob(file, {\n headers: this.getHeaders(by),\n encoding,\n } as any)\n return { image: res.data.blob, alt: filePath }\n }\n\n async like(\n by: string,\n subject: RecordRef,\n overrides?: Partial<AppBskyFeedLike.Record>,\n ) {\n const res = await this.agent.app.bsky.feed.like.create(\n { repo: by },\n {\n subject: subject.raw,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.likes[by] ??= {}\n this.likes[by][subject.uriStr] = new AtUri(res.uri)\n return this.likes[by][subject.uriStr]\n }\n\n async reply(\n by: string,\n root: RecordRef,\n parent: RecordRef,\n text: string,\n facets?: AppBskyRichtextFacet.Main[],\n images?: ImageRef[],\n overrides?: Partial<AppBskyFeedPost.Record>,\n ) {\n const embed = images\n ? {\n $type: 'app.bsky.embed.images',\n images,\n }\n : undefined\n const res = await this.agent.app.bsky.feed.post.create(\n { repo: by },\n {\n text: text,\n reply: {\n root: root.raw,\n parent: parent.raw,\n },\n facets,\n embed,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.replies[by] ??= []\n const reply = {\n text,\n ref: new RecordRef(res.uri, res.cid),\n images: images ?? [],\n }\n this.replies[by].push(reply)\n return reply\n }\n\n async repost(\n by: string,\n subject: RecordRef,\n overrides?: Partial<AppBskyFeedRepost.Record>,\n ) {\n const res = await this.agent.app.bsky.feed.repost.create(\n { repo: by },\n {\n subject: subject.raw,\n createdAt: new Date().toISOString(),\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.reposts[by] ??= []\n const repost = new RecordRef(res.uri, res.cid)\n this.reposts[by].push(repost)\n return repost\n }\n\n async createList(\n by: string,\n name: string,\n purpose: 'mod' | 'curate' | 'reference',\n overrides?: Partial<AppBskyGraphList.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.list.create(\n { repo: by },\n {\n name,\n purpose:\n purpose === 'mod'\n ? 'app.bsky.graph.defs#modlist'\n : purpose === 'curate'\n ? 'app.bsky.graph.defs#curatelist'\n : 'app.bsky.graph.defs#referencelist',\n createdAt: new Date().toISOString(),\n ...(overrides || {}),\n },\n this.getHeaders(by),\n )\n this.lists[by] ??= {}\n const ref = new RecordRef(res.uri, res.cid)\n this.lists[by][ref.uriStr] = {\n ref: ref,\n items: {},\n }\n return ref\n }\n\n async createFeedGen(by: string, feedDid: string, name: string) {\n const res = await this.agent.app.bsky.feed.generator.create(\n { repo: by },\n {\n did: feedDid,\n displayName: name,\n createdAt: new Date().toISOString(),\n },\n this.getHeaders(by),\n )\n this.feedgens[by] ??= {}\n const ref = new RecordRef(res.uri, res.cid)\n this.feedgens[by][ref.uriStr] = {\n ref: ref,\n items: {},\n }\n return ref\n }\n\n async createStarterPack(\n by: string,\n name: string,\n actors: string[],\n feeds?: string[],\n ) {\n const list = await this.createList(by, 'n/a', 'reference')\n for (const did of actors) {\n await this.addToList(by, did, list)\n }\n const res = await this.agent.app.bsky.graph.starterpack.create(\n { repo: by },\n {\n name,\n list: list.uriStr,\n feeds: feeds?.map((uri) => ({ uri })),\n createdAt: new Date().toISOString(),\n },\n this.getHeaders(by),\n )\n this.starterpacks[by] ??= {}\n const ref = new RecordRef(res.uri, res.cid)\n this.starterpacks[by][ref.uriStr] = {\n ref: ref,\n list,\n feeds: feeds ?? [],\n name,\n }\n return ref\n }\n\n async addToList(by: string, subject: string, list: RecordRef) {\n const res = await this.agent.app.bsky.graph.listitem.create(\n { repo: by },\n { subject, list: list.uriStr, createdAt: new Date().toISOString() },\n this.getHeaders(by),\n )\n const ref = new RecordRef(res.uri, res.cid)\n const found = (this.lists[by] ?? {})[list.uriStr]\n if (found) {\n found.items[subject] = ref\n }\n return ref\n }\n\n async rmFromList(by: string, subject: string, list: RecordRef) {\n const foundList = (this.lists[by] ?? {})[list.uriStr] ?? {}\n if (!foundList) return\n const foundItem = foundList.items[subject]\n if (!foundItem) return\n await this.agent.app.bsky.graph.listitem.delete(\n { repo: by, rkey: foundItem.uri.rkey },\n this.getHeaders(by),\n )\n delete foundList.items[subject]\n }\n\n // override public signature to add support for convos and messages\n async createReport(opts: {\n reasonType: ComAtprotoModerationCreateReport.InputSchema['reasonType']\n subject:\n | $Typed<ComAtprotoAdminDefs.RepoRef>\n | $Typed<ComAtprotoRepoStrongRef.Main>\n | $Typed<ChatBskyConvoDefs.MessageRef>\n | $Typed<ChatBskyConvoDefs.ConvoRef>\n | { $type: string }\n reason?: string\n reportedBy: string\n }): Promise<\n ComAtprotoModerationCreateReport.OutputSchema & {\n subject:\n | $Typed<ComAtprotoAdminDefs.RepoRef>\n | $Typed<ComAtprotoRepoStrongRef.Main>\n | $Typed<ChatBskyConvoDefs.MessageRef>\n | $Typed<ChatBskyConvoDefs.ConvoRef>\n | { $type: string }\n }\n > {\n const { reasonType, subject, reason, reportedBy } = opts\n const result = await this.agent.com.atproto.moderation.createReport(\n { reasonType, subject, reason },\n {\n encoding: 'application/json',\n headers: this.getHeaders(reportedBy),\n },\n )\n return result.data\n }\n\n async verify(\n by: string,\n subject: string,\n handle: string,\n displayName: string,\n overrides?: Partial<AppBskyGraphVerification.Record>,\n ) {\n const res = await this.agent.app.bsky.graph.verification.create(\n { repo: by },\n {\n subject,\n createdAt: new Date().toISOString(),\n handle,\n displayName,\n ...overrides,\n },\n this.getHeaders(by),\n )\n this.verifications[by] ??= {}\n this.verifications[by][subject] = new AtUri(res.uri)\n return this.verifications[by][subject]\n }\n\n async unverify(by: string, subject: string) {\n const verification = this.verifications[by]?.[subject]\n if (!verification) {\n throw new Error('verification does not exist')\n }\n\n await this.agent.app.bsky.graph.verification.delete(\n { repo: by, rkey: verification.rkey },\n this.getHeaders(by),\n )\n delete this.verifications[by][subject]\n }\n\n getHeaders(did: string) {\n return SeedClient.getHeaders(this.accounts[did].accessJwt)\n }\n\n static getHeaders(jwt: string) {\n return { authorization: `Bearer ${jwt}` }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/dev-env",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Local development environment helper for atproto development",
|
|
6
6
|
"keywords": [
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"multiformats": "^13.0.0",
|
|
26
26
|
"uint8arrays": "^5.0.0",
|
|
27
27
|
"undici": "^6.14.1",
|
|
28
|
-
"@atproto/api": "^0.20.
|
|
29
|
-
"@atproto/bsky": "^0.0.
|
|
28
|
+
"@atproto/api": "^0.20.7",
|
|
29
|
+
"@atproto/bsky": "^0.0.236",
|
|
30
30
|
"@atproto/bsync": "^0.0.27",
|
|
31
31
|
"@atproto/common-web": "^0.5.0",
|
|
32
32
|
"@atproto/crypto": "^0.5.0",
|
|
33
33
|
"@atproto/identity": "^0.5.0",
|
|
34
34
|
"@atproto/lex": "^0.1.3",
|
|
35
35
|
"@atproto/lexicon": "^0.7.1",
|
|
36
|
-
"@atproto/ozone": "^0.
|
|
36
|
+
"@atproto/ozone": "^0.2.0",
|
|
37
37
|
"@atproto/pds": "^0.5.1",
|
|
38
38
|
"@atproto/sync": "^0.3.1",
|
|
39
39
|
"@atproto/syntax": "^0.6.1",
|
package/src/moderator-client.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
+
$Typed,
|
|
2
3
|
AtpAgent,
|
|
4
|
+
ChatBskyConvoDefs,
|
|
5
|
+
ComAtprotoAdminDefs,
|
|
6
|
+
ComAtprotoRepoStrongRef,
|
|
3
7
|
ToolsOzoneModerationDefs,
|
|
4
8
|
ToolsOzoneModerationEmitEvent as EmitModerationEvent,
|
|
5
9
|
ToolsOzoneModerationGetReporterStats as _GetReporterStats, // includes types for getReporterStats()
|
|
@@ -85,7 +89,12 @@ export class ModeratorClient {
|
|
|
85
89
|
async emitEvent(
|
|
86
90
|
opts: {
|
|
87
91
|
event: TakeActionInput['event']
|
|
88
|
-
subject:
|
|
92
|
+
subject:
|
|
93
|
+
| $Typed<ComAtprotoAdminDefs.RepoRef>
|
|
94
|
+
| $Typed<ComAtprotoRepoStrongRef.Main>
|
|
95
|
+
| $Typed<ChatBskyConvoDefs.MessageRef>
|
|
96
|
+
| $Typed<ChatBskyConvoDefs.ConvoRef>
|
|
97
|
+
| { $type: string }
|
|
89
98
|
subjectBlobCids?: TakeActionInput['subjectBlobCids']
|
|
90
99
|
reason?: string
|
|
91
100
|
createdBy?: string
|
|
@@ -165,7 +174,12 @@ export class ModeratorClient {
|
|
|
165
174
|
|
|
166
175
|
async performTakedown(
|
|
167
176
|
opts: {
|
|
168
|
-
subject:
|
|
177
|
+
subject:
|
|
178
|
+
| $Typed<ComAtprotoAdminDefs.RepoRef>
|
|
179
|
+
| $Typed<ComAtprotoRepoStrongRef.Main>
|
|
180
|
+
| $Typed<ChatBskyConvoDefs.MessageRef>
|
|
181
|
+
| $Typed<ChatBskyConvoDefs.ConvoRef>
|
|
182
|
+
| { $type: string }
|
|
169
183
|
subjectBlobCids?: TakeActionInput['subjectBlobCids']
|
|
170
184
|
durationInHours?: number
|
|
171
185
|
acknowledgeAccountSubjects?: boolean
|
package/src/seed/client.ts
CHANGED
|
@@ -3,6 +3,7 @@ import path from 'node:path'
|
|
|
3
3
|
import { fileURLToPath } from 'node:url'
|
|
4
4
|
import { CID } from 'multiformats/cid'
|
|
5
5
|
import {
|
|
6
|
+
$Typed,
|
|
6
7
|
AppBskyActorProfile,
|
|
7
8
|
AppBskyFeedLike,
|
|
8
9
|
AppBskyFeedPost,
|
|
@@ -13,7 +14,10 @@ import {
|
|
|
13
14
|
AppBskyGraphVerification,
|
|
14
15
|
AppBskyRichtextFacet,
|
|
15
16
|
AtpAgent,
|
|
17
|
+
ChatBskyConvoDefs,
|
|
18
|
+
ComAtprotoAdminDefs,
|
|
16
19
|
ComAtprotoModerationCreateReport,
|
|
20
|
+
ComAtprotoRepoStrongRef,
|
|
17
21
|
} from '@atproto/api'
|
|
18
22
|
import { CidString, Client } from '@atproto/lex'
|
|
19
23
|
import { BlobRef } from '@atproto/lexicon'
|
|
@@ -577,12 +581,27 @@ export class SeedClient<
|
|
|
577
581
|
delete foundList.items[subject]
|
|
578
582
|
}
|
|
579
583
|
|
|
584
|
+
// override public signature to add support for convos and messages
|
|
580
585
|
async createReport(opts: {
|
|
581
586
|
reasonType: ComAtprotoModerationCreateReport.InputSchema['reasonType']
|
|
582
|
-
subject:
|
|
587
|
+
subject:
|
|
588
|
+
| $Typed<ComAtprotoAdminDefs.RepoRef>
|
|
589
|
+
| $Typed<ComAtprotoRepoStrongRef.Main>
|
|
590
|
+
| $Typed<ChatBskyConvoDefs.MessageRef>
|
|
591
|
+
| $Typed<ChatBskyConvoDefs.ConvoRef>
|
|
592
|
+
| { $type: string }
|
|
583
593
|
reason?: string
|
|
584
594
|
reportedBy: string
|
|
585
|
-
})
|
|
595
|
+
}): Promise<
|
|
596
|
+
ComAtprotoModerationCreateReport.OutputSchema & {
|
|
597
|
+
subject:
|
|
598
|
+
| $Typed<ComAtprotoAdminDefs.RepoRef>
|
|
599
|
+
| $Typed<ComAtprotoRepoStrongRef.Main>
|
|
600
|
+
| $Typed<ChatBskyConvoDefs.MessageRef>
|
|
601
|
+
| $Typed<ChatBskyConvoDefs.ConvoRef>
|
|
602
|
+
| { $type: string }
|
|
603
|
+
}
|
|
604
|
+
> {
|
|
586
605
|
const { reasonType, subject, reason, reportedBy } = opts
|
|
587
606
|
const result = await this.agent.com.atproto.moderation.createReport(
|
|
588
607
|
{ reasonType, subject, reason },
|