@atproto/api 0.32.0 → 0.32.1
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 +8 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +9 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +266 -4
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +163 -2
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/emitEvents.d.ts +77 -0
- package/dist/client/types/tools/ozone/moderation/emitEvents.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/moderation/emitEvents.js +58 -0
- package/dist/client/types/tools/ozone/moderation/emitEvents.js.map +1 -0
- package/dist/client/types/tools/ozone/report/closeReports.d.ts +3 -1
- package/dist/client/types/tools/ozone/report/closeReports.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/report/closeReports.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import { type ValidationResult } from '@atproto/lexicon';
|
|
6
|
+
import { type $Typed } from '../../../../util.js';
|
|
7
|
+
import type * as ToolsOzoneModerationDefs from './defs.js';
|
|
8
|
+
import type * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs.js';
|
|
9
|
+
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js';
|
|
10
|
+
import type * as ToolsOzoneModerationEmitEvent from './emitEvent.js';
|
|
11
|
+
export type QueryParams = {};
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
event: $Typed<ToolsOzoneModerationDefs.ModEventTakedown> | $Typed<ToolsOzoneModerationDefs.ModEventAcknowledge> | $Typed<ToolsOzoneModerationDefs.ModEventLabel> | $Typed<ToolsOzoneModerationDefs.ModEventReport> | $Typed<ToolsOzoneModerationDefs.ModEventReverseTakedown> | $Typed<ToolsOzoneModerationDefs.ModEventResolveAppeal> | $Typed<ToolsOzoneModerationDefs.ModEventEmail> | $Typed<ToolsOzoneModerationDefs.ModEventTag> | $Typed<ToolsOzoneModerationDefs.RevokeAccountCredentialsEvent> | {
|
|
14
|
+
$type: string;
|
|
15
|
+
};
|
|
16
|
+
/** Array of subjects to apply the moderation event to. */
|
|
17
|
+
subjects: SubjectEntry[];
|
|
18
|
+
createdBy: string;
|
|
19
|
+
modTool?: ToolsOzoneModerationDefs.ModTool;
|
|
20
|
+
}
|
|
21
|
+
export interface OutputSchema {
|
|
22
|
+
/** Successfully processed moderation events. */
|
|
23
|
+
events: ToolsOzoneModerationDefs.ModEventView[];
|
|
24
|
+
/** Events that failed to process. */
|
|
25
|
+
failedEvents: FailedEvent[];
|
|
26
|
+
}
|
|
27
|
+
export interface CallOptions {
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
headers?: HeadersMap;
|
|
30
|
+
qp?: QueryParams;
|
|
31
|
+
encoding?: 'application/json';
|
|
32
|
+
}
|
|
33
|
+
export interface Response {
|
|
34
|
+
success: boolean;
|
|
35
|
+
headers: HeadersMap;
|
|
36
|
+
data: OutputSchema;
|
|
37
|
+
}
|
|
38
|
+
export declare class InvalidLabelError extends XRPCError {
|
|
39
|
+
constructor(src: XRPCError);
|
|
40
|
+
}
|
|
41
|
+
export declare class DuplicateSubjectsError extends XRPCError {
|
|
42
|
+
constructor(src: XRPCError);
|
|
43
|
+
}
|
|
44
|
+
export declare class EmptySubjectsError extends XRPCError {
|
|
45
|
+
constructor(src: XRPCError);
|
|
46
|
+
}
|
|
47
|
+
export declare class UnsupportedEventError extends XRPCError {
|
|
48
|
+
constructor(src: XRPCError);
|
|
49
|
+
}
|
|
50
|
+
export declare function toKnownErr(e: any): any;
|
|
51
|
+
/** A subject with optional blob CIDs, external event ID, and report-level targeting. Report targeting applies only to this entry. */
|
|
52
|
+
export interface SubjectEntry {
|
|
53
|
+
$type?: 'tools.ozone.moderation.emitEvents#subjectEntry';
|
|
54
|
+
subject: $Typed<ComAtprotoAdminDefs.RepoRef> | $Typed<ComAtprotoRepoStrongRef.Main> | {
|
|
55
|
+
$type: string;
|
|
56
|
+
};
|
|
57
|
+
subjectBlobCids?: string[];
|
|
58
|
+
/** Deduplicate events of this type for this subject using an external ID. */
|
|
59
|
+
externalId?: string;
|
|
60
|
+
reportAction?: ToolsOzoneModerationEmitEvent.ReportAction;
|
|
61
|
+
}
|
|
62
|
+
export declare function isSubjectEntry<V>(v: V): v is import("../../../../util.js").$TypedObject<V, "tools.ozone.moderation.emitEvents", "subjectEntry">;
|
|
63
|
+
export declare function validateSubjectEntry<V>(v: V): ValidationResult<SubjectEntry & V>;
|
|
64
|
+
/** An event that failed to process. */
|
|
65
|
+
export interface FailedEvent {
|
|
66
|
+
$type?: 'tools.ozone.moderation.emitEvents#failedEvent';
|
|
67
|
+
/** Error message describing the reason for failure. */
|
|
68
|
+
error: string;
|
|
69
|
+
/** Typed error identifier for programmatic handling. Omitted when the error is unexpected/uncategorized. */
|
|
70
|
+
errorName?: 'InvalidSubject' | 'SubjectHasAction' | 'AlreadyTakendown' | 'NotTakendown' | 'DuplicateExternalId' | 'InvalidConfiguration' | 'InvalidRequest' | (string & {});
|
|
71
|
+
subject: $Typed<ComAtprotoAdminDefs.RepoRef> | $Typed<ComAtprotoRepoStrongRef.Main> | {
|
|
72
|
+
$type: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export declare function isFailedEvent<V>(v: V): v is import("../../../../util.js").$TypedObject<V, "tools.ozone.moderation.emitEvents", "failedEvent">;
|
|
76
|
+
export declare function validateFailedEvent<V>(v: V): ValidationResult<FailedEvent & V>;
|
|
77
|
+
//# sourceMappingURL=emitEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitEvents.d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,CAAC,sCAE3C;AAED,uCAAuC;AACvC,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,+CAA+C,CAAA;IACvD,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,4GAA4G;IAC5G,SAAS,CAAC,EACN,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,gBAAgB,GAChB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACjB,OAAO,EACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,GACnC,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,GACpC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CACtB;AAID,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,0GAEpC;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,qCAE1C"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import { BlobRef } from '@atproto/lexicon';
|
|
6
|
+
import { CID } from 'multiformats/cid';
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons.js';
|
|
8
|
+
import { is$typed as _is$typed, } from '../../../../util.js';
|
|
9
|
+
const is$typed = _is$typed, validate = _validate;
|
|
10
|
+
const id = 'tools.ozone.moderation.emitEvents';
|
|
11
|
+
export class InvalidLabelError extends XRPCError {
|
|
12
|
+
constructor(src) {
|
|
13
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export class DuplicateSubjectsError extends XRPCError {
|
|
17
|
+
constructor(src) {
|
|
18
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export class EmptySubjectsError extends XRPCError {
|
|
22
|
+
constructor(src) {
|
|
23
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class UnsupportedEventError extends XRPCError {
|
|
27
|
+
constructor(src) {
|
|
28
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function toKnownErr(e) {
|
|
32
|
+
if (e instanceof XRPCError) {
|
|
33
|
+
if (e.error === 'InvalidLabel')
|
|
34
|
+
return new InvalidLabelError(e);
|
|
35
|
+
if (e.error === 'DuplicateSubjects')
|
|
36
|
+
return new DuplicateSubjectsError(e);
|
|
37
|
+
if (e.error === 'EmptySubjects')
|
|
38
|
+
return new EmptySubjectsError(e);
|
|
39
|
+
if (e.error === 'UnsupportedEvent')
|
|
40
|
+
return new UnsupportedEventError(e);
|
|
41
|
+
}
|
|
42
|
+
return e;
|
|
43
|
+
}
|
|
44
|
+
const hashSubjectEntry = 'subjectEntry';
|
|
45
|
+
export function isSubjectEntry(v) {
|
|
46
|
+
return is$typed(v, id, hashSubjectEntry);
|
|
47
|
+
}
|
|
48
|
+
export function validateSubjectEntry(v) {
|
|
49
|
+
return validate(v, id, hashSubjectEntry);
|
|
50
|
+
}
|
|
51
|
+
const hashFailedEvent = 'failedEvent';
|
|
52
|
+
export function isFailedEvent(v) {
|
|
53
|
+
return is$typed(v, id, hashFailedEvent);
|
|
54
|
+
}
|
|
55
|
+
export function validateFailedEvent(v) {
|
|
56
|
+
return validate(v, id, hashFailedEvent);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=emitEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitEvents.js","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/moderation/emitEvents.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAmB,SAAS,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO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IACxE,CAAC;CACF;AAED,MAAM,UAAU,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,SAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,CAAC,KAAK,KAAK,cAAc;YAAE,OAAO,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAA;QAC/D,IAAI,CAAC,CAAC,KAAK,KAAK,mBAAmB;YAAE,OAAO,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAA;QACzE,IAAI,CAAC,CAAC,KAAK,KAAK,eAAe;YAAE,OAAO,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAA;QACjE,IAAI,CAAC,CAAC,KAAK,KAAK,kBAAkB;YAAE,OAAO,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAA;IACzE,CAAC;IAED,OAAO,CAAC,CAAA;AACV,CAAC;AAeD,MAAM,gBAAgB,GAAG,cAAc,CAAA;AAEvC,MAAM,UAAU,cAAc,CAAI,CAAI;IACpC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC1C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAI,CAAI;IAC1C,OAAO,QAAQ,CAAmB,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC5D,CAAC;AAuBD,MAAM,eAAe,GAAG,aAAa,CAAA;AAErC,MAAM,UAAU,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;AACzC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAI,CAAI;IACzC,OAAO,QAAQ,CAAkB,CAAC,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;AAC1D,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type HeadersMap, XRPCError } from '@atproto/xrpc'\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons.js'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util.js'\nimport type * as ToolsOzoneModerationDefs from './defs.js'\nimport type * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs.js'\nimport type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'\nimport type * as ToolsOzoneModerationEmitEvent from './emitEvent.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'tools.ozone.moderation.emitEvents'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n event:\n | $Typed<ToolsOzoneModerationDefs.ModEventTakedown>\n | $Typed<ToolsOzoneModerationDefs.ModEventAcknowledge>\n | $Typed<ToolsOzoneModerationDefs.ModEventLabel>\n | $Typed<ToolsOzoneModerationDefs.ModEventReport>\n | $Typed<ToolsOzoneModerationDefs.ModEventReverseTakedown>\n | $Typed<ToolsOzoneModerationDefs.ModEventResolveAppeal>\n | $Typed<ToolsOzoneModerationDefs.ModEventEmail>\n | $Typed<ToolsOzoneModerationDefs.ModEventTag>\n | $Typed<ToolsOzoneModerationDefs.RevokeAccountCredentialsEvent>\n | { $type: string }\n /** Array of subjects to apply the moderation event to. */\n subjects: SubjectEntry[]\n createdBy: string\n modTool?: ToolsOzoneModerationDefs.ModTool\n}\n\nexport interface OutputSchema {\n /** Successfully processed moderation events. */\n events: ToolsOzoneModerationDefs.ModEventView[]\n /** Events that failed to process. */\n failedEvents: FailedEvent[]\n}\n\nexport interface CallOptions {\n signal?: AbortSignal\n headers?: HeadersMap\n qp?: QueryParams\n encoding?: 'application/json'\n}\n\nexport interface Response {\n success: boolean\n headers: HeadersMap\n data: OutputSchema\n}\n\nexport class InvalidLabelError extends XRPCError {\n constructor(src: XRPCError) {\n super(src.status, src.error, src.message, src.headers, { cause: src })\n }\n}\n\nexport class DuplicateSubjectsError extends XRPCError {\n constructor(src: XRPCError) {\n super(src.status, src.error, src.message, src.headers, { cause: src })\n }\n}\n\nexport class EmptySubjectsError extends XRPCError {\n constructor(src: XRPCError) {\n super(src.status, src.error, src.message, src.headers, { cause: src })\n }\n}\n\nexport class UnsupportedEventError extends XRPCError {\n constructor(src: XRPCError) {\n super(src.status, src.error, src.message, src.headers, { cause: src })\n }\n}\n\nexport function toKnownErr(e: any) {\n if (e instanceof XRPCError) {\n if (e.error === 'InvalidLabel') return new InvalidLabelError(e)\n if (e.error === 'DuplicateSubjects') return new DuplicateSubjectsError(e)\n if (e.error === 'EmptySubjects') return new EmptySubjectsError(e)\n if (e.error === 'UnsupportedEvent') return new UnsupportedEventError(e)\n }\n\n return e\n}\n\n/** A subject with optional blob CIDs, external event ID, and report-level targeting. Report targeting applies only to this entry. */\nexport interface SubjectEntry {\n $type?: 'tools.ozone.moderation.emitEvents#subjectEntry'\n subject:\n | $Typed<ComAtprotoAdminDefs.RepoRef>\n | $Typed<ComAtprotoRepoStrongRef.Main>\n | { $type: string }\n subjectBlobCids?: string[]\n /** Deduplicate events of this type for this subject using an external ID. */\n externalId?: string\n reportAction?: ToolsOzoneModerationEmitEvent.ReportAction\n}\n\nconst hashSubjectEntry = 'subjectEntry'\n\nexport function isSubjectEntry<V>(v: V) {\n return is$typed(v, id, hashSubjectEntry)\n}\n\nexport function validateSubjectEntry<V>(v: V) {\n return validate<SubjectEntry & V>(v, id, hashSubjectEntry)\n}\n\n/** An event that failed to process. */\nexport interface FailedEvent {\n $type?: 'tools.ozone.moderation.emitEvents#failedEvent'\n /** Error message describing the reason for failure. */\n error: string\n /** Typed error identifier for programmatic handling. Omitted when the error is unexpected/uncategorized. */\n errorName?:\n | 'InvalidSubject'\n | 'SubjectHasAction'\n | 'AlreadyTakendown'\n | 'NotTakendown'\n | 'DuplicateExternalId'\n | 'InvalidConfiguration'\n | 'InvalidRequest'\n | (string & {})\n subject:\n | $Typed<ComAtprotoAdminDefs.RepoRef>\n | $Typed<ComAtprotoRepoStrongRef.Main>\n | { $type: string }\n}\n\nconst hashFailedEvent = 'failedEvent'\n\nexport function isFailedEvent<V>(v: V) {\n return is$typed(v, id, hashFailedEvent)\n}\n\nexport function validateFailedEvent<V>(v: V) {\n return validate<FailedEvent & V>(v, id, hashFailedEvent)\n}\n"]}
|
|
@@ -8,7 +8,9 @@ export interface InputSchema {
|
|
|
8
8
|
subject: string;
|
|
9
9
|
/** If true, also close reports on all subjects owned by the account, including records, messages, and conversations. Only valid when subject is an account DID. */
|
|
10
10
|
includeAllOwned?: boolean;
|
|
11
|
-
/**
|
|
11
|
+
/** An explicitly targeted report in the requested subject scope. It is included even if assigned, escalated, or not in reportTypes; excludedReportTypes still applies. */
|
|
12
|
+
reportId?: number;
|
|
13
|
+
/** If nonempty, eligible reports of the given report types (fully qualified reason NSIDs) are closed, in addition to reportId. When omitted or empty, all eligible reports in the requested subject scope are targeted, except excludedReportTypes. Assigned, escalated, and actively assigned reports are excluded unless explicitly targeted by reportId. */
|
|
12
14
|
reportTypes?: string[];
|
|
13
15
|
/** Reports of these types (fully qualified reason NSIDs) are excluded from closure and left unchanged. When omitted or empty, no report types are excluded. */
|
|
14
16
|
excludedReportTypes?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeReports.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/report/closeReports.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,UAAU,EAAa,MAAM,eAAe,CAAA;AAc1D,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,2GAA2G;IAC3G,OAAO,EAAE,MAAM,CAAA;IACf,mKAAmK;IACnK,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,
|
|
1
|
+
{"version":3,"file":"closeReports.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/report/closeReports.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,UAAU,EAAa,MAAM,eAAe,CAAA;AAc1D,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,2GAA2G;IAC3G,OAAO,EAAE,MAAM,CAAA;IACf,mKAAmK;IACnK,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,0KAA0K;IAC1K,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+VAA+V;IAC/V,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,+JAA+J;IAC/J,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,mSAAmS;IACnS,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yFAAyF;IACzF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kHAAkH;IAClH,IAAI,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeReports.js","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/report/closeReports.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAmB,SAAS,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAyB,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAEL,QAAQ,IAAI,SAAS,GAEtB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,QAAQ,GAAG,SAAS,EACxB,QAAQ,GAAG,SAAS,CAAA;AACtB,MAAM,EAAE,GAAG,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"closeReports.js","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/report/closeReports.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAmB,SAAS,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAyB,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAEL,QAAQ,IAAI,SAAS,GAEtB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,QAAQ,GAAG,SAAS,EACxB,QAAQ,GAAG,SAAS,CAAA;AACtB,MAAM,EAAE,GAAG,iCAAiC,CAAA;AA6C5C,MAAM,UAAU,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type HeadersMap, XRPCError } from '@atproto/xrpc'\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons.js'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'tools.ozone.report.closeReports'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n /** Subject DID (account-level reports) or AT-URI (record-level reports) whose reports should be closed. */\n subject: string\n /** If true, also close reports on all subjects owned by the account, including records, messages, and conversations. Only valid when subject is an account DID. */\n includeAllOwned?: boolean\n /** An explicitly targeted report in the requested subject scope. It is included even if assigned, escalated, or not in reportTypes; excludedReportTypes still applies. */\n reportId?: number\n /** If nonempty, eligible reports of the given report types (fully qualified reason NSIDs) are closed, in addition to reportId. When omitted or empty, all eligible reports in the requested subject scope are targeted, except excludedReportTypes. Assigned, escalated, and actively assigned reports are excluded unless explicitly targeted by reportId. */\n reportTypes?: string[]\n /** Reports of these types (fully qualified reason NSIDs) are excluded from closure and left unchanged. When omitted or empty, no report types are excluded. */\n excludedReportTypes?: string[]\n /** Optional existing moderation event that closes reports. It must target the exact subject or its owning account; account-wide closure requires an account event. The event is linked to each closed report and may predate the report. The link does not imply the action is still in effect. */\n actionEventId?: number\n /** Optional moderator-only note recorded on each close activity. Not visible to reporters. */\n internalNote?: string\n /** Set true when this action is triggered by an automated process. Defaults to false. */\n isAutomated?: boolean\n /** Optional metadata for the report activities. Lifecycle and resolution fields are controlled by the service. */\n meta?: { [_ in string]: unknown }\n}\n\nexport interface OutputSchema {\n /** Number of reports that were transitioned to closed. */\n closedCount: number\n /** IDs of the reports that were closed. */\n reportIds: number[]\n}\n\nexport interface CallOptions {\n signal?: AbortSignal\n headers?: HeadersMap\n qp?: QueryParams\n encoding?: 'application/json'\n}\n\nexport interface Response {\n success: boolean\n headers: HeadersMap\n data: OutputSchema\n}\n\nexport function toKnownErr(e: any) {\n return e\n}\n"]}
|