@headless-lms/core 0.4.0 → 0.5.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 +27 -21
- package/dist/assets/file-urls.d.ts +11 -7
- package/dist/assets/file-urls.js +14 -4
- package/dist/assets/file-urls.js.map +1 -1
- package/dist/assets/index.d.ts +4 -4
- package/dist/assets/index.js +3 -3
- package/dist/assets/ports.d.ts +34 -15
- package/dist/assets/service.d.ts +30 -14
- package/dist/assets/service.js +230 -56
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.js +69 -4
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.js +16 -16
- package/dist/automations/community-derivations.js.map +1 -1
- package/dist/automations/community-mail.d.ts +34 -4
- package/dist/automations/community-mail.js +32 -4
- package/dist/automations/community-mail.js.map +1 -1
- package/dist/automations/event-permissions.d.ts +12 -0
- package/dist/automations/event-permissions.js +38 -0
- package/dist/automations/event-permissions.js.map +1 -0
- package/dist/automations/index.d.ts +2 -1
- package/dist/automations/index.js +2 -1
- package/dist/automations/notifications/applicable.d.ts +8 -0
- package/dist/automations/notifications/applicable.js +12 -0
- package/dist/automations/notifications/applicable.js.map +1 -0
- package/dist/automations/notifications/debounce.js +1 -1
- package/dist/automations/notifications/debounce.js.map +1 -1
- package/dist/automations/notifications/defaults.js +33 -3
- package/dist/automations/notifications/defaults.js.map +1 -1
- package/dist/automations/notifications/processor.js +3 -3
- package/dist/automations/notifications/processor.js.map +1 -1
- package/dist/automations/notifications/rules/content.js +60 -3
- package/dist/automations/notifications/rules/content.js.map +1 -1
- package/dist/automations/notifications/rules/discussion.js +29 -29
- package/dist/automations/notifications/rules/discussion.js.map +1 -1
- package/dist/automations/notifications/rules/entitlements.js +36 -9
- package/dist/automations/notifications/rules/entitlements.js.map +1 -1
- package/dist/automations/notifications/rules/events.d.ts +9 -0
- package/dist/automations/notifications/rules/events.js +27 -0
- package/dist/automations/notifications/rules/events.js.map +1 -0
- package/dist/automations/notifications/rules/organizations.js +17 -10
- package/dist/automations/notifications/rules/organizations.js.map +1 -1
- package/dist/automations/notifications/rules/recipients.js +0 -1
- package/dist/automations/notifications/rules/recipients.js.map +1 -1
- package/dist/automations/notifications/service.d.ts +8 -6
- package/dist/automations/notifications/service.js +13 -13
- package/dist/automations/notifications/service.js.map +1 -1
- package/dist/automations/notifications/types.js +94 -7
- package/dist/automations/notifications/types.js.map +1 -1
- package/dist/automations/ports.d.ts +30 -31
- package/dist/automations/service.d.ts +20 -17
- package/dist/automations/service.js +91 -62
- package/dist/automations/service.js.map +1 -1
- package/dist/content/event-sight.d.ts +11 -0
- package/dist/content/event-sight.js +11 -0
- package/dist/content/event-sight.js.map +1 -0
- package/dist/content/events.d.ts +413 -72
- package/dist/content/events.js +34 -1
- 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/jobs.d.ts +16 -0
- package/dist/content/jobs.js +37 -0
- package/dist/content/jobs.js.map +1 -0
- package/dist/content/model.d.ts +2 -2
- package/dist/content/notification-categories.d.ts +5 -4
- package/dist/content/notification-categories.js +15 -6
- package/dist/content/notification-categories.js.map +1 -1
- package/dist/content/ports.d.ts +113 -68
- package/dist/content/service.d.ts +99 -67
- package/dist/content/service.js +680 -139
- package/dist/content/service.js.map +1 -1
- package/dist/content/titles.d.ts +6 -3
- package/dist/content/titles.js +37 -24
- package/dist/content/titles.js.map +1 -1
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/authors.d.ts +4 -2
- package/dist/discussion/authors.js +9 -5
- package/dist/discussion/authors.js.map +1 -1
- package/dist/discussion/chats.d.ts +56 -37
- package/dist/discussion/chats.js +393 -161
- package/dist/discussion/chats.js.map +1 -1
- package/dist/discussion/events.d.ts +77 -39
- package/dist/discussion/events.js +41 -3
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +8 -5
- package/dist/discussion/index.js +5 -3
- package/dist/discussion/live.d.ts +106 -0
- package/dist/discussion/live.js +642 -0
- package/dist/discussion/live.js.map +1 -0
- package/dist/discussion/mentions.js +2 -2
- package/dist/discussion/mentions.js.map +1 -1
- package/dist/discussion/ports.d.ts +182 -100
- package/dist/discussion/ports.js.map +1 -1
- package/dist/discussion/posts.d.ts +45 -39
- package/dist/discussion/posts.js +268 -154
- package/dist/discussion/posts.js.map +1 -1
- package/dist/discussion/rules.d.ts +18 -0
- package/dist/discussion/rules.js +22 -0
- package/dist/discussion/rules.js.map +1 -0
- package/dist/discussion/service.d.ts +37 -31
- package/dist/discussion/service.js +252 -188
- package/dist/discussion/service.js.map +1 -1
- package/dist/discussion/subscriptions.d.ts +8 -8
- package/dist/discussion/subscriptions.js +29 -13
- package/dist/discussion/subscriptions.js.map +1 -1
- package/dist/discussion/titles.d.ts +4 -2
- package/dist/discussion/titles.js +27 -13
- package/dist/discussion/titles.js.map +1 -1
- package/dist/entitlements/events.d.ts +20 -20
- package/dist/entitlements/index.d.ts +4 -4
- package/dist/entitlements/index.js +2 -2
- package/dist/entitlements/model.d.ts +2 -2
- package/dist/entitlements/ports.d.ts +65 -39
- package/dist/entitlements/rules.d.ts +3 -6
- package/dist/entitlements/rules.js +5 -10
- package/dist/entitlements/rules.js.map +1 -1
- package/dist/entitlements/service.d.ts +40 -28
- package/dist/entitlements/service.js +370 -163
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/devices.d.ts +3 -3
- package/dist/identity/devices.js +7 -5
- package/dist/identity/devices.js.map +1 -1
- package/dist/identity/events.d.ts +2 -2
- package/dist/identity/index.d.ts +2 -2
- package/dist/identity/index.js +2 -2
- package/dist/identity/notification-settings.d.ts +1 -1
- package/dist/identity/notification-settings.js +3 -2
- package/dist/identity/notification-settings.js.map +1 -1
- package/dist/identity/ports.d.ts +7 -7
- package/dist/identity/service.d.ts +8 -7
- package/dist/identity/service.js +17 -13
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/events.d.ts +3 -3
- package/dist/integrations/ports.d.ts +9 -8
- package/dist/integrations/service.d.ts +9 -8
- package/dist/integrations/service.js +33 -16
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/default-roles.d.ts +22 -0
- package/dist/organizations/default-roles.js +89 -0
- package/dist/organizations/default-roles.js.map +1 -0
- package/dist/organizations/effective-permissions.d.ts +45 -0
- package/dist/organizations/effective-permissions.js +113 -0
- package/dist/organizations/effective-permissions.js.map +1 -0
- package/dist/organizations/events.d.ts +320 -181
- package/dist/organizations/events.js +90 -18
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +14 -10
- package/dist/organizations/index.js +7 -3
- package/dist/organizations/members.d.ts +66 -8
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/notification-catalog.d.ts +31 -0
- package/dist/organizations/notification-catalog.js +32 -0
- package/dist/organizations/notification-catalog.js.map +1 -0
- package/dist/organizations/notification-categories.d.ts +6 -4
- package/dist/organizations/notification-categories.js +25 -10
- package/dist/organizations/notification-categories.js.map +1 -1
- package/dist/organizations/org-roles.d.ts +33 -0
- package/dist/organizations/org-roles.js +49 -0
- package/dist/organizations/org-roles.js.map +1 -0
- package/dist/organizations/permissions.d.ts +311 -0
- package/dist/organizations/permissions.js +327 -0
- package/dist/organizations/permissions.js.map +1 -0
- package/dist/organizations/ports.d.ts +184 -65
- package/dist/organizations/service.d.ts +102 -35
- package/dist/organizations/service.js +1245 -328
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/testing.d.ts +18 -0
- package/dist/organizations/testing.js +37 -0
- package/dist/organizations/testing.js.map +1 -0
- package/dist/organizations/types.d.ts +5 -16
- package/dist/progress/events.d.ts +14 -14
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/ports.d.ts +11 -3
- package/dist/progress/service.d.ts +6 -5
- package/dist/progress/service.js +23 -8
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/admin/index.d.ts +6 -4
- package/dist/reporting/admin/model.d.ts +36 -3
- package/dist/reporting/admin/ports.d.ts +39 -14
- package/dist/reporting/admin/service.d.ts +32 -11
- package/dist/reporting/admin/service.js +102 -18
- package/dist/reporting/admin/service.js.map +1 -1
- package/dist/reporting/events/index.d.ts +27 -0
- package/dist/reporting/events/index.js +20 -0
- package/dist/reporting/events/index.js.map +1 -0
- package/dist/reporting/member/calendar.d.ts +11 -0
- package/dist/reporting/member/calendar.js +75 -0
- package/dist/reporting/member/calendar.js.map +1 -0
- package/dist/reporting/member/index.d.ts +3 -2
- package/dist/reporting/member/model.d.ts +26 -5
- package/dist/reporting/member/ports.d.ts +48 -29
- package/dist/reporting/member/service.d.ts +56 -29
- package/dist/reporting/member/service.js +328 -113
- package/dist/reporting/member/service.js.map +1 -1
- package/dist/shared/actor.d.ts +22 -3
- package/dist/shared/errors.d.ts +2 -1
- package/dist/shared/errors.js +3 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +4 -0
- package/dist/shared/id.js +4 -0
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/logger.d.ts +2 -1
- package/dist/shared/logger.js +10 -1
- package/dist/shared/logger.js.map +1 -1
- package/dist/shared/ports.d.ts +25 -5
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +4 -5
- package/dist/types/email-templates.d.ts +22 -3
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/identity.d.ts +13 -16
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +2 -1
- package/dist/types/notifications.d.ts +4 -4
- package/dist/types/organizations.d.ts +3 -2
- package/dist/types/ports.d.ts +8 -1
- package/dist/types/ports.js +7 -1
- package/dist/types/ports.js.map +1 -0
- package/dist/types/schemas/assets.d.ts +5 -5
- package/dist/types/schemas/assets.js +4 -3
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/content.d.ts +537 -13
- package/dist/types/schemas/content.js +201 -7
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +282 -59
- package/dist/types/schemas/discussion.js +77 -3
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +14 -1
- package/dist/types/schemas/entitlements.js +11 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/index.d.ts +5 -5
- package/dist/types/schemas/index.js +5 -5
- package/dist/types/schemas/notifications.d.ts +13 -12
- package/dist/types/schemas/notifications.js +3 -2
- package/dist/types/schemas/notifications.js.map +1 -1
- package/dist/types/schemas/organizations.d.ts +96 -60
- package/dist/types/schemas/organizations.js +78 -27
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +3 -4
- package/dist/types/schemas/progress.js +0 -1
- package/dist/types/schemas/progress.js.map +1 -1
- package/package.json +1 -1
- package/dist/organizations/access-scopes.d.ts +0 -19
- package/dist/organizations/access-scopes.js +0 -89
- package/dist/organizations/access-scopes.js.map +0 -1
- package/dist/organizations/roles.d.ts +0 -19
- package/dist/organizations/roles.js +0 -82
- package/dist/organizations/roles.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventOf, EventOfValues, RuntimeEventDefinition, VersionedDomainEvent } from "../shared/events.js";
|
|
2
2
|
import "../shared/ports.js";
|
|
3
|
+
import { z } from "zod";
|
|
3
4
|
//#region src/organizations/events.d.ts
|
|
4
5
|
declare const organizationEvents: {
|
|
5
6
|
organizationCreated: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
@@ -18,14 +19,14 @@ declare const organizationEvents: {
|
|
|
18
19
|
ownerId: string;
|
|
19
20
|
createdAt: unknown;
|
|
20
21
|
updatedAt: unknown;
|
|
21
|
-
},
|
|
22
|
-
id:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
slug:
|
|
27
|
-
ownerId:
|
|
28
|
-
},
|
|
22
|
+
}, z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
26
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
27
|
+
slug: z.ZodString;
|
|
28
|
+
ownerId: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
29
30
|
organizationUpdated: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
30
31
|
id: string;
|
|
31
32
|
externalId: string | null;
|
|
@@ -42,14 +43,14 @@ declare const organizationEvents: {
|
|
|
42
43
|
ownerId: string;
|
|
43
44
|
createdAt: unknown;
|
|
44
45
|
updatedAt: unknown;
|
|
45
|
-
},
|
|
46
|
-
id:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
slug:
|
|
51
|
-
ownerId:
|
|
52
|
-
},
|
|
46
|
+
}, z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
50
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
51
|
+
slug: z.ZodString;
|
|
52
|
+
ownerId: z.ZodString;
|
|
53
|
+
}, z.core.$strip>>;
|
|
53
54
|
organizationDeleted: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
54
55
|
id: string;
|
|
55
56
|
externalId: string | null;
|
|
@@ -66,219 +67,209 @@ declare const organizationEvents: {
|
|
|
66
67
|
ownerId: string;
|
|
67
68
|
createdAt: unknown;
|
|
68
69
|
updatedAt: unknown;
|
|
69
|
-
},
|
|
70
|
-
id:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
slug:
|
|
75
|
-
ownerId:
|
|
76
|
-
},
|
|
70
|
+
}, z.ZodObject<{
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
74
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
75
|
+
slug: z.ZodString;
|
|
76
|
+
ownerId: z.ZodString;
|
|
77
|
+
}, z.core.$strip>>;
|
|
77
78
|
orgUserLinked: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
78
79
|
id: string;
|
|
79
80
|
orgId: string;
|
|
80
81
|
userId: string;
|
|
81
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
82
82
|
status: "active" | "invited";
|
|
83
83
|
createdAt: Date;
|
|
84
84
|
updatedAt: Date;
|
|
85
|
-
|
|
85
|
+
orgRole: {
|
|
86
|
+
key: string;
|
|
87
|
+
};
|
|
88
|
+
}, "organization.user.linked", 2>, {
|
|
86
89
|
id: string;
|
|
87
90
|
orgId: string;
|
|
88
91
|
userId: string;
|
|
89
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
90
92
|
status: "active" | "invited";
|
|
91
93
|
createdAt: unknown;
|
|
92
94
|
updatedAt: unknown;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
orgRole: {
|
|
96
|
+
key: string;
|
|
97
|
+
};
|
|
98
|
+
}, z.ZodObject<{
|
|
99
|
+
orgId: z.ZodString;
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
102
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
103
|
+
status: z.ZodEnum<{
|
|
99
104
|
active: "active";
|
|
100
105
|
invited: "invited";
|
|
101
106
|
}>;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
student: "student";
|
|
108
|
-
}>;
|
|
109
|
-
userId: import("zod").ZodString;
|
|
110
|
-
}, import("zod/v4/core").$strip>>;
|
|
107
|
+
userId: z.ZodString;
|
|
108
|
+
orgRole: z.ZodObject<{
|
|
109
|
+
key: z.ZodString;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
111
112
|
orgUserDeleted: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
112
113
|
id: string;
|
|
113
114
|
orgId: string;
|
|
114
115
|
userId: string;
|
|
115
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
116
116
|
status: "active" | "invited";
|
|
117
117
|
createdAt: Date;
|
|
118
118
|
updatedAt: Date;
|
|
119
|
-
|
|
119
|
+
orgRole: {
|
|
120
|
+
key: string;
|
|
121
|
+
};
|
|
122
|
+
}, "organization.user.deleted", 2>, {
|
|
120
123
|
id: string;
|
|
121
124
|
orgId: string;
|
|
122
125
|
userId: string;
|
|
123
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
124
126
|
status: "active" | "invited";
|
|
125
127
|
createdAt: unknown;
|
|
126
128
|
updatedAt: unknown;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
orgRole: {
|
|
130
|
+
key: string;
|
|
131
|
+
};
|
|
132
|
+
}, z.ZodObject<{
|
|
133
|
+
orgId: z.ZodString;
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
136
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
137
|
+
status: z.ZodEnum<{
|
|
133
138
|
active: "active";
|
|
134
139
|
invited: "invited";
|
|
135
140
|
}>;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
student: "student";
|
|
142
|
-
}>;
|
|
143
|
-
userId: import("zod").ZodString;
|
|
144
|
-
}, import("zod/v4/core").$strip>>;
|
|
141
|
+
userId: z.ZodString;
|
|
142
|
+
orgRole: z.ZodObject<{
|
|
143
|
+
key: z.ZodString;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
}, z.core.$strip>>;
|
|
145
146
|
orgUserUpdated: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
146
147
|
id: string;
|
|
147
148
|
orgId: string;
|
|
148
149
|
userId: string;
|
|
149
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
150
150
|
status: "active" | "invited";
|
|
151
151
|
createdAt: Date;
|
|
152
152
|
updatedAt: Date;
|
|
153
|
-
|
|
153
|
+
orgRole: {
|
|
154
|
+
key: string;
|
|
155
|
+
};
|
|
156
|
+
}, "organization.user.updated", 2>, {
|
|
154
157
|
id: string;
|
|
155
158
|
orgId: string;
|
|
156
159
|
userId: string;
|
|
157
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
158
160
|
status: "active" | "invited";
|
|
159
161
|
createdAt: unknown;
|
|
160
162
|
updatedAt: unknown;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
orgRole: {
|
|
164
|
+
key: string;
|
|
165
|
+
};
|
|
166
|
+
}, z.ZodObject<{
|
|
167
|
+
orgId: z.ZodString;
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
170
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
171
|
+
status: z.ZodEnum<{
|
|
167
172
|
active: "active";
|
|
168
173
|
invited: "invited";
|
|
169
174
|
}>;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
student: "student";
|
|
176
|
-
}>;
|
|
177
|
-
userId: import("zod").ZodString;
|
|
178
|
-
}, import("zod/v4/core").$strip>>;
|
|
175
|
+
userId: z.ZodString;
|
|
176
|
+
orgRole: z.ZodObject<{
|
|
177
|
+
key: z.ZodString;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
}, z.core.$strip>>;
|
|
179
180
|
inviteCreated: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
180
181
|
id: string;
|
|
181
182
|
orgId: string;
|
|
182
183
|
email: string;
|
|
183
|
-
|
|
184
|
-
status: "pending" | "
|
|
184
|
+
roleKey: string;
|
|
185
|
+
status: "pending" | "canceled" | "accepted" | "rejected";
|
|
185
186
|
invitedBy: string;
|
|
186
187
|
tokenHash: string | null;
|
|
187
188
|
expiresAt: Date | null;
|
|
188
189
|
createdAt: Date;
|
|
189
190
|
updatedAt: Date;
|
|
190
|
-
}, "organization.invite.created",
|
|
191
|
+
}, "organization.invite.created", 2>, {
|
|
191
192
|
id: string;
|
|
192
193
|
orgId: string;
|
|
193
194
|
email: string;
|
|
194
|
-
|
|
195
|
-
status: "pending" | "
|
|
195
|
+
roleKey: string;
|
|
196
|
+
status: "pending" | "canceled" | "accepted" | "rejected";
|
|
196
197
|
invitedBy: string;
|
|
197
198
|
tokenHash: string | null;
|
|
198
199
|
expiresAt: unknown;
|
|
199
200
|
createdAt: unknown;
|
|
200
201
|
updatedAt: unknown;
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
createdAt:
|
|
205
|
-
updatedAt:
|
|
206
|
-
status:
|
|
202
|
+
}, z.ZodObject<{
|
|
203
|
+
orgId: z.ZodString;
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
206
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
207
|
+
status: z.ZodEnum<{
|
|
207
208
|
pending: "pending";
|
|
209
|
+
canceled: "canceled";
|
|
208
210
|
accepted: "accepted";
|
|
209
211
|
rejected: "rejected";
|
|
210
|
-
canceled: "canceled";
|
|
211
|
-
}>;
|
|
212
|
-
expiresAt: import("zod").ZodNullable<import("zod").ZodCoercedDate<unknown>>;
|
|
213
|
-
role: import("zod").ZodEnum<{
|
|
214
|
-
admin: "admin";
|
|
215
|
-
instructor: "instructor";
|
|
216
|
-
moderator: "moderator";
|
|
217
|
-
student: "student";
|
|
218
212
|
}>;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
213
|
+
expiresAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
214
|
+
email: z.ZodEmail;
|
|
215
|
+
invitedBy: z.ZodString;
|
|
216
|
+
roleKey: z.ZodString;
|
|
217
|
+
}, z.core.$strip>>;
|
|
222
218
|
inviteAccepted: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
223
219
|
id: string;
|
|
224
220
|
orgId: string;
|
|
225
221
|
email: string;
|
|
226
|
-
|
|
227
|
-
status: "pending" | "
|
|
222
|
+
roleKey: string;
|
|
223
|
+
status: "pending" | "canceled" | "accepted" | "rejected";
|
|
228
224
|
invitedBy: string;
|
|
229
225
|
tokenHash: string | null;
|
|
230
226
|
expiresAt: Date | null;
|
|
231
227
|
createdAt: Date;
|
|
232
228
|
updatedAt: Date;
|
|
233
|
-
}, "organization.invite.accepted",
|
|
229
|
+
}, "organization.invite.accepted", 2>, {
|
|
234
230
|
id: string;
|
|
235
231
|
orgId: string;
|
|
236
232
|
email: string;
|
|
237
|
-
|
|
238
|
-
status: "pending" | "
|
|
233
|
+
roleKey: string;
|
|
234
|
+
status: "pending" | "canceled" | "accepted" | "rejected";
|
|
239
235
|
invitedBy: string;
|
|
240
236
|
tokenHash: string | null;
|
|
241
237
|
expiresAt: unknown;
|
|
242
238
|
createdAt: unknown;
|
|
243
239
|
updatedAt: unknown;
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
createdAt:
|
|
248
|
-
updatedAt:
|
|
249
|
-
status:
|
|
240
|
+
}, z.ZodObject<{
|
|
241
|
+
orgId: z.ZodString;
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
244
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
245
|
+
status: z.ZodEnum<{
|
|
250
246
|
pending: "pending";
|
|
247
|
+
canceled: "canceled";
|
|
251
248
|
accepted: "accepted";
|
|
252
249
|
rejected: "rejected";
|
|
253
|
-
canceled: "canceled";
|
|
254
|
-
}>;
|
|
255
|
-
expiresAt: import("zod").ZodNullable<import("zod").ZodCoercedDate<unknown>>;
|
|
256
|
-
role: import("zod").ZodEnum<{
|
|
257
|
-
admin: "admin";
|
|
258
|
-
instructor: "instructor";
|
|
259
|
-
moderator: "moderator";
|
|
260
|
-
student: "student";
|
|
261
250
|
}>;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
251
|
+
expiresAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
252
|
+
email: z.ZodEmail;
|
|
253
|
+
invitedBy: z.ZodString;
|
|
254
|
+
roleKey: z.ZodString;
|
|
255
|
+
}, z.core.$strip>>;
|
|
265
256
|
inviteCanceled: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
266
257
|
id: string;
|
|
267
258
|
orgId: string;
|
|
268
259
|
email: string;
|
|
269
|
-
|
|
270
|
-
status: "pending" | "
|
|
260
|
+
roleKey: string;
|
|
261
|
+
status: "pending" | "canceled" | "accepted" | "rejected";
|
|
271
262
|
invitedBy: string;
|
|
272
263
|
tokenHash: string | null;
|
|
273
264
|
expiresAt: Date | null;
|
|
274
265
|
createdAt: Date;
|
|
275
266
|
updatedAt: Date;
|
|
276
|
-
}, "organization.invite.canceled",
|
|
267
|
+
}, "organization.invite.canceled", 2>, {
|
|
277
268
|
id: string;
|
|
278
269
|
orgId: string;
|
|
279
270
|
email: string;
|
|
280
|
-
|
|
281
|
-
status: "pending" | "
|
|
271
|
+
roleKey: string;
|
|
272
|
+
status: "pending" | "canceled" | "accepted" | "rejected";
|
|
282
273
|
invitedBy: string;
|
|
283
274
|
tokenHash: string | null;
|
|
284
275
|
expiresAt: unknown;
|
|
@@ -289,104 +280,246 @@ declare const organizationEvents: {
|
|
|
289
280
|
id: string;
|
|
290
281
|
orgId: string;
|
|
291
282
|
userId: string;
|
|
292
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
293
283
|
status: "active" | "invited";
|
|
294
284
|
createdAt: Date;
|
|
295
285
|
updatedAt: Date;
|
|
296
|
-
}, "organization.student.created",
|
|
286
|
+
}, "organization.student.created", 2>, {
|
|
297
287
|
id: string;
|
|
298
288
|
orgId: string;
|
|
299
289
|
userId: string;
|
|
300
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
301
290
|
status: "active" | "invited";
|
|
302
291
|
createdAt: unknown;
|
|
303
292
|
updatedAt: unknown;
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
createdAt:
|
|
308
|
-
updatedAt:
|
|
309
|
-
status:
|
|
293
|
+
}, z.ZodObject<{
|
|
294
|
+
orgId: z.ZodString;
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
297
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
298
|
+
status: z.ZodEnum<{
|
|
310
299
|
active: "active";
|
|
311
300
|
invited: "invited";
|
|
312
301
|
}>;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
admin: "admin";
|
|
316
|
-
instructor: "instructor";
|
|
317
|
-
moderator: "moderator";
|
|
318
|
-
student: "student";
|
|
319
|
-
}>;
|
|
320
|
-
userId: import("zod").ZodString;
|
|
321
|
-
}, import("zod/v4/core").$strip>>;
|
|
302
|
+
userId: z.ZodString;
|
|
303
|
+
}, z.core.$strip>>;
|
|
322
304
|
studentDeleted: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
323
305
|
id: string;
|
|
324
306
|
orgId: string;
|
|
325
307
|
userId: string;
|
|
326
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
327
308
|
status: "active" | "invited";
|
|
328
309
|
createdAt: Date;
|
|
329
310
|
updatedAt: Date;
|
|
330
|
-
}, "organization.student.deleted",
|
|
311
|
+
}, "organization.student.deleted", 2>, {
|
|
331
312
|
id: string;
|
|
332
313
|
orgId: string;
|
|
333
314
|
userId: string;
|
|
334
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
335
315
|
status: "active" | "invited";
|
|
336
316
|
createdAt: unknown;
|
|
337
317
|
updatedAt: unknown;
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
createdAt:
|
|
342
|
-
updatedAt:
|
|
343
|
-
status:
|
|
318
|
+
}, z.ZodObject<{
|
|
319
|
+
orgId: z.ZodString;
|
|
320
|
+
id: z.ZodString;
|
|
321
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
322
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
323
|
+
status: z.ZodEnum<{
|
|
344
324
|
active: "active";
|
|
345
325
|
invited: "invited";
|
|
346
326
|
}>;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
327
|
+
userId: z.ZodString;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
roleUpdated: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
330
|
+
key: string;
|
|
331
|
+
before: {
|
|
332
|
+
key: string;
|
|
333
|
+
name: string;
|
|
334
|
+
description: string;
|
|
335
|
+
base: string;
|
|
336
|
+
levels: ("event" | "course" | "download" | "community" | "org")[];
|
|
337
|
+
team: boolean;
|
|
338
|
+
permissions: string[];
|
|
339
|
+
};
|
|
340
|
+
after: {
|
|
341
|
+
key: string;
|
|
342
|
+
name: string;
|
|
343
|
+
description: string;
|
|
344
|
+
base: string;
|
|
345
|
+
levels: ("event" | "course" | "download" | "community" | "org")[];
|
|
346
|
+
team: boolean;
|
|
347
|
+
permissions: string[];
|
|
348
|
+
};
|
|
349
|
+
}, "organization.role.updated", 1>, {
|
|
350
|
+
key: string;
|
|
351
|
+
before: {
|
|
352
|
+
key: string;
|
|
353
|
+
name: string;
|
|
354
|
+
description: string;
|
|
355
|
+
base: string;
|
|
356
|
+
levels: ("event" | "course" | "download" | "community" | "org")[];
|
|
357
|
+
team: boolean;
|
|
358
|
+
permissions: string[];
|
|
359
|
+
};
|
|
360
|
+
after: {
|
|
361
|
+
key: string;
|
|
362
|
+
name: string;
|
|
363
|
+
description: string;
|
|
364
|
+
base: string;
|
|
365
|
+
levels: ("event" | "course" | "download" | "community" | "org")[];
|
|
366
|
+
team: boolean;
|
|
367
|
+
permissions: string[];
|
|
368
|
+
};
|
|
369
|
+
}, z.ZodObject<{
|
|
370
|
+
key: z.ZodString;
|
|
371
|
+
before: z.ZodObject<{
|
|
372
|
+
key: z.ZodString;
|
|
373
|
+
name: z.ZodString;
|
|
374
|
+
description: z.ZodString;
|
|
375
|
+
base: z.ZodString;
|
|
376
|
+
levels: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"org">, z.ZodLazy<z.ZodEnum<{
|
|
377
|
+
event: "event";
|
|
378
|
+
course: "course";
|
|
379
|
+
download: "download";
|
|
380
|
+
community: "community";
|
|
381
|
+
}>>]>>;
|
|
382
|
+
team: z.ZodBoolean;
|
|
383
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
after: z.ZodObject<{
|
|
386
|
+
key: z.ZodString;
|
|
387
|
+
name: z.ZodString;
|
|
388
|
+
description: z.ZodString;
|
|
389
|
+
base: z.ZodString;
|
|
390
|
+
levels: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"org">, z.ZodLazy<z.ZodEnum<{
|
|
391
|
+
event: "event";
|
|
392
|
+
course: "course";
|
|
393
|
+
download: "download";
|
|
394
|
+
community: "community";
|
|
395
|
+
}>>]>>;
|
|
396
|
+
team: z.ZodBoolean;
|
|
397
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
398
|
+
}, z.core.$strip>;
|
|
399
|
+
}, z.core.$strip>>;
|
|
400
|
+
roleCreated: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
401
|
+
role: {
|
|
402
|
+
key: string;
|
|
403
|
+
name: string;
|
|
404
|
+
description: string;
|
|
405
|
+
base: string;
|
|
406
|
+
levels: ("event" | "course" | "download" | "community" | "org")[];
|
|
407
|
+
team: boolean;
|
|
408
|
+
permissions: string[];
|
|
409
|
+
};
|
|
410
|
+
}, "organization.role.created", 1>, {
|
|
411
|
+
role: {
|
|
412
|
+
key: string;
|
|
413
|
+
name: string;
|
|
414
|
+
description: string;
|
|
415
|
+
base: string;
|
|
416
|
+
levels: ("event" | "course" | "download" | "community" | "org")[];
|
|
417
|
+
team: boolean;
|
|
418
|
+
permissions: string[];
|
|
419
|
+
};
|
|
420
|
+
}, z.ZodObject<{
|
|
421
|
+
role: z.ZodObject<{
|
|
422
|
+
key: z.ZodString;
|
|
423
|
+
name: z.ZodString;
|
|
424
|
+
description: z.ZodString;
|
|
425
|
+
base: z.ZodString;
|
|
426
|
+
levels: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"org">, z.ZodLazy<z.ZodEnum<{
|
|
427
|
+
event: "event";
|
|
428
|
+
course: "course";
|
|
429
|
+
download: "download";
|
|
430
|
+
community: "community";
|
|
431
|
+
}>>]>>;
|
|
432
|
+
team: z.ZodBoolean;
|
|
433
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
434
|
+
}, z.core.$strip>;
|
|
435
|
+
}, z.core.$strip>>;
|
|
436
|
+
roleDeleted: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
437
|
+
key: string;
|
|
438
|
+
}, "organization.role.deleted", 1>, {
|
|
439
|
+
key: string;
|
|
440
|
+
}, z.ZodObject<{
|
|
441
|
+
key: z.ZodString;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
roleAssigned: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
444
|
+
orgUserId: string;
|
|
445
|
+
roleKey: string;
|
|
446
|
+
contentId: string | null;
|
|
447
|
+
contentType: "event" | "course" | "download" | "community" | null;
|
|
448
|
+
previousRoleKey: string | null;
|
|
449
|
+
}, "organization.role.assigned", 1>, {
|
|
450
|
+
orgUserId: string;
|
|
451
|
+
roleKey: string;
|
|
452
|
+
contentId: string | null;
|
|
453
|
+
contentType: "event" | "course" | "download" | "community" | null;
|
|
454
|
+
previousRoleKey: string | null;
|
|
455
|
+
}, z.ZodObject<{
|
|
456
|
+
orgUserId: z.ZodString;
|
|
457
|
+
roleKey: z.ZodString;
|
|
458
|
+
contentId: z.ZodNullable<z.ZodString>;
|
|
459
|
+
contentType: z.ZodNullable<z.ZodEnum<{
|
|
460
|
+
event: "event";
|
|
461
|
+
course: "course";
|
|
462
|
+
download: "download";
|
|
463
|
+
community: "community";
|
|
464
|
+
}>>;
|
|
465
|
+
previousRoleKey: z.ZodNullable<z.ZodString>;
|
|
466
|
+
}, z.core.$strip>>;
|
|
467
|
+
roleUnassigned: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
468
|
+
orgUserId: string;
|
|
469
|
+
roleKey: string;
|
|
470
|
+
contentId: string;
|
|
471
|
+
contentType: "event" | "course" | "download" | "community";
|
|
472
|
+
}, "organization.role.unassigned", 1>, {
|
|
473
|
+
orgUserId: string;
|
|
474
|
+
roleKey: string;
|
|
475
|
+
contentId: string;
|
|
476
|
+
contentType: "event" | "course" | "download" | "community";
|
|
477
|
+
}, z.ZodObject<{
|
|
478
|
+
orgUserId: z.ZodString;
|
|
479
|
+
roleKey: z.ZodString;
|
|
480
|
+
contentId: z.ZodString;
|
|
481
|
+
contentType: z.ZodEnum<{
|
|
482
|
+
event: "event";
|
|
483
|
+
course: "course";
|
|
484
|
+
download: "download";
|
|
485
|
+
community: "community";
|
|
353
486
|
}>;
|
|
354
|
-
|
|
355
|
-
|
|
487
|
+
}, z.core.$strip>>;
|
|
488
|
+
ownershipTransferred: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
489
|
+
previousOwnerOrgUserId: string;
|
|
490
|
+
newOwnerOrgUserId: string;
|
|
491
|
+
}, "organization.ownership.transferred", 1>, {
|
|
492
|
+
previousOwnerOrgUserId: string;
|
|
493
|
+
newOwnerOrgUserId: string;
|
|
494
|
+
}, z.ZodObject<{
|
|
495
|
+
previousOwnerOrgUserId: z.ZodString;
|
|
496
|
+
newOwnerOrgUserId: z.ZodString;
|
|
497
|
+
}, z.core.$strip>>;
|
|
356
498
|
studentLinked: RuntimeEventDefinition<VersionedDomainEvent<{
|
|
357
499
|
id: string;
|
|
358
500
|
orgId: string;
|
|
359
501
|
userId: string;
|
|
360
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
361
502
|
status: "active" | "invited";
|
|
362
503
|
createdAt: Date;
|
|
363
504
|
updatedAt: Date;
|
|
364
|
-
}, "organization.student.linked",
|
|
505
|
+
}, "organization.student.linked", 2>, {
|
|
365
506
|
id: string;
|
|
366
507
|
orgId: string;
|
|
367
508
|
userId: string;
|
|
368
|
-
role: "owner" | "admin" | "instructor" | "moderator" | "student";
|
|
369
509
|
status: "active" | "invited";
|
|
370
510
|
createdAt: unknown;
|
|
371
511
|
updatedAt: unknown;
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
createdAt:
|
|
376
|
-
updatedAt:
|
|
377
|
-
status:
|
|
512
|
+
}, z.ZodObject<{
|
|
513
|
+
orgId: z.ZodString;
|
|
514
|
+
id: z.ZodString;
|
|
515
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
516
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
517
|
+
status: z.ZodEnum<{
|
|
378
518
|
active: "active";
|
|
379
519
|
invited: "invited";
|
|
380
520
|
}>;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
admin: "admin";
|
|
384
|
-
instructor: "instructor";
|
|
385
|
-
moderator: "moderator";
|
|
386
|
-
student: "student";
|
|
387
|
-
}>;
|
|
388
|
-
userId: import("zod").ZodString;
|
|
389
|
-
}, import("zod/v4/core").$strip>>;
|
|
521
|
+
userId: z.ZodString;
|
|
522
|
+
}, z.core.$strip>>;
|
|
390
523
|
};
|
|
391
524
|
type OrganizationCreated = EventOf<typeof organizationEvents.organizationCreated>;
|
|
392
525
|
type OrganizationUpdated = EventOf<typeof organizationEvents.organizationUpdated>;
|
|
@@ -400,7 +533,13 @@ type InviteCanceled = EventOf<typeof organizationEvents.inviteCanceled>;
|
|
|
400
533
|
type StudentCreated = EventOf<typeof organizationEvents.studentCreated>;
|
|
401
534
|
type StudentDeleted = EventOf<typeof organizationEvents.studentDeleted>;
|
|
402
535
|
type StudentLinked = EventOf<typeof organizationEvents.studentLinked>;
|
|
536
|
+
type RoleUpdated = EventOf<typeof organizationEvents.roleUpdated>;
|
|
537
|
+
type RoleCreated = EventOf<typeof organizationEvents.roleCreated>;
|
|
538
|
+
type RoleDeleted = EventOf<typeof organizationEvents.roleDeleted>;
|
|
539
|
+
type RoleAssigned = EventOf<typeof organizationEvents.roleAssigned>;
|
|
540
|
+
type RoleUnassigned = EventOf<typeof organizationEvents.roleUnassigned>;
|
|
541
|
+
type OwnershipTransferred = EventOf<typeof organizationEvents.ownershipTransferred>;
|
|
403
542
|
type OrganizationEvent = EventOfValues<typeof organizationEvents>;
|
|
404
543
|
//#endregion
|
|
405
|
-
export { InviteAccepted, InviteCanceled, InviteCreated, OrgUserDeleted, OrgUserLinked, OrgUserUpdated, OrganizationCreated, OrganizationDeleted, OrganizationEvent, OrganizationUpdated, StudentCreated, StudentDeleted, StudentLinked, organizationEvents };
|
|
544
|
+
export { InviteAccepted, InviteCanceled, InviteCreated, OrgUserDeleted, OrgUserLinked, OrgUserUpdated, OrganizationCreated, OrganizationDeleted, OrganizationEvent, OrganizationUpdated, OwnershipTransferred, RoleAssigned, RoleCreated, RoleDeleted, RoleUnassigned, RoleUpdated, StudentCreated, StudentDeleted, StudentLinked, organizationEvents };
|
|
406
545
|
//# sourceMappingURL=events.d.ts.map
|