@ttt-productions/ttt-core 0.4.0 → 0.4.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.
@@ -0,0 +1,25 @@
1
+ import type { AuditEvent } from '@ttt-productions/audit-core';
2
+ export type AuditEventType = 'creator.grantedToUser' | 'creator.revokedFromUser' | 'user.accountRegistered' | 'user.statusChanged' | 'user.accountBanned' | 'user.accountUnbanned' | 'admin.roleGranted' | 'admin.roleRevoked' | 'admin.roleSyncedFromDirectEdit' | 'admin.contentAppealReviewed' | 'admin.violationDecisionAccepted' | 'admin.libraryItemReviewed' | 'admin.futurePlansUpdated' | 'admin.rulesAndAgreementsUpdated' | 'project.newProjectCreated' | 'project.memberRoleChanged' | 'project.memberProfessionsChanged' | 'project.publicDetailsUpdated' | 'project.fileDeleted' | 'project.userInvited' | 'project.inviteAccepted' | 'project.inviteDeclined' | 'project.inviteCancelled' | 'project.inviteSharesUpdated' | 'project.jobListingCreated' | 'project.jobApplicationCreated' | 'project.jobApplicantAccepted' | 'project.jobClosed' | 'project.jobDeleted' | 'project.jobApplicantSaveToggled' | 'project.jobApplicantRejected' | 'project.sharesChanged' | 'skill.userSkillDeleted' | 'content.itemReported' | 'content.violationRecorded' | 'content.libraryItemSubmitted' | 'content.libraryItemPublished' | 'content.appealSubmitted' | 'content.violationAccepted' | 'content.taleDetailsUpdated' | 'content.taleCategoriesUpdated' | 'content.chapterCreated' | 'content.chapterDetailsUpdated' | 'content.tuneDetailsUpdated' | 'content.tuneCategoriesUpdated' | 'content.songCreated' | 'content.songDetailsUpdated' | 'content.televisionDetailsUpdated' | 'content.televisionCategoriesUpdated' | 'content.showCreated' | 'content.showDetailsUpdated' | 'payment.sessionCreated' | 'payment.donationCompleted' | 'payment.donationAbandoned' | 'payment.donationFailed' | 'admin.taskCheckedOut' | 'admin.taskCheckedIn' | 'admin.taskReleased' | 'admin.taskAutoReleased' | 'admin.taskDeferredLater' | 'project.opportunityCreated' | 'admin.opportunityCreated' | 'opportunity.replyCreated' | 'opportunity.closedByUser' | 'system.manualIntervention' | 'system.appConfigUpdated' | 'system.donationsArchived' | 'system.pendingMediaArchived' | 'system.profanityListSynced' | 'system.profanityListSyncSkipped' | 'system.orphanUploadsCleanedUp' | 'admin.profanityListUpdated' | 'social.streetzPostLiked' | 'social.streetzPostUnliked' | 'social.userFollowed' | 'social.userUnfollowed' | 'chat.channelCreated' | 'chat.channelUpdated' | 'chat.channelArchived' | 'chat.messageSent' | 'chat.adminThreadStarted' | 'chat.attachmentTimedOut';
3
+ /**
4
+ * TTT actor shape: the uid performing an audited action, plus whether they
5
+ * held an admin claim at the time.
6
+ */
7
+ export type TTTAuditActor = {
8
+ uid: string | null;
9
+ isAdmin: boolean;
10
+ };
11
+ /**
12
+ * TTT target shape: the uid the audited action affects (if any), plus the
13
+ * Firestore path of the affected document (if any).
14
+ */
15
+ export type TTTAuditTarget = {
16
+ uid: string | null;
17
+ ref: string | null;
18
+ };
19
+ /**
20
+ * The canonical TTT audit event document shape. Specializes the generic
21
+ * `AuditEvent` from @ttt-productions/audit-core with the TTT event-type
22
+ * union, actor shape, target shape, and a generic metadata bag.
23
+ */
24
+ export type TTTAuditEvent = AuditEvent<AuditEventType, TTTAuditActor, TTTAuditTarget, Record<string, unknown>>;
25
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,MAAM,cAAc,GAEtB,uBAAuB,GACvB,yBAAyB,GACzB,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,GAEtB,mBAAmB,GACnB,mBAAmB,GACnB,gCAAgC,GAChC,6BAA6B,GAC7B,iCAAiC,GACjC,2BAA2B,GAC3B,0BAA0B,GAC1B,iCAAiC,GAEjC,2BAA2B,GAC3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AAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,cAAc,EACd,aAAa,EACb,cAAc,EACd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxB,CAAC"}
@@ -0,0 +1,10 @@
1
+ // TTT audit event catalog. The `AuditEventType` union is the canonical list
2
+ // of all sensitive actions the system logs. The `TTTAuditActor` and
3
+ // `TTTAuditTarget` shapes describe who performed the action and what was
4
+ // affected. `TTTAuditEvent` specializes the generic `AuditEvent` from
5
+ // @ttt-productions/audit-core with the TTT-specific shapes.
6
+ //
7
+ // Backend writers and future native/TV/console readers all consume this
8
+ // catalog from here.
9
+ export {};
10
+ //# sourceMappingURL=audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,oEAAoE;AACpE,yEAAyE;AACzE,sEAAsE;AACtE,4DAA4D;AAC5D,EAAE;AACF,wEAAwE;AACxE,qBAAqB"}
@@ -8,4 +8,5 @@ export * from './messaging.js';
8
8
  export * from './moderation.js';
9
9
  export * from './admin.js';
10
10
  export * from './system.js';
11
+ export * from './audit.js';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -8,4 +8,5 @@ export * from './messaging.js';
8
8
  export * from './moderation.js';
9
9
  export * from './admin.js';
10
10
  export * from './system.js';
11
+ export * from './audit.js';
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ttt-core",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Core types, Firestore path constants, and shared constants for TTT Productions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -85,6 +85,7 @@
85
85
  "test": "vitest run"
86
86
  },
87
87
  "dependencies": {
88
+ "@ttt-productions/audit-core": "*",
88
89
  "@ttt-productions/chat-schemas": "*",
89
90
  "@ttt-productions/media-schemas": "*",
90
91
  "@ttt-productions/report-core": "*",