@headless-lms/core 0.1.0 → 0.3.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 +90 -9
- package/dist/assets/events.js +19 -3
- package/dist/assets/events.js.map +1 -1
- package/dist/assets/file-urls.d.ts +20 -0
- package/dist/assets/file-urls.js +25 -0
- package/dist/assets/file-urls.js.map +1 -0
- package/dist/assets/index.d.ts +5 -4
- package/dist/assets/index.js +3 -2
- package/dist/assets/model.d.ts +2 -2
- package/dist/assets/ports.d.ts +45 -15
- package/dist/assets/service.d.ts +39 -7
- package/dist/assets/service.js +292 -37
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.d.ts +12 -15
- package/dist/automations/actions.js +188 -30
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.d.ts +5 -1
- package/dist/automations/catalog.js +514 -197
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.d.ts +14 -0
- package/dist/automations/community-derivations.js +439 -0
- package/dist/automations/community-derivations.js.map +1 -0
- package/dist/automations/community-mail.d.ts +112 -0
- package/dist/automations/community-mail.js +90 -0
- package/dist/automations/community-mail.js.map +1 -0
- package/dist/automations/community-notifications.d.ts +16 -0
- package/dist/automations/community-notifications.js +84 -0
- package/dist/automations/community-notifications.js.map +1 -0
- package/dist/automations/events.d.ts +74 -24
- package/dist/automations/events.js +5 -5
- package/dist/automations/events.js.map +1 -1
- package/dist/automations/index.d.ts +7 -5
- package/dist/automations/index.js +3 -2
- package/dist/automations/model.d.ts +20 -3
- package/dist/automations/model.js +36 -3
- package/dist/automations/model.js.map +1 -1
- package/dist/automations/ports.d.ts +27 -8
- package/dist/automations/schedule.d.ts +6 -0
- package/dist/automations/schedule.js +41 -0
- package/dist/automations/schedule.js.map +1 -0
- package/dist/automations/seeds.d.ts +17 -0
- package/dist/automations/seeds.js +235 -0
- package/dist/automations/seeds.js.map +1 -0
- package/dist/automations/service.d.ts +41 -6
- package/dist/automations/service.js +542 -59
- package/dist/automations/service.js.map +1 -1
- package/dist/automations/types.d.ts +2 -2
- package/dist/automations/webhook-signing.d.ts +7 -0
- package/dist/automations/webhook-signing.js +22 -0
- package/dist/automations/webhook-signing.js.map +1 -0
- package/dist/content/events.d.ts +1013 -25
- package/dist/content/events.js +168 -19
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +5 -5
- package/dist/content/index.js +2 -2
- package/dist/content/model.d.ts +2 -2
- package/dist/content/ports.d.ts +109 -25
- package/dist/content/service.d.ts +68 -23
- package/dist/content/service.js +647 -60
- package/dist/content/service.js.map +1 -1
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/authors.d.ts +10 -0
- package/dist/discussion/authors.js +23 -0
- package/dist/discussion/authors.js.map +1 -0
- package/dist/discussion/chats.d.ts +104 -0
- package/dist/discussion/chats.js +798 -0
- package/dist/discussion/chats.js.map +1 -0
- package/dist/discussion/events.d.ts +633 -14
- package/dist/discussion/events.js +134 -5
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +7 -3
- package/dist/discussion/index.js +4 -1
- package/dist/discussion/model.d.ts +1 -2
- package/dist/discussion/ports.d.ts +288 -27
- package/dist/discussion/ports.js +6 -1
- package/dist/discussion/ports.js.map +1 -0
- package/dist/discussion/posts.d.ts +103 -0
- package/dist/discussion/posts.js +723 -0
- package/dist/discussion/posts.js.map +1 -0
- package/dist/discussion/service.d.ts +33 -11
- package/dist/discussion/service.js +297 -81
- package/dist/discussion/service.js.map +1 -1
- package/dist/entitlements/events.d.ts +264 -13
- package/dist/entitlements/events.js +49 -5
- package/dist/entitlements/events.js.map +1 -1
- package/dist/entitlements/index.d.ts +5 -4
- package/dist/entitlements/index.js +2 -1
- package/dist/entitlements/model.d.ts +3 -2
- package/dist/entitlements/ports.d.ts +124 -11
- package/dist/entitlements/rules.d.ts +12 -0
- package/dist/entitlements/rules.js +17 -0
- package/dist/entitlements/rules.js.map +1 -0
- package/dist/entitlements/service.d.ts +54 -3
- package/dist/entitlements/service.js +473 -2
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/access.d.ts +6 -0
- package/dist/identity/access.js +7 -0
- package/dist/identity/access.js.map +1 -0
- package/dist/identity/events.d.ts +17 -3
- package/dist/identity/events.js +12 -2
- package/dist/identity/events.js.map +1 -1
- package/dist/identity/index.d.ts +6 -4
- package/dist/identity/index.js +3 -1
- package/dist/identity/model.d.ts +2 -1
- package/dist/identity/notifications.d.ts +27 -0
- package/dist/identity/notifications.js +101 -0
- package/dist/identity/notifications.js.map +1 -0
- package/dist/identity/ports.d.ts +76 -3
- package/dist/identity/service.d.ts +17 -3
- package/dist/identity/service.js +73 -5
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/events.d.ts +27 -3
- package/dist/integrations/events.js +15 -3
- package/dist/integrations/events.js.map +1 -1
- package/dist/integrations/model.js +1 -1
- package/dist/integrations/model.js.map +1 -1
- package/dist/integrations/service.js +2 -2
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/access-scopes.d.ts +19 -0
- package/dist/organizations/access-scopes.js +89 -0
- package/dist/organizations/access-scopes.js.map +1 -0
- package/dist/organizations/events.d.ts +234 -25
- package/dist/organizations/events.js +58 -9
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +8 -7
- package/dist/organizations/index.js +4 -3
- package/dist/organizations/members.d.ts +8 -5
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/ports.d.ts +20 -21
- package/dist/organizations/roles.d.ts +6 -10
- package/dist/organizations/roles.js +19 -7
- package/dist/organizations/roles.js.map +1 -1
- package/dist/organizations/service.d.ts +28 -14
- package/dist/organizations/service.js +274 -105
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/types.d.ts +2 -11
- package/dist/progress/events.d.ts +34 -2
- package/dist/progress/events.js +15 -2
- package/dist/progress/events.js.map +1 -1
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/ports.d.ts +6 -1
- package/dist/progress/service.d.ts +5 -3
- package/dist/progress/service.js +9 -3
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/admin/index.d.ts +4 -0
- package/dist/reporting/admin/index.js +2 -0
- package/dist/reporting/admin/model.d.ts +108 -0
- package/dist/reporting/admin/ports.d.ts +27 -0
- package/dist/reporting/admin/service.d.ts +22 -0
- package/dist/reporting/admin/service.js +38 -0
- package/dist/reporting/admin/service.js.map +1 -0
- package/dist/reporting/member/index.d.ts +5 -0
- package/dist/reporting/member/index.js +2 -0
- package/dist/reporting/member/model.d.ts +124 -0
- package/dist/reporting/member/ports.d.ts +45 -0
- package/dist/reporting/member/service.d.ts +73 -0
- package/dist/reporting/member/service.js +286 -0
- package/dist/reporting/member/service.js.map +1 -0
- package/dist/shared/actor.d.ts +9 -0
- package/dist/shared/errors.d.ts +7 -1
- package/dist/shared/errors.js +10 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/events.d.ts +5 -3
- package/dist/shared/events.js +1 -0
- package/dist/shared/events.js.map +1 -1
- package/dist/shared/id.d.ts +12 -0
- package/dist/shared/id.js +13 -1
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/mailer.d.ts +6 -1
- package/dist/shared/mailer.js.map +1 -1
- package/dist/shared/network.d.ts +10 -0
- package/dist/shared/network.js +211 -0
- package/dist/shared/network.js.map +1 -0
- package/dist/shared/settings.js.map +1 -1
- package/dist/types/assets.d.ts +2 -2
- package/dist/types/automations.d.ts +21 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +12 -3
- package/dist/types/email-templates.d.ts +124 -1
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/events.d.ts +3 -3
- package/dist/types/identity.d.ts +48 -2
- package/dist/types/index.d.ts +10 -10
- package/dist/types/organizations.d.ts +2 -2
- package/dist/types/ports.d.ts +7 -1
- package/dist/types/schemas/assets.d.ts +67 -36
- package/dist/types/schemas/assets.js +19 -13
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/automations.d.ts +88 -4
- package/dist/types/schemas/automations.js +46 -6
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +385 -20
- package/dist/types/schemas/content.js +178 -15
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/credentials.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +379 -4
- package/dist/types/schemas/discussion.js +209 -7
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +44 -4
- package/dist/types/schemas/entitlements.js +32 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +115 -5
- package/dist/types/schemas/identity.js +59 -6
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +9 -9
- package/dist/types/schemas/index.js +9 -9
- package/dist/types/schemas/integrations.js.map +1 -1
- package/dist/types/schemas/organizations.d.ts +27 -5
- package/dist/types/schemas/organizations.js +14 -7
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/outbox.d.ts +1 -0
- package/dist/types/schemas/outbox.js +1 -0
- package/dist/types/schemas/outbox.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +1 -0
- package/dist/types/schemas/progress.js +1 -0
- package/dist/types/schemas/progress.js.map +1 -1
- package/dist/types/schemas/settings.js.map +1 -1
- package/dist/types/schemas/shared.d.ts +4 -1
- package/dist/types/schemas/shared.js +7 -1
- package/dist/types/schemas/shared.js.map +1 -1
- package/dist/types/shared.d.ts +1 -1
- package/package.json +2 -2
- package/dist/reporting/dashboard/index.d.ts +0 -4
- package/dist/reporting/dashboard/index.js +0 -2
- package/dist/reporting/dashboard/model.d.ts +0 -14
- package/dist/reporting/dashboard/ports.d.ts +0 -13
- package/dist/reporting/dashboard/service.d.ts +0 -19
- package/dist/reporting/dashboard/service.js +0 -20
- package/dist/reporting/dashboard/service.js.map +0 -1
- package/dist/reporting/learn/index.d.ts +0 -5
- package/dist/reporting/learn/index.js +0 -2
- package/dist/reporting/learn/model.d.ts +0 -23
- package/dist/reporting/learn/ports.d.ts +0 -42
- package/dist/reporting/learn/service.d.ts +0 -48
- package/dist/reporting/learn/service.js +0 -111
- package/dist/reporting/learn/service.js.map +0 -1
- package/dist/reporting/students/index.d.ts +0 -4
- package/dist/reporting/students/index.js +0 -2
- package/dist/reporting/students/model.d.ts +0 -31
- package/dist/reporting/students/ports.d.ts +0 -13
- package/dist/reporting/students/ports.js +0 -1
- package/dist/reporting/students/service.d.ts +0 -19
- package/dist/reporting/students/service.js +0 -20
- package/dist/reporting/students/service.js.map +0 -1
- /package/dist/reporting/{dashboard → admin}/model.js +0 -0
- /package/dist/reporting/{dashboard → admin}/ports.js +0 -0
- /package/dist/reporting/{learn → member}/model.js +0 -0
- /package/dist/reporting/{learn → member}/ports.js +0 -0
- /package/dist/{reporting/students/model.js → shared/actor.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { idSchema } from "./shared.js";
|
|
1
|
+
import { emailSchema, idSchema, jsonValueSchema } from "./shared.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/types/schemas/identity.ts
|
|
4
4
|
const userSchema = z.object({
|
|
5
5
|
id: idSchema,
|
|
6
6
|
externalId: idSchema.nullable(),
|
|
7
|
-
email:
|
|
7
|
+
email: emailSchema,
|
|
8
8
|
firstName: z.string().nullable(),
|
|
9
9
|
lastName: z.string().nullable(),
|
|
10
10
|
createdAt: z.coerce.date(),
|
|
@@ -13,12 +13,12 @@ const userSchema = z.object({
|
|
|
13
13
|
const createUserInputSchema = z.object({
|
|
14
14
|
id: idSchema.optional(),
|
|
15
15
|
externalId: idSchema.optional(),
|
|
16
|
-
email:
|
|
16
|
+
email: emailSchema,
|
|
17
17
|
firstName: z.string().optional(),
|
|
18
18
|
lastName: z.string().optional()
|
|
19
19
|
}).strict();
|
|
20
20
|
const provisionUserInputSchema = z.object({
|
|
21
|
-
email:
|
|
21
|
+
email: emailSchema,
|
|
22
22
|
firstName: z.string().optional(),
|
|
23
23
|
lastName: z.string().optional()
|
|
24
24
|
}).strict();
|
|
@@ -26,9 +26,62 @@ const updateUserInputSchema = z.object({
|
|
|
26
26
|
externalId: idSchema.optional(),
|
|
27
27
|
firstName: z.string().optional(),
|
|
28
28
|
lastName: z.string().optional(),
|
|
29
|
-
email:
|
|
29
|
+
email: emailSchema.optional()
|
|
30
|
+
}).strict();
|
|
31
|
+
const userProfileSchema = z.object({
|
|
32
|
+
userId: idSchema,
|
|
33
|
+
displayName: z.string().nullable(),
|
|
34
|
+
headline: z.string().nullable(),
|
|
35
|
+
bio: z.string().nullable(),
|
|
36
|
+
imageAssetOrgId: idSchema.nullable(),
|
|
37
|
+
imageAssetId: idSchema.nullable(),
|
|
38
|
+
extra: jsonValueSchema,
|
|
39
|
+
createdAt: z.coerce.date(),
|
|
40
|
+
updatedAt: z.coerce.date()
|
|
41
|
+
}).strict();
|
|
42
|
+
const userProfileViewSchema = userProfileSchema.extend({ imageUrl: z.string().nullable() }).strict();
|
|
43
|
+
const notificationKindSchema = z.enum([
|
|
44
|
+
"newPostInSpace",
|
|
45
|
+
"newCommentOnPost",
|
|
46
|
+
"replyToYourComment",
|
|
47
|
+
"yourPostWasPublished",
|
|
48
|
+
"yourPostWasRemoved",
|
|
49
|
+
"yourCommentWasRemoved",
|
|
50
|
+
"requestApproved",
|
|
51
|
+
"requestDeclined",
|
|
52
|
+
"invitedToSpace",
|
|
53
|
+
"newMessage",
|
|
54
|
+
"messageRequest",
|
|
55
|
+
"addedToGroupChat",
|
|
56
|
+
"youAreNowAModerator",
|
|
57
|
+
"membershipEndingSoon",
|
|
58
|
+
"welcomeToCommunity",
|
|
59
|
+
"postAwaitingReview",
|
|
60
|
+
"joinRequest",
|
|
61
|
+
"somethingWasFlagged",
|
|
62
|
+
"messageWasFlagged"
|
|
63
|
+
]);
|
|
64
|
+
const notificationSchema = z.object({
|
|
65
|
+
orgId: idSchema,
|
|
66
|
+
id: idSchema,
|
|
67
|
+
userId: idSchema,
|
|
68
|
+
kind: notificationKindSchema,
|
|
69
|
+
actorOrgUserId: idSchema.nullable(),
|
|
70
|
+
communityId: idSchema.nullable(),
|
|
71
|
+
spaceId: idSchema.nullable(),
|
|
72
|
+
postId: idSchema.nullable(),
|
|
73
|
+
commentId: idSchema.nullable(),
|
|
74
|
+
chatId: idSchema.nullable(),
|
|
75
|
+
messageId: idSchema.nullable(),
|
|
76
|
+
createdAt: z.coerce.date(),
|
|
77
|
+
readAt: z.coerce.date().nullable()
|
|
78
|
+
}).strict();
|
|
79
|
+
const notificationPreferenceSchema = z.object({
|
|
80
|
+
kind: notificationKindSchema,
|
|
81
|
+
inApp: z.boolean(),
|
|
82
|
+
email: z.boolean()
|
|
30
83
|
}).strict();
|
|
31
84
|
//#endregion
|
|
32
|
-
export { createUserInputSchema, provisionUserInputSchema, updateUserInputSchema, userSchema };
|
|
85
|
+
export { createUserInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, provisionUserInputSchema, updateUserInputSchema, userProfileSchema, userProfileViewSchema, userSchema };
|
|
33
86
|
|
|
34
87
|
//# sourceMappingURL=identity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","names":[],"sources":["../../../src/types/schemas/identity.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"identity.js","names":[],"sources":["../../../src/types/schemas/identity.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, emailSchema, jsonValueSchema } from './shared.js';\n\nexport const userSchema = z\n .object({\n id: idSchema,\n externalId: idSchema.nullable(),\n email: emailSchema,\n firstName: z.string().nullable(),\n lastName: z.string().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type User = z.output<typeof userSchema>;\nexport type UserInput = z.input<typeof userSchema>;\n\nexport const createUserInputSchema = z\n .object({\n id: idSchema.optional(),\n externalId: idSchema.optional(),\n email: emailSchema,\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n })\n .strict();\nexport type CreateUserInput = z.infer<typeof createUserInputSchema>;\n\nexport const provisionUserInputSchema = z\n .object({\n email: emailSchema,\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n })\n .strict();\nexport type ProvisionUserInput = z.infer<typeof provisionUserInputSchema>;\n\nexport const updateUserInputSchema = z\n .object({\n externalId: idSchema.optional(),\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n email: emailSchema.optional(),\n })\n .strict();\nexport type UpdateUserInput = z.infer<typeof updateUserInputSchema>;\n\nexport const userProfileSchema = z\n .object({\n userId: idSchema,\n displayName: z.string().nullable(),\n headline: z.string().nullable(),\n bio: z.string().nullable(),\n imageAssetOrgId: idSchema.nullable(),\n imageAssetId: idSchema.nullable(),\n extra: jsonValueSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type UserProfile = z.output<typeof userProfileSchema>;\n\nexport const userProfileViewSchema = userProfileSchema\n .extend({ imageUrl: z.string().nullable() })\n .strict();\nexport type UserProfileView = z.output<typeof userProfileViewSchema>;\n\nexport const notificationKindSchema = z.enum([\n 'newPostInSpace',\n 'newCommentOnPost',\n 'replyToYourComment',\n 'yourPostWasPublished',\n 'yourPostWasRemoved',\n 'yourCommentWasRemoved',\n 'requestApproved',\n 'requestDeclined',\n 'invitedToSpace',\n 'newMessage',\n 'messageRequest',\n 'addedToGroupChat',\n 'youAreNowAModerator',\n 'membershipEndingSoon',\n 'welcomeToCommunity',\n 'postAwaitingReview',\n 'joinRequest',\n 'somethingWasFlagged',\n 'messageWasFlagged',\n]);\nexport type NotificationKind = z.infer<typeof notificationKindSchema>;\n\nexport const notificationSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n userId: idSchema,\n kind: notificationKindSchema,\n actorOrgUserId: idSchema.nullable(),\n communityId: idSchema.nullable(),\n spaceId: idSchema.nullable(),\n postId: idSchema.nullable(),\n commentId: idSchema.nullable(),\n chatId: idSchema.nullable(),\n messageId: idSchema.nullable(),\n createdAt: z.coerce.date(),\n readAt: z.coerce.date().nullable(),\n })\n .strict();\nexport type Notification = z.output<typeof notificationSchema>;\n\nexport const notificationPreferenceSchema = z\n .object({\n kind: notificationKindSchema,\n inApp: z.boolean(),\n email: z.boolean(),\n })\n .strict();\nexport type NotificationPreference = z.output<typeof notificationPreferenceSchema>;\n"],"mappings":";;;AAGA,MAAa,aAAa,EACvB,OAAO;CACN,IAAI;CACJ,YAAY,SAAS,SAAS;CAC9B,OAAO;CACP,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,wBAAwB,EAClC,OAAO;CACN,IAAI,SAAS,SAAS;CACtB,YAAY,SAAS,SAAS;CAC9B,OAAO;CACP,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,EACrC,OAAO;CACN,OAAO;CACP,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,wBAAwB,EAClC,OAAO;CACN,YAAY,SAAS,SAAS;CAC9B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,OAAO,YAAY,SAAS;AAC9B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,oBAAoB,EAC9B,OAAO;CACN,QAAQ;CACR,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS;CACzB,iBAAiB,SAAS,SAAS;CACnC,cAAc,SAAS,SAAS;CAChC,OAAO;CACP,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,wBAAwB,kBAClC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAC3C,OAAO;AAGV,MAAa,yBAAyB,EAAE,KAAK;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAGD,MAAa,qBAAqB,EAC/B,OAAO;CACN,OAAO;CACP,IAAI;CACJ,QAAQ;CACR,MAAM;CACN,gBAAgB,SAAS,SAAS;CAClC,aAAa,SAAS,SAAS;CAC/B,SAAS,SAAS,SAAS;CAC3B,QAAQ,SAAS,SAAS;CAC1B,WAAW,SAAS,SAAS;CAC7B,QAAQ,SAAS,SAAS;CAC1B,WAAW,SAAS,SAAS;CAC7B,WAAW,EAAE,OAAO,KAAK;CACzB,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;AACnC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,+BAA+B,EACzC,OAAO;CACN,MAAM;CACN,OAAO,EAAE,QAAQ;CACjB,OAAO,EAAE,QAAQ;AACnB,CAAC,CAAC,CACD,OAAO"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, GrantEntitlementInput, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema } from "./entitlements.js";
|
|
1
|
+
import { 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 } from "./content.js";
|
|
2
|
+
import { CreateUserInput, Notification, NotificationKind, NotificationPreference, ProvisionUserInput, UpdateUserInput, User, UserInput, UserProfile, UserProfileView, createUserInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, provisionUserInputSchema, updateUserInputSchema, userProfileSchema, userProfileViewSchema, userSchema } from "./identity.js";
|
|
3
|
+
import { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, UpdateOrgUserInput, acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema } from "./organizations.js";
|
|
4
|
+
import { Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, GrantEntitlementInput, SpaceMember, SpaceMemberSource, SpaceMemberStatus, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema } from "./entitlements.js";
|
|
5
5
|
import { ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ReportProgressInput, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, reportProgressInputSchema } from "./progress.js";
|
|
6
|
-
import { Asset, AssetInput, AssetKind, AssetStatus,
|
|
6
|
+
import { Asset, AssetInput, AssetKind, AssetSource, AssetStatus, AssetUrls, AssetView, AssetsQuery, RequestUploadInput, UploadTicket, assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, requestUploadInputSchema, uploadTicketSchema } from "./assets.js";
|
|
7
7
|
import { ConfigureInput, ConnectInput, Connection, ConnectionInput, Validation, configureInputSchema, connectInputSchema, connectionSchema, validationSchema } from "./integrations.js";
|
|
8
|
-
import { Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AvailableAction, AvailableActions, AvailableTriggers, CreateAutomationInput, UpdateAutomationInput, automationActionResultSchema, automationActionSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, updateAutomationInputSchema } from "./automations.js";
|
|
9
|
-
import { Comment, CommentAuthor, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, ListCommentsQuery, ReactionCounts, ReactionEmoji, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, listCommentsQuerySchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
|
|
8
|
+
import { Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationSource, 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, automationSourceSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema } from "./automations.js";
|
|
9
|
+
import { ActivityCommentsRule, BlockedUser, Chat, ChatKind, ChatLastMessage, ChatStatus, ChatUser, Comment, CommentAuthor, CommentFlagResolution, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, FlaggedComment, ListCommentsQuery, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Post, PostBookmark, PostFlag, PostFlagResolution, PostFollow, PostReaction, PostStatus, PostView, ReactionCounts, ReactionEmoji, activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, flaggedCommentSchema, listCommentsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
|
|
10
10
|
import { Credential, CredentialInput, credentialSchema } from "./credentials.js";
|
|
11
|
-
import { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
|
|
11
|
+
import { boundedJsonSchema, domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
|
|
12
12
|
import { EventOutbox, EventOutboxInput, eventOutboxSchema } from "./outbox.js";
|
|
13
13
|
import { Setting, SettingInput, settingSchema } from "./settings.js";
|
|
14
|
-
export { AcceptInviteInput, Activity, ActivityAsset, ActivityAssetInput, ActivityCommentsRule, ActivityInput, ActivitySettings, AddDownloadAssetInput, AddOrgUserInput, Asset, AssetInput, AssetKind, AssetStatus, AssetsQuery, Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AvailableAction, AvailableActions, AvailableTriggers, Comment, CommentAuthor, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, ConfigureInput, ConnectInput, Connection, ConnectionInput, ContentItem, ContentItemInput, ContentType, Course,
|
|
14
|
+
export { AcceptInviteInput, Activity, ActivityAsset, ActivityAssetInput, ActivityCommentsRule, ActivityInput, ActivitySettings, ActivityView, AddDownloadAssetInput, AddOrgUserInput, AddSpaceLinkInput, Asset, AssetInput, AssetKind, AssetSource, AssetStatus, AssetUrls, AssetView, AssetsQuery, Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationSource, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableActions, AvailableTriggers, BlockedUser, Bundle, BundleInput, BundleItem, BundleItemInput, Chat, ChatKind, ChatLastMessage, ChatStatus, ChatUser, Comment, CommentAuthor, CommentFlagResolution, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, Community, CommunitySettings, CommunityStatus, CommunityView, ConfigureInput, ConnectInput, Connection, ConnectionInput, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateAutomationInput, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateInviteInput, CreateOrgUserInput, CreateSpaceInput, CreateUserInput, CreateWebhookInput, CreatedWebhook, Credential, CredentialInput, DeliverWebhookInput, DmSettings, Download, DownloadAsset, DownloadAssetInput, DownloadFile, DownloadInput, DownloadStatus, DownloadView, Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, EventOutbox, EventOutboxInput, FlaggedComment, GrantEntitlementInput, Invite, InviteInput, InviteRole, ListBundlesQuery, ListCommentsQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Module, ModuleInput, NewOrganizationInput, Notification, NotificationKind, NotificationPreference, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, PatchDmSettingsInput, Post, PostBookmark, PostFlag, PostFlagResolution, PostFollow, PostReaction, PostStatus, PostView, ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ProvisionUserInput, ReactionCounts, ReactionEmoji, ReorderDownloadAssetsInput, ReportProgressInput, RequestUploadInput, Role, SaveActivityInput, SetSpaceTopicsInput, Setting, SettingInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceMember, SpaceMemberSource, SpaceMemberStatus, SpaceSettings, SpaceTopic, UpdateAutomationInput, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateOrgUserInput, UpdateSpaceInput, UpdateUserInput, UpdateWebhookInput, UploadTicket, User, UserInput, UserProfile, UserProfileView, Validation, Webhook, WebhookSecret, acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, addSpaceLinkInputSchema, assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationSourceSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, blockedUserSchema, boundedJsonSchema, bundleItemSchema, bundleSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createAutomationInputSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createSpaceInputSchema, createUserInputSchema, createWebhookInputSchema, createdWebhookSchema, credentialSchema, deliverWebhookInputSchema, dmSettingsDefaults, dmSettingsSchema, domainEventSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, emailSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, flaggedCommentSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listBundlesQuerySchema, listCommentsQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, moduleSchema, newOrganizationInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, patchDmSettingsInputSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, setSpaceTopicsInputSchema, settingSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateAutomationInputSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateOrgUserInputSchema, updateSpaceInputSchema, updateUserInputSchema, updateWebhookInputSchema, uploadTicketSchema, userProfileSchema, userProfileViewSchema, userSchema, validationSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
|
|
2
|
-
import { createUserInputSchema, provisionUserInputSchema, updateUserInputSchema, userSchema } from "./identity.js";
|
|
3
|
-
import { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema } from "./organizations.js";
|
|
4
|
-
import { commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, listCommentsQuerySchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { boundedJsonSchema, domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
|
|
2
|
+
import { createUserInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, provisionUserInputSchema, updateUserInputSchema, userProfileSchema, userProfileViewSchema, userSchema } from "./identity.js";
|
|
3
|
+
import { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema } from "./organizations.js";
|
|
4
|
+
import { activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, flaggedCommentSchema, listCommentsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
|
|
5
|
+
import { assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, requestUploadInputSchema, uploadTicketSchema } from "./assets.js";
|
|
6
|
+
import { 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 } from "./content.js";
|
|
7
|
+
import { entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema } from "./entitlements.js";
|
|
7
8
|
import { progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, reportProgressInputSchema } from "./progress.js";
|
|
8
|
-
import { assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, downloadTicketSchema, requestUploadInputSchema, uploadTicketSchema } from "./assets.js";
|
|
9
9
|
import { configureInputSchema, connectInputSchema, connectionSchema, validationSchema } from "./integrations.js";
|
|
10
|
-
import { automationActionResultSchema, automationActionSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, updateAutomationInputSchema } from "./automations.js";
|
|
10
|
+
import { MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationSourceSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema } from "./automations.js";
|
|
11
11
|
import { credentialSchema } from "./credentials.js";
|
|
12
12
|
import { eventOutboxSchema } from "./outbox.js";
|
|
13
13
|
import { settingSchema } from "./settings.js";
|
|
14
|
-
export { acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, availableActionSchema, availableTriggersSchema, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsSchema, courseStatusSchema, createAutomationInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createUserInputSchema, credentialSchema, domainEventSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema,
|
|
14
|
+
export { MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, addSpaceLinkInputSchema, assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationSourceSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, blockedUserSchema, boundedJsonSchema, bundleItemSchema, bundleSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createAutomationInputSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createSpaceInputSchema, createUserInputSchema, createWebhookInputSchema, createdWebhookSchema, credentialSchema, deliverWebhookInputSchema, dmSettingsDefaults, dmSettingsSchema, domainEventSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, emailSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, flaggedCommentSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listBundlesQuerySchema, listCommentsQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, moduleSchema, newOrganizationInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, patchDmSettingsInputSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, setSpaceTopicsInputSchema, settingSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateAutomationInputSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateOrgUserInputSchema, updateSpaceInputSchema, updateUserInputSchema, updateWebhookInputSchema, uploadTicketSchema, userProfileSchema, userProfileViewSchema, userSchema, validationSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","names":[],"sources":["../../../src/types/schemas/integrations.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"integrations.js","names":[],"sources":["../../../src/types/schemas/integrations.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonRecordSchema } from './shared.js';\n\nexport const validationSchema = z.union([\n z.object({ ok: z.literal(true) }).strict(),\n z.object({ ok: z.literal(false), errors: z.array(z.string()) }).strict(),\n]);\nexport type Validation = z.infer<typeof validationSchema>;\n\nexport const connectionSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n integrationId: idSchema,\n config: jsonRecordSchema,\n active: z.boolean(),\n credentialRef: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Connection = z.output<typeof connectionSchema>;\nexport type ConnectionInput = z.input<typeof connectionSchema>;\n\nexport const connectInputSchema = z\n .object({\n integrationId: idSchema,\n secrets: jsonRecordSchema,\n config: jsonRecordSchema.optional(),\n })\n .strict();\nexport type ConnectInput = z.output<typeof connectInputSchema>;\n\nexport const configureInputSchema = z\n .object({\n config: jsonRecordSchema.optional(),\n active: z.boolean().optional(),\n })\n .strict();\nexport type ConfigureInput = z.output<typeof configureInputSchema>;\n"],"mappings":";;;AAGA,MAAa,mBAAmB,EAAE,MAAM,CACtC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,GACzC,EAAE,OAAO;CAAE,IAAI,EAAE,QAAQ,KAAK;CAAG,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;AAAE,CAAC,CAAC,CAAC,OAAO,CACzE,CAAC;AAGD,MAAa,mBAAmB,EAC7B,OAAO;CACN,OAAO;CACP,IAAI;CACJ,eAAe;CACf,QAAQ;CACR,QAAQ,EAAE,QAAQ;CAClB,eAAe;CACf,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,qBAAqB,EAC/B,OAAO;CACN,eAAe;CACf,SAAS;CACT,QAAQ,iBAAiB,SAAS;AACpC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,uBAAuB,EACjC,OAAO;CACN,QAAQ,iBAAiB,SAAS;CAClC,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;AAC/B,CAAC,CAAC,CACD,OAAO"}
|
|
@@ -4,6 +4,7 @@ declare const roleSchema: z.ZodEnum<{
|
|
|
4
4
|
owner: "owner";
|
|
5
5
|
admin: "admin";
|
|
6
6
|
instructor: "instructor";
|
|
7
|
+
moderator: "moderator";
|
|
7
8
|
student: "student";
|
|
8
9
|
}>;
|
|
9
10
|
type Role = z.infer<typeof roleSchema>;
|
|
@@ -15,6 +16,7 @@ type OrgUserStatus = z.infer<typeof orgUserStatusSchema>;
|
|
|
15
16
|
declare const inviteRoleSchema: z.ZodEnum<{
|
|
16
17
|
admin: "admin";
|
|
17
18
|
instructor: "instructor";
|
|
19
|
+
moderator: "moderator";
|
|
18
20
|
student: "student";
|
|
19
21
|
}>;
|
|
20
22
|
type InviteRole = z.infer<typeof inviteRoleSchema>;
|
|
@@ -37,6 +39,7 @@ declare const orgUserSchema: z.ZodObject<{
|
|
|
37
39
|
owner: "owner";
|
|
38
40
|
admin: "admin";
|
|
39
41
|
instructor: "instructor";
|
|
42
|
+
moderator: "moderator";
|
|
40
43
|
student: "student";
|
|
41
44
|
}>;
|
|
42
45
|
status: z.ZodEnum<{
|
|
@@ -52,17 +55,18 @@ declare const orgUserProfileSchema: z.ZodObject<{
|
|
|
52
55
|
id: z.ZodString;
|
|
53
56
|
firstName: z.ZodNullable<z.ZodString>;
|
|
54
57
|
lastName: z.ZodNullable<z.ZodString>;
|
|
55
|
-
email: z.
|
|
58
|
+
email: z.ZodEmail;
|
|
56
59
|
image: z.ZodNullable<z.ZodString>;
|
|
57
60
|
}, z.core.$strict>;
|
|
58
61
|
type OrgUserProfile = z.infer<typeof orgUserProfileSchema>;
|
|
59
62
|
declare const inviteSchema: z.ZodObject<{
|
|
60
63
|
id: z.ZodString;
|
|
61
64
|
orgId: z.ZodString;
|
|
62
|
-
email: z.
|
|
65
|
+
email: z.ZodEmail;
|
|
63
66
|
role: z.ZodEnum<{
|
|
64
67
|
admin: "admin";
|
|
65
68
|
instructor: "instructor";
|
|
69
|
+
moderator: "moderator";
|
|
66
70
|
student: "student";
|
|
67
71
|
}>;
|
|
68
72
|
status: z.ZodEnum<{
|
|
@@ -75,6 +79,7 @@ declare const inviteSchema: z.ZodObject<{
|
|
|
75
79
|
tokenHash: z.ZodNullable<z.ZodString>;
|
|
76
80
|
expiresAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
77
81
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
82
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
78
83
|
}, z.core.$strict>;
|
|
79
84
|
type Invite = z.output<typeof inviteSchema>;
|
|
80
85
|
type InviteInput = z.input<typeof inviteSchema>;
|
|
@@ -91,6 +96,7 @@ declare const addOrgUserInputSchema: z.ZodObject<{
|
|
|
91
96
|
owner: "owner";
|
|
92
97
|
admin: "admin";
|
|
93
98
|
instructor: "instructor";
|
|
99
|
+
moderator: "moderator";
|
|
94
100
|
student: "student";
|
|
95
101
|
}>;
|
|
96
102
|
}, z.core.$strict>;
|
|
@@ -102,6 +108,7 @@ declare const createOrgUserInputSchema: z.ZodObject<{
|
|
|
102
108
|
owner: "owner";
|
|
103
109
|
admin: "admin";
|
|
104
110
|
instructor: "instructor";
|
|
111
|
+
moderator: "moderator";
|
|
105
112
|
student: "student";
|
|
106
113
|
}>;
|
|
107
114
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -110,12 +117,27 @@ declare const createOrgUserInputSchema: z.ZodObject<{
|
|
|
110
117
|
}>>;
|
|
111
118
|
}, z.core.$strict>;
|
|
112
119
|
type CreateOrgUserInput = z.infer<typeof createOrgUserInputSchema>;
|
|
120
|
+
declare const updateOrgUserInputSchema: z.ZodObject<{
|
|
121
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
owner: "owner";
|
|
123
|
+
admin: "admin";
|
|
124
|
+
instructor: "instructor";
|
|
125
|
+
moderator: "moderator";
|
|
126
|
+
student: "student";
|
|
127
|
+
}>>;
|
|
128
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
active: "active";
|
|
130
|
+
invited: "invited";
|
|
131
|
+
}>>;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
type UpdateOrgUserInput = z.infer<typeof updateOrgUserInputSchema>;
|
|
113
134
|
declare const createInviteInputSchema: z.ZodObject<{
|
|
114
135
|
orgId: z.ZodString;
|
|
115
|
-
email: z.
|
|
136
|
+
email: z.ZodEmail;
|
|
116
137
|
role: z.ZodEnum<{
|
|
117
138
|
admin: "admin";
|
|
118
139
|
instructor: "instructor";
|
|
140
|
+
moderator: "moderator";
|
|
119
141
|
student: "student";
|
|
120
142
|
}>;
|
|
121
143
|
inviterUserId: z.ZodString;
|
|
@@ -127,9 +149,9 @@ type CreateInviteInput = z.infer<typeof createInviteInputSchema>;
|
|
|
127
149
|
declare const acceptInviteInputSchema: z.ZodObject<{
|
|
128
150
|
token: z.ZodString;
|
|
129
151
|
userId: z.ZodString;
|
|
130
|
-
email: z.
|
|
152
|
+
email: z.ZodEmail;
|
|
131
153
|
}, z.core.$strict>;
|
|
132
154
|
type AcceptInviteInput = z.infer<typeof acceptInviteInputSchema>;
|
|
133
155
|
//#endregion
|
|
134
|
-
export { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema };
|
|
156
|
+
export { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, UpdateOrgUserInput, acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema };
|
|
135
157
|
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { idSchema } from "./shared.js";
|
|
1
|
+
import { emailSchema, idSchema } from "./shared.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/types/schemas/organizations.ts
|
|
4
4
|
const roleSchema = z.enum([
|
|
5
5
|
"owner",
|
|
6
6
|
"admin",
|
|
7
7
|
"instructor",
|
|
8
|
+
"moderator",
|
|
8
9
|
"student"
|
|
9
10
|
]);
|
|
10
11
|
const orgUserStatusSchema = z.enum(["invited", "active"]);
|
|
11
12
|
const inviteRoleSchema = z.enum([
|
|
12
13
|
"admin",
|
|
13
14
|
"instructor",
|
|
15
|
+
"moderator",
|
|
14
16
|
"student"
|
|
15
17
|
]);
|
|
16
18
|
const organizationSchema = z.object({
|
|
@@ -35,13 +37,13 @@ const orgUserProfileSchema = z.object({
|
|
|
35
37
|
id: idSchema,
|
|
36
38
|
firstName: z.string().nullable(),
|
|
37
39
|
lastName: z.string().nullable(),
|
|
38
|
-
email:
|
|
40
|
+
email: emailSchema,
|
|
39
41
|
image: z.string().nullable()
|
|
40
42
|
}).strict();
|
|
41
43
|
const inviteSchema = z.object({
|
|
42
44
|
id: idSchema,
|
|
43
45
|
orgId: idSchema,
|
|
44
|
-
email:
|
|
46
|
+
email: emailSchema,
|
|
45
47
|
role: inviteRoleSchema,
|
|
46
48
|
status: z.enum([
|
|
47
49
|
"pending",
|
|
@@ -52,7 +54,8 @@ const inviteSchema = z.object({
|
|
|
52
54
|
invitedBy: idSchema,
|
|
53
55
|
tokenHash: z.string().nullable(),
|
|
54
56
|
expiresAt: z.coerce.date().nullable(),
|
|
55
|
-
createdAt: z.coerce.date()
|
|
57
|
+
createdAt: z.coerce.date(),
|
|
58
|
+
updatedAt: z.coerce.date()
|
|
56
59
|
}).strict();
|
|
57
60
|
const newOrganizationInputSchema = z.object({
|
|
58
61
|
name: z.string(),
|
|
@@ -70,9 +73,13 @@ const createOrgUserInputSchema = z.object({
|
|
|
70
73
|
role: roleSchema,
|
|
71
74
|
status: orgUserStatusSchema.optional()
|
|
72
75
|
}).strict();
|
|
76
|
+
const updateOrgUserInputSchema = z.object({
|
|
77
|
+
role: roleSchema.optional(),
|
|
78
|
+
status: orgUserStatusSchema.optional()
|
|
79
|
+
}).strict();
|
|
73
80
|
const createInviteInputSchema = z.object({
|
|
74
81
|
orgId: idSchema,
|
|
75
|
-
email:
|
|
82
|
+
email: emailSchema,
|
|
76
83
|
role: inviteRoleSchema,
|
|
77
84
|
inviterUserId: idSchema,
|
|
78
85
|
firstName: z.string().optional(),
|
|
@@ -82,9 +89,9 @@ const createInviteInputSchema = z.object({
|
|
|
82
89
|
const acceptInviteInputSchema = z.object({
|
|
83
90
|
token: z.string().trim().min(1),
|
|
84
91
|
userId: idSchema,
|
|
85
|
-
email:
|
|
92
|
+
email: emailSchema
|
|
86
93
|
}).strict();
|
|
87
94
|
//#endregion
|
|
88
|
-
export { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema };
|
|
95
|
+
export { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema };
|
|
89
96
|
|
|
90
97
|
//# sourceMappingURL=organizations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","names":[],"sources":["../../../src/types/schemas/organizations.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"organizations.js","names":[],"sources":["../../../src/types/schemas/organizations.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, emailSchema } from './shared.js';\n\nexport const roleSchema = z.enum(['owner', 'admin', 'instructor', 'moderator', 'student']);\nexport type Role = z.infer<typeof roleSchema>;\n\nexport const orgUserStatusSchema = z.enum(['invited', 'active']);\nexport type OrgUserStatus = z.infer<typeof orgUserStatusSchema>;\n\nexport const inviteRoleSchema = z.enum(['admin', 'instructor', 'moderator', 'student']);\nexport type InviteRole = z.infer<typeof inviteRoleSchema>;\n\nexport const organizationSchema = z\n .object({\n id: idSchema,\n externalId: idSchema.nullable(),\n name: z.string(),\n slug: z.string(),\n ownerId: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Organization = z.output<typeof organizationSchema>;\nexport type OrganizationInput = z.input<typeof organizationSchema>;\n\nexport const orgUserSchema = z\n .object({\n id: idSchema,\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n status: orgUserStatusSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type OrgUser = z.output<typeof orgUserSchema>;\nexport type OrgUserInput = z.input<typeof orgUserSchema>;\n\nexport const orgUserProfileSchema = z\n .object({\n id: idSchema,\n firstName: z.string().nullable(),\n lastName: z.string().nullable(),\n email: emailSchema,\n image: z.string().nullable(),\n })\n .strict();\nexport type OrgUserProfile = z.infer<typeof orgUserProfileSchema>;\n\nexport const inviteSchema = z\n .object({\n id: idSchema,\n orgId: idSchema,\n email: emailSchema,\n role: inviteRoleSchema,\n status: z.enum(['pending', 'accepted', 'rejected', 'canceled']),\n invitedBy: idSchema,\n tokenHash: z.string().nullable(),\n expiresAt: z.coerce.date().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Invite = z.output<typeof inviteSchema>;\nexport type InviteInput = z.input<typeof inviteSchema>;\n\nexport const newOrganizationInputSchema = z\n .object({\n name: z.string(),\n slug: z.string(),\n logo: z.string().optional(),\n })\n .strict();\nexport type NewOrganizationInput = z.infer<typeof newOrganizationInputSchema>;\n\nexport const addOrgUserInputSchema = z\n .object({\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n })\n .strict();\nexport type AddOrgUserInput = z.infer<typeof addOrgUserInputSchema>;\n\nexport const createOrgUserInputSchema = z\n .object({\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n status: orgUserStatusSchema.optional(),\n })\n .strict();\nexport type CreateOrgUserInput = z.infer<typeof createOrgUserInputSchema>;\n\nexport const updateOrgUserInputSchema = z\n .object({\n role: roleSchema.optional(),\n status: orgUserStatusSchema.optional(),\n })\n .strict();\nexport type UpdateOrgUserInput = z.infer<typeof updateOrgUserInputSchema>;\n\nexport const createInviteInputSchema = z\n .object({\n orgId: idSchema,\n email: emailSchema,\n role: inviteRoleSchema,\n inviterUserId: idSchema,\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n sendEmail: z.boolean().optional(),\n })\n .strict();\nexport type CreateInviteInput = z.infer<typeof createInviteInputSchema>;\n\nexport const acceptInviteInputSchema = z\n .object({\n token: z.string().trim().min(1),\n userId: idSchema,\n email: emailSchema,\n })\n .strict();\nexport type AcceptInviteInput = z.infer<typeof acceptInviteInputSchema>;\n"],"mappings":";;;AAGA,MAAa,aAAa,EAAE,KAAK;CAAC;CAAS;CAAS;CAAc;CAAa;AAAS,CAAC;AAGzF,MAAa,sBAAsB,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC;AAG/D,MAAa,mBAAmB,EAAE,KAAK;CAAC;CAAS;CAAc;CAAa;AAAS,CAAC;AAGtF,MAAa,qBAAqB,EAC/B,OAAO;CACN,IAAI;CACJ,YAAY,SAAS,SAAS;CAC9B,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,SAAS;CACT,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,gBAAgB,EAC1B,OAAO;CACN,IAAI;CACJ,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,uBAAuB,EACjC,OAAO;CACN,IAAI;CACJ,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,OAAO;CACP,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,eAAe,EACzB,OAAO;CACN,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACN,QAAQ,EAAE,KAAK;EAAC;EAAW;EAAY;EAAY;CAAU,CAAC;CAC9D,WAAW;CACX,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;CACpC,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,6BAA6B,EACvC,OAAO;CACN,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,wBAAwB,EAClC,OAAO;CACN,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,EACrC,OAAO;CACN,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ,oBAAoB,SAAS;AACvC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,EACrC,OAAO;CACN,MAAM,WAAW,SAAS;CAC1B,QAAQ,oBAAoB,SAAS;AACvC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,0BAA0B,EACpC,OAAO;CACN,OAAO;CACP,OAAO;CACP,MAAM;CACN,eAAe;CACf,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;AAClC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,0BAA0B,EACpC,OAAO;CACN,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC9B,QAAQ;CACR,OAAO;AACT,CAAC,CAAC,CACD,OAAO"}
|
|
@@ -10,6 +10,7 @@ declare const eventOutboxSchema: z.ZodObject<{
|
|
|
10
10
|
nextAttemptAt: z.ZodCoercedDate<unknown>;
|
|
11
11
|
lastError: z.ZodNullable<z.ZodString>;
|
|
12
12
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
13
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
13
14
|
processedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
14
15
|
}, z.core.$strict>;
|
|
15
16
|
type EventOutbox = z.output<typeof eventOutboxSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbox.js","names":[],"sources":["../../../src/types/schemas/outbox.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"outbox.js","names":[],"sources":["../../../src/types/schemas/outbox.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonRecordSchema } from './shared.js';\n\nexport const eventOutboxSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.string(),\n payload: jsonRecordSchema,\n attempts: z.number().int(),\n nextAttemptAt: z.coerce.date(),\n lastError: z.string().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n processedAt: z.coerce.date().nullable(),\n })\n .strict();\nexport type EventOutbox = z.output<typeof eventOutboxSchema>;\nexport type EventOutboxInput = z.input<typeof eventOutboxSchema>;\n"],"mappings":";;;AAGA,MAAa,oBAAoB,EAC9B,OAAO;CACN,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,SAAS;CACT,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI;CACzB,eAAe,EAAE,OAAO,KAAK;CAC7B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;CACzB,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;AACxC,CAAC,CAAC,CACD,OAAO"}
|
|
@@ -20,6 +20,7 @@ declare const progressRecordSchema: z.ZodObject<{
|
|
|
20
20
|
startedAt: z.ZodCoercedDate<unknown>;
|
|
21
21
|
position: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
22
22
|
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
23
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
23
24
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
24
25
|
}, z.core.$strict>;
|
|
25
26
|
type ProgressRecord = z.output<typeof progressRecordSchema>;
|
|
@@ -15,6 +15,7 @@ const progressRecordSchema = z.object({
|
|
|
15
15
|
startedAt: z.coerce.date(),
|
|
16
16
|
position: jsonValueSchema.nullable(),
|
|
17
17
|
completedAt: z.coerce.date().nullable(),
|
|
18
|
+
createdAt: z.coerce.date(),
|
|
18
19
|
updatedAt: z.coerce.date()
|
|
19
20
|
}).strict();
|
|
20
21
|
const progressTargetSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":[],"sources":["../../../src/types/schemas/progress.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"progress.js","names":[],"sources":["../../../src/types/schemas/progress.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonValueSchema } from './shared.js';\n\nexport const progressTargetTypeSchema = z.enum(['activity', 'module', 'course']);\nexport type ProgressTargetType = z.infer<typeof progressTargetTypeSchema>;\n\nexport const progressRecordSchema = z\n .object({\n id: idSchema,\n orgId: idSchema,\n orgUserId: idSchema,\n targetType: progressTargetTypeSchema,\n targetId: idSchema,\n startedAt: z.coerce.date(),\n position: jsonValueSchema.nullable(),\n completedAt: z.coerce.date().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ProgressRecord = z.output<typeof progressRecordSchema>;\nexport type ProgressRecordInput = z.input<typeof progressRecordSchema>;\n\nexport const progressTargetSchema = z\n .object({\n orgUserId: idSchema,\n targetType: progressTargetTypeSchema,\n targetId: idSchema,\n })\n .strict();\nexport type ProgressTarget = z.infer<typeof progressTargetSchema>;\n\nexport const progressReportItemSchema = z\n .object({\n asset: z.string().optional(),\n completed: z.boolean().optional(),\n })\n .catchall(jsonValueSchema);\nexport type ProgressReportItem = z.infer<typeof progressReportItemSchema>;\n\nexport const reportProgressInputSchema = z\n .object({\n orgUserId: idSchema,\n activityId: idSchema,\n reports: z.array(progressReportItemSchema),\n })\n .strict();\nexport type ReportProgressInput = z.infer<typeof reportProgressInputSchema>;\n"],"mappings":";;;AAGA,MAAa,2BAA2B,EAAE,KAAK;CAAC;CAAY;CAAU;AAAQ,CAAC;AAG/E,MAAa,uBAAuB,EACjC,OAAO;CACN,IAAI;CACJ,OAAO;CACP,WAAW;CACX,YAAY;CACZ,UAAU;CACV,WAAW,EAAE,OAAO,KAAK;CACzB,UAAU,gBAAgB,SAAS;CACnC,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;CACtC,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,uBAAuB,EACjC,OAAO;CACN,WAAW;CACX,YAAY;CACZ,UAAU;AACZ,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,EACrC,OAAO;CACN,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;AAClC,CAAC,CAAC,CACD,SAAS,eAAe;AAG3B,MAAa,4BAA4B,EACtC,OAAO;CACN,WAAW;CACX,YAAY;CACZ,SAAS,EAAE,MAAM,wBAAwB;AAC3C,CAAC,CAAC,CACD,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","names":[],"sources":["../../../src/types/schemas/settings.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"settings.js","names":[],"sources":["../../../src/types/schemas/settings.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonRecordSchema } from './shared.js';\n\nexport const settingSchema = z\n .object({\n orgId: idSchema,\n namespace: z.string(),\n scopeId: idSchema,\n value: jsonRecordSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Setting = z.output<typeof settingSchema>;\nexport type SettingInput = z.input<typeof settingSchema>;\n"],"mappings":";;;AAGA,MAAa,gBAAgB,EAC1B,OAAO;CACN,OAAO;CACP,WAAW,EAAE,OAAO;CACpB,SAAS;CACT,OAAO;CACP,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO"}
|
|
@@ -2,12 +2,15 @@ import { DomainEvent, EventMetadata, JsonValue } from "../shared.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/types/schemas/shared.d.ts
|
|
4
4
|
declare const idSchema: z.ZodString;
|
|
5
|
+
declare const emailSchema: z.ZodEmail;
|
|
5
6
|
declare const isoDateStringSchema: z.ZodString;
|
|
6
7
|
declare const serializableDateSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>, z.ZodString]>;
|
|
7
8
|
declare const jsonValueSchema: z.ZodType<JsonValue, unknown>;
|
|
8
9
|
declare const jsonRecordSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
10
|
+
/** Free-form JSON whose serialized form fits in `maxBytes` of UTF-8. */
|
|
11
|
+
declare function boundedJsonSchema(maxBytes: number): z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
9
12
|
declare const eventMetadataSchema: z.ZodType<EventMetadata>;
|
|
10
13
|
declare const domainEventSchema: z.ZodType<DomainEvent>;
|
|
11
14
|
//#endregion
|
|
12
|
-
export { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
15
|
+
export { boundedJsonSchema, domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
13
16
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/types/schemas/shared.ts
|
|
3
3
|
const idSchema = z.string().trim().min(1);
|
|
4
|
+
const emailSchema = z.email({ pattern: z.regexes.html5Email });
|
|
4
5
|
const isoDateStringSchema = z.string().trim().min(1);
|
|
5
6
|
const serializableDateSchema = z.union([z.coerce.date().transform((value) => value.toISOString()), isoDateStringSchema]);
|
|
6
7
|
const jsonValueSchema = z.lazy(() => z.union([
|
|
@@ -11,7 +12,12 @@ const jsonValueSchema = z.lazy(() => z.union([
|
|
|
11
12
|
z.array(jsonValueSchema),
|
|
12
13
|
z.record(z.string(), jsonValueSchema)
|
|
13
14
|
]));
|
|
15
|
+
z.globalRegistry.add(jsonValueSchema, { id: "JsonValue" });
|
|
14
16
|
const jsonRecordSchema = z.record(z.string(), jsonValueSchema);
|
|
17
|
+
/** Free-form JSON whose serialized form fits in `maxBytes` of UTF-8. */
|
|
18
|
+
function boundedJsonSchema(maxBytes) {
|
|
19
|
+
return jsonValueSchema.refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= maxBytes, { message: `must be at most ${Math.floor(maxBytes / 1024)} KB once serialized` }).describe(`Free-form JSON, at most ${Math.floor(maxBytes / 1024)} KB once serialized`);
|
|
20
|
+
}
|
|
15
21
|
const eventMetadataSchema = z.record(z.string(), jsonValueSchema);
|
|
16
22
|
const domainEventSchema = z.object({
|
|
17
23
|
type: z.string().trim().min(1),
|
|
@@ -23,6 +29,6 @@ const domainEventSchema = z.object({
|
|
|
23
29
|
metadata: eventMetadataSchema.optional()
|
|
24
30
|
}).strict();
|
|
25
31
|
//#endregion
|
|
26
|
-
export { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
32
|
+
export { boundedJsonSchema, domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
27
33
|
|
|
28
34
|
//# sourceMappingURL=shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","names":[],"sources":["../../../src/types/schemas/shared.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"shared.js","names":[],"sources":["../../../src/types/schemas/shared.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { DomainEvent, EventMetadata, JsonValue } from '../shared.js';\n\nexport const idSchema: z.ZodString = z.string().trim().min(1);\n\n// The default z.email() pattern uses lookaheads, which RE2-based OpenAPI\n// consumers (Go, linters) reject. The HTML5 pattern is lookahead-free.\nexport const emailSchema: z.ZodEmail = z.email({ pattern: z.regexes.html5Email });\n\nexport const isoDateStringSchema = z.string().trim().min(1);\n\nexport const serializableDateSchema = z.union([\n z.coerce.date().transform((value) => value.toISOString()),\n isoDateStringSchema,\n]);\n\nexport const jsonValueSchema: z.ZodType<JsonValue, unknown> = z.lazy(() =>\n z.union([\n z.null(),\n z.string(),\n z.number().finite(),\n z.boolean(),\n z.array(jsonValueSchema),\n z.record(z.string(), jsonValueSchema),\n ]),\n);\n// Recursive schemas serialize to JSON Schema as a $ref; without a registered\n// id the ref gets an auto-name (\"schema0\") that OpenAPI tooling can't resolve.\nz.globalRegistry.add(jsonValueSchema, { id: 'JsonValue' });\n\nexport const jsonRecordSchema = z.record(z.string(), jsonValueSchema);\n\n/** Free-form JSON whose serialized form fits in `maxBytes` of UTF-8. */\nexport function boundedJsonSchema(maxBytes: number) {\n return jsonValueSchema\n .refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= maxBytes, {\n message: `must be at most ${Math.floor(maxBytes / 1024)} KB once serialized`,\n })\n .describe(`Free-form JSON, at most ${Math.floor(maxBytes / 1024)} KB once serialized`);\n}\n\nexport const eventMetadataSchema: z.ZodType<EventMetadata> = z.record(z.string(), jsonValueSchema);\n\nexport const domainEventSchema: z.ZodType<DomainEvent> = z\n .object({\n type: z.string().trim().min(1),\n version: z.number().int().positive(),\n id: idSchema,\n orgId: idSchema,\n occurredAt: isoDateStringSchema,\n data: jsonValueSchema,\n metadata: eventMetadataSchema.optional(),\n })\n .strict();\n"],"mappings":";;AAGA,MAAa,WAAwB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAI5D,MAAa,cAA0B,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,WAAW,CAAC;AAEhF,MAAa,sBAAsB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAE1D,MAAa,yBAAyB,EAAE,MAAM,CAC5C,EAAE,OAAO,KAAK,CAAC,CAAC,WAAW,UAAU,MAAM,YAAY,CAAC,GACxD,mBACF,CAAC;AAED,MAAa,kBAAiD,EAAE,WAC9D,EAAE,MAAM;CACN,EAAE,KAAK;CACP,EAAE,OAAO;CACT,EAAE,OAAO,CAAC,CAAC,OAAO;CAClB,EAAE,QAAQ;CACV,EAAE,MAAM,eAAe;CACvB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AACtC,CAAC,CACH;AAGA,EAAE,eAAe,IAAI,iBAAiB,EAAE,IAAI,YAAY,CAAC;AAEzD,MAAa,mBAAmB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;;AAGpE,SAAgB,kBAAkB,UAAkB;CAClD,OAAO,gBACJ,QAAQ,UAAU,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK,UAAU,KAAK,CAAC,CAAC,CAAC,UAAU,UAAU,EACrF,SAAS,mBAAmB,KAAK,MAAM,WAAW,IAAI,EAAE,qBAC1D,CAAC,CAAC,CACD,SAAS,2BAA2B,KAAK,MAAM,WAAW,IAAI,EAAE,oBAAoB;AACzF;AAEA,MAAa,sBAAgD,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AAEjG,MAAa,oBAA4C,EACtD,OAAO;CACN,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC7B,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACnC,IAAI;CACJ,OAAO;CACP,YAAY;CACZ,MAAM;CACN,UAAU,oBAAoB,SAAS;AACzC,CAAC,CAAC,CACD,OAAO"}
|
package/dist/types/shared.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ interface DomainEvent<TData = unknown, TType extends string = string, TVersion e
|
|
|
12
12
|
readonly data: TData;
|
|
13
13
|
readonly metadata?: EventMetadata | undefined;
|
|
14
14
|
}
|
|
15
|
-
type ContractNewDomainEvent<E extends DomainEvent = DomainEvent> = Omit<E,
|
|
15
|
+
type ContractNewDomainEvent<E extends DomainEvent = DomainEvent> = Omit<E, 'id' | 'occurredAt'>;
|
|
16
16
|
type NewDomainEvent<E extends DomainEvent = DomainEvent> = ContractNewDomainEvent<E>;
|
|
17
17
|
interface Page<T> {
|
|
18
18
|
rows: T[];
|