@atproto/ozone 0.0.2 → 0.0.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 +21 -0
- package/dist/api/admin/listCommunicationTemplates.d.ts +3 -0
- package/dist/api/admin/updateCommunicationTemplate.d.ts +3 -0
- package/dist/communication-service/template.d.ts +18 -0
- package/dist/context.d.ts +3 -0
- package/dist/db/index.js +18 -1
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20240116T085607200Z-communication-template.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/schema/communication_template.d.ts +15 -0
- package/dist/db/schema/index.d.ts +2 -1
- package/dist/index.js +971 -240
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +10 -0
- package/dist/lexicon/lexicons.d.ts +230 -0
- package/dist/lexicon/types/app/bsky/unspecced/{getPopular.d.ts → getTaggedSuggestions.d.ts} +10 -6
- package/dist/lexicon/types/{app/bsky/moderation/getService.d.ts → com/atproto/admin/createCommunicationTemplate.d.ts} +13 -5
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +13 -0
- package/dist/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.d.ts +25 -0
- package/dist/lexicon/types/{app/bsky/moderation/getServices.d.ts → com/atproto/admin/listCommunicationTemplates.d.ts} +2 -3
- package/dist/lexicon/types/com/atproto/admin/updateCommunicationTemplate.d.ts +39 -0
- package/package.json +8 -8
- package/src/api/admin/createCommunicationTemplate.ts +37 -0
- package/src/api/admin/deleteCommunicationTemplate.ts +23 -0
- package/src/api/admin/listCommunicationTemplates.ts +31 -0
- package/src/api/admin/updateCommunicationTemplate.ts +40 -0
- package/src/api/index.ts +8 -0
- package/src/communication-service/template.ts +105 -0
- package/src/context.ts +12 -0
- package/src/db/migrations/20240116T085607200Z-communication-template.ts +23 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/schema/communication_template.ts +18 -0
- package/src/db/schema/index.ts +3 -1
- package/src/lexicon/index.ts +60 -0
- package/src/lexicon/lexicons.ts +249 -0
- package/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts +65 -0
- package/src/lexicon/types/com/atproto/admin/createCommunicationTemplate.ts +54 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +35 -0
- package/src/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.ts +38 -0
- package/src/lexicon/types/com/atproto/admin/listCommunicationTemplates.ts +44 -0
- package/src/lexicon/types/com/atproto/admin/updateCommunicationTemplate.ts +57 -0
- package/tests/communication-templates.test.ts +131 -0
- package/dist/api/com/atproto/admin/emitModerationEvent.d.ts +0 -3
- package/dist/api/com/atproto/admin/getModerationEvent.d.ts +0 -3
- package/dist/api/com/atproto/admin/getRecord.d.ts +0 -3
- package/dist/api/com/atproto/admin/getRepo.d.ts +0 -3
- package/dist/api/com/atproto/admin/queryModerationEvents.d.ts +0 -3
- package/dist/api/com/atproto/admin/queryModerationStatuses.d.ts +0 -3
- package/dist/api/com/atproto/admin/searchRepos.d.ts +0 -3
- package/dist/api/com/atproto/admin/util.d.ts +0 -5
- package/dist/api/com/atproto/moderation/createReport.d.ts +0 -3
- package/dist/api/com/atproto/moderation/util.d.ts +0 -4
- package/dist/api/com/atproto/temp/fetchLabels.d.ts +0 -3
- package/dist/api/util.d.ts +0 -2
- package/dist/auth-verifier.d.ts +0 -47
- package/dist/config.d.ts +0 -42
- package/dist/daemon/config.d.ts +0 -23
- package/dist/lexicon/types/app/bsky/moderation/defs.d.ts +0 -49
- package/dist/lexicon/types/app/bsky/moderation/service.d.ts +0 -17
- package/dist/sequencer/index.d.ts +0 -2
- package/dist/sequencer/outbox.d.ts +0 -16
- package/dist/sequencer/sequencer.d.ts +0 -35
- package/dist/services/index.d.ts +0 -7
- package/dist/services/moderation/index.d.ts +0 -144
- package/dist/services/moderation/status.d.ts +0 -12
- package/dist/services/moderation/subject.d.ts +0 -60
- package/dist/services/moderation/types.d.ts +0 -19
- package/dist/services/moderation/views.d.ts +0 -42
- package/dist/services/types.d.ts +0 -2
- package/dist/util/date.d.ts +0 -1
- package/dist/util/debug.d.ts +0 -1
- package/dist/util/retry.d.ts +0 -3
- package/test.log +0 -0
- /package/dist/api/{label/queryLabels.d.ts → admin/createCommunicationTemplate.d.ts} +0 -0
- /package/dist/api/{label/subscribeLabels.d.ts → admin/deleteCommunicationTemplate.d.ts} +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Selectable } from 'kysely';
|
|
2
|
-
import { ModerationEvent } from '../../db/schema/moderation_event';
|
|
3
|
-
import { ModerationSubjectStatus } from '../../db/schema/moderation_subject_status';
|
|
4
|
-
import { ComAtprotoAdminDefs } from '@atproto/api';
|
|
5
|
-
import { ModSubject } from './subject';
|
|
6
|
-
export declare type ModerationEventRow = Selectable<ModerationEvent>;
|
|
7
|
-
export declare type ReversibleModerationEvent = Pick<ModerationEventRow, 'createdBy' | 'comment' | 'action'> & {
|
|
8
|
-
createdAt?: Date;
|
|
9
|
-
subject: ModSubject;
|
|
10
|
-
};
|
|
11
|
-
export declare type ModerationEventRowWithHandle = ModerationEventRow & {
|
|
12
|
-
subjectHandle?: string | null;
|
|
13
|
-
creatorHandle?: string | null;
|
|
14
|
-
};
|
|
15
|
-
export declare type ModerationSubjectStatusRow = Selectable<ModerationSubjectStatus>;
|
|
16
|
-
export declare type ModerationSubjectStatusRowWithHandle = ModerationSubjectStatusRow & {
|
|
17
|
-
handle: string | null;
|
|
18
|
-
};
|
|
19
|
-
export declare type ModEventType = ComAtprotoAdminDefs.ModEventTakedown | ComAtprotoAdminDefs.ModEventAcknowledge | ComAtprotoAdminDefs.ModEventEscalate | ComAtprotoAdminDefs.ModEventComment | ComAtprotoAdminDefs.ModEventLabel | ComAtprotoAdminDefs.ModEventReport | ComAtprotoAdminDefs.ModEventMute | ComAtprotoAdminDefs.ModEventReverseTakedown;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import AtpAgent from '@atproto/api';
|
|
2
|
-
import { BlobRef } from '@atproto/lexicon';
|
|
3
|
-
import { Database } from '../../db';
|
|
4
|
-
import { ModEventView, RepoView, RepoViewDetail, RecordView, RecordViewDetail, ReportViewDetail, BlobView, SubjectStatusView, ModEventViewDetail, AccountView } from '../../lexicon/types/com/atproto/admin/defs';
|
|
5
|
-
import { OutputSchema as ReportOutput } from '../../lexicon/types/com/atproto/moderation/createReport';
|
|
6
|
-
import { Label } from '../../lexicon/types/com/atproto/label/defs';
|
|
7
|
-
import { ModerationEventRowWithHandle, ModerationSubjectStatusRowWithHandle } from './types';
|
|
8
|
-
export declare class ModerationViews {
|
|
9
|
-
private db;
|
|
10
|
-
private appviewAgent;
|
|
11
|
-
constructor(db: Database, appviewAgent: AtpAgent);
|
|
12
|
-
getAccoutInfosByDid(dids: string[]): Promise<Map<string, AccountView>>;
|
|
13
|
-
repos(dids: string[]): Promise<Map<string, RepoView>>;
|
|
14
|
-
formatEvent(event: ModerationEventRowWithHandle): ModEventView;
|
|
15
|
-
eventDetail(result: ModerationEventRowWithHandle): Promise<ModEventViewDetail>;
|
|
16
|
-
repoDetail(did: string): Promise<RepoViewDetail | undefined>;
|
|
17
|
-
fetchRecords(subjects: RecordSubject[]): Promise<Map<string, {
|
|
18
|
-
uri: string;
|
|
19
|
-
cid: string;
|
|
20
|
-
value: Record<string, unknown>;
|
|
21
|
-
indexedAt: string;
|
|
22
|
-
}>>;
|
|
23
|
-
records(subjects: RecordSubject[]): Promise<Map<string, RecordView>>;
|
|
24
|
-
recordDetail(subject: RecordSubject): Promise<RecordViewDetail | undefined>;
|
|
25
|
-
formatReport(report: ModerationEventRowWithHandle): ReportOutput;
|
|
26
|
-
subject(subject: string): Promise<SubjectView>;
|
|
27
|
-
blob(blobs: BlobRef[]): Promise<BlobView[]>;
|
|
28
|
-
labels(subject: string, includeNeg?: boolean): Promise<Label[]>;
|
|
29
|
-
getSubjectStatus(subjects: string[]): Promise<Map<string, ModerationSubjectStatusRowWithHandle>>;
|
|
30
|
-
formatSubjectStatus(status: ModerationSubjectStatusRowWithHandle): SubjectStatusView;
|
|
31
|
-
}
|
|
32
|
-
declare type RecordSubject = {
|
|
33
|
-
uri: string;
|
|
34
|
-
cid?: string;
|
|
35
|
-
};
|
|
36
|
-
declare type SubjectView = ModEventViewDetail['subject'] & ReportViewDetail['subject'];
|
|
37
|
-
export declare function getSelfLabels(details: {
|
|
38
|
-
uri: string | null;
|
|
39
|
-
cid: string | null;
|
|
40
|
-
record: Record<string, unknown> | null;
|
|
41
|
-
}): Label[];
|
|
42
|
-
export {};
|
package/dist/services/types.d.ts
DELETED
package/dist/util/date.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function addHoursToDate(hours: number, startingDate?: Date): Date;
|
package/dist/util/debug.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const debugCatch: <Func extends (...args: any[]) => any>(fn: Func) => (...args: Parameters<Func>) => Promise<ReturnType<Func>>;
|
package/dist/util/retry.d.ts
DELETED
package/test.log
DELETED
|
Binary file
|
|
File without changes
|
|
File without changes
|