@ttt-productions/ttt-core 0.10.6 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/business-admin.d.ts +43 -0
- package/dist/constants/business-admin.d.ts.map +1 -0
- package/dist/constants/business-admin.js +52 -0
- package/dist/constants/business-admin.js.map +1 -0
- package/dist/constants/business-content.d.ts +34 -0
- package/dist/constants/business-content.d.ts.map +1 -0
- package/dist/constants/business-content.js +41 -0
- package/dist/constants/business-content.js.map +1 -0
- package/dist/constants/business-platform.d.ts +24 -0
- package/dist/constants/business-platform.d.ts.map +1 -0
- package/dist/constants/business-platform.js +29 -0
- package/dist/constants/business-platform.js.map +1 -0
- package/dist/constants/business-user.d.ts +15 -0
- package/dist/constants/business-user.d.ts.map +1 -0
- package/dist/constants/business-user.js +21 -0
- package/dist/constants/business-user.js.map +1 -0
- package/dist/constants/business-work-project.d.ts +44 -0
- package/dist/constants/business-work-project.d.ts.map +1 -0
- package/dist/constants/business-work-project.js +48 -0
- package/dist/constants/business-work-project.js.map +1 -0
- package/dist/constants/business.d.ts +5 -155
- package/dist/constants/business.d.ts.map +1 -1
- package/dist/constants/business.js +8 -177
- package/dist/constants/business.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +1617 -1617
- package/dist/media/domain-events-admin.d.ts +212 -0
- package/dist/media/domain-events-admin.d.ts.map +1 -0
- package/dist/media/domain-events-admin.js +100 -0
- package/dist/media/domain-events-admin.js.map +1 -0
- package/dist/media/domain-events-social.d.ts +112 -0
- package/dist/media/domain-events-social.d.ts.map +1 -0
- package/dist/media/domain-events-social.js +50 -0
- package/dist/media/domain-events-social.js.map +1 -0
- package/dist/media/domain-events-user.d.ts +222 -0
- package/dist/media/domain-events-user.d.ts.map +1 -0
- package/dist/media/domain-events-user.js +99 -0
- package/dist/media/domain-events-user.js.map +1 -0
- package/dist/media/domain-events-work.d.ts +597 -0
- package/dist/media/domain-events-work.d.ts.map +1 -0
- package/dist/media/domain-events-work.js +246 -0
- package/dist/media/domain-events-work.js.map +1 -0
- package/dist/media/domain-events.d.ts +4 -1135
- package/dist/media/domain-events.d.ts.map +1 -1
- package/dist/media/domain-events.js +8 -476
- package/dist/media/domain-events.js.map +1 -1
- package/dist/media/pending-media.d.ts +3449 -3449
- package/dist/permissions/work-project-permissions-data.d.ts +278 -0
- package/dist/permissions/work-project-permissions-data.d.ts.map +1 -0
- package/dist/permissions/work-project-permissions-data.js +275 -0
- package/dist/permissions/work-project-permissions-data.js.map +1 -0
- package/dist/permissions/work-project-permissions.d.ts +2 -277
- package/dist/permissions/work-project-permissions.d.ts.map +1 -1
- package/dist/permissions/work-project-permissions.js +4 -274
- package/dist/permissions/work-project-permissions.js.map +1 -1
- package/dist/schemas/work-project-management.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,178 +1,9 @@
|
|
|
1
|
-
// Business rule constants shared between frontend and backend
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
/** The maximum character length for a SquareStreetz post created on behalf of a workProject. */
|
|
10
|
-
export const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;
|
|
11
|
-
// --- Admin Task Priority System ---
|
|
12
|
-
export const TASK_PRIORITY = {
|
|
13
|
-
CRITICAL: 4,
|
|
14
|
-
HIGH: 3,
|
|
15
|
-
NORMAL: 2,
|
|
16
|
-
LOW: 1,
|
|
17
|
-
};
|
|
18
|
-
export const TASK_PRIORITY_LABELS = {
|
|
19
|
-
4: 'CRITICAL',
|
|
20
|
-
3: 'HIGH',
|
|
21
|
-
2: 'NORMAL',
|
|
22
|
-
1: 'LOW',
|
|
23
|
-
};
|
|
24
|
-
// --- Short Links ---
|
|
25
|
-
/** The length of the generated ID for short links. */
|
|
26
|
-
export const SHORT_LINK_LENGTH = 6;
|
|
27
|
-
/** The maximum number of attempts to generate a unique short link ID before failing. */
|
|
28
|
-
export const SHORT_LINK_MAX_ATTEMPTS = 5;
|
|
29
|
-
/** Character set for short link IDs. Excludes ambiguous characters (0, O, l, 1, I). */
|
|
30
|
-
export const SHORT_LINK_CHARS = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789';
|
|
31
|
-
// --- Firestore Limits ---
|
|
32
|
-
/** Maximum operations in a single Firestore write batch. */
|
|
33
|
-
export const FIRESTORE_BATCH_LIMIT = 500;
|
|
34
|
-
// --- User Display Names ---
|
|
35
|
-
/** Minimum length for a user display name (inclusive). */
|
|
36
|
-
export const USERNAME_MIN_LENGTH = 3;
|
|
37
|
-
/** Maximum length for a user display name (inclusive). */
|
|
38
|
-
export const USERNAME_MAX_LENGTH = 20;
|
|
39
|
-
/** Allowed characters in a user display name: letters and numbers only. */
|
|
40
|
-
export const USERNAME_REGEX = /^[a-zA-Z0-9]+$/;
|
|
41
|
-
// --- User Profile Craft Skills ---
|
|
42
|
-
/** Maximum number of craft-skills a user can upload to their profile. */
|
|
43
|
-
export const CRAFT_SKILL_LIMIT = 8;
|
|
44
|
-
/** Maximum number of tags allowed per craftSkill. */
|
|
45
|
-
export const MAX_CRAFT_SKILL_TAGS = 5;
|
|
46
|
-
// --- Mention History ---
|
|
47
|
-
/** Maximum number of recent mentions kept in the user's mention-history hook. */
|
|
48
|
-
export const MAX_HISTORY_ITEMS = 10;
|
|
49
|
-
// --- Search ---
|
|
50
|
-
/** Maximum number of results returned by the search hook. */
|
|
51
|
-
export const SEARCH_RESULT_LIMIT = 6;
|
|
52
|
-
// --- WorkProject Titles & Descriptions ---
|
|
53
|
-
/** Maximum length for a workProject title. */
|
|
54
|
-
export const MAX_WORK_PROJECT_TITLE_LENGTH = 150;
|
|
55
|
-
/** Maximum length for a workProject description. */
|
|
56
|
-
export const MAX_WORK_PROJECT_DESCRIPTION_LENGTH = 300;
|
|
57
|
-
/** Maximum number of files attached to a workProject. */
|
|
58
|
-
export const MAX_WORK_ASSETS = 5;
|
|
59
|
-
/** Maximum file size for workProject file attachments, in bytes (5MB). */
|
|
60
|
-
export const MAX_WORK_ASSET_FILE_SIZE = 5 * 1024 * 1024;
|
|
61
|
-
/** Allowed characters in titles: letters, numbers, spaces. */
|
|
62
|
-
export const TITLE_PATTERN = /^[a-zA-Z0-9 ]+$/;
|
|
63
|
-
/** Maximum number of auditions a single workProject can have open at once. */
|
|
64
|
-
export const MAX_WORK_PROJECT_AUDITIONS = 3;
|
|
65
|
-
// --- WorkProject Subtypes (Tales / Tunes / Television) ---
|
|
66
|
-
// Length aliases — kept as named exports so call sites read clearly.
|
|
67
|
-
export const MAX_TALE_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;
|
|
68
|
-
export const MAX_TALE_DESCRIPTION_LENGTH = MAX_WORK_PROJECT_DESCRIPTION_LENGTH;
|
|
69
|
-
export const MAX_TUNE_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;
|
|
70
|
-
export const MAX_TUNE_DESCRIPTION_LENGTH = MAX_WORK_PROJECT_DESCRIPTION_LENGTH;
|
|
71
|
-
export const MAX_TELEVISION_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;
|
|
72
|
-
export const MAX_TELEVISION_DESCRIPTION_LENGTH = MAX_WORK_PROJECT_DESCRIPTION_LENGTH;
|
|
73
|
-
/** Maximum number of chapters a Tale can have. */
|
|
74
|
-
export const MAX_CHAPTERS = 10;
|
|
75
|
-
/** Maximum length for a chapter title. */
|
|
76
|
-
export const MAX_CHAPTER_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;
|
|
77
|
-
/** Maximum length for chapter body content. */
|
|
78
|
-
export const MAX_CHAPTER_CONTENT_LENGTH = 2500;
|
|
79
|
-
/** Maximum number of tracks a Tunes workProject can have. */
|
|
80
|
-
export const MAX_TUNE_TRACKS = 10;
|
|
81
|
-
/** Maximum length for a track title. */
|
|
82
|
-
export const MAX_TUNE_TRACK_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;
|
|
83
|
-
/** Maximum length for a track description. */
|
|
84
|
-
export const MAX_TUNE_TRACK_DESCRIPTION_LENGTH = MAX_WORK_PROJECT_DESCRIPTION_LENGTH;
|
|
85
|
-
/** Maximum number of episodes a Television workProject can have. */
|
|
86
|
-
export const MAX_TELEVISION_EPISODES = 10;
|
|
87
|
-
/** Maximum length for an episode title. */
|
|
88
|
-
export const MAX_TELEVISION_EPISODE_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;
|
|
89
|
-
/** Maximum length for an episode description. */
|
|
90
|
-
export const MAX_TELEVISION_EPISODE_DESCRIPTION_LENGTH = MAX_WORK_PROJECT_DESCRIPTION_LENGTH;
|
|
91
|
-
// --- Commission Board & Proposals ---
|
|
92
|
-
/** Maximum number of open commissions a workProject can have. */
|
|
93
|
-
export const MAX_COMMISSION_LISTINGS = 5;
|
|
94
|
-
/** Maximum number of proposal artisans saved to a commission. */
|
|
95
|
-
export const MAX_SAVED_PROPOSAL_ARTISANS = 5;
|
|
96
|
-
/** Maximum length for a commission title. */
|
|
97
|
-
export const MAX_COMMISSION_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;
|
|
98
|
-
/** Maximum length for a commission description / cover letter. */
|
|
99
|
-
export const MAX_COMMISSION_DESCRIPTION_LENGTH = 400;
|
|
100
|
-
// --- Auditions ---
|
|
101
|
-
/** Maximum length for an audition title. */
|
|
102
|
-
export const MAX_AUDITION_TITLE_LENGTH = 150;
|
|
103
|
-
/** Maximum length for an audition description. */
|
|
104
|
-
export const MAX_AUDITION_DESCRIPTION_LENGTH = 1000;
|
|
105
|
-
/**
|
|
106
|
-
* Maximum sponsored-audition payout amount in whole USD accepted at the upload
|
|
107
|
-
* trust boundary. Mirrors MAX_PLEDGE_PAYMENT_AMOUNT_CENTS ($500,000) expressed
|
|
108
|
-
* in dollars — a finite ceiling that rejects absurd/garbage amounts before any
|
|
109
|
-
* downstream processing.
|
|
110
|
-
*/
|
|
111
|
-
export const MAX_SPONSORED_AUDITION_AMOUNT_USD = 500_000;
|
|
112
|
-
// --- SquareStreetz (Social Feed) ---
|
|
113
|
-
/** Maximum length for a SquareStreetz post. */
|
|
114
|
-
export const MAX_POST_LENGTH = 500;
|
|
115
|
-
/** Maximum number of mentions allowed in a single SquareStreetz post. */
|
|
116
|
-
export const MAX_MENTIONS = 3;
|
|
117
|
-
/** Maximum characters of a mention's display name shown before truncation. */
|
|
118
|
-
export const MAX_MENTION_DISPLAY_LENGTH = 30;
|
|
119
|
-
// --- Messages & Invites ---
|
|
120
|
-
/** Maximum length for a guild-invite message. */
|
|
121
|
-
export const MAX_GUILD_INVITE_MESSAGE_LENGTH = 500;
|
|
122
|
-
/** Maximum length for a pledgePayment message. */
|
|
123
|
-
export const MAX_PLEDGE_PAYMENT_MESSAGE_LENGTH = 500;
|
|
124
|
-
/** Maximum length for a chat reply-to preview snippet stored on an attachment. */
|
|
125
|
-
export const MAX_CHAT_REPLY_PREVIEW_LENGTH = 280;
|
|
126
|
-
// --- Admin Dispatches ---
|
|
127
|
-
/** Maximum length for an admin-dispatch subject line. */
|
|
128
|
-
export const MAX_ADMIN_DISPATCH_SUBJECT_LENGTH = 100;
|
|
129
|
-
/** Maximum length for the initial body text of an admin dispatch. */
|
|
130
|
-
export const MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH = 1000;
|
|
131
|
-
// --- Content Moderation Workflow ---
|
|
132
|
-
/** Maximum length for a content-violation appeal message. */
|
|
133
|
-
export const MAX_APPEAL_MESSAGE_LENGTH = 1000;
|
|
134
|
-
/** Maximum length for a feedback suggestion. */
|
|
135
|
-
export const MAX_FEEDBACK_SUGGESTION_LENGTH = 100;
|
|
136
|
-
/** Maximum number of distinct submitters tracked per feedback suggestion. */
|
|
137
|
-
export const MAX_FEEDBACK_SUBMITTERS = 100;
|
|
138
|
-
/**
|
|
139
|
-
* Canonical list of feedback types accepted by `submitFeedback`. Used both
|
|
140
|
-
* for runtime validation in the schema (`SubmitFeedbackInputSchema`) and
|
|
141
|
-
* for type-safe consumer props on the frontend `<FeedbackSubmission />`
|
|
142
|
-
* component. Adding a new type here is the single source of truth — no
|
|
143
|
-
* mirroring in callers required.
|
|
144
|
-
*/
|
|
145
|
-
export const FEEDBACK_TYPES = [
|
|
146
|
-
'tradeProfessionSuggestions',
|
|
147
|
-
'craftSkillTagSuggestions',
|
|
148
|
-
'talesWorkGenreSuggestions',
|
|
149
|
-
'tunesWorkGenreSuggestions',
|
|
150
|
-
'televisionWorkGenreSuggestions',
|
|
151
|
-
];
|
|
152
|
-
/** Maximum number of items submitted in a single hallLibrary-review submission. */
|
|
153
|
-
export const MAX_HALL_LIBRARY_SUBMIT_BATCH = 50;
|
|
154
|
-
// --- Admin Tasks ---
|
|
155
|
-
/** Admin task lifecycle statuses. */
|
|
156
|
-
export const ADMIN_TASK_STATUS = {
|
|
157
|
-
PENDING: 'pending',
|
|
158
|
-
CHECKED_OUT: 'checkedOut',
|
|
159
|
-
WORK_LATER: 'workLater',
|
|
160
|
-
COMPLETED: 'completed',
|
|
161
|
-
};
|
|
162
|
-
// --- Payments ---
|
|
163
|
-
/**
|
|
164
|
-
* Minimum pledgePayment amount accepted by the Stripe checkout flow, in cents
|
|
165
|
-
* (USD). 50¢ is Stripe's hard floor for a card charge. Promoted out of the Zod
|
|
166
|
-
* schema so the webhook can re-assert it server-side against the Stripe-confirmed
|
|
167
|
-
* amount, independent of the client input bound.
|
|
168
|
-
*/
|
|
169
|
-
export const MIN_PLEDGE_PAYMENT_AMOUNT_CENTS = 50;
|
|
170
|
-
/**
|
|
171
|
-
* Maximum pledgePayment amount accepted by the Stripe checkout flow, in cents
|
|
172
|
-
* (USD). $500,000.00. Well below Stripe's hard per-charge ceiling, but
|
|
173
|
-
* high enough that legitimate large gifts pass without friction. Anything
|
|
174
|
-
* above this is rejected by the schema before a Stripe session is created
|
|
175
|
-
* or any rate-limit / audit-event side effects are incurred.
|
|
176
|
-
*/
|
|
177
|
-
export const MAX_PLEDGE_PAYMENT_AMOUNT_CENTS = 50_000_000;
|
|
1
|
+
// Business rule constants shared between frontend and backend, split by domain.
|
|
2
|
+
// This barrel re-exports the per-domain files so the published constants surface
|
|
3
|
+
// (and every existing `constants/business.js` import) stays unchanged.
|
|
4
|
+
export * from "./business-work-project.js";
|
|
5
|
+
export * from "./business-content.js";
|
|
6
|
+
export * from "./business-admin.js";
|
|
7
|
+
export * from "./business-user.js";
|
|
8
|
+
export * from "./business-platform.js";
|
|
178
9
|
//# sourceMappingURL=business.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.js","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"business.js","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,iFAAiF;AACjF,uEAAuE;AACvE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|