@atproto/ozone 0.1.140 → 0.1.141

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/api/moderation/emitEvent.d.ts.map +1 -1
  3. package/dist/api/moderation/emitEvent.js +3 -0
  4. package/dist/api/moderation/emitEvent.js.map +1 -1
  5. package/dist/api/report/createReport.d.ts.map +1 -1
  6. package/dist/api/report/createReport.js +7 -5
  7. package/dist/api/report/createReport.js.map +1 -1
  8. package/dist/api/util.d.ts +2 -3
  9. package/dist/api/util.d.ts.map +1 -1
  10. package/dist/api/util.js +7 -17
  11. package/dist/api/util.js.map +1 -1
  12. package/dist/config/config.d.ts +1 -0
  13. package/dist/config/config.d.ts.map +1 -1
  14. package/dist/config/config.js +1 -0
  15. package/dist/config/config.js.map +1 -1
  16. package/dist/config/env.d.ts +1 -0
  17. package/dist/config/env.d.ts.map +1 -1
  18. package/dist/config/env.js +1 -0
  19. package/dist/config/env.js.map +1 -1
  20. package/dist/context.d.ts +3 -0
  21. package/dist/context.d.ts.map +1 -1
  22. package/dist/context.js +6 -0
  23. package/dist/context.js.map +1 -1
  24. package/dist/db/migrations/20250718T150931000Z-update-appeal-reason-stats.d.ts +5 -0
  25. package/dist/db/migrations/20250718T150931000Z-update-appeal-reason-stats.d.ts.map +1 -0
  26. package/dist/db/migrations/20250718T150931000Z-update-appeal-reason-stats.js +228 -0
  27. package/dist/db/migrations/20250718T150931000Z-update-appeal-reason-stats.js.map +1 -0
  28. package/dist/db/migrations/index.d.ts +1 -0
  29. package/dist/db/migrations/index.d.ts.map +1 -1
  30. package/dist/db/migrations/index.js +2 -1
  31. package/dist/db/migrations/index.js.map +1 -1
  32. package/dist/lexicon/index.d.ts +49 -0
  33. package/dist/lexicon/index.d.ts.map +1 -1
  34. package/dist/lexicon/index.js +52 -1
  35. package/dist/lexicon/index.js.map +1 -1
  36. package/dist/lexicon/lexicons.d.ts +470 -16
  37. package/dist/lexicon/lexicons.d.ts.map +1 -1
  38. package/dist/lexicon/lexicons.js +329 -7
  39. package/dist/lexicon/lexicons.js.map +1 -1
  40. package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +8 -8
  41. package/dist/lexicon/types/com/atproto/moderation/defs.d.ts.map +1 -1
  42. package/dist/lexicon/types/com/atproto/moderation/defs.js +7 -7
  43. package/dist/lexicon/types/com/atproto/moderation/defs.js.map +1 -1
  44. package/dist/lexicon/types/com/atproto/temp/dereferenceScope.d.ts +24 -0
  45. package/dist/lexicon/types/com/atproto/temp/dereferenceScope.d.ts.map +1 -0
  46. package/dist/lexicon/types/com/atproto/temp/dereferenceScope.js +7 -0
  47. package/dist/lexicon/types/com/atproto/temp/dereferenceScope.js.map +1 -0
  48. package/dist/lexicon/types/tools/ozone/report/defs.d.ts +92 -0
  49. package/dist/lexicon/types/tools/ozone/report/defs.d.ts.map +1 -0
  50. package/dist/lexicon/types/tools/ozone/report/defs.js +98 -0
  51. package/dist/lexicon/types/tools/ozone/report/defs.js.map +1 -0
  52. package/dist/mod-service/profile.d.ts +15 -0
  53. package/dist/mod-service/profile.d.ts.map +1 -0
  54. package/dist/mod-service/profile.js +135 -0
  55. package/dist/mod-service/profile.js.map +1 -0
  56. package/dist/mod-service/status.d.ts.map +1 -1
  57. package/dist/mod-service/status.js +18 -17
  58. package/dist/mod-service/status.js.map +1 -1
  59. package/dist/tag-service/util.d.ts.map +1 -1
  60. package/dist/tag-service/util.js +7 -1
  61. package/dist/tag-service/util.js.map +1 -1
  62. package/package.json +9 -9
  63. package/src/api/moderation/emitEvent.ts +4 -0
  64. package/src/api/report/createReport.ts +9 -9
  65. package/src/api/util.ts +7 -28
  66. package/src/config/config.ts +3 -1
  67. package/src/config/env.ts +2 -0
  68. package/src/context.ts +14 -0
  69. package/src/db/migrations/20250718T150931000Z-update-appeal-reason-stats.ts +311 -0
  70. package/src/db/migrations/index.ts +1 -0
  71. package/src/lexicon/index.ts +82 -0
  72. package/src/lexicon/lexicons.ts +341 -7
  73. package/src/lexicon/types/com/atproto/moderation/defs.ts +52 -7
  74. package/src/lexicon/types/com/atproto/temp/dereferenceScope.ts +42 -0
  75. package/src/lexicon/types/tools/ozone/report/defs.ts +154 -0
  76. package/src/mod-service/profile.ts +143 -0
  77. package/src/mod-service/status.ts +3 -2
  78. package/src/tag-service/util.ts +9 -1
  79. package/tests/__snapshots__/report-reason.test.ts.snap +14 -0
  80. package/tests/report-reason.test.ts +154 -0
  81. package/tsconfig.build.tsbuildinfo +1 -1
  82. package/tsconfig.tests.tsbuildinfo +1 -1
@@ -1,17 +1,17 @@
1
- export type ReasonType = 'com.atproto.moderation.defs#reasonSpam' | 'com.atproto.moderation.defs#reasonViolation' | 'com.atproto.moderation.defs#reasonMisleading' | 'com.atproto.moderation.defs#reasonSexual' | 'com.atproto.moderation.defs#reasonRude' | 'com.atproto.moderation.defs#reasonOther' | 'com.atproto.moderation.defs#reasonAppeal' | (string & {});
2
- /** Spam: frequent unwanted promotion, replies, mentions */
1
+ export type ReasonType = 'com.atproto.moderation.defs#reasonSpam' | 'com.atproto.moderation.defs#reasonViolation' | 'com.atproto.moderation.defs#reasonMisleading' | 'com.atproto.moderation.defs#reasonSexual' | 'com.atproto.moderation.defs#reasonRude' | 'com.atproto.moderation.defs#reasonOther' | 'com.atproto.moderation.defs#reasonAppeal' | 'tools.ozone.report.defs#reasonAppeal' | 'tools.ozone.report.defs#reasonViolenceAnimalWelfare' | 'tools.ozone.report.defs#reasonViolenceThreats' | 'tools.ozone.report.defs#reasonViolenceGraphicContent' | 'tools.ozone.report.defs#reasonViolenceSelfHarm' | 'tools.ozone.report.defs#reasonViolenceGlorification' | 'tools.ozone.report.defs#reasonViolenceExtremistContent' | 'tools.ozone.report.defs#reasonViolenceTrafficking' | 'tools.ozone.report.defs#reasonViolenceOther' | 'tools.ozone.report.defs#reasonSexualAbuseContent' | 'tools.ozone.report.defs#reasonSexualNCII' | 'tools.ozone.report.defs#reasonSexualSextortion' | 'tools.ozone.report.defs#reasonSexualDeepfake' | 'tools.ozone.report.defs#reasonSexualAnimal' | 'tools.ozone.report.defs#reasonSexualUnlabeled' | 'tools.ozone.report.defs#reasonSexualOther' | 'tools.ozone.report.defs#reasonChildSafetyCSAM' | 'tools.ozone.report.defs#reasonChildSafetyGroom' | 'tools.ozone.report.defs#reasonChildSafetyMinorPrivacy' | 'tools.ozone.report.defs#reasonChildSafetyEndangerment' | 'tools.ozone.report.defs#reasonChildSafetyHarassment' | 'tools.ozone.report.defs#reasonChildSafetyPromotion' | 'tools.ozone.report.defs#reasonChildSafetyOther' | 'tools.ozone.report.defs#reasonHarassmentTroll' | 'tools.ozone.report.defs#reasonHarassmentTargeted' | 'tools.ozone.report.defs#reasonHarassmentHateSpeech' | 'tools.ozone.report.defs#reasonHarassmentDoxxing' | 'tools.ozone.report.defs#reasonHarassmentOther' | 'tools.ozone.report.defs#reasonMisleadingBot' | 'tools.ozone.report.defs#reasonMisleadingImpersonation' | 'tools.ozone.report.defs#reasonMisleadingSpam' | 'tools.ozone.report.defs#reasonMisleadingScam' | 'tools.ozone.report.defs#reasonMisleadingSyntheticContent' | 'tools.ozone.report.defs#reasonMisleadingMisinformation' | 'tools.ozone.report.defs#reasonMisleadingOther' | 'tools.ozone.report.defs#reasonRuleSiteSecurity' | 'tools.ozone.report.defs#reasonRuleStolenContent' | 'tools.ozone.report.defs#reasonRuleProhibitedSales' | 'tools.ozone.report.defs#reasonRuleBanEvasion' | 'tools.ozone.report.defs#reasonRuleOther' | 'tools.ozone.report.defs#reasonCivicElectoralProcess' | 'tools.ozone.report.defs#reasonCivicDisclosure' | 'tools.ozone.report.defs#reasonCivicInterference' | 'tools.ozone.report.defs#reasonCivicMisinformation' | 'tools.ozone.report.defs#reasonCivicImpersonation' | (string & {});
2
+ /** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. */
3
3
  export declare const REASONSPAM = "com.atproto.moderation.defs#reasonSpam";
4
- /** Direct violation of server rules, laws, terms of service */
4
+ /** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. */
5
5
  export declare const REASONVIOLATION = "com.atproto.moderation.defs#reasonViolation";
6
- /** Misleading identity, affiliation, or content */
6
+ /** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. */
7
7
  export declare const REASONMISLEADING = "com.atproto.moderation.defs#reasonMisleading";
8
- /** Unwanted or mislabeled sexual content */
8
+ /** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. */
9
9
  export declare const REASONSEXUAL = "com.atproto.moderation.defs#reasonSexual";
10
- /** Rude, harassing, explicit, or otherwise unwelcoming behavior */
10
+ /** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. */
11
11
  export declare const REASONRUDE = "com.atproto.moderation.defs#reasonRude";
12
- /** Other: reports not falling under another report category */
12
+ /** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. */
13
13
  export declare const REASONOTHER = "com.atproto.moderation.defs#reasonOther";
14
- /** Appeal: appeal a previously taken moderation action */
14
+ /** Appeal a previously taken moderation action */
15
15
  export declare const REASONAPPEAL = "com.atproto.moderation.defs#reasonAppeal";
16
16
  /** Tag describing a type of subject that might be reported. */
17
17
  export type SubjectType = 'account' | 'record' | 'chat' | (string & {});
@@ -1 +1 @@
1
- {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/moderation/defs.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,UAAU,GAClB,wCAAwC,GACxC,6CAA6C,GAC7C,8CAA8C,GAC9C,0CAA0C,GAC1C,wCAAwC,GACxC,yCAAyC,GACzC,0CAA0C,GAC1C,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,2DAA2D;AAC3D,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,eAAe,gDAA0B,CAAA;AACtD,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,iDAA2B,CAAA;AACxD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,6CAAuB,CAAA;AAChD,mEAAmE;AACnE,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,WAAW,4CAAsB,CAAA;AAC9C,0DAA0D;AAC1D,eAAO,MAAM,YAAY,6CAAuB,CAAA;AAEhD,+DAA+D;AAC/D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/moderation/defs.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,UAAU,GAClB,wCAAwC,GACxC,6CAA6C,GAC7C,8CAA8C,GAC9C,0CAA0C,GAC1C,wCAAwC,GACxC,yCAAyC,GACzC,0CAA0C,GAC1C,sCAAsC,GACtC,qDAAqD,GACrD,+CAA+C,GAC/C,sDAAsD,GACtD,gDAAgD,GAChD,qDAAqD,GACrD,wDAAwD,GACxD,mDAAmD,GACnD,6CAA6C,GAC7C,kDAAkD,GAClD,0CAA0C,GAC1C,gDAAgD,GAChD,8CAA8C,GAC9C,4CAA4C,GAC5C,+CAA+C,GAC/C,2CAA2C,GAC3C,+CAA+C,GAC/C,gDAAgD,GAChD,uDAAuD,GACvD,uDAAuD,GACvD,qDAAqD,GACrD,oDAAoD,GACpD,gDAAgD,GAChD,+CAA+C,GAC/C,kDAAkD,GAClD,oDAAoD,GACpD,iDAAiD,GACjD,+CAA+C,GAC/C,6CAA6C,GAC7C,uDAAuD,GACvD,8CAA8C,GAC9C,8CAA8C,GAC9C,0DAA0D,GAC1D,wDAAwD,GACxD,+CAA+C,GAC/C,gDAAgD,GAChD,iDAAiD,GACjD,mDAAmD,GACnD,8CAA8C,GAC9C,yCAAyC,GACzC,qDAAqD,GACrD,+CAA+C,GAC/C,iDAAiD,GACjD,mDAAmD,GACnD,kDAAkD,GAClD,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,0IAA0I;AAC1I,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,yIAAyI;AACzI,eAAO,MAAM,eAAe,gDAA0B,CAAA;AACtD,mIAAmI;AACnI,eAAO,MAAM,gBAAgB,iDAA2B,CAAA;AACxD,4HAA4H;AAC5H,eAAO,MAAM,YAAY,6CAAuB,CAAA;AAChD,mJAAmJ;AACnJ,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,kIAAkI;AAClI,eAAO,MAAM,WAAW,4CAAsB,CAAA;AAC9C,kDAAkD;AAClD,eAAO,MAAM,YAAY,6CAAuB,CAAA;AAEhD,+DAA+D;AAC/D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
@@ -5,18 +5,18 @@ const lexicons_1 = require("../../../../lexicons");
5
5
  const util_1 = require("../../../../util");
6
6
  const is$typed = util_1.is$typed, validate = lexicons_1.validate;
7
7
  const id = 'com.atproto.moderation.defs';
8
- /** Spam: frequent unwanted promotion, replies, mentions */
8
+ /** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. */
9
9
  exports.REASONSPAM = `${id}#reasonSpam`;
10
- /** Direct violation of server rules, laws, terms of service */
10
+ /** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. */
11
11
  exports.REASONVIOLATION = `${id}#reasonViolation`;
12
- /** Misleading identity, affiliation, or content */
12
+ /** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. */
13
13
  exports.REASONMISLEADING = `${id}#reasonMisleading`;
14
- /** Unwanted or mislabeled sexual content */
14
+ /** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. */
15
15
  exports.REASONSEXUAL = `${id}#reasonSexual`;
16
- /** Rude, harassing, explicit, or otherwise unwelcoming behavior */
16
+ /** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. */
17
17
  exports.REASONRUDE = `${id}#reasonRude`;
18
- /** Other: reports not falling under another report category */
18
+ /** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. */
19
19
  exports.REASONOTHER = `${id}#reasonOther`;
20
- /** Appeal: appeal a previously taken moderation action */
20
+ /** Appeal a previously taken moderation action */
21
21
  exports.REASONAPPEAL = `${id}#reasonAppeal`;
22
22
  //# sourceMappingURL=defs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/moderation/defs.ts"],"names":[],"mappings":";;;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,6BAA6B,CAAA;AAYxC,2DAA2D;AAC9C,QAAA,UAAU,GAAG,GAAG,EAAE,aAAa,CAAA;AAC5C,+DAA+D;AAClD,QAAA,eAAe,GAAG,GAAG,EAAE,kBAAkB,CAAA;AACtD,mDAAmD;AACtC,QAAA,gBAAgB,GAAG,GAAG,EAAE,mBAAmB,CAAA;AACxD,4CAA4C;AAC/B,QAAA,YAAY,GAAG,GAAG,EAAE,eAAe,CAAA;AAChD,mEAAmE;AACtD,QAAA,UAAU,GAAG,GAAG,EAAE,aAAa,CAAA;AAC5C,+DAA+D;AAClD,QAAA,WAAW,GAAG,GAAG,EAAE,cAAc,CAAA;AAC9C,0DAA0D;AAC7C,QAAA,YAAY,GAAG,GAAG,EAAE,eAAe,CAAA"}
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/moderation/defs.ts"],"names":[],"mappings":";;;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,6BAA6B,CAAA;AAyDxC,0IAA0I;AAC7H,QAAA,UAAU,GAAG,GAAG,EAAE,aAAa,CAAA;AAC5C,yIAAyI;AAC5H,QAAA,eAAe,GAAG,GAAG,EAAE,kBAAkB,CAAA;AACtD,mIAAmI;AACtH,QAAA,gBAAgB,GAAG,GAAG,EAAE,mBAAmB,CAAA;AACxD,4HAA4H;AAC/G,QAAA,YAAY,GAAG,GAAG,EAAE,eAAe,CAAA;AAChD,mJAAmJ;AACtI,QAAA,UAAU,GAAG,GAAG,EAAE,aAAa,CAAA;AAC5C,kIAAkI;AACrH,QAAA,WAAW,GAAG,GAAG,EAAE,cAAc,CAAA;AAC9C,kDAAkD;AACrC,QAAA,YAAY,GAAG,GAAG,EAAE,eAAe,CAAA"}
@@ -0,0 +1,24 @@
1
+ export type QueryParams = {
2
+ /** The scope reference (starts with 'ref:') */
3
+ scope: string;
4
+ };
5
+ export type InputSchema = undefined;
6
+ export interface OutputSchema {
7
+ /** The full oauth permission scope */
8
+ scope: string;
9
+ }
10
+ export type HandlerInput = void;
11
+ export interface HandlerSuccess {
12
+ encoding: 'application/json';
13
+ body: OutputSchema;
14
+ headers?: {
15
+ [key: string]: string;
16
+ };
17
+ }
18
+ export interface HandlerError {
19
+ status: number;
20
+ message?: string;
21
+ error?: 'InvalidScopeReference';
22
+ }
23
+ export type HandlerOutput = HandlerError | HandlerSuccess;
24
+ //# sourceMappingURL=dereferenceScope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dereferenceScope.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/temp/dereferenceScope.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,uBAAuB,CAAA;CAChC;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lexicons_1 = require("../../../../lexicons");
4
+ const util_1 = require("../../../../util");
5
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
6
+ const id = 'com.atproto.temp.dereferenceScope';
7
+ //# sourceMappingURL=dereferenceScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dereferenceScope.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/temp/dereferenceScope.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,mCAAmC,CAAA"}
@@ -0,0 +1,92 @@
1
+ export type ReasonType = 'tools.ozone.report.defs#reasonAppeal' | 'tools.ozone.report.defs#reasonViolenceAnimalWelfare' | 'tools.ozone.report.defs#reasonViolenceThreats' | 'tools.ozone.report.defs#reasonViolenceGraphicContent' | 'tools.ozone.report.defs#reasonViolenceSelfHarm' | 'tools.ozone.report.defs#reasonViolenceGlorification' | 'tools.ozone.report.defs#reasonViolenceExtremistContent' | 'tools.ozone.report.defs#reasonViolenceTrafficking' | 'tools.ozone.report.defs#reasonViolenceOther' | 'tools.ozone.report.defs#reasonSexualAbuseContent' | 'tools.ozone.report.defs#reasonSexualNCII' | 'tools.ozone.report.defs#reasonSexualSextortion' | 'tools.ozone.report.defs#reasonSexualDeepfake' | 'tools.ozone.report.defs#reasonSexualAnimal' | 'tools.ozone.report.defs#reasonSexualUnlabeled' | 'tools.ozone.report.defs#reasonSexualOther' | 'tools.ozone.report.defs#reasonChildSafetyCSAM' | 'tools.ozone.report.defs#reasonChildSafetyGroom' | 'tools.ozone.report.defs#reasonChildSafetyMinorPrivacy' | 'tools.ozone.report.defs#reasonChildSafetyEndangerment' | 'tools.ozone.report.defs#reasonChildSafetyHarassment' | 'tools.ozone.report.defs#reasonChildSafetyPromotion' | 'tools.ozone.report.defs#reasonChildSafetyOther' | 'tools.ozone.report.defs#reasonHarassmentTroll' | 'tools.ozone.report.defs#reasonHarassmentTargeted' | 'tools.ozone.report.defs#reasonHarassmentHateSpeech' | 'tools.ozone.report.defs#reasonHarassmentDoxxing' | 'tools.ozone.report.defs#reasonHarassmentOther' | 'tools.ozone.report.defs#reasonMisleadingBot' | 'tools.ozone.report.defs#reasonMisleadingImpersonation' | 'tools.ozone.report.defs#reasonMisleadingSpam' | 'tools.ozone.report.defs#reasonMisleadingScam' | 'tools.ozone.report.defs#reasonMisleadingSyntheticContent' | 'tools.ozone.report.defs#reasonMisleadingMisinformation' | 'tools.ozone.report.defs#reasonMisleadingOther' | 'tools.ozone.report.defs#reasonRuleSiteSecurity' | 'tools.ozone.report.defs#reasonRuleStolenContent' | 'tools.ozone.report.defs#reasonRuleProhibitedSales' | 'tools.ozone.report.defs#reasonRuleBanEvasion' | 'tools.ozone.report.defs#reasonRuleOther' | 'tools.ozone.report.defs#reasonCivicElectoralProcess' | 'tools.ozone.report.defs#reasonCivicDisclosure' | 'tools.ozone.report.defs#reasonCivicInterference' | 'tools.ozone.report.defs#reasonCivicMisinformation' | 'tools.ozone.report.defs#reasonCivicImpersonation' | (string & {});
2
+ /** Appeal a previously taken moderation action */
3
+ export declare const REASONAPPEAL = "tools.ozone.report.defs#reasonAppeal";
4
+ /** Animal welfare violations */
5
+ export declare const REASONVIOLENCEANIMALWELFARE = "tools.ozone.report.defs#reasonViolenceAnimalWelfare";
6
+ /** Threats or incitement */
7
+ export declare const REASONVIOLENCETHREATS = "tools.ozone.report.defs#reasonViolenceThreats";
8
+ /** Graphic violent content */
9
+ export declare const REASONVIOLENCEGRAPHICCONTENT = "tools.ozone.report.defs#reasonViolenceGraphicContent";
10
+ /** Self harm */
11
+ export declare const REASONVIOLENCESELFHARM = "tools.ozone.report.defs#reasonViolenceSelfHarm";
12
+ /** Glorification of violence */
13
+ export declare const REASONVIOLENCEGLORIFICATION = "tools.ozone.report.defs#reasonViolenceGlorification";
14
+ /** Extremist content. These reports will be sent only be sent to the application's Moderation Authority. */
15
+ export declare const REASONVIOLENCEEXTREMISTCONTENT = "tools.ozone.report.defs#reasonViolenceExtremistContent";
16
+ /** Human trafficking */
17
+ export declare const REASONVIOLENCETRAFFICKING = "tools.ozone.report.defs#reasonViolenceTrafficking";
18
+ /** Other violent content */
19
+ export declare const REASONVIOLENCEOTHER = "tools.ozone.report.defs#reasonViolenceOther";
20
+ /** Adult sexual abuse content */
21
+ export declare const REASONSEXUALABUSECONTENT = "tools.ozone.report.defs#reasonSexualAbuseContent";
22
+ /** Non-consensual intimate imagery */
23
+ export declare const REASONSEXUALNCII = "tools.ozone.report.defs#reasonSexualNCII";
24
+ /** Sextortion */
25
+ export declare const REASONSEXUALSEXTORTION = "tools.ozone.report.defs#reasonSexualSextortion";
26
+ /** Deepfake adult content */
27
+ export declare const REASONSEXUALDEEPFAKE = "tools.ozone.report.defs#reasonSexualDeepfake";
28
+ /** Animal sexual abuse */
29
+ export declare const REASONSEXUALANIMAL = "tools.ozone.report.defs#reasonSexualAnimal";
30
+ /** Unlabelled adult content */
31
+ export declare const REASONSEXUALUNLABELED = "tools.ozone.report.defs#reasonSexualUnlabeled";
32
+ /** Other sexual violence content */
33
+ export declare const REASONSEXUALOTHER = "tools.ozone.report.defs#reasonSexualOther";
34
+ /** Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority. */
35
+ export declare const REASONCHILDSAFETYCSAM = "tools.ozone.report.defs#reasonChildSafetyCSAM";
36
+ /** Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority. */
37
+ export declare const REASONCHILDSAFETYGROOM = "tools.ozone.report.defs#reasonChildSafetyGroom";
38
+ /** Privacy violation involving a minor */
39
+ export declare const REASONCHILDSAFETYMINORPRIVACY = "tools.ozone.report.defs#reasonChildSafetyMinorPrivacy";
40
+ /** Child endangerment. These reports will be sent only be sent to the application's Moderation Authority. */
41
+ export declare const REASONCHILDSAFETYENDANGERMENT = "tools.ozone.report.defs#reasonChildSafetyEndangerment";
42
+ /** Harassment or bullying of minors */
43
+ export declare const REASONCHILDSAFETYHARASSMENT = "tools.ozone.report.defs#reasonChildSafetyHarassment";
44
+ /** Promotion of child exploitation. These reports will be sent only be sent to the application's Moderation Authority. */
45
+ export declare const REASONCHILDSAFETYPROMOTION = "tools.ozone.report.defs#reasonChildSafetyPromotion";
46
+ /** Other child safety. These reports will be sent only be sent to the application's Moderation Authority. */
47
+ export declare const REASONCHILDSAFETYOTHER = "tools.ozone.report.defs#reasonChildSafetyOther";
48
+ /** Trolling */
49
+ export declare const REASONHARASSMENTTROLL = "tools.ozone.report.defs#reasonHarassmentTroll";
50
+ /** Targeted harassment */
51
+ export declare const REASONHARASSMENTTARGETED = "tools.ozone.report.defs#reasonHarassmentTargeted";
52
+ /** Hate speech */
53
+ export declare const REASONHARASSMENTHATESPEECH = "tools.ozone.report.defs#reasonHarassmentHateSpeech";
54
+ /** Doxxing */
55
+ export declare const REASONHARASSMENTDOXXING = "tools.ozone.report.defs#reasonHarassmentDoxxing";
56
+ /** Other harassing or hateful content */
57
+ export declare const REASONHARASSMENTOTHER = "tools.ozone.report.defs#reasonHarassmentOther";
58
+ /** Fake account or bot */
59
+ export declare const REASONMISLEADINGBOT = "tools.ozone.report.defs#reasonMisleadingBot";
60
+ /** Impersonation */
61
+ export declare const REASONMISLEADINGIMPERSONATION = "tools.ozone.report.defs#reasonMisleadingImpersonation";
62
+ /** Spam */
63
+ export declare const REASONMISLEADINGSPAM = "tools.ozone.report.defs#reasonMisleadingSpam";
64
+ /** Scam */
65
+ export declare const REASONMISLEADINGSCAM = "tools.ozone.report.defs#reasonMisleadingScam";
66
+ /** Unlabelled gen-AI or synthetic content */
67
+ export declare const REASONMISLEADINGSYNTHETICCONTENT = "tools.ozone.report.defs#reasonMisleadingSyntheticContent";
68
+ /** Harmful false claims */
69
+ export declare const REASONMISLEADINGMISINFORMATION = "tools.ozone.report.defs#reasonMisleadingMisinformation";
70
+ /** Other misleading content */
71
+ export declare const REASONMISLEADINGOTHER = "tools.ozone.report.defs#reasonMisleadingOther";
72
+ /** Hacking or system attacks */
73
+ export declare const REASONRULESITESECURITY = "tools.ozone.report.defs#reasonRuleSiteSecurity";
74
+ /** Stolen content */
75
+ export declare const REASONRULESTOLENCONTENT = "tools.ozone.report.defs#reasonRuleStolenContent";
76
+ /** Promoting or selling prohibited items or services */
77
+ export declare const REASONRULEPROHIBITEDSALES = "tools.ozone.report.defs#reasonRuleProhibitedSales";
78
+ /** Banned user returning */
79
+ export declare const REASONRULEBANEVASION = "tools.ozone.report.defs#reasonRuleBanEvasion";
80
+ /** Other */
81
+ export declare const REASONRULEOTHER = "tools.ozone.report.defs#reasonRuleOther";
82
+ /** Electoral process violations */
83
+ export declare const REASONCIVICELECTORALPROCESS = "tools.ozone.report.defs#reasonCivicElectoralProcess";
84
+ /** Disclosure & transparency violations */
85
+ export declare const REASONCIVICDISCLOSURE = "tools.ozone.report.defs#reasonCivicDisclosure";
86
+ /** Voter intimidation or interference */
87
+ export declare const REASONCIVICINTERFERENCE = "tools.ozone.report.defs#reasonCivicInterference";
88
+ /** Election misinformation */
89
+ export declare const REASONCIVICMISINFORMATION = "tools.ozone.report.defs#reasonCivicMisinformation";
90
+ /** Impersonation of electoral officials/entities */
91
+ export declare const REASONCIVICIMPERSONATION = "tools.ozone.report.defs#reasonCivicImpersonation";
92
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/report/defs.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,UAAU,GAClB,sCAAsC,GACtC,qDAAqD,GACrD,+CAA+C,GAC/C,sDAAsD,GACtD,gDAAgD,GAChD,qDAAqD,GACrD,wDAAwD,GACxD,mDAAmD,GACnD,6CAA6C,GAC7C,kDAAkD,GAClD,0CAA0C,GAC1C,gDAAgD,GAChD,8CAA8C,GAC9C,4CAA4C,GAC5C,+CAA+C,GAC/C,2CAA2C,GAC3C,+CAA+C,GAC/C,gDAAgD,GAChD,uDAAuD,GACvD,uDAAuD,GACvD,qDAAqD,GACrD,oDAAoD,GACpD,gDAAgD,GAChD,+CAA+C,GAC/C,kDAAkD,GAClD,oDAAoD,GACpD,iDAAiD,GACjD,+CAA+C,GAC/C,6CAA6C,GAC7C,uDAAuD,GACvD,8CAA8C,GAC9C,8CAA8C,GAC9C,0DAA0D,GAC1D,wDAAwD,GACxD,+CAA+C,GAC/C,gDAAgD,GAChD,iDAAiD,GACjD,mDAAmD,GACnD,8CAA8C,GAC9C,yCAAyC,GACzC,qDAAqD,GACrD,+CAA+C,GAC/C,iDAAiD,GACjD,mDAAmD,GACnD,kDAAkD,GAClD,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,kDAAkD;AAClD,eAAO,MAAM,YA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mC,CAAA"}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REASONCIVICIMPERSONATION = exports.REASONCIVICMISINFORMATION = exports.REASONCIVICINTERFERENCE = exports.REASONCIVICDISCLOSURE = exports.REASONCIVICELECTORALPROCESS = exports.REASONRULEOTHER = exports.REASONRULEBANEVASION = exports.REASONRULEPROHIBITEDSALES = exports.REASONRULESTOLENCONTENT = exports.REASONRULESITESECURITY = exports.REASONMISLEADINGOTHER = exports.REASONMISLEADINGMISINFORMATION = exports.REASONMISLEADINGSYNTHETICCONTENT = exports.REASONMISLEADINGSCAM = exports.REASONMISLEADINGSPAM = exports.REASONMISLEADINGIMPERSONATION = exports.REASONMISLEADINGBOT = exports.REASONHARASSMENTOTHER = exports.REASONHARASSMENTDOXXING = exports.REASONHARASSMENTHATESPEECH = exports.REASONHARASSMENTTARGETED = exports.REASONHARASSMENTTROLL = exports.REASONCHILDSAFETYOTHER = exports.REASONCHILDSAFETYPROMOTION = exports.REASONCHILDSAFETYHARASSMENT = exports.REASONCHILDSAFETYENDANGERMENT = exports.REASONCHILDSAFETYMINORPRIVACY = exports.REASONCHILDSAFETYGROOM = exports.REASONCHILDSAFETYCSAM = exports.REASONSEXUALOTHER = exports.REASONSEXUALUNLABELED = exports.REASONSEXUALANIMAL = exports.REASONSEXUALDEEPFAKE = exports.REASONSEXUALSEXTORTION = exports.REASONSEXUALNCII = exports.REASONSEXUALABUSECONTENT = exports.REASONVIOLENCEOTHER = exports.REASONVIOLENCETRAFFICKING = exports.REASONVIOLENCEEXTREMISTCONTENT = exports.REASONVIOLENCEGLORIFICATION = exports.REASONVIOLENCESELFHARM = exports.REASONVIOLENCEGRAPHICCONTENT = exports.REASONVIOLENCETHREATS = exports.REASONVIOLENCEANIMALWELFARE = exports.REASONAPPEAL = void 0;
4
+ const lexicons_1 = require("../../../../lexicons");
5
+ const util_1 = require("../../../../util");
6
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
7
+ const id = 'tools.ozone.report.defs';
8
+ /** Appeal a previously taken moderation action */
9
+ exports.REASONAPPEAL = `${id}#reasonAppeal`;
10
+ /** Animal welfare violations */
11
+ exports.REASONVIOLENCEANIMALWELFARE = `${id}#reasonViolenceAnimalWelfare`;
12
+ /** Threats or incitement */
13
+ exports.REASONVIOLENCETHREATS = `${id}#reasonViolenceThreats`;
14
+ /** Graphic violent content */
15
+ exports.REASONVIOLENCEGRAPHICCONTENT = `${id}#reasonViolenceGraphicContent`;
16
+ /** Self harm */
17
+ exports.REASONVIOLENCESELFHARM = `${id}#reasonViolenceSelfHarm`;
18
+ /** Glorification of violence */
19
+ exports.REASONVIOLENCEGLORIFICATION = `${id}#reasonViolenceGlorification`;
20
+ /** Extremist content. These reports will be sent only be sent to the application's Moderation Authority. */
21
+ exports.REASONVIOLENCEEXTREMISTCONTENT = `${id}#reasonViolenceExtremistContent`;
22
+ /** Human trafficking */
23
+ exports.REASONVIOLENCETRAFFICKING = `${id}#reasonViolenceTrafficking`;
24
+ /** Other violent content */
25
+ exports.REASONVIOLENCEOTHER = `${id}#reasonViolenceOther`;
26
+ /** Adult sexual abuse content */
27
+ exports.REASONSEXUALABUSECONTENT = `${id}#reasonSexualAbuseContent`;
28
+ /** Non-consensual intimate imagery */
29
+ exports.REASONSEXUALNCII = `${id}#reasonSexualNCII`;
30
+ /** Sextortion */
31
+ exports.REASONSEXUALSEXTORTION = `${id}#reasonSexualSextortion`;
32
+ /** Deepfake adult content */
33
+ exports.REASONSEXUALDEEPFAKE = `${id}#reasonSexualDeepfake`;
34
+ /** Animal sexual abuse */
35
+ exports.REASONSEXUALANIMAL = `${id}#reasonSexualAnimal`;
36
+ /** Unlabelled adult content */
37
+ exports.REASONSEXUALUNLABELED = `${id}#reasonSexualUnlabeled`;
38
+ /** Other sexual violence content */
39
+ exports.REASONSEXUALOTHER = `${id}#reasonSexualOther`;
40
+ /** Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority. */
41
+ exports.REASONCHILDSAFETYCSAM = `${id}#reasonChildSafetyCSAM`;
42
+ /** Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority. */
43
+ exports.REASONCHILDSAFETYGROOM = `${id}#reasonChildSafetyGroom`;
44
+ /** Privacy violation involving a minor */
45
+ exports.REASONCHILDSAFETYMINORPRIVACY = `${id}#reasonChildSafetyMinorPrivacy`;
46
+ /** Child endangerment. These reports will be sent only be sent to the application's Moderation Authority. */
47
+ exports.REASONCHILDSAFETYENDANGERMENT = `${id}#reasonChildSafetyEndangerment`;
48
+ /** Harassment or bullying of minors */
49
+ exports.REASONCHILDSAFETYHARASSMENT = `${id}#reasonChildSafetyHarassment`;
50
+ /** Promotion of child exploitation. These reports will be sent only be sent to the application's Moderation Authority. */
51
+ exports.REASONCHILDSAFETYPROMOTION = `${id}#reasonChildSafetyPromotion`;
52
+ /** Other child safety. These reports will be sent only be sent to the application's Moderation Authority. */
53
+ exports.REASONCHILDSAFETYOTHER = `${id}#reasonChildSafetyOther`;
54
+ /** Trolling */
55
+ exports.REASONHARASSMENTTROLL = `${id}#reasonHarassmentTroll`;
56
+ /** Targeted harassment */
57
+ exports.REASONHARASSMENTTARGETED = `${id}#reasonHarassmentTargeted`;
58
+ /** Hate speech */
59
+ exports.REASONHARASSMENTHATESPEECH = `${id}#reasonHarassmentHateSpeech`;
60
+ /** Doxxing */
61
+ exports.REASONHARASSMENTDOXXING = `${id}#reasonHarassmentDoxxing`;
62
+ /** Other harassing or hateful content */
63
+ exports.REASONHARASSMENTOTHER = `${id}#reasonHarassmentOther`;
64
+ /** Fake account or bot */
65
+ exports.REASONMISLEADINGBOT = `${id}#reasonMisleadingBot`;
66
+ /** Impersonation */
67
+ exports.REASONMISLEADINGIMPERSONATION = `${id}#reasonMisleadingImpersonation`;
68
+ /** Spam */
69
+ exports.REASONMISLEADINGSPAM = `${id}#reasonMisleadingSpam`;
70
+ /** Scam */
71
+ exports.REASONMISLEADINGSCAM = `${id}#reasonMisleadingScam`;
72
+ /** Unlabelled gen-AI or synthetic content */
73
+ exports.REASONMISLEADINGSYNTHETICCONTENT = `${id}#reasonMisleadingSyntheticContent`;
74
+ /** Harmful false claims */
75
+ exports.REASONMISLEADINGMISINFORMATION = `${id}#reasonMisleadingMisinformation`;
76
+ /** Other misleading content */
77
+ exports.REASONMISLEADINGOTHER = `${id}#reasonMisleadingOther`;
78
+ /** Hacking or system attacks */
79
+ exports.REASONRULESITESECURITY = `${id}#reasonRuleSiteSecurity`;
80
+ /** Stolen content */
81
+ exports.REASONRULESTOLENCONTENT = `${id}#reasonRuleStolenContent`;
82
+ /** Promoting or selling prohibited items or services */
83
+ exports.REASONRULEPROHIBITEDSALES = `${id}#reasonRuleProhibitedSales`;
84
+ /** Banned user returning */
85
+ exports.REASONRULEBANEVASION = `${id}#reasonRuleBanEvasion`;
86
+ /** Other */
87
+ exports.REASONRULEOTHER = `${id}#reasonRuleOther`;
88
+ /** Electoral process violations */
89
+ exports.REASONCIVICELECTORALPROCESS = `${id}#reasonCivicElectoralProcess`;
90
+ /** Disclosure & transparency violations */
91
+ exports.REASONCIVICDISCLOSURE = `${id}#reasonCivicDisclosure`;
92
+ /** Voter intimidation or interference */
93
+ exports.REASONCIVICINTERFERENCE = `${id}#reasonCivicInterference`;
94
+ /** Election misinformation */
95
+ exports.REASONCIVICMISINFORMATION = `${id}#reasonCivicMisinformation`;
96
+ /** Impersonation of electoral officials/entities */
97
+ exports.REASONCIVICIMPERSONATION = `${id}#reasonCivicImpersonation`;
98
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/report/defs.ts"],"names":[],"mappings":";;;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,yBAAyB,CAAA;AAkDpC,kDAAkD;A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AACtE,wDAAwD;AAC3C,QAAA,yBAAyB,GAAG,GAAG,EAAE,4BAA4B,CAAA;AAC1E,4BAA4B;AACf,QAAA,oBAAoB,GAAG,GAAG,EAAE,uBAAuB,CAAA;AAChE,YAAY;AACC,QAAA,eAAe,GAAG,GAAG,EAAE,kBAAkB,CAAA;AACtD,mCAAmC;AACtB,QAAA,2BAA2B,GAAG,GAAG,EAAE,8BAA8B,CAAA;AAC9E,2CAA2C;AAC9B,QAAA,qBAAqB,GAAG,GAAG,EAAE,wBAAwB,CAAA;AAClE,yCAAyC;AAC5B,QAAA,uBAAuB,GAAG,GAAG,EAAE,0BAA0B,CAAA;AACtE,8BAA8B;AACjB,QAAA,yBAAyB,GAAG,GAAG,EAAE,4BAA4B,CAAA;AAC1E,oDAAoD;AACvC,QAAA,wBAAwB,GAAG,GAAG,EAAE,2BAA2B,CAAA"}
@@ -0,0 +1,15 @@
1
+ import AtpAgent, { AppBskyLabelerDefs } from '@atproto/api';
2
+ import { OzoneConfig } from '../config';
3
+ export declare const NEW_TO_OLD_REASON_MAPPING: Record<string, string>;
4
+ export type ModerationServiceProfileCreator = () => ModerationServiceProfile;
5
+ export declare class ModerationServiceProfile {
6
+ private cfg;
7
+ private appviewAgent;
8
+ private cache;
9
+ private CACHE_TTL;
10
+ constructor(cfg: OzoneConfig, appviewAgent: AtpAgent, cacheTTL?: number);
11
+ static creator(cfg: OzoneConfig, appviewAgent: AtpAgent): ModerationServiceProfileCreator;
12
+ getProfile(): Promise<AppBskyLabelerDefs.LabelerViewDetailed | null>;
13
+ validateReasonType(reasonType: string): Promise<string>;
14
+ }
15
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/mod-service/profile.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,EAAE,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAYvC,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqD5D,CAAA;AAOD,MAAM,MAAM,+BAA+B,GAAG,MAAM,wBAAwB,CAAA;AAE5E,qBAAa,wBAAwB;IAKjC,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,YAAY;IALtB,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,SAAS,CAAQ;gBAGf,GAAG,EAAE,WAAW,EAChB,YAAY,EAAE,QAAQ,EAC9B,QAAQ,CAAC,EAAE,MAAM;IAKnB,MAAM,CAAC,OAAO,CACZ,GAAG,EAAE,WAAW,EAChB,YAAY,EAAE,QAAQ,GACrB,+BAA+B;IAI5B,UAAU;IAyBV,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAsB9D"}
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModerationServiceProfile = exports.NEW_TO_OLD_REASON_MAPPING = void 0;
4
+ const api_1 = require("@atproto/api");
5
+ const xrpc_server_1 = require("@atproto/xrpc-server");
6
+ const defs_1 = require("../lexicon/types/com/atproto/moderation/defs");
7
+ const logger_1 = require("../logger");
8
+ // Reverse mapping from new ozone namespaced reason types to old com.atproto namespaced reason types
9
+ exports.NEW_TO_OLD_REASON_MAPPING = {
10
+ 'tools.ozone.report.defs#reasonMisleadingSpam': defs_1.REASONSPAM,
11
+ 'tools.ozone.report.defs#reasonRuleOther': defs_1.REASONVIOLATION,
12
+ 'tools.ozone.report.defs#reasonMisleadingOther': defs_1.REASONMISLEADING,
13
+ 'tools.ozone.report.defs#reasonSexualUnlabeled': defs_1.REASONSEXUAL,
14
+ 'tools.ozone.report.defs#reasonHarassmentOther': defs_1.REASONRUDE,
15
+ 'tools.ozone.report.defs#reasonAppeal': defs_1.REASONAPPEAL,
16
+ // Map all violence-related reasons to REASONVIOLATION
17
+ 'tools.ozone.report.defs#reasonViolenceAnimalWelfare': defs_1.REASONVIOLATION,
18
+ 'tools.ozone.report.defs#reasonViolenceThreats': defs_1.REASONVIOLATION,
19
+ 'tools.ozone.report.defs#reasonViolenceGraphicContent': defs_1.REASONVIOLATION,
20
+ 'tools.ozone.report.defs#reasonViolenceSelfHarm': defs_1.REASONVIOLATION,
21
+ 'tools.ozone.report.defs#reasonViolenceGlorification': defs_1.REASONVIOLATION,
22
+ 'tools.ozone.report.defs#reasonViolenceExtremistContent': defs_1.REASONVIOLATION,
23
+ 'tools.ozone.report.defs#reasonViolenceTrafficking': defs_1.REASONVIOLATION,
24
+ 'tools.ozone.report.defs#reasonViolenceOther': defs_1.REASONVIOLATION,
25
+ // Map all sexual-related reasons to REASONSEXUAL
26
+ 'tools.ozone.report.defs#reasonSexualAbuseContent': defs_1.REASONSEXUAL,
27
+ 'tools.ozone.report.defs#reasonSexualNCII': defs_1.REASONSEXUAL,
28
+ 'tools.ozone.report.defs#reasonSexualSextortion': defs_1.REASONSEXUAL,
29
+ 'tools.ozone.report.defs#reasonSexualDeepfake': defs_1.REASONSEXUAL,
30
+ 'tools.ozone.report.defs#reasonSexualAnimal': defs_1.REASONSEXUAL,
31
+ 'tools.ozone.report.defs#reasonSexualOther': defs_1.REASONSEXUAL,
32
+ // Map all child safety reasons to REASONVIOLATION
33
+ 'tools.ozone.report.defs#reasonChildSafetyCSAM': defs_1.REASONVIOLATION,
34
+ 'tools.ozone.report.defs#reasonChildSafetyGroom': defs_1.REASONVIOLATION,
35
+ 'tools.ozone.report.defs#reasonChildSafetyMinorPrivacy': defs_1.REASONVIOLATION,
36
+ 'tools.ozone.report.defs#reasonChildSafetyEndangerment': defs_1.REASONVIOLATION,
37
+ 'tools.ozone.report.defs#reasonChildSafetyHarassment': defs_1.REASONVIOLATION,
38
+ 'tools.ozone.report.defs#reasonChildSafetyPromotion': defs_1.REASONVIOLATION,
39
+ 'tools.ozone.report.defs#reasonChildSafetyOther': defs_1.REASONVIOLATION,
40
+ // Map all harassment reasons to REASONRUDE
41
+ 'tools.ozone.report.defs#reasonHarassmentTroll': defs_1.REASONRUDE,
42
+ 'tools.ozone.report.defs#reasonHarassmentTargeted': defs_1.REASONRUDE,
43
+ 'tools.ozone.report.defs#reasonHarassmentHateSpeech': defs_1.REASONRUDE,
44
+ 'tools.ozone.report.defs#reasonHarassmentDoxxing': defs_1.REASONRUDE,
45
+ // Map all misleading reasons to REASONMISLEADING
46
+ 'tools.ozone.report.defs#reasonMisleadingBot': defs_1.REASONMISLEADING,
47
+ 'tools.ozone.report.defs#reasonMisleadingImpersonation': defs_1.REASONMISLEADING,
48
+ 'tools.ozone.report.defs#reasonMisleadingScam': defs_1.REASONMISLEADING,
49
+ 'tools.ozone.report.defs#reasonMisleadingSyntheticContent': defs_1.REASONMISLEADING,
50
+ 'tools.ozone.report.defs#reasonMisleadingMisinformation': defs_1.REASONMISLEADING,
51
+ // Map all rule-related reasons to REASONVIOLATION
52
+ 'tools.ozone.report.defs#reasonRuleSiteSecurity': defs_1.REASONVIOLATION,
53
+ 'tools.ozone.report.defs#reasonRuleStolenContent': defs_1.REASONVIOLATION,
54
+ 'tools.ozone.report.defs#reasonRuleProhibitedSales': defs_1.REASONVIOLATION,
55
+ 'tools.ozone.report.defs#reasonRuleBanEvasion': defs_1.REASONVIOLATION,
56
+ // Map all civic reasons to REASONMISLEADING
57
+ 'tools.ozone.report.defs#reasonCivicElectoralProcess': defs_1.REASONMISLEADING,
58
+ 'tools.ozone.report.defs#reasonCivicDisclosure': defs_1.REASONMISLEADING,
59
+ 'tools.ozone.report.defs#reasonCivicInterference': defs_1.REASONMISLEADING,
60
+ 'tools.ozone.report.defs#reasonCivicMisinformation': defs_1.REASONMISLEADING,
61
+ 'tools.ozone.report.defs#reasonCivicImpersonation': defs_1.REASONMISLEADING,
62
+ };
63
+ class ModerationServiceProfile {
64
+ constructor(cfg, appviewAgent, cacheTTL) {
65
+ Object.defineProperty(this, "cfg", {
66
+ enumerable: true,
67
+ configurable: true,
68
+ writable: true,
69
+ value: cfg
70
+ });
71
+ Object.defineProperty(this, "appviewAgent", {
72
+ enumerable: true,
73
+ configurable: true,
74
+ writable: true,
75
+ value: appviewAgent
76
+ });
77
+ Object.defineProperty(this, "cache", {
78
+ enumerable: true,
79
+ configurable: true,
80
+ writable: true,
81
+ value: null
82
+ });
83
+ Object.defineProperty(this, "CACHE_TTL", {
84
+ enumerable: true,
85
+ configurable: true,
86
+ writable: true,
87
+ value: void 0
88
+ });
89
+ this.CACHE_TTL = cacheTTL || cfg.service.serviceRecordCacheTTL;
90
+ }
91
+ static creator(cfg, appviewAgent) {
92
+ return () => new ModerationServiceProfile(cfg, appviewAgent);
93
+ }
94
+ async getProfile() {
95
+ const now = Date.now();
96
+ if (!this.cache || now - this.cache.timestamp > this.CACHE_TTL) {
97
+ try {
98
+ const { data } = await this.appviewAgent.app.bsky.labeler.getServices({
99
+ dids: [this.cfg.service.did],
100
+ detailed: true,
101
+ });
102
+ if (api_1.AppBskyLabelerDefs.isLabelerViewDetailed(data.views?.[0])) {
103
+ this.cache = {
104
+ profile: data.views[0],
105
+ timestamp: now,
106
+ };
107
+ }
108
+ }
109
+ catch (e) {
110
+ // On error, fail open
111
+ logger_1.httpLogger.error(`Failed to fetch labeler profile: ${e?.['message']}`);
112
+ }
113
+ }
114
+ return this.cache?.profile || null;
115
+ }
116
+ async validateReasonType(reasonType) {
117
+ const profile = await this.getProfile();
118
+ if (!Array.isArray(profile?.reasonTypes)) {
119
+ return reasonType;
120
+ }
121
+ const supportedReasonTypes = profile.reasonTypes;
122
+ // Check if the reason type is directly supported
123
+ if (supportedReasonTypes.includes(reasonType)) {
124
+ return reasonType;
125
+ }
126
+ // Allow new reason types only if they map to a supported old reason type
127
+ const mappedOldReason = exports.NEW_TO_OLD_REASON_MAPPING[reasonType];
128
+ if (mappedOldReason && supportedReasonTypes.includes(mappedOldReason)) {
129
+ return reasonType;
130
+ }
131
+ throw new xrpc_server_1.InvalidRequestError(`Invalid reason type: ${reasonType}`);
132
+ }
133
+ }
134
+ exports.ModerationServiceProfile = ModerationServiceProfile;
135
+ //# sourceMappingURL=profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/mod-service/profile.ts"],"names":[],"mappings":";;;AAAA,sCAA2D;AAC3D,sDAA0D;AAE1D,uEAOqD;AACrD,sCAAsC;AAEtC,oGAAoG;AACvF,QAAA,yBAAyB,GAA2B;IAC/D,8CAA8C,EAAE,iBAAU;IAC1D,yCAAyC,EAAE,sBAAe;IAC1D,+CAA+C,EAAE,uBAAgB;IACjE,+CAA+C,EAAE,mBAAY;IAC7D,+CAA+C,EAAE,iBAAU;IAC3D,sCAAsC,EAAE,mBAAY;IACpD,sDAAsD;IACtD,qDAAqD,EAAE,sBAAe;IACtE,+CAA+C,EAAE,sBAAe;IAChE,sDAAsD,EAAE,sBAAe;IACvE,gDAAgD,EAAE,sBAAe;IACjE,qDAAqD,EAAE,sBAAe;IACtE,wDAAwD,EAAE,sBAAe;IACzE,mDAAmD,EAAE,sBAAe;IACpE,6CAA6C,EAAE,sBAAe;IAC9D,iDAAiD;IACjD,kDAAkD,EAAE,mBAAY;IAChE,0CAA0C,EAAE,mBAAY;IACxD,gDAAgD,EAAE,mBAAY;IAC9D,8CAA8C,EAAE,mBAAY;IAC5D,4CAA4C,EAAE,mBAAY;IAC1D,2CAA2C,EAAE,mBAAY;IACzD,kDAAkD;IAClD,+CAA+C,EAAE,sBAAe;IAChE,gDAAgD,EAAE,sBAAe;IACjE,uDAAuD,EAAE,sBAAe;IACxE,uDAAuD,EAAE,sBAAe;IACxE,qDAAqD,EAAE,sBAAe;IACtE,oDAAoD,EAAE,sBAAe;IACrE,gDAAgD,EAAE,sBAAe;IACjE,2CAA2C;IAC3C,+CAA+C,EAAE,iBAAU;IAC3D,kDAAkD,EAAE,iBAAU;IAC9D,oDAAoD,EAAE,iBAAU;IAChE,iDAAiD,EAAE,iBAAU;IAC7D,iDAAiD;IACjD,6C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,"file":"status.d.ts","sourceRoot":"","sources":["../../src/mod-service/status.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAS7C,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAsMxE,eAAO,MAAM,mCAAmC,GAAI,IAAI,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ucAgDrE,CAAA;AAKD,eAAO,MAAM,6BAA6B,GACxC,IAAI,QAAQ,EACZ,iBAAiB,kBAAkB,EACnC,WAAW,MAAM,EAAE,KAClB,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAyN3C,CAAA;AAED,eAAO,MAAM,8BAA8B,GACzC,SAAS,MAAM,GAAG,KAAK,KACtB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAkBnC,CAAA"}
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/mod-service/status.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAQ7C,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAsMxE,eAAO,MAAM,mCAAmC,GAAI,IAAI,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ucAgDrE,CAAA;AAKD,eAAO,MAAM,6BAA6B,GACxC,IAAI,QAAQ,EACZ,iBAAiB,kBAAkB,EACnC,WAAW,MAAM,EAAE,KAClB,OAAO,CAAC,0BAA0B,GAAG,IAAI,CA0N3C,CAAA;AAED,eAAO,MAAM,8BAA8B,GACzC,SAAS,MAAM,GAAG,KAAK,KACtB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAkBnC,CAAA"}
@@ -4,35 +4,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.getStatusIdentifierFromSubject = exports.adjustModerationSubjectStatus = exports.moderationSubjectStatusQueryBuilder = void 0;
5
5
  const common_1 = require("@atproto/common");
6
6
  const syntax_1 = require("@atproto/syntax");
7
+ const util_1 = require("../api/util");
7
8
  const types_1 = require("../db/types");
8
- const defs_1 = require("../lexicon/types/com/atproto/moderation/defs");
9
- const defs_2 = require("../lexicon/types/tools/ozone/moderation/defs");
9
+ const defs_1 = require("../lexicon/types/tools/ozone/moderation/defs");
10
10
  const getSubjectStatusForModerationEvent = ({ currentStatus, action, createdBy, createdAt, durationInHours, }) => {
11
11
  const defaultReviewState = currentStatus
12
12
  ? currentStatus.reviewState
13
- : defs_2.REVIEWNONE;
13
+ : defs_1.REVIEWNONE;
14
14
  switch (action) {
15
15
  case 'tools.ozone.moderation.defs#modEventAcknowledge':
16
16
  return {
17
17
  lastReviewedBy: createdBy,
18
- reviewState: defs_2.REVIEWCLOSED,
18
+ reviewState: defs_1.REVIEWCLOSED,
19
19
  lastReviewedAt: createdAt,
20
20
  };
21
21
  case 'tools.ozone.moderation.defs#modEventReport':
22
22
  return {
23
- reviewState: defs_2.REVIEWOPEN,
23
+ reviewState: defs_1.REVIEWOPEN,
24
24
  lastReportedAt: createdAt,
25
25
  };
26
26
  case 'tools.ozone.moderation.defs#modEventEscalate':
27
27
  return {
28
28
  lastReviewedBy: createdBy,
29
- reviewState: defs_2.REVIEWESCALATED,
29
+ reviewState: defs_1.REVIEWESCALATED,
30
30
  lastReviewedAt: createdAt,
31
31
  };
32
32
  case 'tools.ozone.moderation.defs#modEventReverseTakedown':
33
33
  return {
34
34
  lastReviewedBy: createdBy,
35
- reviewState: defs_2.REVIEWCLOSED,
35
+ reviewState: defs_1.REVIEWCLOSED,
36
36
  takendown: false,
37
37
  suspendUntil: null,
38
38
  lastReviewedAt: createdAt,
@@ -61,7 +61,7 @@ const getSubjectStatusForModerationEvent = ({ currentStatus, action, createdBy,
61
61
  ...(currentStatus?.appealed ? { appealed: false } : {}),
62
62
  takendown: true,
63
63
  lastReviewedBy: createdBy,
64
- reviewState: defs_2.REVIEWCLOSED,
64
+ reviewState: defs_1.REVIEWCLOSED,
65
65
  lastReviewedAt: createdAt,
66
66
  suspendUntil: durationInHours
67
67
  ? new Date(Date.now() + durationInHours * common_1.HOUR).toISOString()
@@ -232,7 +232,7 @@ const adjustModerationSubjectStatus = async (db, moderationEvent, blobCids) => {
232
232
  ...newStatus,
233
233
  // newStatus doesn't contain a reviewState or takendown so in case this is a new entry
234
234
  // we need to set a default values so that the insert doesn't fail
235
- reviewState: currentStatus ? currentStatus.reviewState : defs_2.REVIEWNONE,
235
+ reviewState: currentStatus ? currentStatus.reviewState : defs_1.REVIEWNONE,
236
236
  // @TODO: should we try to update this based on status property of account event?
237
237
  // For now we're the only one emitting takedowns so i don't think it makes too much of a difference
238
238
  takendown: currentStatus ? currentStatus.takendown : false,
@@ -255,7 +255,8 @@ const adjustModerationSubjectStatus = async (db, moderationEvent, blobCids) => {
255
255
  return currentStatus || null;
256
256
  }
257
257
  const isAppealEvent = action === 'tools.ozone.moderation.defs#modEventReport' &&
258
- meta?.reportType === defs_1.REASONAPPEAL;
258
+ meta?.reportType &&
259
+ (0, util_1.isAppealReport)(`${meta.reportType}`);
259
260
  const subjectStatus = getSubjectStatusForModerationEvent({
260
261
  currentStatus,
261
262
  action,
@@ -263,13 +264,13 @@ const adjustModerationSubjectStatus = async (db, moderationEvent, blobCids) => {
263
264
  createdAt,
264
265
  durationInHours: moderationEvent.durationInHours,
265
266
  });
266
- if (currentStatus?.reviewState === defs_2.REVIEWESCALATED &&
267
- subjectStatus.reviewState !== defs_2.REVIEWCLOSED) {
267
+ if (currentStatus?.reviewState === defs_1.REVIEWESCALATED &&
268
+ subjectStatus.reviewState !== defs_1.REVIEWCLOSED) {
268
269
  // If the current status is escalated only allow incoming events to move the state to
269
270
  // reviewClosed because escalated subjects should never move to any other state
270
- subjectStatus.reviewState = defs_2.REVIEWESCALATED;
271
+ subjectStatus.reviewState = defs_1.REVIEWESCALATED;
271
272
  }
272
- if (currentStatus && subjectStatus.reviewState === defs_2.REVIEWNONE) {
273
+ if (currentStatus && subjectStatus.reviewState === defs_1.REVIEWNONE) {
273
274
  // reviewNone is ONLY allowed when there is no current status
274
275
  // If there is a current status, it should not be allowed to move back to reviewNone
275
276
  subjectStatus.reviewState = currentStatus.reviewState;
@@ -280,7 +281,7 @@ const adjustModerationSubjectStatus = async (db, moderationEvent, blobCids) => {
280
281
  // Defaulting reviewState to open for any event may not be the desired behavior.
281
282
  // For instance, if a subject never had any event and we just want to leave a comment to keep an eye on it
282
283
  // that shouldn't mean we want to review the subject
283
- reviewState: defs_2.REVIEWNONE,
284
+ reviewState: defs_1.REVIEWNONE,
284
285
  recordCid: subjectCid || null,
285
286
  ageAssuranceState: currentStatus?.ageAssuranceState || 'unknown',
286
287
  };
@@ -304,8 +305,8 @@ const adjustModerationSubjectStatus = async (db, moderationEvent, blobCids) => {
304
305
  newStatus.lastAppealedAt = createdAt;
305
306
  subjectStatus.lastAppealedAt = createdAt;
306
307
  // Set reviewState to escalated when appeal events are emitted
307
- subjectStatus.reviewState = defs_2.REVIEWESCALATED;
308
- newStatus.reviewState = defs_2.REVIEWESCALATED;
308
+ subjectStatus.reviewState = defs_1.REVIEWESCALATED;
309
+ newStatus.reviewState = defs_1.REVIEWESCALATED;
309
310
  }
310
311
  if (action === 'tools.ozone.moderation.defs#modEventResolveAppeal' &&
311
312
  subjectStatus.appealed) {