@headless-lms/core 0.3.0 → 0.4.0
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/assets/events.d.ts +9 -9
- package/dist/assets/index.d.ts +3 -2
- package/dist/assets/index.js +2 -1
- package/dist/assets/jobs.d.ts +15 -0
- package/dist/assets/jobs.js +30 -0
- package/dist/assets/jobs.js.map +1 -0
- package/dist/assets/ports.d.ts +4 -3
- package/dist/assets/service.d.ts +0 -1
- package/dist/assets/service.js +0 -4
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.js +2 -63
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.d.ts +1 -2
- package/dist/automations/catalog.js +69 -62
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.js +4 -4
- package/dist/automations/community-derivations.js.map +1 -1
- package/dist/automations/community-mail.d.ts +3 -17
- package/dist/automations/community-mail.js +1 -21
- package/dist/automations/community-mail.js.map +1 -1
- package/dist/automations/events.d.ts +0 -10
- package/dist/automations/index.d.ts +11 -4
- package/dist/automations/index.js +8 -1
- package/dist/automations/notifications/debounce.d.ts +25 -0
- package/dist/automations/notifications/debounce.js +93 -0
- package/dist/automations/notifications/debounce.js.map +1 -0
- package/dist/automations/notifications/defaults.d.ts +8 -0
- package/dist/automations/notifications/defaults.js +316 -0
- package/dist/automations/notifications/defaults.js.map +1 -0
- package/dist/automations/notifications/delivery.d.ts +28 -0
- package/dist/automations/notifications/delivery.js +88 -0
- package/dist/automations/notifications/delivery.js.map +1 -0
- package/dist/automations/notifications/processor.d.ts +64 -0
- package/dist/automations/notifications/processor.js +270 -0
- package/dist/automations/notifications/processor.js.map +1 -0
- package/dist/automations/notifications/rules/content.d.ts +6 -0
- package/dist/automations/notifications/rules/content.js +39 -0
- package/dist/automations/notifications/rules/content.js.map +1 -0
- package/dist/automations/notifications/rules/discussion.d.ts +7 -0
- package/dist/automations/notifications/rules/discussion.js +678 -0
- package/dist/automations/notifications/rules/discussion.js.map +1 -0
- package/dist/automations/notifications/rules/entitlements.d.ts +6 -0
- package/dist/automations/notifications/rules/entitlements.js +249 -0
- package/dist/automations/notifications/rules/entitlements.js.map +1 -0
- package/dist/automations/notifications/rules/index.d.ts +6 -0
- package/dist/automations/notifications/rules/index.js +15 -0
- package/dist/automations/notifications/rules/index.js.map +1 -0
- package/dist/automations/notifications/rules/organizations.d.ts +6 -0
- package/dist/automations/notifications/rules/organizations.js +28 -0
- package/dist/automations/notifications/rules/organizations.js.map +1 -0
- package/dist/automations/notifications/rules/recipients.d.ts +32 -0
- package/dist/automations/notifications/rules/recipients.js +99 -0
- package/dist/automations/notifications/rules/recipients.js.map +1 -0
- package/dist/automations/notifications/service.d.ts +27 -0
- package/dist/automations/notifications/service.js +45 -0
- package/dist/automations/notifications/service.js.map +1 -0
- package/dist/automations/notifications/types.d.ts +7 -0
- package/dist/automations/notifications/types.js +473 -0
- package/dist/automations/notifications/types.js.map +1 -0
- package/dist/automations/ports.d.ts +119 -5
- package/dist/automations/service.d.ts +10 -13
- package/dist/automations/service.js +21 -83
- package/dist/automations/service.js.map +1 -1
- package/dist/content/events.d.ts +130 -80
- package/dist/content/events.js +11 -0
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +6 -4
- package/dist/content/index.js +3 -1
- package/dist/content/model.d.ts +2 -2
- package/dist/content/notification-categories.d.ts +36 -0
- package/dist/content/notification-categories.js +64 -0
- package/dist/content/notification-categories.js.map +1 -0
- package/dist/content/ports.d.ts +25 -6
- package/dist/content/service.d.ts +4 -4
- package/dist/content/service.js +24 -8
- package/dist/content/service.js.map +1 -1
- package/dist/content/titles.d.ts +22 -0
- package/dist/content/titles.js +69 -0
- package/dist/content/titles.js.map +1 -0
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/chats.d.ts +9 -4
- package/dist/discussion/chats.js +80 -47
- package/dist/discussion/chats.js.map +1 -1
- package/dist/discussion/digests.d.ts +24 -0
- package/dist/discussion/digests.js +104 -0
- package/dist/discussion/digests.js.map +1 -0
- package/dist/discussion/events.d.ts +194 -28
- package/dist/discussion/events.js +74 -17
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +7 -2
- package/dist/discussion/index.js +6 -1
- package/dist/discussion/jobs.d.ts +16 -0
- package/dist/discussion/jobs.js +40 -0
- package/dist/discussion/jobs.js.map +1 -0
- package/dist/discussion/mentions.d.ts +11 -0
- package/dist/discussion/mentions.js +35 -0
- package/dist/discussion/mentions.js.map +1 -0
- package/dist/discussion/ports.d.ts +107 -24
- package/dist/discussion/ports.js.map +1 -1
- package/dist/discussion/posts.d.ts +18 -8
- package/dist/discussion/posts.js +207 -155
- package/dist/discussion/posts.js.map +1 -1
- package/dist/discussion/service.d.ts +17 -8
- package/dist/discussion/service.js +105 -41
- package/dist/discussion/service.js.map +1 -1
- package/dist/discussion/subscriptions.d.ts +37 -0
- package/dist/discussion/subscriptions.js +99 -0
- package/dist/discussion/subscriptions.js.map +1 -0
- package/dist/discussion/titles.d.ts +26 -0
- package/dist/discussion/titles.js +84 -0
- package/dist/discussion/titles.js.map +1 -0
- package/dist/entitlements/events.d.ts +20 -20
- package/dist/entitlements/index.d.ts +2 -1
- package/dist/entitlements/index.js +2 -1
- package/dist/entitlements/jobs.d.ts +12 -0
- package/dist/entitlements/jobs.js +18 -0
- package/dist/entitlements/jobs.js.map +1 -0
- package/dist/entitlements/ports.d.ts +7 -3
- package/dist/entitlements/service.d.ts +5 -2
- package/dist/entitlements/service.js +23 -3
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/devices.d.ts +30 -0
- package/dist/identity/devices.js +107 -0
- package/dist/identity/devices.js.map +1 -0
- package/dist/identity/events.d.ts +2 -2
- package/dist/identity/index.d.ts +5 -4
- package/dist/identity/index.js +3 -2
- package/dist/identity/model.d.ts +2 -2
- package/dist/identity/notification-settings.d.ts +28 -0
- package/dist/identity/notification-settings.js +113 -0
- package/dist/identity/notification-settings.js.map +1 -0
- package/dist/identity/ports.d.ts +78 -54
- package/dist/integrations/events.d.ts +3 -3
- package/dist/organizations/events.d.ts +32 -32
- package/dist/organizations/index.d.ts +2 -1
- package/dist/organizations/index.js +2 -1
- package/dist/organizations/notification-categories.d.ts +32 -0
- package/dist/organizations/notification-categories.js +51 -0
- package/dist/organizations/notification-categories.js.map +1 -0
- package/dist/organizations/ports.d.ts +3 -0
- package/dist/organizations/service.d.ts +2 -0
- package/dist/organizations/service.js +7 -0
- package/dist/organizations/service.js.map +1 -1
- package/dist/progress/events.d.ts +14 -14
- package/dist/reporting/member/index.d.ts +2 -2
- package/dist/reporting/member/model.d.ts +56 -23
- package/dist/reporting/member/ports.d.ts +9 -6
- package/dist/reporting/member/service.d.ts +33 -14
- package/dist/reporting/member/service.js +138 -60
- package/dist/reporting/member/service.js.map +1 -1
- package/dist/shared/errors.d.ts +13 -1
- package/dist/shared/errors.js +18 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +3 -0
- package/dist/shared/id.js +4 -1
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/mailer.d.ts +11 -1
- package/dist/shared/mailer.js +32 -5
- package/dist/shared/mailer.js.map +1 -1
- package/dist/shared/notification-categories.d.ts +16 -0
- package/dist/shared/notification-categories.js +94 -0
- package/dist/shared/notification-categories.js.map +1 -0
- package/dist/shared/notification-settings.d.ts +14 -0
- package/dist/shared/notification-settings.js +61 -0
- package/dist/shared/notification-settings.js.map +1 -0
- package/dist/shared/ports.d.ts +48 -2
- package/dist/shared/settings.d.ts +2 -1
- package/dist/shared/settings.js +1 -0
- package/dist/shared/settings.js.map +1 -1
- package/dist/types/automations.d.ts +8 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +2 -2
- package/dist/types/email-templates.d.ts +97 -3
- package/dist/types/identity.d.ts +2 -2
- package/dist/types/index.d.ts +7 -6
- package/dist/types/notifications.d.ts +157 -0
- package/dist/types/notifications.js +1 -0
- package/dist/types/schemas/automations.d.ts +1 -10
- package/dist/types/schemas/automations.js +1 -3
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +62 -1
- package/dist/types/schemas/content.js +25 -3
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +85 -12
- package/dist/types/schemas/discussion.js +47 -13
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +1 -85
- package/dist/types/schemas/identity.js +1 -42
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +6 -5
- package/dist/types/schemas/index.js +6 -5
- package/dist/types/schemas/notifications.d.ts +95 -0
- package/dist/types/schemas/notifications.js +56 -0
- package/dist/types/schemas/notifications.js.map +1 -0
- package/dist/types/schemas/progress.d.ts +3 -3
- package/package.json +1 -1
- package/dist/automations/community-notifications.d.ts +0 -16
- package/dist/automations/community-notifications.js +0 -84
- package/dist/automations/community-notifications.js.map +0 -1
- package/dist/automations/seeds.d.ts +0 -17
- package/dist/automations/seeds.js +0 -235
- package/dist/automations/seeds.js.map +0 -1
- package/dist/identity/notifications.d.ts +0 -27
- package/dist/identity/notifications.js +0 -101
- package/dist/identity/notifications.js.map +0 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { JsonValue } from "./shared.js";
|
|
2
|
+
import { EmailTemplateId } from "./email-templates.js";
|
|
3
|
+
//#region src/types/notifications.d.ts
|
|
4
|
+
type Reason = 'subject' | 'post_author' | 'comment_author' | 'message_author' | 'follower' | 'thread_participant' | 'mentioned' | 'participant' | 'space_member' | 'community_member' | 'course_member' | 'moderator' | 'staff';
|
|
5
|
+
type Scope = 'org' | 'community' | 'space' | 'chat';
|
|
6
|
+
interface SubjectRef {
|
|
7
|
+
type: 'post' | 'comment' | 'chat' | 'message' | 'space' | 'community' | 'course' | 'download' | 'bundle' | 'activity';
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
interface NotificationTypeDeclaration {
|
|
11
|
+
type: string;
|
|
12
|
+
scopes: Scope[];
|
|
13
|
+
reasons: Reason[];
|
|
14
|
+
display: Partial<Record<Scope, string[]>>;
|
|
15
|
+
email?: Partial<Record<Scope, {
|
|
16
|
+
template: EmailTemplateId;
|
|
17
|
+
byReason?: Partial<Record<Reason, EmailTemplateId>>;
|
|
18
|
+
}>>;
|
|
19
|
+
push?: Partial<Record<Scope, {
|
|
20
|
+
title: string;
|
|
21
|
+
body: string;
|
|
22
|
+
}>>;
|
|
23
|
+
}
|
|
24
|
+
interface NotificationCategory {
|
|
25
|
+
key: string;
|
|
26
|
+
covers: {
|
|
27
|
+
type: string;
|
|
28
|
+
reasons: Reason[];
|
|
29
|
+
}[];
|
|
30
|
+
channels: Record<string, {
|
|
31
|
+
default: boolean;
|
|
32
|
+
locked: boolean;
|
|
33
|
+
}>;
|
|
34
|
+
perSpace?: boolean;
|
|
35
|
+
spaceDefaults?: Record<string, Record<string, boolean>>;
|
|
36
|
+
}
|
|
37
|
+
interface StoredNotification {
|
|
38
|
+
id: string;
|
|
39
|
+
orgId: string;
|
|
40
|
+
userId: string;
|
|
41
|
+
type: string;
|
|
42
|
+
scope: Scope;
|
|
43
|
+
reasons: Reason[];
|
|
44
|
+
matchedReason: Reason;
|
|
45
|
+
category: string;
|
|
46
|
+
communityId: string | null;
|
|
47
|
+
spaceId: string | null;
|
|
48
|
+
actorOrgUserId: string | null;
|
|
49
|
+
subject: SubjectRef | null;
|
|
50
|
+
parent: SubjectRef | null;
|
|
51
|
+
display: Record<string, JsonValue>;
|
|
52
|
+
createdAt: Date;
|
|
53
|
+
}
|
|
54
|
+
type DeliveryStatus = 'pending' | 'sent' | 'failed';
|
|
55
|
+
interface Delivery {
|
|
56
|
+
id: string;
|
|
57
|
+
notificationId: string;
|
|
58
|
+
channel: string;
|
|
59
|
+
status: DeliveryStatus;
|
|
60
|
+
lastError: string | null;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
sentAt: Date | null;
|
|
63
|
+
}
|
|
64
|
+
interface StoredSetting {
|
|
65
|
+
communityId: string | null;
|
|
66
|
+
spaceId: string | null;
|
|
67
|
+
category: string;
|
|
68
|
+
channel: string;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
}
|
|
71
|
+
type SettingsScope = {
|
|
72
|
+
communityId: string;
|
|
73
|
+
} | 'org';
|
|
74
|
+
interface PushDevice {
|
|
75
|
+
id: string;
|
|
76
|
+
provider: 'apns' | 'fcm' | 'webpush';
|
|
77
|
+
token: string;
|
|
78
|
+
p256dh: string | null;
|
|
79
|
+
auth: string | null;
|
|
80
|
+
appId: string | null;
|
|
81
|
+
environment: 'production' | 'sandbox' | null;
|
|
82
|
+
}
|
|
83
|
+
interface PushMessage {
|
|
84
|
+
title: string;
|
|
85
|
+
body: string;
|
|
86
|
+
data: {
|
|
87
|
+
notificationId: string;
|
|
88
|
+
type: string;
|
|
89
|
+
subject: SubjectRef | null;
|
|
90
|
+
parent: SubjectRef | null;
|
|
91
|
+
communityId: string | null;
|
|
92
|
+
spaceId: string | null;
|
|
93
|
+
courseId: string | null;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
interface ChannelRecipient {
|
|
97
|
+
email?: string;
|
|
98
|
+
devices?: PushDevice[];
|
|
99
|
+
address?: JsonValue;
|
|
100
|
+
}
|
|
101
|
+
interface DeliveryResult {
|
|
102
|
+
accepted: boolean;
|
|
103
|
+
deadDeviceIds: string[];
|
|
104
|
+
error?: string;
|
|
105
|
+
}
|
|
106
|
+
interface NotificationFilter {
|
|
107
|
+
scope?: 'org' | 'community';
|
|
108
|
+
communityId?: string;
|
|
109
|
+
includeOrg?: boolean;
|
|
110
|
+
category?: string[];
|
|
111
|
+
reason?: Reason[];
|
|
112
|
+
type?: string[];
|
|
113
|
+
unread?: boolean;
|
|
114
|
+
}
|
|
115
|
+
interface RecipientList {
|
|
116
|
+
type: string;
|
|
117
|
+
scope: Scope;
|
|
118
|
+
actorOrgUserId: string | null;
|
|
119
|
+
communityId: string | null;
|
|
120
|
+
spaceId: string | null;
|
|
121
|
+
subject: SubjectRef | null;
|
|
122
|
+
parent: SubjectRef | null;
|
|
123
|
+
display: Record<string, JsonValue>;
|
|
124
|
+
recipients?: {
|
|
125
|
+
orgUserId: string;
|
|
126
|
+
userId: string;
|
|
127
|
+
reasons: Reason[];
|
|
128
|
+
}[];
|
|
129
|
+
audience?: {
|
|
130
|
+
reason: 'space_member';
|
|
131
|
+
spaceId: string;
|
|
132
|
+
exclude: string[];
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
type PushProvider = PushDevice['provider'];
|
|
136
|
+
interface DeviceView extends PushDevice {
|
|
137
|
+
lastSeenAt: Date;
|
|
138
|
+
}
|
|
139
|
+
interface PushConfig {
|
|
140
|
+
apns?: {
|
|
141
|
+
teamId: string;
|
|
142
|
+
keyId: string;
|
|
143
|
+
key: string;
|
|
144
|
+
bundleIds: string[];
|
|
145
|
+
};
|
|
146
|
+
fcm?: {
|
|
147
|
+
serviceAccount: Record<string, unknown>;
|
|
148
|
+
};
|
|
149
|
+
webpush?: {
|
|
150
|
+
publicKey: string;
|
|
151
|
+
privateKey: string;
|
|
152
|
+
subject: string;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export { ChannelRecipient, Delivery, DeliveryResult, DeliveryStatus, DeviceView, NotificationCategory, NotificationFilter, NotificationTypeDeclaration, PushConfig, PushDevice, PushMessage, PushProvider, Reason, RecipientList, Scope, SettingsScope, StoredNotification, StoredSetting, SubjectRef };
|
|
157
|
+
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,11 +12,6 @@ declare const automationKindSchema: z.ZodEnum<{
|
|
|
12
12
|
webhook: "webhook";
|
|
13
13
|
}>;
|
|
14
14
|
type AutomationKind = z.infer<typeof automationKindSchema>;
|
|
15
|
-
declare const automationSourceSchema: z.ZodEnum<{
|
|
16
|
-
system: "system";
|
|
17
|
-
user: "user";
|
|
18
|
-
}>;
|
|
19
|
-
type AutomationSource = z.infer<typeof automationSourceSchema>;
|
|
20
15
|
declare const automationActionSchema: z.ZodObject<{
|
|
21
16
|
type: z.ZodString;
|
|
22
17
|
input: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
@@ -38,10 +33,6 @@ declare const automationSchema: z.ZodObject<{
|
|
|
38
33
|
}, z.core.$strict>>;
|
|
39
34
|
enabled: z.ZodBoolean;
|
|
40
35
|
filter: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
41
|
-
source: z.ZodEnum<{
|
|
42
|
-
system: "system";
|
|
43
|
-
user: "user";
|
|
44
|
-
}>;
|
|
45
36
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
46
37
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
47
38
|
}, z.core.$strict>;
|
|
@@ -198,5 +189,5 @@ declare const createdWebhookSchema: z.ZodObject<{
|
|
|
198
189
|
}, z.core.$strict>;
|
|
199
190
|
type CreatedWebhook = z.output<typeof createdWebhookSchema>;
|
|
200
191
|
//#endregion
|
|
201
|
-
export { Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery,
|
|
192
|
+
export { Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableActions, AvailableTriggers, CreateAutomationInput, CreateWebhookInput, CreatedWebhook, DeliverWebhookInput, MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, UpdateAutomationInput, UpdateWebhookInput, Webhook, WebhookSecret, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
|
|
202
193
|
//# sourceMappingURL=automations.d.ts.map
|
|
@@ -8,7 +8,6 @@ const MAX_WEBHOOK_EVENTS = 100;
|
|
|
8
8
|
const automationTriggerSchema = z.string().trim().min(1);
|
|
9
9
|
const automationTriggersSchema = z.array(automationTriggerSchema).min(1).max(20);
|
|
10
10
|
const automationKindSchema = z.enum(["workflow", "webhook"]);
|
|
11
|
-
const automationSourceSchema = z.enum(["system", "user"]);
|
|
12
11
|
const automationActionSchema = z.object({
|
|
13
12
|
type: z.string().trim().min(1),
|
|
14
13
|
input: jsonRecordSchema
|
|
@@ -23,7 +22,6 @@ const automationSchema = z.object({
|
|
|
23
22
|
actions: z.array(automationActionSchema),
|
|
24
23
|
enabled: z.boolean(),
|
|
25
24
|
filter: jsonRecordSchema.nullable(),
|
|
26
|
-
source: automationSourceSchema,
|
|
27
25
|
createdAt: z.coerce.date(),
|
|
28
26
|
updatedAt: z.coerce.date()
|
|
29
27
|
}).strict();
|
|
@@ -108,6 +106,6 @@ const updateWebhookInputSchema = createWebhookInputSchema.partial().extend({ ena
|
|
|
108
106
|
const webhookSecretSchema = z.object({ secret: z.string() }).strict();
|
|
109
107
|
const createdWebhookSchema = webhookSchema.extend({ secret: z.string() }).strict();
|
|
110
108
|
//#endregion
|
|
111
|
-
export { MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema,
|
|
109
|
+
export { MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
|
|
112
110
|
|
|
113
111
|
//# sourceMappingURL=automations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.js","names":[],"sources":["../../../src/types/schemas/automations.ts"],"sourcesContent":["import { z } from 'zod';\nimport { isPublicHostname } from '../../shared/network.js';\nimport { domainEventSchema, idSchema, jsonRecordSchema } from './shared.js';\n\nexport const MAX_AUTOMATION_TRIGGERS = 20;\nexport const MAX_AUTOMATION_ACTIONS = 20;\nexport const MAX_WEBHOOK_EVENTS = 100;\n\nexport const automationTriggerSchema = z.string().trim().min(1);\nexport type AutomationTrigger = z.infer<typeof automationTriggerSchema>;\n\nexport const automationTriggersSchema = z\n .array(automationTriggerSchema)\n .min(1)\n .max(MAX_AUTOMATION_TRIGGERS);\n\nexport const automationKindSchema = z.enum(['workflow', 'webhook']);\nexport type AutomationKind = z.infer<typeof automationKindSchema>;\n\nexport const
|
|
1
|
+
{"version":3,"file":"automations.js","names":[],"sources":["../../../src/types/schemas/automations.ts"],"sourcesContent":["import { z } from 'zod';\nimport { isPublicHostname } from '../../shared/network.js';\nimport { domainEventSchema, idSchema, jsonRecordSchema } from './shared.js';\n\nexport const MAX_AUTOMATION_TRIGGERS = 20;\nexport const MAX_AUTOMATION_ACTIONS = 20;\nexport const MAX_WEBHOOK_EVENTS = 100;\n\nexport const automationTriggerSchema = z.string().trim().min(1);\nexport type AutomationTrigger = z.infer<typeof automationTriggerSchema>;\n\nexport const automationTriggersSchema = z\n .array(automationTriggerSchema)\n .min(1)\n .max(MAX_AUTOMATION_TRIGGERS);\n\nexport const automationKindSchema = z.enum(['workflow', 'webhook']);\nexport type AutomationKind = z.infer<typeof automationKindSchema>;\n\nexport const automationActionSchema = z\n .object({\n type: z.string().trim().min(1),\n input: jsonRecordSchema,\n })\n .strict();\nexport type AutomationAction = z.infer<typeof automationActionSchema>;\n\nexport const automationSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n name: z.string(),\n kind: automationKindSchema,\n description: z.string().nullable(),\n triggers: z.array(automationTriggerSchema),\n actions: z.array(automationActionSchema),\n enabled: z.boolean(),\n filter: jsonRecordSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Automation = z.output<typeof automationSchema>;\nexport type AutomationInput = z.input<typeof automationSchema>;\n\nexport const createAutomationInputSchema = z\n .object({\n name: z.string(),\n description: z.string().optional(),\n triggers: automationTriggersSchema,\n actions: z.array(automationActionSchema).min(1).max(MAX_AUTOMATION_ACTIONS),\n filter: jsonRecordSchema.nullable().optional(),\n })\n .strict();\nexport type CreateAutomationInput = z.infer<typeof createAutomationInputSchema>;\n\nexport const updateAutomationInputSchema = createAutomationInputSchema.partial().extend({\n enabled: z.boolean().optional(),\n});\nexport type UpdateAutomationInput = z.infer<typeof updateAutomationInputSchema>;\n\nexport const automationsQuerySchema = z\n .object({\n kind: automationKindSchema.optional(),\n })\n .strict();\nexport type AutomationsQuery = z.infer<typeof automationsQuerySchema>;\n\nexport const automationRunsQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n status: z.enum(['running', 'completed', 'failed']).optional(),\n sort: z.string().optional(),\n })\n .strict();\nexport type AutomationRunsQuery = z.infer<typeof automationRunsQuerySchema>;\n\nexport const automationRunStatusSchema = z.enum(['running', 'completed', 'failed']);\nexport type AutomationRunStatus = z.infer<typeof automationRunStatusSchema>;\n\nexport const automationActionResultSchema = z\n .object({\n index: z.number().int().min(0),\n type: z.string().trim().min(1),\n status: z.enum(['completed', 'failed']),\n error: z.string().optional(),\n recipients: z.array(z.string()).optional(),\n })\n .strict();\nexport type AutomationActionResult = z.infer<typeof automationActionResultSchema>;\n\nexport const automationRunSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n automationId: idSchema,\n trigger: automationTriggerSchema,\n eventId: idSchema,\n event: domainEventSchema,\n status: automationRunStatusSchema,\n actionResults: z.array(automationActionResultSchema),\n startedAt: z.coerce.date(),\n finishedAt: z.coerce.date().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type AutomationRun = z.output<typeof automationRunSchema>;\nexport type AutomationRunInput = z.input<typeof automationRunSchema>;\n\nexport const availableActionSchema = z\n .object({\n type: z.string().trim().min(1),\n description: z.string(),\n inputSchema: jsonRecordSchema,\n source: z.string(),\n })\n .strict();\nexport type AvailableAction = z.infer<typeof availableActionSchema>;\nexport type AvailableActions = AvailableAction[];\n\nexport const availableTriggersSchema = z\n .object({\n triggers: z.array(\n z\n .object({\n type: z.string().trim().min(1),\n label: z.string().min(1),\n category: z.string().min(1),\n description: z.string(),\n })\n .strict(),\n ),\n })\n .strict();\nexport type AvailableTriggers = z.infer<typeof availableTriggersSchema>;\n\nexport const deliverWebhookInputSchema = z\n .object({\n url: z.string(),\n secretRef: idSchema,\n })\n .strict();\nexport type DeliverWebhookInput = z.infer<typeof deliverWebhookInputSchema>;\n\nexport const webhookUrlSchema = z\n .url({ protocol: /^https?$/ })\n .refine((value) => isPublicHostname(new URL(value).hostname), {\n message: 'Webhook URL must be a public address, not localhost or a private network address',\n });\n\nexport const webhookSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n url: z.string(),\n events: z.array(automationTriggerSchema),\n description: z.string().nullable(),\n enabled: z.boolean(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Webhook = z.output<typeof webhookSchema>;\n\nexport const createWebhookInputSchema = z\n .object({\n url: webhookUrlSchema,\n events: z.array(automationTriggerSchema).min(1).max(MAX_WEBHOOK_EVENTS),\n description: z.string().optional(),\n })\n .strict();\nexport type CreateWebhookInput = z.infer<typeof createWebhookInputSchema>;\n\nexport const updateWebhookInputSchema = createWebhookInputSchema.partial().extend({\n enabled: z.boolean().optional(),\n});\nexport type UpdateWebhookInput = z.infer<typeof updateWebhookInputSchema>;\n\nexport const webhookSecretSchema = z\n .object({\n secret: z.string(),\n })\n .strict();\nexport type WebhookSecret = z.infer<typeof webhookSecretSchema>;\n\nexport const createdWebhookSchema = webhookSchema.extend({ secret: z.string() }).strict();\nexport type CreatedWebhook = z.output<typeof createdWebhookSchema>;\n"],"mappings":";;;;AAIA,MAAa,0BAA0B;AACvC,MAAa,yBAAyB;AACtC,MAAa,qBAAqB;AAElC,MAAa,0BAA0B,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAG9D,MAAa,2BAA2B,EACrC,MAAM,uBAAuB,CAAC,CAC9B,IAAI,CAAC,CAAC,CACN,IAAA,EAA2B;AAE9B,MAAa,uBAAuB,EAAE,KAAK,CAAC,YAAY,SAAS,CAAC;AAGlE,MAAa,yBAAyB,EACnC,OAAO;CACN,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC7B,OAAO;AACT,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,mBAAmB,EAC7B,OAAO;CACN,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,MAAM;CACN,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,UAAU,EAAE,MAAM,uBAAuB;CACzC,SAAS,EAAE,MAAM,sBAAsB;CACvC,SAAS,EAAE,QAAQ;CACnB,QAAQ,iBAAiB,SAAS;CAClC,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,8BAA8B,EACxC,OAAO;CACN,MAAM,EAAE,OAAO;CACf,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,UAAU;CACV,SAAS,EAAE,MAAM,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uBAAuB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,GAAsB;CACtE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;AACnC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,yBAAyB,QAAQ,CAAC,CAAC,OAAO,EAChF,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,EAChC,CAAC;AAGD,MAAa,sBAAsB,EAChC,OAAO,EACN,QAAQ,EAAE,OAAO,EACnB,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,uBAAuB,cAAc,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO"}
|
|
@@ -334,6 +334,21 @@ declare const dmSettingsSchema: z.ZodObject<{
|
|
|
334
334
|
}, z.core.$strict>;
|
|
335
335
|
type DmSettings = z.infer<typeof dmSettingsSchema>;
|
|
336
336
|
declare const dmSettingsDefaults: DmSettings;
|
|
337
|
+
declare const digestCadenceSchema: z.ZodEnum<{
|
|
338
|
+
daily: "daily";
|
|
339
|
+
weekly: "weekly";
|
|
340
|
+
}>;
|
|
341
|
+
type DigestCadence = z.infer<typeof digestCadenceSchema>;
|
|
342
|
+
declare const digestScheduleSchema: z.ZodObject<{
|
|
343
|
+
cadence: z.ZodEnum<{
|
|
344
|
+
daily: "daily";
|
|
345
|
+
weekly: "weekly";
|
|
346
|
+
}>;
|
|
347
|
+
weekday: z.ZodNumber;
|
|
348
|
+
hour: z.ZodNumber;
|
|
349
|
+
timeZone: z.ZodString;
|
|
350
|
+
}, z.core.$strict>;
|
|
351
|
+
type DigestSchedule = z.infer<typeof digestScheduleSchema>;
|
|
337
352
|
declare const communitySettingsSchema: z.ZodObject<{
|
|
338
353
|
dm: z.ZodObject<{
|
|
339
354
|
enabled: z.ZodBoolean;
|
|
@@ -344,6 +359,15 @@ declare const communitySettingsSchema: z.ZodObject<{
|
|
|
344
359
|
groupChats: z.ZodBoolean;
|
|
345
360
|
groupSize: z.ZodNumber;
|
|
346
361
|
}, z.core.$strict>;
|
|
362
|
+
digest: z.ZodNullable<z.ZodObject<{
|
|
363
|
+
cadence: z.ZodEnum<{
|
|
364
|
+
daily: "daily";
|
|
365
|
+
weekly: "weekly";
|
|
366
|
+
}>;
|
|
367
|
+
weekday: z.ZodNumber;
|
|
368
|
+
hour: z.ZodNumber;
|
|
369
|
+
timeZone: z.ZodString;
|
|
370
|
+
}, z.core.$strict>>;
|
|
347
371
|
}, z.core.$strict>;
|
|
348
372
|
type CommunitySettings = z.infer<typeof communitySettingsSchema>;
|
|
349
373
|
declare const communitySettingsDefaults: CommunitySettings;
|
|
@@ -369,6 +393,15 @@ declare const communitySchema: z.ZodObject<{
|
|
|
369
393
|
groupChats: z.ZodBoolean;
|
|
370
394
|
groupSize: z.ZodNumber;
|
|
371
395
|
}, z.core.$strict>;
|
|
396
|
+
digest: z.ZodNullable<z.ZodObject<{
|
|
397
|
+
cadence: z.ZodEnum<{
|
|
398
|
+
daily: "daily";
|
|
399
|
+
weekly: "weekly";
|
|
400
|
+
}>;
|
|
401
|
+
weekday: z.ZodNumber;
|
|
402
|
+
hour: z.ZodNumber;
|
|
403
|
+
timeZone: z.ZodString;
|
|
404
|
+
}, z.core.$strict>>;
|
|
372
405
|
}, z.core.$strict>;
|
|
373
406
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
374
407
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -396,6 +429,15 @@ declare const communityViewSchema: z.ZodObject<{
|
|
|
396
429
|
groupChats: z.ZodBoolean;
|
|
397
430
|
groupSize: z.ZodNumber;
|
|
398
431
|
}, z.core.$strict>;
|
|
432
|
+
digest: z.ZodNullable<z.ZodObject<{
|
|
433
|
+
cadence: z.ZodEnum<{
|
|
434
|
+
daily: "daily";
|
|
435
|
+
weekly: "weekly";
|
|
436
|
+
}>;
|
|
437
|
+
weekday: z.ZodNumber;
|
|
438
|
+
hour: z.ZodNumber;
|
|
439
|
+
timeZone: z.ZodString;
|
|
440
|
+
}, z.core.$strict>>;
|
|
399
441
|
}, z.core.$strict>;
|
|
400
442
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
401
443
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -533,6 +575,25 @@ declare const patchDmSettingsInputSchema: z.ZodObject<{
|
|
|
533
575
|
groupSize: z.ZodOptional<z.ZodNumber>;
|
|
534
576
|
}, z.core.$strict>;
|
|
535
577
|
type PatchDmSettingsInput = z.infer<typeof patchDmSettingsInputSchema>;
|
|
578
|
+
declare const patchCommunitySettingsInputSchema: z.ZodObject<{
|
|
579
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
580
|
+
memberToMember: z.ZodOptional<z.ZodBoolean>;
|
|
581
|
+
memberToStaff: z.ZodOptional<z.ZodBoolean>;
|
|
582
|
+
staffToAnyone: z.ZodOptional<z.ZodBoolean>;
|
|
583
|
+
firstMessageIsRequest: z.ZodOptional<z.ZodBoolean>;
|
|
584
|
+
groupChats: z.ZodOptional<z.ZodBoolean>;
|
|
585
|
+
groupSize: z.ZodOptional<z.ZodNumber>;
|
|
586
|
+
digest: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
587
|
+
cadence: z.ZodEnum<{
|
|
588
|
+
daily: "daily";
|
|
589
|
+
weekly: "weekly";
|
|
590
|
+
}>;
|
|
591
|
+
weekday: z.ZodNumber;
|
|
592
|
+
hour: z.ZodNumber;
|
|
593
|
+
timeZone: z.ZodString;
|
|
594
|
+
}, z.core.$strict>>>;
|
|
595
|
+
}, z.core.$strict>;
|
|
596
|
+
type PatchCommunitySettingsInput = z.infer<typeof patchCommunitySettingsInputSchema>;
|
|
536
597
|
declare const createSpaceInputSchema: z.ZodObject<{
|
|
537
598
|
name: z.ZodString;
|
|
538
599
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -577,5 +638,5 @@ declare const addSpaceLinkInputSchema: z.ZodObject<{
|
|
|
577
638
|
}, z.core.$strict>;
|
|
578
639
|
type AddSpaceLinkInput = z.infer<typeof addSpaceLinkInputSchema>;
|
|
579
640
|
//#endregion
|
|
580
|
-
export { Activity, ActivityAsset, ActivityAssetInput, ActivityInput, ActivitySettings, ActivityView, AddDownloadAssetInput, AddSpaceLinkInput, Bundle, BundleInput, BundleItem, BundleItemInput, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DmSettings, Download, DownloadAsset, DownloadAssetInput, DownloadFile, DownloadInput, DownloadStatus, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, PatchDmSettingsInput, ReorderDownloadAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput, activityAssetSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addSpaceLinkInputSchema, bundleItemSchema, bundleSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createSpaceInputSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema };
|
|
641
|
+
export { Activity, ActivityAsset, ActivityAssetInput, ActivityInput, ActivitySettings, ActivityView, AddDownloadAssetInput, AddSpaceLinkInput, Bundle, BundleInput, BundleItem, BundleItemInput, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DigestCadence, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadAssetInput, DownloadFile, DownloadInput, DownloadStatus, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, PatchCommunitySettingsInput, PatchDmSettingsInput, ReorderDownloadAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput, activityAssetSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addSpaceLinkInputSchema, bundleItemSchema, bundleSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createSpaceInputSchema, digestCadenceSchema, digestScheduleSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchCommunitySettingsInputSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema };
|
|
581
642
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -192,8 +192,29 @@ const dmSettingsDefaults = {
|
|
|
192
192
|
groupChats: true,
|
|
193
193
|
groupSize: 8
|
|
194
194
|
};
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
function isTimeZone(value) {
|
|
196
|
+
try {
|
|
197
|
+
new Intl.DateTimeFormat("en-US", { timeZone: value });
|
|
198
|
+
return true;
|
|
199
|
+
} catch {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const digestCadenceSchema = z.enum(["daily", "weekly"]);
|
|
204
|
+
const digestScheduleSchema = z.object({
|
|
205
|
+
cadence: digestCadenceSchema,
|
|
206
|
+
weekday: z.number().int().min(0).max(6).describe("The day a weekly digest goes out, 0 is Sunday; a daily digest ignores it"),
|
|
207
|
+
hour: z.number().int().min(0).max(23).describe("The hour of the day it goes out, 0–23"),
|
|
208
|
+
timeZone: z.string().refine(isTimeZone, { message: "must be an IANA time zone" }).describe("The IANA time zone the weekday and hour are in, such as `Europe/Madrid`")
|
|
209
|
+
}).strict();
|
|
210
|
+
const communitySettingsSchema = z.object({
|
|
211
|
+
dm: dmSettingsSchema,
|
|
212
|
+
digest: digestScheduleSchema.nullable()
|
|
213
|
+
}).strict();
|
|
214
|
+
const communitySettingsDefaults = {
|
|
215
|
+
dm: dmSettingsDefaults,
|
|
216
|
+
digest: null
|
|
217
|
+
};
|
|
197
218
|
const communitySchema = z.object({
|
|
198
219
|
orgId: idSchema,
|
|
199
220
|
id: idSchema,
|
|
@@ -276,6 +297,7 @@ const updateCommunityInputSchema = z.object({
|
|
|
276
297
|
thumbnailAssetId: idSchema.nullable().optional()
|
|
277
298
|
}).strict();
|
|
278
299
|
const patchDmSettingsInputSchema = dmSettingsSchema.extend({ groupSize: z.number().int().min(3).max(100).describe("The most people a group chat may hold, its creator included") }).partial();
|
|
300
|
+
const patchCommunitySettingsInputSchema = patchDmSettingsInputSchema.extend({ digest: digestScheduleSchema.nullable().optional().describe("When the community digest goes out; null stops it") });
|
|
279
301
|
const createSpaceInputSchema = z.object({
|
|
280
302
|
name: z.string().trim().min(1).max(120),
|
|
281
303
|
description: z.string().trim().max(2e3).optional(),
|
|
@@ -296,6 +318,6 @@ const setSpaceTopicsInputSchema = z.object({ topics: z.array(z.object({
|
|
|
296
318
|
}).strict()).max(50).describe("The complete list, in order. A topic left out is deleted") }).strict();
|
|
297
319
|
const addSpaceLinkInputSchema = z.object({ contentId: idSchema }).strict();
|
|
298
320
|
//#endregion
|
|
299
|
-
export { activityAssetSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addSpaceLinkInputSchema, bundleItemSchema, bundleSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createSpaceInputSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema };
|
|
321
|
+
export { activityAssetSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addSpaceLinkInputSchema, bundleItemSchema, bundleSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createSpaceInputSchema, digestCadenceSchema, digestScheduleSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchCommunitySettingsInputSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema };
|
|
300
322
|
|
|
301
323
|
//# sourceMappingURL=content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","names":[],"sources":["../../../src/types/schemas/content.ts"],"sourcesContent":["import { z } from 'zod';\nimport { assetUrlsSchema } from './assets.js';\nimport { activityCommentsRuleSchema, commentSettingsSchema } from './discussion.js';\nimport { idSchema, jsonValueSchema } from './shared.js';\n\nexport const contentTypeSchema = z.enum(['course', 'download', 'community']);\nexport type ContentType = z.infer<typeof contentTypeSchema>;\n\nexport const courseStatusSchema = z.enum(['draft', 'published']);\nexport type CourseStatus = z.infer<typeof courseStatusSchema>;\n\nexport const courseSettingsSchema = z\n .object({\n transcriptDownloads: z.boolean(),\n comments: commentSettingsSchema.optional(),\n })\n .strict();\nexport type CourseSettings = z.infer<typeof courseSettingsSchema>;\n\n/** Defaults for keys a stored settings row doesn't carry (or no row at all). */\nexport const courseSettingsDefaults: CourseSettings = { transcriptDownloads: false };\n\nexport const activitySettingsSchema = z\n .object({\n comments: activityCommentsRuleSchema.optional(),\n })\n .strict();\nexport type ActivitySettings = z.infer<typeof activitySettingsSchema>;\n\nexport const bundleSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n name: z.string(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Bundle = z.output<typeof bundleSchema>;\nexport type BundleInput = z.input<typeof bundleSchema>;\n\nexport const bundleItemSchema = z\n .object({\n orgId: idSchema,\n bundleId: idSchema,\n contentId: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type BundleItem = z.output<typeof bundleItemSchema>;\nexport type BundleItemInput = z.input<typeof bundleItemSchema>;\n\nexport const listBundlesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n })\n .strict();\nexport type ListBundlesQuery = z.infer<typeof listBundlesQuerySchema>;\n\nexport const createBundleInputSchema = z\n .object({\n name: z.string(),\n /** Content to put in the bundle at creation — bundle and items land together. */\n contentIds: z.array(idSchema).optional(),\n })\n .strict();\nexport type CreateBundleInput = z.infer<typeof createBundleInputSchema>;\n\nexport const updateBundleInputSchema = z\n .object({\n name: z.string().optional(),\n })\n .strict();\nexport type UpdateBundleInput = z.infer<typeof updateBundleInputSchema>;\n\nexport const contentItemSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: contentTypeSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ContentItem = z.output<typeof contentItemSchema>;\nexport type ContentItemInput = z.input<typeof contentItemSchema>;\n\nexport const courseSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('course'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: courseStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n settings: courseSettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Course = z.output<typeof courseSchema>;\n\nexport const courseViewSchema = courseSchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type CourseView = z.output<typeof courseViewSchema>;\n\nexport const activitySchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n moduleId: idSchema,\n courseId: idSchema,\n seq: z.number().int().min(0),\n settings: jsonValueSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Activity = z.output<typeof activitySchema>;\nexport type ActivityInput = z.input<typeof activitySchema>;\n\nexport const activityViewSchema = activitySchema.extend({ assetUrls: assetUrlsSchema }).strict();\nexport type ActivityView = z.output<typeof activityViewSchema>;\n\nexport const moduleSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n courseId: idSchema,\n title: z.string(),\n seq: z.number().int().min(0),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Module = z.output<typeof moduleSchema>;\nexport type ModuleInput = z.input<typeof moduleSchema>;\n\nexport const activityAssetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n activityId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ActivityAsset = z.output<typeof activityAssetSchema>;\nexport type ActivityAssetInput = z.input<typeof activityAssetSchema>;\n\nexport const saveActivityInputSchema = z\n .object({\n settings: jsonValueSchema.optional(),\n assetIds: z.array(idSchema).optional(),\n })\n .strict();\nexport type SaveActivityInput = z.infer<typeof saveActivityInputSchema>;\n\nexport const listCoursesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: courseStatusSchema.optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type ListCoursesQuery = z.infer<typeof listCoursesQuerySchema>;\n\nexport const createCourseInputSchema = z\n .object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type CreateCourseInput = z.infer<typeof createCourseInputSchema>;\n\nexport const updateCourseInputSchema = z\n .object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: courseStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateCourseInput = z.infer<typeof updateCourseInputSchema>;\n\nexport const downloadStatusSchema = z.enum(['draft', 'published']);\nexport type DownloadStatus = z.infer<typeof downloadStatusSchema>;\n\nexport const downloadSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('download'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: downloadStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Download = z.output<typeof downloadSchema>;\nexport type DownloadInput = z.input<typeof downloadSchema>;\n\nexport const downloadViewSchema = downloadSchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type DownloadView = z.output<typeof downloadViewSchema>;\n\nexport const downloadAssetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n downloadId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n displayName: z.string().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type DownloadAsset = z.output<typeof downloadAssetSchema>;\nexport type DownloadAssetInput = z.input<typeof downloadAssetSchema>;\n\nexport const downloadFileSchema = downloadAssetSchema\n .extend({\n filename: z.string(),\n contentType: z.string(),\n size: z.number().int().min(0),\n url: z.string(),\n })\n .strict();\nexport type DownloadFile = z.output<typeof downloadFileSchema>;\n\nexport const listDownloadsQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: downloadStatusSchema.optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type ListDownloadsQuery = z.infer<typeof listDownloadsQuerySchema>;\n\nexport const createDownloadInputSchema = z\n .object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type CreateDownloadInput = z.infer<typeof createDownloadInputSchema>;\n\nexport const updateDownloadInputSchema = z\n .object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: downloadStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateDownloadInput = z.infer<typeof updateDownloadInputSchema>;\n\nexport const addDownloadAssetInputSchema = z\n .object({\n assetId: idSchema,\n displayName: z.string().optional(),\n })\n .strict();\nexport type AddDownloadAssetInput = z.infer<typeof addDownloadAssetInputSchema>;\n\nexport const reorderDownloadAssetsInputSchema = z\n .object({\n assetIds: z.array(idSchema).max(500),\n })\n .strict();\nexport type ReorderDownloadAssetsInput = z.infer<typeof reorderDownloadAssetsInputSchema>;\n\nexport const communityStatusSchema = z.enum(['draft', 'published']);\nexport type CommunityStatus = z.infer<typeof communityStatusSchema>;\n\nexport const dmSettingsSchema = z\n .object({\n enabled: z.boolean(),\n memberToMember: z.boolean(),\n memberToStaff: z.boolean(),\n staffToAnyone: z.boolean(),\n firstMessageIsRequest: z.boolean(),\n groupChats: z.boolean(),\n groupSize: z.number().int().min(1),\n })\n .strict();\nexport type DmSettings = z.infer<typeof dmSettingsSchema>;\n\nexport const dmSettingsDefaults: DmSettings = {\n enabled: true,\n memberToMember: true,\n memberToStaff: true,\n staffToAnyone: true,\n firstMessageIsRequest: true,\n groupChats: true,\n groupSize: 8,\n};\n\nexport const communitySettingsSchema = z\n .object({\n dm: dmSettingsSchema,\n })\n .strict();\nexport type CommunitySettings = z.infer<typeof communitySettingsSchema>;\n\nexport const communitySettingsDefaults: CommunitySettings = { dm: dmSettingsDefaults };\n\nexport const communitySchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('community'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: communityStatusSchema,\n thumbnailAssetId: idSchema.nullable(),\n settings: communitySettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Community = z.output<typeof communitySchema>;\n\nexport const communityViewSchema = communitySchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type CommunityView = z.output<typeof communityViewSchema>;\n\nexport const spaceAccessRuleSchema = z.enum(['all_members', 'by_request', 'by_invite']);\nexport type SpaceAccessRule = z.infer<typeof spaceAccessRuleSchema>;\n\nexport const spaceSettingsSchema = z\n .object({\n comments: z.boolean(),\n reactions: z.boolean(),\n requireReview: z.boolean(),\n })\n .strict();\nexport type SpaceSettings = z.infer<typeof spaceSettingsSchema>;\n\nexport const spaceSettingsDefaults: SpaceSettings = {\n comments: true,\n reactions: true,\n requireReview: false,\n};\n\nexport const spaceSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n communityId: idSchema,\n name: z.string(),\n description: z.string(),\n seq: z.number().int(),\n accessRule: spaceAccessRuleSchema,\n capacity: z.number().int().nullable(),\n settings: spaceSettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Space = z.output<typeof spaceSchema>;\n\nexport const spaceTopicSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n spaceId: idSchema,\n name: z.string(),\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type SpaceTopic = z.output<typeof spaceTopicSchema>;\n\nexport const spaceLinkSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n spaceId: idSchema,\n contentId: idSchema,\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type SpaceLink = z.output<typeof spaceLinkSchema>;\n\nexport const spaceDetailSchema = spaceSchema.extend({\n topics: z.array(spaceTopicSchema),\n links: z.array(spaceLinkSchema),\n});\nexport type SpaceDetail = z.output<typeof spaceDetailSchema>;\n\nexport const listCommunitiesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: communityStatusSchema.optional(),\n })\n .strict();\nexport type ListCommunitiesQuery = z.infer<typeof listCommunitiesQuerySchema>;\n\nexport const createCommunityInputSchema = z\n .object({\n title: z.string().trim().min(1).max(200),\n description: z.string().trim().max(5_000).optional(),\n })\n .strict();\nexport type CreateCommunityInput = z.infer<typeof createCommunityInputSchema>;\n\nexport const updateCommunityInputSchema = z\n .object({\n title: z.string().trim().min(1).max(200).optional(),\n description: z.string().trim().max(5_000).optional(),\n status: communityStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateCommunityInput = z.infer<typeof updateCommunityInputSchema>;\n\nexport const patchDmSettingsInputSchema = dmSettingsSchema\n .extend({\n groupSize: z\n .number()\n .int()\n .min(3)\n .max(100)\n .describe('The most people a group chat may hold, its creator included'),\n })\n .partial();\nexport type PatchDmSettingsInput = z.infer<typeof patchDmSettingsInputSchema>;\n\nexport const createSpaceInputSchema = z\n .object({\n name: z.string().trim().min(1).max(120),\n description: z.string().trim().max(2_000).optional(),\n accessRule: spaceAccessRuleSchema.optional(),\n capacity: z.number().int().min(0).nullable().optional(),\n settings: spaceSettingsSchema.partial().optional(),\n })\n .strict();\nexport type CreateSpaceInput = z.infer<typeof createSpaceInputSchema>;\n\nexport const updateSpaceInputSchema = z\n .object({\n name: z.string().trim().min(1).max(120).optional(),\n description: z.string().trim().max(2_000).optional(),\n accessRule: spaceAccessRuleSchema.optional(),\n capacity: z.number().int().min(0).nullable().optional(),\n settings: spaceSettingsSchema.partial().optional(),\n })\n .strict();\nexport type UpdateSpaceInput = z.infer<typeof updateSpaceInputSchema>;\n\nexport const setSpaceTopicsInputSchema = z\n .object({\n topics: z\n .array(\n z\n .object({\n id: idSchema.optional().describe('Keep an existing topic; omit to add a new one'),\n name: z.string().trim().min(1).max(60),\n })\n .strict(),\n )\n .max(50)\n .describe('The complete list, in order. A topic left out is deleted'),\n })\n .strict();\nexport type SetSpaceTopicsInput = z.infer<typeof setSpaceTopicsInputSchema>;\n\nexport const addSpaceLinkInputSchema = z\n .object({\n contentId: idSchema,\n })\n .strict();\nexport type AddSpaceLinkInput = z.infer<typeof addSpaceLinkInputSchema>;\n"],"mappings":";;;;;AAKA,MAAa,oBAAoB,EAAE,KAAK;CAAC;CAAU;CAAY;AAAW,CAAC;AAG3E,MAAa,qBAAqB,EAAE,KAAK,CAAC,SAAS,WAAW,CAAC;AAG/D,MAAa,uBAAuB,EACjC,OAAO;CACN,qBAAqB,EAAE,QAAQ;CAC/B,UAAU,sBAAsB,SAAS;AAC3C,CAAC,CAAC,CACD,OAAO;;AAIV,MAAa,yBAAyC,EAAE,qBAAqB,MAAM;AAEnF,MAAa,yBAAyB,EACnC,OAAO,EACN,UAAU,2BAA2B,SAAS,EAChD,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,eAAe,EACzB,OAAO;CACN,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,mBAAmB,EAC7B,OAAO;CACN,OAAO;CACP,UAAU;CACV,WAAW;CACX,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,yBAAyB,EACnC,OAAO;CACN,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAC5B,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAChC,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,0BAA0B,EACpC,OAAO;CACN,MAAM,EAAE,OAAO;;CAEf,YAAY,EAAE,MAA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AAI,EAAE,CAAC,CACP,SAAS,0DAA0D,EACxE,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,0BAA0B,EACpC,OAAO,EACN,WAAW,SACb,CAAC,CAAC,CACD,OAAO"}
|
|
1
|
+
{"version":3,"file":"content.js","names":[],"sources":["../../../src/types/schemas/content.ts"],"sourcesContent":["import { z } from 'zod';\nimport { assetUrlsSchema } from './assets.js';\nimport { activityCommentsRuleSchema, commentSettingsSchema } from './discussion.js';\nimport { idSchema, jsonValueSchema } from './shared.js';\n\nexport const contentTypeSchema = z.enum(['course', 'download', 'community']);\nexport type ContentType = z.infer<typeof contentTypeSchema>;\n\nexport const courseStatusSchema = z.enum(['draft', 'published']);\nexport type CourseStatus = z.infer<typeof courseStatusSchema>;\n\nexport const courseSettingsSchema = z\n .object({\n transcriptDownloads: z.boolean(),\n comments: commentSettingsSchema.optional(),\n })\n .strict();\nexport type CourseSettings = z.infer<typeof courseSettingsSchema>;\n\n/** Defaults for keys a stored settings row doesn't carry (or no row at all). */\nexport const courseSettingsDefaults: CourseSettings = { transcriptDownloads: false };\n\nexport const activitySettingsSchema = z\n .object({\n comments: activityCommentsRuleSchema.optional(),\n })\n .strict();\nexport type ActivitySettings = z.infer<typeof activitySettingsSchema>;\n\nexport const bundleSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n name: z.string(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Bundle = z.output<typeof bundleSchema>;\nexport type BundleInput = z.input<typeof bundleSchema>;\n\nexport const bundleItemSchema = z\n .object({\n orgId: idSchema,\n bundleId: idSchema,\n contentId: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type BundleItem = z.output<typeof bundleItemSchema>;\nexport type BundleItemInput = z.input<typeof bundleItemSchema>;\n\nexport const listBundlesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n })\n .strict();\nexport type ListBundlesQuery = z.infer<typeof listBundlesQuerySchema>;\n\nexport const createBundleInputSchema = z\n .object({\n name: z.string(),\n /** Content to put in the bundle at creation — bundle and items land together. */\n contentIds: z.array(idSchema).optional(),\n })\n .strict();\nexport type CreateBundleInput = z.infer<typeof createBundleInputSchema>;\n\nexport const updateBundleInputSchema = z\n .object({\n name: z.string().optional(),\n })\n .strict();\nexport type UpdateBundleInput = z.infer<typeof updateBundleInputSchema>;\n\nexport const contentItemSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: contentTypeSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ContentItem = z.output<typeof contentItemSchema>;\nexport type ContentItemInput = z.input<typeof contentItemSchema>;\n\nexport const courseSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('course'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: courseStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n settings: courseSettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Course = z.output<typeof courseSchema>;\n\nexport const courseViewSchema = courseSchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type CourseView = z.output<typeof courseViewSchema>;\n\nexport const activitySchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n moduleId: idSchema,\n courseId: idSchema,\n seq: z.number().int().min(0),\n settings: jsonValueSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Activity = z.output<typeof activitySchema>;\nexport type ActivityInput = z.input<typeof activitySchema>;\n\nexport const activityViewSchema = activitySchema.extend({ assetUrls: assetUrlsSchema }).strict();\nexport type ActivityView = z.output<typeof activityViewSchema>;\n\nexport const moduleSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n courseId: idSchema,\n title: z.string(),\n seq: z.number().int().min(0),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Module = z.output<typeof moduleSchema>;\nexport type ModuleInput = z.input<typeof moduleSchema>;\n\nexport const activityAssetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n activityId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ActivityAsset = z.output<typeof activityAssetSchema>;\nexport type ActivityAssetInput = z.input<typeof activityAssetSchema>;\n\nexport const saveActivityInputSchema = z\n .object({\n settings: jsonValueSchema.optional(),\n assetIds: z.array(idSchema).optional(),\n })\n .strict();\nexport type SaveActivityInput = z.infer<typeof saveActivityInputSchema>;\n\nexport const listCoursesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: courseStatusSchema.optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type ListCoursesQuery = z.infer<typeof listCoursesQuerySchema>;\n\nexport const createCourseInputSchema = z\n .object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type CreateCourseInput = z.infer<typeof createCourseInputSchema>;\n\nexport const updateCourseInputSchema = z\n .object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: courseStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateCourseInput = z.infer<typeof updateCourseInputSchema>;\n\nexport const downloadStatusSchema = z.enum(['draft', 'published']);\nexport type DownloadStatus = z.infer<typeof downloadStatusSchema>;\n\nexport const downloadSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('download'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: downloadStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Download = z.output<typeof downloadSchema>;\nexport type DownloadInput = z.input<typeof downloadSchema>;\n\nexport const downloadViewSchema = downloadSchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type DownloadView = z.output<typeof downloadViewSchema>;\n\nexport const downloadAssetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n downloadId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n displayName: z.string().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type DownloadAsset = z.output<typeof downloadAssetSchema>;\nexport type DownloadAssetInput = z.input<typeof downloadAssetSchema>;\n\nexport const downloadFileSchema = downloadAssetSchema\n .extend({\n filename: z.string(),\n contentType: z.string(),\n size: z.number().int().min(0),\n url: z.string(),\n })\n .strict();\nexport type DownloadFile = z.output<typeof downloadFileSchema>;\n\nexport const listDownloadsQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: downloadStatusSchema.optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type ListDownloadsQuery = z.infer<typeof listDownloadsQuerySchema>;\n\nexport const createDownloadInputSchema = z\n .object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type CreateDownloadInput = z.infer<typeof createDownloadInputSchema>;\n\nexport const updateDownloadInputSchema = z\n .object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: downloadStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateDownloadInput = z.infer<typeof updateDownloadInputSchema>;\n\nexport const addDownloadAssetInputSchema = z\n .object({\n assetId: idSchema,\n displayName: z.string().optional(),\n })\n .strict();\nexport type AddDownloadAssetInput = z.infer<typeof addDownloadAssetInputSchema>;\n\nexport const reorderDownloadAssetsInputSchema = z\n .object({\n assetIds: z.array(idSchema).max(500),\n })\n .strict();\nexport type ReorderDownloadAssetsInput = z.infer<typeof reorderDownloadAssetsInputSchema>;\n\nexport const communityStatusSchema = z.enum(['draft', 'published']);\nexport type CommunityStatus = z.infer<typeof communityStatusSchema>;\n\nexport const dmSettingsSchema = z\n .object({\n enabled: z.boolean(),\n memberToMember: z.boolean(),\n memberToStaff: z.boolean(),\n staffToAnyone: z.boolean(),\n firstMessageIsRequest: z.boolean(),\n groupChats: z.boolean(),\n groupSize: z.number().int().min(1),\n })\n .strict();\nexport type DmSettings = z.infer<typeof dmSettingsSchema>;\n\nexport const dmSettingsDefaults: DmSettings = {\n enabled: true,\n memberToMember: true,\n memberToStaff: true,\n staffToAnyone: true,\n firstMessageIsRequest: true,\n groupChats: true,\n groupSize: 8,\n};\n\nfunction isTimeZone(value: string): boolean {\n try {\n new Intl.DateTimeFormat('en-US', { timeZone: value });\n return true;\n } catch {\n return false;\n }\n}\n\nexport const digestCadenceSchema = z.enum(['daily', 'weekly']);\nexport type DigestCadence = z.infer<typeof digestCadenceSchema>;\n\nexport const digestScheduleSchema = z\n .object({\n cadence: digestCadenceSchema,\n weekday: z\n .number()\n .int()\n .min(0)\n .max(6)\n .describe('The day a weekly digest goes out, 0 is Sunday; a daily digest ignores it'),\n hour: z.number().int().min(0).max(23).describe('The hour of the day it goes out, 0–23'),\n timeZone: z\n .string()\n .refine(isTimeZone, { message: 'must be an IANA time zone' })\n .describe('The IANA time zone the weekday and hour are in, such as `Europe/Madrid`'),\n })\n .strict();\nexport type DigestSchedule = z.infer<typeof digestScheduleSchema>;\n\nexport const communitySettingsSchema = z\n .object({\n dm: dmSettingsSchema,\n digest: digestScheduleSchema.nullable(),\n })\n .strict();\nexport type CommunitySettings = z.infer<typeof communitySettingsSchema>;\n\nexport const communitySettingsDefaults: CommunitySettings = {\n dm: dmSettingsDefaults,\n digest: null,\n};\n\nexport const communitySchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('community'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: communityStatusSchema,\n thumbnailAssetId: idSchema.nullable(),\n settings: communitySettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Community = z.output<typeof communitySchema>;\n\nexport const communityViewSchema = communitySchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type CommunityView = z.output<typeof communityViewSchema>;\n\nexport const spaceAccessRuleSchema = z.enum(['all_members', 'by_request', 'by_invite']);\nexport type SpaceAccessRule = z.infer<typeof spaceAccessRuleSchema>;\n\nexport const spaceSettingsSchema = z\n .object({\n comments: z.boolean(),\n reactions: z.boolean(),\n requireReview: z.boolean(),\n })\n .strict();\nexport type SpaceSettings = z.infer<typeof spaceSettingsSchema>;\n\nexport const spaceSettingsDefaults: SpaceSettings = {\n comments: true,\n reactions: true,\n requireReview: false,\n};\n\nexport const spaceSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n communityId: idSchema,\n name: z.string(),\n description: z.string(),\n seq: z.number().int(),\n accessRule: spaceAccessRuleSchema,\n capacity: z.number().int().nullable(),\n settings: spaceSettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Space = z.output<typeof spaceSchema>;\n\nexport const spaceTopicSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n spaceId: idSchema,\n name: z.string(),\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type SpaceTopic = z.output<typeof spaceTopicSchema>;\n\nexport const spaceLinkSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n spaceId: idSchema,\n contentId: idSchema,\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type SpaceLink = z.output<typeof spaceLinkSchema>;\n\nexport const spaceDetailSchema = spaceSchema.extend({\n topics: z.array(spaceTopicSchema),\n links: z.array(spaceLinkSchema),\n});\nexport type SpaceDetail = z.output<typeof spaceDetailSchema>;\n\nexport const listCommunitiesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: communityStatusSchema.optional(),\n })\n .strict();\nexport type ListCommunitiesQuery = z.infer<typeof listCommunitiesQuerySchema>;\n\nexport const createCommunityInputSchema = z\n .object({\n title: z.string().trim().min(1).max(200),\n description: z.string().trim().max(5_000).optional(),\n })\n .strict();\nexport type CreateCommunityInput = z.infer<typeof createCommunityInputSchema>;\n\nexport const updateCommunityInputSchema = z\n .object({\n title: z.string().trim().min(1).max(200).optional(),\n description: z.string().trim().max(5_000).optional(),\n status: communityStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateCommunityInput = z.infer<typeof updateCommunityInputSchema>;\n\nexport const patchDmSettingsInputSchema = dmSettingsSchema\n .extend({\n groupSize: z\n .number()\n .int()\n .min(3)\n .max(100)\n .describe('The most people a group chat may hold, its creator included'),\n })\n .partial();\nexport type PatchDmSettingsInput = z.infer<typeof patchDmSettingsInputSchema>;\n\nexport const patchCommunitySettingsInputSchema = patchDmSettingsInputSchema.extend({\n digest: digestScheduleSchema\n .nullable()\n .optional()\n .describe('When the community digest goes out; null stops it'),\n});\nexport type PatchCommunitySettingsInput = z.infer<typeof patchCommunitySettingsInputSchema>;\n\nexport const createSpaceInputSchema = z\n .object({\n name: z.string().trim().min(1).max(120),\n description: z.string().trim().max(2_000).optional(),\n accessRule: spaceAccessRuleSchema.optional(),\n capacity: z.number().int().min(0).nullable().optional(),\n settings: spaceSettingsSchema.partial().optional(),\n })\n .strict();\nexport type CreateSpaceInput = z.infer<typeof createSpaceInputSchema>;\n\nexport const updateSpaceInputSchema = z\n .object({\n name: z.string().trim().min(1).max(120).optional(),\n description: z.string().trim().max(2_000).optional(),\n accessRule: spaceAccessRuleSchema.optional(),\n capacity: z.number().int().min(0).nullable().optional(),\n settings: spaceSettingsSchema.partial().optional(),\n })\n .strict();\nexport type UpdateSpaceInput = z.infer<typeof updateSpaceInputSchema>;\n\nexport const setSpaceTopicsInputSchema = z\n .object({\n topics: z\n .array(\n z\n .object({\n id: idSchema.optional().describe('Keep an existing topic; omit to add a new one'),\n name: z.string().trim().min(1).max(60),\n })\n .strict(),\n )\n .max(50)\n .describe('The complete list, in order. A topic left out is deleted'),\n })\n .strict();\nexport type SetSpaceTopicsInput = z.infer<typeof setSpaceTopicsInputSchema>;\n\nexport const addSpaceLinkInputSchema = z\n .object({\n contentId: idSchema,\n })\n .strict();\nexport type AddSpaceLinkInput = z.infer<typeof addSpaceLinkInputSchema>;\n"],"mappings":";;;;;AAKA,MAAa,oBAAoB,EAAE,KAAK;CAAC;CAAU;CAAY;AAAW,CAAC;AAG3E,MAAa,qBAAqB,EAAE,KAAK,CAAC,SAAS,WAAW,CAAC;AAG/D,MAAa,uBAAuB,EACjC,OAAO;CACN,qBAAqB,EAAE,QAAQ;CAC/B,UAAU,sBAAsB,SAAS;AAC3C,CAAC,CAAC,CACD,OAAO;;AAIV,MAAa,yBAAyC,EAAE,qBAAqB,MAAM;AAEnF,MAAa,yBAAyB,EACnC,OAAO,EACN,UAAU,2BAA2B,SAAS,EAChD,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,eAAe,EACzB,OAAO;CACN,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,mBAAmB,EAC7B,OAAO;CACN,OAAO;CACP,UAAU;CACV,WAAW;CACX,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,yBAAyB,EACnC,OAAO;CACN,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAC5B,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAChC,QAAQ,EAAE,OAAO,CAAC,CAAC,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