@ttt-productions/ttt-core 0.18.0 → 0.19.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.
Files changed (135) hide show
  1. package/dist/doc-schemas/chat-sync.d.ts +2 -2
  2. package/dist/doc-schemas/chat-sync.d.ts.map +1 -1
  3. package/dist/doc-schemas/chat-sync.js +2 -1
  4. package/dist/doc-schemas/chat-sync.js.map +1 -1
  5. package/dist/doc-schemas/index.d.ts +19 -0
  6. package/dist/doc-schemas/index.d.ts.map +1 -1
  7. package/dist/doc-schemas/index.js +21 -0
  8. package/dist/doc-schemas/index.js.map +1 -1
  9. package/dist/doc-schemas/media-activation-jobs.d.ts +6 -6
  10. package/dist/doc-schemas/media-assets.d.ts +168 -14
  11. package/dist/doc-schemas/media-assets.d.ts.map +1 -1
  12. package/dist/doc-schemas/media-assets.js +55 -0
  13. package/dist/doc-schemas/media-assets.js.map +1 -1
  14. package/dist/doc-schemas/moderation.d.ts +6 -6
  15. package/dist/doc-schemas/ncii/allegations.d.ts +84 -0
  16. package/dist/doc-schemas/ncii/allegations.d.ts.map +1 -0
  17. package/dist/doc-schemas/ncii/allegations.js +45 -0
  18. package/dist/doc-schemas/ncii/allegations.js.map +1 -0
  19. package/dist/doc-schemas/ncii/appeals.d.ts +121 -0
  20. package/dist/doc-schemas/ncii/appeals.d.ts.map +1 -0
  21. package/dist/doc-schemas/ncii/appeals.js +132 -0
  22. package/dist/doc-schemas/ncii/appeals.js.map +1 -0
  23. package/dist/doc-schemas/ncii/cases.d.ts +158 -0
  24. package/dist/doc-schemas/ncii/cases.d.ts.map +1 -0
  25. package/dist/doc-schemas/ncii/cases.js +132 -0
  26. package/dist/doc-schemas/ncii/cases.js.map +1 -0
  27. package/dist/doc-schemas/ncii/config.d.ts +131 -0
  28. package/dist/doc-schemas/ncii/config.d.ts.map +1 -0
  29. package/dist/doc-schemas/ncii/config.js +227 -0
  30. package/dist/doc-schemas/ncii/config.js.map +1 -0
  31. package/dist/doc-schemas/ncii/holds.d.ts +84 -0
  32. package/dist/doc-schemas/ncii/holds.d.ts.map +1 -0
  33. package/dist/doc-schemas/ncii/holds.js +63 -0
  34. package/dist/doc-schemas/ncii/holds.js.map +1 -0
  35. package/dist/doc-schemas/ncii/notices.d.ts +109 -0
  36. package/dist/doc-schemas/ncii/notices.d.ts.map +1 -0
  37. package/dist/doc-schemas/ncii/notices.js +114 -0
  38. package/dist/doc-schemas/ncii/notices.js.map +1 -0
  39. package/dist/doc-schemas/ncii/removal.d.ts +222 -0
  40. package/dist/doc-schemas/ncii/removal.d.ts.map +1 -0
  41. package/dist/doc-schemas/ncii/removal.js +130 -0
  42. package/dist/doc-schemas/ncii/removal.js.map +1 -0
  43. package/dist/doc-schemas/ncii/requests.d.ts +372 -0
  44. package/dist/doc-schemas/ncii/requests.d.ts.map +1 -0
  45. package/dist/doc-schemas/ncii/requests.js +287 -0
  46. package/dist/doc-schemas/ncii/requests.js.map +1 -0
  47. package/dist/doc-schemas/ncii/scan.d.ts +59 -0
  48. package/dist/doc-schemas/ncii/scan.d.ts.map +1 -0
  49. package/dist/doc-schemas/ncii/scan.js +105 -0
  50. package/dist/doc-schemas/ncii/scan.js.map +1 -0
  51. package/dist/doc-schemas/notification-ledger.d.ts +1 -1
  52. package/dist/doc-schemas/payments.d.ts +2 -2
  53. package/dist/doc-schemas/registry.d.ts +1929 -96
  54. package/dist/doc-schemas/registry.d.ts.map +1 -1
  55. package/dist/doc-schemas/registry.js +86 -0
  56. package/dist/doc-schemas/registry.js.map +1 -1
  57. package/dist/doc-schemas/report-docs.d.ts +3 -3
  58. package/dist/doc-schemas/safety/age.d.ts +178 -0
  59. package/dist/doc-schemas/safety/age.d.ts.map +1 -0
  60. package/dist/doc-schemas/safety/age.js +222 -0
  61. package/dist/doc-schemas/safety/age.js.map +1 -0
  62. package/dist/doc-schemas/safety/case-aliases.d.ts +97 -0
  63. package/dist/doc-schemas/safety/case-aliases.d.ts.map +1 -0
  64. package/dist/doc-schemas/safety/case-aliases.js +110 -0
  65. package/dist/doc-schemas/safety/case-aliases.js.map +1 -0
  66. package/dist/doc-schemas/safety/case.d.ts +542 -0
  67. package/dist/doc-schemas/safety/case.d.ts.map +1 -0
  68. package/dist/doc-schemas/safety/case.js +339 -0
  69. package/dist/doc-schemas/safety/case.js.map +1 -0
  70. package/dist/doc-schemas/safety/evidence.d.ts +346 -0
  71. package/dist/doc-schemas/safety/evidence.d.ts.map +1 -0
  72. package/dist/doc-schemas/safety/evidence.js +273 -0
  73. package/dist/doc-schemas/safety/evidence.js.map +1 -0
  74. package/dist/doc-schemas/safety/foundation.d.ts +425 -0
  75. package/dist/doc-schemas/safety/foundation.d.ts.map +1 -0
  76. package/dist/doc-schemas/safety/foundation.js +349 -0
  77. package/dist/doc-schemas/safety/foundation.js.map +1 -0
  78. package/dist/doc-schemas/safety/holds.d.ts +152 -0
  79. package/dist/doc-schemas/safety/holds.d.ts.map +1 -0
  80. package/dist/doc-schemas/safety/holds.js +142 -0
  81. package/dist/doc-schemas/safety/holds.js.map +1 -0
  82. package/dist/doc-schemas/safety/monitors.d.ts +77 -0
  83. package/dist/doc-schemas/safety/monitors.d.ts.map +1 -0
  84. package/dist/doc-schemas/safety/monitors.js +87 -0
  85. package/dist/doc-schemas/safety/monitors.js.map +1 -0
  86. package/dist/doc-schemas/safety/provenance.d.ts +70 -0
  87. package/dist/doc-schemas/safety/provenance.d.ts.map +1 -0
  88. package/dist/doc-schemas/safety/provenance.js +76 -0
  89. package/dist/doc-schemas/safety/provenance.js.map +1 -0
  90. package/dist/doc-schemas/safety/report.d.ts +256 -0
  91. package/dist/doc-schemas/safety/report.d.ts.map +1 -0
  92. package/dist/doc-schemas/safety/report.js +116 -0
  93. package/dist/doc-schemas/safety/report.js.map +1 -0
  94. package/dist/doc-schemas/safety/sagas.d.ts +154 -0
  95. package/dist/doc-schemas/safety/sagas.d.ts.map +1 -0
  96. package/dist/doc-schemas/safety/sagas.js +162 -0
  97. package/dist/doc-schemas/safety/sagas.js.map +1 -0
  98. package/dist/doc-schemas/social.d.ts +3 -3
  99. package/dist/doc-schemas/user.d.ts +15 -0
  100. package/dist/doc-schemas/user.d.ts.map +1 -1
  101. package/dist/doc-schemas/user.js +9 -0
  102. package/dist/doc-schemas/user.js.map +1 -1
  103. package/dist/doc-schemas/work-project.d.ts +1 -1
  104. package/dist/media/atoms.d.ts +2 -2
  105. package/dist/media/domain-events-admin.d.ts +1 -1
  106. package/dist/media/domain-events.d.ts +1 -1
  107. package/dist/media/file-origin.d.ts +1 -1
  108. package/dist/media/index.d.ts +1 -0
  109. package/dist/media/index.d.ts.map +1 -1
  110. package/dist/media/index.js +1 -0
  111. package/dist/media/index.js.map +1 -1
  112. package/dist/media/pending-media.d.ts +25 -25
  113. package/dist/media/photodna-coverage.d.ts +46 -0
  114. package/dist/media/photodna-coverage.d.ts.map +1 -0
  115. package/dist/media/photodna-coverage.js +74 -0
  116. package/dist/media/photodna-coverage.js.map +1 -0
  117. package/dist/media/start-upload.d.ts +1 -1
  118. package/dist/media/target-info.d.ts +1 -1
  119. package/dist/paths/collections.d.ts +58 -0
  120. package/dist/paths/collections.d.ts.map +1 -1
  121. package/dist/paths/collections.js +77 -0
  122. package/dist/paths/collections.js.map +1 -1
  123. package/dist/paths/path-builders.d.ts +57 -0
  124. package/dist/paths/path-builders.d.ts.map +1 -1
  125. package/dist/paths/path-builders.js +75 -0
  126. package/dist/paths/path-builders.js.map +1 -1
  127. package/dist/schemas/notification.d.ts +1 -0
  128. package/dist/schemas/notification.d.ts.map +1 -1
  129. package/dist/schemas/notification.js +6 -1
  130. package/dist/schemas/notification.js.map +1 -1
  131. package/dist/schemas/social.d.ts +2 -2
  132. package/dist/types/audit.d.ts +1 -1
  133. package/dist/types/audit.d.ts.map +1 -1
  134. package/dist/upload-variables/square-streetz-post-variables.d.ts +1 -1
  135. package/package.json +1 -1
@@ -0,0 +1,84 @@
1
+ import { z } from 'zod';
2
+ /** Who alleged: an authenticated user or an anonymous member of the public. */
3
+ export declare const NciiAllegationReporterTypeSchema: z.ZodEnum<{
4
+ authenticatedUser: "authenticatedUser";
5
+ anonymousPublic: "anonymousPublic";
6
+ }>;
7
+ export type NciiAllegationReporterType = z.infer<typeof NciiAllegationReporterTypeSchema>;
8
+ /** Allegation lifecycle status — `received` until triaged into one of the
9
+ * terminal/linked states. An allegation NEVER becomes a statutory request. */
10
+ export declare const NciiAllegationStatusSchema: z.ZodEnum<{
11
+ received: "received";
12
+ linked: "linked";
13
+ dismissed: "dismissed";
14
+ escalated: "escalated";
15
+ }>;
16
+ export type NciiAllegationStatus = z.infer<typeof NciiAllegationStatusSchema>;
17
+ /** `nciiAllegations/{allegationId}` — any user may allege; does NOT by itself
18
+ * satisfy the statute or arm the 48h clock. Doc id `allegationId` is a
19
+ * deterministic/assigned id (z.string().min(1)). */
20
+ export declare const NciiAllegationV1Schema: z.ZodObject<{
21
+ schemaVersion: z.ZodLiteral<1>;
22
+ allegationId: z.ZodString;
23
+ caseId: z.ZodOptional<z.ZodString>;
24
+ reporterType: z.ZodEnum<{
25
+ authenticatedUser: "authenticatedUser";
26
+ anonymousPublic: "anonymousPublic";
27
+ }>;
28
+ submittedAt: z.ZodNumber;
29
+ targetLocator: z.ZodDiscriminatedUnion<[z.ZodObject<{
30
+ kind: z.ZodLiteral<"mediaAsset">;
31
+ mediaAssetId: z.ZodString;
32
+ }, z.core.$strict>, z.ZodObject<{
33
+ kind: z.ZodLiteral<"hallItem">;
34
+ hallItemId: z.ZodString;
35
+ subItemId: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strict>, z.ZodObject<{
37
+ kind: z.ZodLiteral<"squarePost">;
38
+ postId: z.ZodString;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ kind: z.ZodLiteral<"profileImage">;
41
+ profileUid: z.ZodString;
42
+ }, z.core.$strict>, z.ZodObject<{
43
+ kind: z.ZodLiteral<"username">;
44
+ profileUid: z.ZodString;
45
+ }, z.core.$strict>, z.ZodObject<{
46
+ kind: z.ZodLiteral<"craftSkill">;
47
+ profileUid: z.ZodString;
48
+ craftSkillId: z.ZodString;
49
+ }, z.core.$strict>, z.ZodObject<{
50
+ kind: z.ZodLiteral<"commissionListing">;
51
+ commissionListingId: z.ZodString;
52
+ }, z.core.$strict>, z.ZodObject<{
53
+ kind: z.ZodLiteral<"audition">;
54
+ auditionId: z.ZodString;
55
+ }, z.core.$strict>, z.ZodObject<{
56
+ kind: z.ZodLiteral<"auditionEntry">;
57
+ auditionId: z.ZodString;
58
+ auditionEntryId: z.ZodString;
59
+ }, z.core.$strict>, z.ZodObject<{
60
+ kind: z.ZodLiteral<"guildInviteMessage">;
61
+ channelId: z.ZodString;
62
+ messageId: z.ZodString;
63
+ }, z.core.$strict>, z.ZodObject<{
64
+ kind: z.ZodLiteral<"chatAttachment">;
65
+ channelId: z.ZodString;
66
+ messageId: z.ZodString;
67
+ attachmentId: z.ZodString;
68
+ }, z.core.$strict>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"url">;
70
+ url: z.ZodString;
71
+ }, z.core.$strict>, z.ZodObject<{
72
+ kind: z.ZodLiteral<"additionalText">;
73
+ textRef: z.ZodString;
74
+ }, z.core.$strict>], "kind">;
75
+ allegationReason: z.ZodString;
76
+ status: z.ZodEnum<{
77
+ received: "received";
78
+ linked: "linked";
79
+ dismissed: "dismissed";
80
+ escalated: "escalated";
81
+ }>;
82
+ }, z.core.$strict>;
83
+ export type NciiAllegationV1 = z.infer<typeof NciiAllegationV1Schema>;
84
+ //# sourceMappingURL=allegations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allegations.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/allegations.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,+EAA+E;AAC/E,eAAO,MAAM,gCAAgC;;;EAAmD,CAAC;AACjG,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;8EAC8E;AAC9E,eAAO,MAAM,0BAA0B;;;;;EAA2D,CAAC;AACnG,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;oDAEoD;AACpD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUxB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ // Trust & Safety — NCII allegations (Appendix A §A11, concept (1)).
2
+ //
3
+ // `nciiAllegations/{allegationId}` — ANY user (authenticated or anonymous public)
4
+ // may allege NCII. An allegation may justify platform-policy hiding but does NOT
5
+ // by itself satisfy the statute or arm the 48h clock; it NEVER auto-becomes a
6
+ // statutory `takeItDownRequest`. The discriminated locator is the ONE typed
7
+ // locator (TargetLocatorV1) — never an all-optional contentRef.
8
+ //
9
+ // Every shape here is transcribed verbatim from docs/code_changes_needed/
10
+ // trust-and-safety/IMPLEMENTATION_PLAN.md Appendix A §A11 (1) — no invented
11
+ // values, no placeholders.
12
+ //
13
+ // SHARED enums + the locator come from ../safety/foundation.js (the single source
14
+ // for every cross-cluster enum); they are NEVER redefined here. This cluster
15
+ // IMPORTS TargetLocatorV1Schema.
16
+ //
17
+ // Collection note: this cluster introduces a NEW Firestore collection; wiring
18
+ // collections.ts / path-builders.ts / registry.ts is deferred to the app leg (the
19
+ // orchestrator binds the schema + path builders there); the doc-id shape is
20
+ // documented on the schema below.
21
+ import { z } from 'zod';
22
+ import { TargetLocatorV1Schema } from '../safety/foundation.js';
23
+ // ===========================================================================
24
+ // §A11 (1) — nciiAllegations/{allegationId}
25
+ // ===========================================================================
26
+ /** Who alleged: an authenticated user or an anonymous member of the public. */
27
+ export const NciiAllegationReporterTypeSchema = z.enum(['authenticatedUser', 'anonymousPublic']);
28
+ /** Allegation lifecycle status — `received` until triaged into one of the
29
+ * terminal/linked states. An allegation NEVER becomes a statutory request. */
30
+ export const NciiAllegationStatusSchema = z.enum(['received', 'linked', 'dismissed', 'escalated']);
31
+ /** `nciiAllegations/{allegationId}` — any user may allege; does NOT by itself
32
+ * satisfy the statute or arm the 48h clock. Doc id `allegationId` is a
33
+ * deterministic/assigned id (z.string().min(1)). */
34
+ export const NciiAllegationV1Schema = z.object({
35
+ schemaVersion: z.literal(1),
36
+ allegationId: z.string().min(1),
37
+ caseId: z.string().min(1).optional(),
38
+ reporterType: NciiAllegationReporterTypeSchema,
39
+ submittedAt: z.number(),
40
+ // the discriminated locator (the ONE typed locator) — never an all-optional contentRef
41
+ targetLocator: TargetLocatorV1Schema,
42
+ allegationReason: z.string(), // free-text reason; NEVER substitutes for a statutory request
43
+ status: NciiAllegationStatusSchema,
44
+ }).strict();
45
+ //# sourceMappingURL=allegations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allegations.js","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/allegations.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,kFAAkF;AAClF,iFAAiF;AACjF,8EAA8E;AAC9E,4EAA4E;AAC5E,gEAAgE;AAChE,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,2BAA2B;AAC3B,EAAE;AACF,kFAAkF;AAClF,6EAA6E;AAC7E,iCAAiC;AACjC,EAAE;AACF,8EAA8E;AAC9E,kFAAkF;AAClF,4EAA4E;AAC5E,kCAAkC;AAElC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,8EAA8E;AAC9E,4CAA4C;AAC5C,8EAA8E;AAE9E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAGjG;8EAC8E;AAC9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAGnG;;oDAEoD;AACpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,gCAAgC;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,uFAAuF;IACvF,aAAa,EAAE,qBAAqB;IACpC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,8DAA8D;IAC5F,MAAM,EAAE,0BAA0B;CACnC,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { z } from 'zod';
2
+ /** The AUTHORITATIVE appeal state (`nciiCases.appealState` projects this). */
3
+ export declare const NciiAppealStateSchema: z.ZodEnum<{
4
+ underReview: "underReview";
5
+ denied: "denied";
6
+ submitted: "submitted";
7
+ granted: "granted";
8
+ withdrawn: "withdrawn";
9
+ }>;
10
+ export type NciiAppealState = z.infer<typeof NciiAppealStateSchema>;
11
+ /** Durable command/retry/dead-letter status for the reinstatement/denial effect. */
12
+ export declare const NciiAppealCommandStatusSchema: z.ZodEnum<{
13
+ pending: "pending";
14
+ deadLetter: "deadLetter";
15
+ applied: "applied";
16
+ executing: "executing";
17
+ }>;
18
+ export type NciiAppealCommandStatus = z.infer<typeof NciiAppealCommandStatusSchema>;
19
+ /** Durable command sub-record on the appeal — drives the reinstatement/denial
20
+ * effect with retry/dead-letter. */
21
+ export declare const NciiAppealCommandV1Schema: z.ZodObject<{
22
+ commandId: z.ZodString;
23
+ status: z.ZodEnum<{
24
+ pending: "pending";
25
+ deadLetter: "deadLetter";
26
+ applied: "applied";
27
+ executing: "executing";
28
+ }>;
29
+ attemptCount: z.ZodNumber;
30
+ nextAttemptAt: z.ZodOptional<z.ZodNumber>;
31
+ leaseOwner: z.ZodOptional<z.ZodString>;
32
+ leaseExpiresAt: z.ZodOptional<z.ZodNumber>;
33
+ lastErrorCode: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strict>;
35
+ export type NciiAppealCommandV1 = z.infer<typeof NciiAppealCommandV1Schema>;
36
+ /** `nciiAppeals/{appealId}` — durable, append-only uploader-removal appeal. Doc id
37
+ * `appealId` is deterministic:
38
+ * `sha256('ncii-appeal-v1:' + caseId + ':' + appellantUid + ':' + removalGeneration)`
39
+ * (a retried submit resolves to the same doc — idempotent). */
40
+ export declare const NciiAppealV1Schema: z.ZodObject<{
41
+ schemaVersion: z.ZodLiteral<1>;
42
+ appealId: z.ZodString;
43
+ caseId: z.ZodString;
44
+ requestIds: z.ZodArray<z.ZodString>;
45
+ appealKind: z.ZodLiteral<"uploaderRemovalAppeal">;
46
+ removalGeneration: z.ZodNumber;
47
+ appellantUid: z.ZodString;
48
+ idempotencyKey: z.ZodString;
49
+ state: z.ZodEnum<{
50
+ underReview: "underReview";
51
+ denied: "denied";
52
+ submitted: "submitted";
53
+ granted: "granted";
54
+ withdrawn: "withdrawn";
55
+ }>;
56
+ deadlineAt: z.ZodOptional<z.ZodNumber>;
57
+ command: z.ZodObject<{
58
+ commandId: z.ZodString;
59
+ status: z.ZodEnum<{
60
+ pending: "pending";
61
+ deadLetter: "deadLetter";
62
+ applied: "applied";
63
+ executing: "executing";
64
+ }>;
65
+ attemptCount: z.ZodNumber;
66
+ nextAttemptAt: z.ZodOptional<z.ZodNumber>;
67
+ leaseOwner: z.ZodOptional<z.ZodString>;
68
+ leaseExpiresAt: z.ZodOptional<z.ZodNumber>;
69
+ lastErrorCode: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strict>;
71
+ createdAt: z.ZodNumber;
72
+ updatedAt: z.ZodNumber;
73
+ decidedAt: z.ZodOptional<z.ZodNumber>;
74
+ }, z.core.$strict>;
75
+ export type NciiAppealV1 = z.infer<typeof NciiAppealV1Schema>;
76
+ /** Who created the submission. */
77
+ export declare const NciiAppealSubmissionAuthorSchema: z.ZodEnum<{
78
+ operator: "operator";
79
+ appellant: "appellant";
80
+ }>;
81
+ export type NciiAppealSubmissionAuthor = z.infer<typeof NciiAppealSubmissionAuthorSchema>;
82
+ /** `nciiAppeals/{appealId}/submissions/{submissionId}` — IMMUTABLE append-only
83
+ * record of the appellant's reason + evidence. Doc id `submissionId` is a
84
+ * deterministic/assigned id (z.string().min(1)). */
85
+ export declare const NciiAppealSubmissionV1Schema: z.ZodObject<{
86
+ schemaVersion: z.ZodLiteral<1>;
87
+ submissionId: z.ZodString;
88
+ sequence: z.ZodNumber;
89
+ receivedAt: z.ZodNumber;
90
+ appellantStatement: z.ZodString;
91
+ evidenceIds: z.ZodArray<z.ZodString>;
92
+ createdBy: z.ZodEnum<{
93
+ operator: "operator";
94
+ appellant: "appellant";
95
+ }>;
96
+ }, z.core.$strict>;
97
+ export type NciiAppealSubmissionV1 = z.infer<typeof NciiAppealSubmissionV1Schema>;
98
+ /** Appeal decision result. */
99
+ export declare const NciiAppealDecisionResultSchema: z.ZodEnum<{
100
+ denied: "denied";
101
+ granted: "granted";
102
+ }>;
103
+ export type NciiAppealDecisionResult = z.infer<typeof NciiAppealDecisionResultSchema>;
104
+ /** `nciiAppeals/{appealId}/decisions/{decisionId}` — IMMUTABLE append-only
105
+ * decision. ONLY `nciiAppealReviewer` may write a decision (capability pinned by
106
+ * literal). Doc id `decisionId` is a deterministic/assigned id (z.string().min(1)). */
107
+ export declare const NciiAppealDecisionV1Schema: z.ZodObject<{
108
+ schemaVersion: z.ZodLiteral<1>;
109
+ decisionId: z.ZodString;
110
+ result: z.ZodEnum<{
111
+ denied: "denied";
112
+ granted: "granted";
113
+ }>;
114
+ reviewerUid: z.ZodString;
115
+ capability: z.ZodLiteral<"nciiAppealReviewer">;
116
+ basisSubmissionIds: z.ZodArray<z.ZodString>;
117
+ rationaleRef: z.ZodString;
118
+ decidedAt: z.ZodNumber;
119
+ }, z.core.$strict>;
120
+ export type NciiAppealDecisionV1 = z.infer<typeof NciiAppealDecisionV1Schema>;
121
+ //# sourceMappingURL=appeals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appeals.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/appeals.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,oFAAoF;AACpF,eAAO,MAAM,6BAA6B;;;;;EAKxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;oCACoC;AACpC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;kBAQ3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E;;;+DAG+D;AAC/D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwBpB,CAAC;AACZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAO9D,kCAAkC;AAClC,eAAO,MAAM,gCAAgC;;;EAAoC,CAAC;AAClF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;;oDAEoD;AACpD,eAAO,MAAM,4BAA4B;;;;;;;;;;;kBAQ9B,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AASlF,8BAA8B;AAC9B,eAAO,MAAM,8BAA8B;;;EAAgC,CAAC;AAC5E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;uFAEuF;AACvF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;kBAS5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,132 @@
1
+ // Trust & Safety — durable uploader-removal appeal (Appendix A §A11 [H-09]).
2
+ //
3
+ // `nciiAppeals/{appealId}` — the `uploaderRemovalAppeal` is a first-class durable,
4
+ // append-only record exactly like every other NCII workflow object. The mutable
5
+ // `nciiCases.appealState` is a labeled NON-AUTHORITATIVE PROJECTION of this record,
6
+ // NEVER the authority.
7
+ //
8
+ // This schema is the UPLOADER appeal ONLY (`appealKind:'uploaderRemovalAppeal'`).
9
+ // The authenticated uploader whose content was removed appeals here; ONLY
10
+ // `nciiAppealReviewer` may grant it (reinstate content / reverse an NCII hash
11
+ // block), and a child-safety hold is NEVER reversible through it. A requester's
12
+ // `requesterValidityCorrection` (status-token supplement) is NOT an appeal, carries
13
+ // NO reinstatement power, and is NOT modeled by this schema.
14
+ //
15
+ // Deterministic `appealId = sha256('ncii-appeal-v1:' + caseId + ':' + appellantUid
16
+ // + ':' + removalGeneration)` (a retried submit resolves to the same doc —
17
+ // idempotent). The client-supplied ≥128-bit `idempotencyKey` together with the
18
+ // deterministic appealId guarantees one record per retry.
19
+ //
20
+ // Every shape here is transcribed verbatim from docs/code_changes_needed/
21
+ // trust-and-safety/IMPLEMENTATION_PLAN.md Appendix A §A11 [H-09] — no invented
22
+ // values, no placeholders.
23
+ //
24
+ // Collection note: this cluster introduces a NEW Firestore collection (+ two
25
+ // append-only child subcollections); wiring collections.ts / path-builders.ts /
26
+ // registry.ts is deferred to the app leg (the orchestrator binds the schemas +
27
+ // path builders there); the deterministic doc-id shape is documented on each
28
+ // schema below. No shared enum is imported — the appeal kind/state/command/result
29
+ // vocabularies are appeal-local literals (the cross-cluster NciiAppealKind enum
30
+ // has two members; this schema pins the single literal it owns).
31
+ import { z } from 'zod';
32
+ // ===========================================================================
33
+ // §A11 [H-09] — appeal state + command vocabularies
34
+ // ===========================================================================
35
+ /** The AUTHORITATIVE appeal state (`nciiCases.appealState` projects this). */
36
+ export const NciiAppealStateSchema = z.enum([
37
+ 'submitted',
38
+ 'underReview',
39
+ 'granted',
40
+ 'denied',
41
+ 'withdrawn',
42
+ ]);
43
+ /** Durable command/retry/dead-letter status for the reinstatement/denial effect. */
44
+ export const NciiAppealCommandStatusSchema = z.enum([
45
+ 'pending',
46
+ 'executing',
47
+ 'applied',
48
+ 'deadLetter',
49
+ ]);
50
+ /** Durable command sub-record on the appeal — drives the reinstatement/denial
51
+ * effect with retry/dead-letter. */
52
+ export const NciiAppealCommandV1Schema = z.object({
53
+ commandId: z.string().min(1),
54
+ status: NciiAppealCommandStatusSchema,
55
+ attemptCount: z.number(),
56
+ nextAttemptAt: z.number().optional(),
57
+ leaseOwner: z.string().min(1).optional(),
58
+ leaseExpiresAt: z.number().optional(),
59
+ lastErrorCode: z.string().optional(),
60
+ }).strict();
61
+ // ===========================================================================
62
+ // §A11 [H-09] — nciiAppeals/{appealId}
63
+ // ===========================================================================
64
+ /** `nciiAppeals/{appealId}` — durable, append-only uploader-removal appeal. Doc id
65
+ * `appealId` is deterministic:
66
+ * `sha256('ncii-appeal-v1:' + caseId + ':' + appellantUid + ':' + removalGeneration)`
67
+ * (a retried submit resolves to the same doc — idempotent). */
68
+ export const NciiAppealV1Schema = z.object({
69
+ schemaVersion: z.literal(1),
70
+ // = sha256('ncii-appeal-v1:' + caseId + ':' + appellantUid + ':' + removalGeneration)
71
+ appealId: z.string().min(1),
72
+ caseId: z.string().min(1),
73
+ // the request(s)/removal this appeal contests
74
+ requestIds: z.array(z.string().min(1)).max(16),
75
+ // this schema is the uploader appeal ONLY
76
+ appealKind: z.literal('uploaderRemovalAppeal'),
77
+ // ties the appeal to the specific NciiRemovalJobV1 generation that removed the content
78
+ removalGeneration: z.number(),
79
+ // the AUTHENTICATED uploader whose content was removed
80
+ appellantUid: z.string().min(1),
81
+ // client-supplied, ≥128-bit; together with the deterministic appealId guarantees one record per retry
82
+ idempotencyKey: z.string().min(1),
83
+ // the AUTHORITATIVE appeal state (appealState projects this)
84
+ state: NciiAppealStateSchema,
85
+ // per-appeal review SLA (NciiPolicyConfigV1.uploaderRemovalAppealWindowDays); UI-independent monitor may arm on it
86
+ deadlineAt: z.number().optional(),
87
+ // durable command/retry/dead-letter state for the reinstatement/denial effect
88
+ command: NciiAppealCommandV1Schema,
89
+ createdAt: z.number(),
90
+ updatedAt: z.number(),
91
+ decidedAt: z.number().optional(),
92
+ }).strict();
93
+ // ===========================================================================
94
+ // §A11 [H-09] — nciiAppeals/{appealId}/submissions/{submissionId}
95
+ // IMMUTABLE append-only — the appellant's reason + evidence.
96
+ // ===========================================================================
97
+ /** Who created the submission. */
98
+ export const NciiAppealSubmissionAuthorSchema = z.enum(['appellant', 'operator']);
99
+ /** `nciiAppeals/{appealId}/submissions/{submissionId}` — IMMUTABLE append-only
100
+ * record of the appellant's reason + evidence. Doc id `submissionId` is a
101
+ * deterministic/assigned id (z.string().min(1)). */
102
+ export const NciiAppealSubmissionV1Schema = z.object({
103
+ schemaVersion: z.literal(1),
104
+ submissionId: z.string().min(1),
105
+ sequence: z.number(),
106
+ receivedAt: z.number(),
107
+ appellantStatement: z.string(),
108
+ evidenceIds: z.array(z.string().min(1)).max(16),
109
+ createdBy: NciiAppealSubmissionAuthorSchema,
110
+ }).strict();
111
+ // ===========================================================================
112
+ // §A11 [H-09] — nciiAppeals/{appealId}/decisions/{decisionId}
113
+ // IMMUTABLE append-only — ONLY `nciiAppealReviewer` may write a decision; a
114
+ // `granted` decision drives the reinstatement command + a child-safety hold is
115
+ // NEVER reversible through it.
116
+ // ===========================================================================
117
+ /** Appeal decision result. */
118
+ export const NciiAppealDecisionResultSchema = z.enum(['granted', 'denied']);
119
+ /** `nciiAppeals/{appealId}/decisions/{decisionId}` — IMMUTABLE append-only
120
+ * decision. ONLY `nciiAppealReviewer` may write a decision (capability pinned by
121
+ * literal). Doc id `decisionId` is a deterministic/assigned id (z.string().min(1)). */
122
+ export const NciiAppealDecisionV1Schema = z.object({
123
+ schemaVersion: z.literal(1),
124
+ decisionId: z.string().min(1),
125
+ result: NciiAppealDecisionResultSchema,
126
+ reviewerUid: z.string().min(1),
127
+ capability: z.literal('nciiAppealReviewer'),
128
+ basisSubmissionIds: z.array(z.string().min(1)).max(16),
129
+ rationaleRef: z.string(),
130
+ decidedAt: z.number(),
131
+ }).strict();
132
+ //# sourceMappingURL=appeals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appeals.js","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/appeals.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,mFAAmF;AACnF,gFAAgF;AAChF,oFAAoF;AACpF,uBAAuB;AACvB,EAAE;AACF,kFAAkF;AAClF,0EAA0E;AAC1E,8EAA8E;AAC9E,gFAAgF;AAChF,oFAAoF;AACpF,6DAA6D;AAC7D,EAAE;AACF,mFAAmF;AACnF,2EAA2E;AAC3E,+EAA+E;AAC/E,0DAA0D;AAC1D,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,2BAA2B;AAC3B,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,kFAAkF;AAClF,gFAAgF;AAChF,iEAAiE;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8E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: "likeness";
6
+ }>;
7
+ export type NciiCaseLane = z.infer<typeof NciiCaseLaneSchema>;
8
+ /** NON-AUTHORITATIVE projection of the durable NciiAppealV1 (the
9
+ * `uploaderRemovalAppeal` only) — derived from the appeal's latest decision; the
10
+ * appeal record, not this field, is the source of truth ([H-09]). Only
11
+ * `nciiAppealReviewer` may drive 'granted'/reinstate. */
12
+ export declare const NciiCaseAppealStateSchema: z.ZodEnum<{
13
+ underReview: "underReview";
14
+ none: "none";
15
+ denied: "denied";
16
+ submitted: "submitted";
17
+ granted: "granted";
18
+ }>;
19
+ export type NciiCaseAppealState = z.infer<typeof NciiCaseAppealStateSchema>;
20
+ /** `nciiCases/{caseId}` — the operational record; minimize-retention; child-link
21
+ * rows, never unbounded root arrays. Doc id `caseId` is a deterministic/assigned
22
+ * id (z.string().min(1)). NO case-level `fileDeleteAfter` [M3]: a single
23
+ * case-level timestamp could wrongly override a LATER-linked request, so each
24
+ * evidence row owns its own `deleteAfter` and each request owns its own
25
+ * PII/status/token schedule. */
26
+ export declare const NciiCaseV1Schema: z.ZodObject<{
27
+ schemaVersion: z.ZodLiteral<1>;
28
+ caseId: z.ZodString;
29
+ revision: z.ZodNumber;
30
+ lane: z.ZodEnum<{
31
+ ncii: "ncii";
32
+ likeness: "likeness";
33
+ }>;
34
+ internalStatus: z.ZodEnum<{
35
+ open: "open";
36
+ rejected: "rejected";
37
+ removed: "removed";
38
+ removalInProgress: "removalInProgress";
39
+ appealPending: "appealPending";
40
+ reinstated: "reinstated";
41
+ closed: "closed";
42
+ }>;
43
+ childSafetyLinkStatus: z.ZodEnum<{
44
+ none: "none";
45
+ assessmentPending: "assessmentPending";
46
+ linked: "linked";
47
+ resolvedNoChildSafetyCase: "resolvedNoChildSafetyCase";
48
+ }>;
49
+ crossover: z.ZodObject<{
50
+ minorAssessment: z.ZodEnum<{
51
+ unknown: "unknown";
52
+ adult: "adult";
53
+ possibleMinor: "possibleMinor";
54
+ confirmedMinor: "confirmedMinor";
55
+ }>;
56
+ csamAssessment: z.ZodEnum<{
57
+ notAssessed: "notAssessed";
58
+ notApparent: "notApparent";
59
+ apparentViolation: "apparentViolation";
60
+ validatedHashMatch: "validatedHashMatch";
61
+ }>;
62
+ childSafetyCaseId: z.ZodOptional<z.ZodString>;
63
+ assessedByUid: z.ZodOptional<z.ZodString>;
64
+ assessedAt: z.ZodOptional<z.ZodNumber>;
65
+ }, z.core.$strict>;
66
+ childSafetyCaseId: z.ZodOptional<z.ZodString>;
67
+ appealState: z.ZodEnum<{
68
+ underReview: "underReview";
69
+ none: "none";
70
+ denied: "denied";
71
+ submitted: "submitted";
72
+ granted: "granted";
73
+ }>;
74
+ nciiRemovalDeadlineAt: z.ZodOptional<z.ZodNumber>;
75
+ createdAt: z.ZodNumber;
76
+ updatedAt: z.ZodNumber;
77
+ }, z.core.$strict>;
78
+ export type NciiCaseV1 = z.infer<typeof NciiCaseV1Schema>;
79
+ /** `nciiCases/{caseId}/allegationLinks/{allegationId}` — links an allegation to
80
+ * the case. Doc id is the `allegationId`. */
81
+ export declare const NciiCaseAllegationLinkV1Schema: z.ZodObject<{
82
+ allegationId: z.ZodString;
83
+ linkedAt: z.ZodNumber;
84
+ linkedByUid: z.ZodString;
85
+ }, z.core.$strict>;
86
+ export type NciiCaseAllegationLinkV1 = z.infer<typeof NciiCaseAllegationLinkV1Schema>;
87
+ /** `nciiCases/{caseId}/requestLinks/{requestId}` — links a statutory request to
88
+ * the case. Doc id is the `requestId`. */
89
+ export declare const NciiCaseRequestLinkV1Schema: z.ZodObject<{
90
+ requestId: z.ZodString;
91
+ linkedAt: z.ZodNumber;
92
+ linkedByUid: z.ZodString;
93
+ }, z.core.$strict>;
94
+ export type NciiCaseRequestLinkV1 = z.infer<typeof NciiCaseRequestLinkV1Schema>;
95
+ /** Removal-action method on a `removalActions` row. */
96
+ export declare const NciiCaseRemovalActionMethodSchema: z.ZodEnum<{
97
+ tombstone: "tombstone";
98
+ accountAction: "accountAction";
99
+ assetBlock: "assetBlock";
100
+ }>;
101
+ export type NciiCaseRemovalActionMethod = z.infer<typeof NciiCaseRemovalActionMethodSchema>;
102
+ /** `nciiCases/{caseId}/removalActions/{actionId}` — append-only removal-action
103
+ * row. Doc id is the `actionId`. */
104
+ export declare const NciiCaseRemovalActionV1Schema: z.ZodObject<{
105
+ at: z.ZodNumber;
106
+ actorId: z.ZodString;
107
+ surface: z.ZodString;
108
+ targetItemType: z.ZodString;
109
+ targetItemId: z.ZodString;
110
+ method: z.ZodEnum<{
111
+ tombstone: "tombstone";
112
+ accountAction: "accountAction";
113
+ assetBlock: "assetBlock";
114
+ }>;
115
+ result: z.ZodString;
116
+ }, z.core.$strict>;
117
+ export type NciiCaseRemovalActionV1 = z.infer<typeof NciiCaseRemovalActionV1Schema>;
118
+ /** Provenance of a blocked exact hash. Transformed / non-identical content is
119
+ * NEVER auto-claimed identical. */
120
+ export declare const NciiBlockedHashSourceSchema: z.ZodEnum<{
121
+ requestEvidence: "requestEvidence";
122
+ platformOriginal: "platformOriginal";
123
+ platformCopy: "platformCopy";
124
+ knownIdenticalCopy: "knownIdenticalCopy";
125
+ }>;
126
+ export type NciiBlockedHashSource = z.infer<typeof NciiBlockedHashSourceSchema>;
127
+ /** Blocked-hash lifecycle. Reversal is restricted + audited; adult NCII hashes do
128
+ * NOT enter the CSAM hash system unless child-safety criteria independently
129
+ * apply. */
130
+ export declare const NciiBlockedHashStatusSchema: z.ZodEnum<{
131
+ active: "active";
132
+ reversed: "reversed";
133
+ }>;
134
+ export type NciiBlockedHashStatus = z.infer<typeof NciiBlockedHashStatusSchema>;
135
+ /** `nciiCases/{caseId}/blockedHashes/{hashId}` [F8] — exact-hash block. Doc id is
136
+ * the `hashId`. */
137
+ export declare const NciiBlockedHashV1Schema: z.ZodObject<{
138
+ hashId: z.ZodString;
139
+ algorithm: z.ZodLiteral<"sha256">;
140
+ digest: z.ZodString;
141
+ source: z.ZodEnum<{
142
+ requestEvidence: "requestEvidence";
143
+ platformOriginal: "platformOriginal";
144
+ platformCopy: "platformCopy";
145
+ knownIdenticalCopy: "knownIdenticalCopy";
146
+ }>;
147
+ createdAt: z.ZodNumber;
148
+ createdByUid: z.ZodString;
149
+ status: z.ZodEnum<{
150
+ active: "active";
151
+ reversed: "reversed";
152
+ }>;
153
+ reversedAt: z.ZodOptional<z.ZodNumber>;
154
+ reversedByUid: z.ZodOptional<z.ZodString>;
155
+ reversalReason: z.ZodOptional<z.ZodString>;
156
+ }, z.core.$strict>;
157
+ export type NciiBlockedHashV1 = z.infer<typeof NciiBlockedHashV1Schema>;
158
+ //# sourceMappingURL=cases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cases.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/cases.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,oDAAoD;AACpD,eAAO,MAAM,kBAAkB;;;EAA+B,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;yDAGyD;AACzD,eAAO,MAAM,yBAAyB;;;;;;EAMpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;gCAKgC;AAChC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoBlB,CAAC;AACZ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAM1D;6CAC6C;AAC7C,eAAO,MAAM,8BAA8B;;;;kBAIhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;0CAC0C;AAC1C,eAAO,MAAM,2BAA2B;;;;kBAI7B,CAAC;AACZ,MAAM,M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