@tietokilta/ilmomasiina-models 2.0.0-alpha41 → 2.0.0-alpha43
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/README.md +7 -0
- package/dist/attrs/event.d.ts +15 -10
- package/dist/attrs/event.d.ts.map +1 -1
- package/dist/attrs/event.js +28 -5
- package/dist/models/answer.d.ts +2 -2
- package/dist/models/answer.d.ts.map +1 -1
- package/dist/models/auditlog.d.ts +1 -1
- package/dist/models/auditlog.d.ts.map +1 -1
- package/dist/models/event.d.ts +18 -8
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/question.d.ts +2 -2
- package/dist/models/question.d.ts.map +1 -1
- package/dist/models/quota.d.ts +1 -1
- package/dist/models/quota.d.ts.map +1 -1
- package/dist/models/signup.d.ts +2 -2
- package/dist/models/signup.d.ts.map +1 -1
- package/dist/schema/event/attributes.d.ts +82 -51
- package/dist/schema/event/attributes.d.ts.map +1 -1
- package/dist/schema/event/attributes.js +57 -40
- package/dist/schema/event/index.d.ts +173 -85
- package/dist/schema/event/index.d.ts.map +1 -1
- package/dist/schema/event/index.js +45 -28
- package/dist/schema/eventList/index.d.ts +64 -22
- package/dist/schema/eventList/index.d.ts.map +1 -1
- package/dist/schema/eventList/index.js +15 -11
- package/dist/schema/question/attributes.d.ts +5 -0
- package/dist/schema/question/attributes.d.ts.map +1 -1
- package/dist/schema/question/attributes.js +16 -6
- package/dist/schema/question/index.d.ts +11 -2
- package/dist/schema/question/index.d.ts.map +1 -1
- package/dist/schema/question/index.js +3 -1
- package/dist/schema/quota/attributes.d.ts +4 -0
- package/dist/schema/quota/attributes.d.ts.map +1 -1
- package/dist/schema/quota/attributes.js +9 -1
- package/dist/schema/quota/index.d.ts +10 -0
- package/dist/schema/quota/index.d.ts.map +1 -1
- package/dist/schema/quota/index.js +3 -1
- package/dist/schema/signupForEdit/index.d.ts +26 -5
- package/dist/schema/signupForEdit/index.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,3 +8,10 @@ Frontend developers should import the supported types directly from `@tietokilta
|
|
|
8
8
|
**Note:** This package follows the versioning of Ilmomasiina. We will avoid breaking changes in the API, but minor
|
|
9
9
|
versions may occasionally be incompatible with each other. If writing custom frontends, we recommend fixing the
|
|
10
10
|
minor version (`"@tietokilta/ilmomasiina-models": "~2.x.x"` in `package.json`).
|
|
11
|
+
|
|
12
|
+
## Package contents
|
|
13
|
+
|
|
14
|
+
- `src/enum.ts`: Enums used in the API and database.
|
|
15
|
+
- `src/schema`: Type definitions for the API.
|
|
16
|
+
- `src/models`: Definitions Sequelize model attributes. These do not exactly match their API equivalents.
|
|
17
|
+
- `src/attrs`: Names of SQL columns to fetch for events in different situations. May be removed.
|
package/dist/attrs/event.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { AnswerAttributes, EventAttributes, QuestionAttributes, QuotaAttributes, SignupAttributes } from "../models";
|
|
2
|
+
/** Attributes included in GET /api/events/slug for Event instances. */
|
|
3
|
+
export declare const eventGetEventAttrs: (keyof EventAttributes)[];
|
|
3
4
|
/** Attributes included in GET /api/admin/events/ID for Event instances. */
|
|
4
|
-
export declare const adminEventGetEventAttrs:
|
|
5
|
+
export declare const adminEventGetEventAttrs: (keyof EventAttributes)[];
|
|
5
6
|
/** Attributes included in results for Question instances. */
|
|
6
|
-
export declare const eventGetQuestionAttrs:
|
|
7
|
+
export declare const eventGetQuestionAttrs: (keyof QuestionAttributes)[];
|
|
7
8
|
/** Attributes included in results for Quota instances. */
|
|
8
|
-
export declare const eventGetQuotaAttrs:
|
|
9
|
-
/** Attributes included in GET /api/events/
|
|
10
|
-
export declare const eventGetSignupAttrs:
|
|
9
|
+
export declare const eventGetQuotaAttrs: (keyof QuotaAttributes)[];
|
|
10
|
+
/** Attributes included in GET /api/events/slug for Signup instances. */
|
|
11
|
+
export declare const eventGetSignupAttrs: (keyof SignupAttributes)[];
|
|
12
|
+
/** Attributes included in GET /api/admin/events/ID for Signup instances. */
|
|
13
|
+
export declare const adminEventGetSignupAttrs: (keyof SignupAttributes)[];
|
|
11
14
|
/** Attributes included in results for Answer instances. */
|
|
12
|
-
export declare const eventGetAnswerAttrs:
|
|
15
|
+
export declare const eventGetAnswerAttrs: (keyof AnswerAttributes)[];
|
|
13
16
|
/** Attributes included in GET /api/events for Event instances. */
|
|
14
|
-
export declare const eventListEventAttrs:
|
|
17
|
+
export declare const eventListEventAttrs: (keyof EventAttributes)[];
|
|
18
|
+
/** Attributes included in GET /api/events for Quota instances. */
|
|
19
|
+
export declare const eventListQuotaAttrs: (keyof QuotaAttributes)[];
|
|
15
20
|
/** Attributes included in GET /api/admin/events for Event instances. */
|
|
16
|
-
export declare const adminEventListEventAttrs:
|
|
21
|
+
export declare const adminEventListEventAttrs: (keyof EventAttributes)[];
|
|
17
22
|
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/attrs/event.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/attrs/event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAEnB,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,EAAE,CAAC,MAAM,eAAe,CAAC,EAoBvD,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,EAAE,CAAC,MAAM,eAAe,CAAC,EAM5D,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,qBAAqB,EAAE,CAAC,MAAM,kBAAkB,CAAC,EAO7D,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,EAAE,CAAC,MAAM,eAAe,CAAC,EAA4B,CAAC;AAErF,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,EAAE,CAAC,MAAM,gBAAgB,CAAC,EAQzD,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,EAAE,CAAC,MAAM,gBAAgB,CAAC,EAA4C,CAAC;AAE5G,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,EAAE,CAAC,MAAM,gBAAgB,CAAC,EAA6B,CAAC;AAExF,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,EAAE,CAAC,MAAM,eAAe,CAAC,EAoBxD,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,EAAE,CAAC,MAAM,eAAe,CAAC,EAA4B,CAAC;AAEtF,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,EAAE,CAAC,MAAM,eAAe,CAAC,EAAgD,CAAC"}
|
package/dist/attrs/event.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adminEventListEventAttrs = exports.eventListEventAttrs = exports.eventGetAnswerAttrs = exports.eventGetSignupAttrs = exports.eventGetQuotaAttrs = exports.eventGetQuestionAttrs = exports.adminEventGetEventAttrs = exports.eventGetEventAttrs = void 0;
|
|
4
|
-
/** Attributes included in GET /api/events/
|
|
3
|
+
exports.adminEventListEventAttrs = exports.eventListQuotaAttrs = exports.eventListEventAttrs = exports.eventGetAnswerAttrs = exports.adminEventGetSignupAttrs = exports.eventGetSignupAttrs = exports.eventGetQuotaAttrs = exports.eventGetQuestionAttrs = exports.adminEventGetEventAttrs = exports.eventGetEventAttrs = void 0;
|
|
4
|
+
/** Attributes included in GET /api/events/slug for Event instances. */
|
|
5
5
|
exports.eventGetEventAttrs = [
|
|
6
6
|
"id",
|
|
7
7
|
"title",
|
|
@@ -20,14 +20,29 @@ exports.eventGetEventAttrs = [
|
|
|
20
20
|
"signupsPublic",
|
|
21
21
|
"nameQuestion",
|
|
22
22
|
"emailQuestion",
|
|
23
|
+
"languages",
|
|
24
|
+
"defaultLanguage",
|
|
23
25
|
];
|
|
24
26
|
/** Attributes included in GET /api/admin/events/ID for Event instances. */
|
|
25
|
-
exports.adminEventGetEventAttrs = [
|
|
27
|
+
exports.adminEventGetEventAttrs = [
|
|
28
|
+
...exports.eventGetEventAttrs,
|
|
29
|
+
"draft",
|
|
30
|
+
"listed",
|
|
31
|
+
"verificationEmail",
|
|
32
|
+
"updatedAt",
|
|
33
|
+
];
|
|
26
34
|
/** Attributes included in results for Question instances. */
|
|
27
|
-
exports.eventGetQuestionAttrs = [
|
|
35
|
+
exports.eventGetQuestionAttrs = [
|
|
36
|
+
"id",
|
|
37
|
+
"question",
|
|
38
|
+
"type",
|
|
39
|
+
"options",
|
|
40
|
+
"required",
|
|
41
|
+
"public",
|
|
42
|
+
];
|
|
28
43
|
/** Attributes included in results for Quota instances. */
|
|
29
44
|
exports.eventGetQuotaAttrs = ["id", "title", "size"];
|
|
30
|
-
/** Attributes included in GET /api/events/
|
|
45
|
+
/** Attributes included in GET /api/events/slug for Signup instances. */
|
|
31
46
|
exports.eventGetSignupAttrs = [
|
|
32
47
|
"firstName",
|
|
33
48
|
"lastName",
|
|
@@ -37,6 +52,8 @@ exports.eventGetSignupAttrs = [
|
|
|
37
52
|
"createdAt",
|
|
38
53
|
"confirmedAt",
|
|
39
54
|
];
|
|
55
|
+
/** Attributes included in GET /api/admin/events/ID for Signup instances. */
|
|
56
|
+
exports.adminEventGetSignupAttrs = [...exports.eventGetSignupAttrs, "id", "email"];
|
|
40
57
|
/** Attributes included in results for Answer instances. */
|
|
41
58
|
exports.eventGetAnswerAttrs = ["questionId", "answer"];
|
|
42
59
|
/** Attributes included in GET /api/events for Event instances. */
|
|
@@ -56,6 +73,12 @@ exports.eventListEventAttrs = [
|
|
|
56
73
|
"facebookUrl",
|
|
57
74
|
"category",
|
|
58
75
|
"signupsPublic",
|
|
76
|
+
"nameQuestion",
|
|
77
|
+
"emailQuestion",
|
|
78
|
+
"languages",
|
|
79
|
+
"defaultLanguage",
|
|
59
80
|
];
|
|
81
|
+
/** Attributes included in GET /api/events for Quota instances. */
|
|
82
|
+
exports.eventListQuotaAttrs = ["id", "title", "size"];
|
|
60
83
|
/** Attributes included in GET /api/admin/events for Event instances. */
|
|
61
84
|
exports.adminEventListEventAttrs = [...exports.eventListEventAttrs, "draft", "listed"];
|
package/dist/models/answer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import QuestionAttributes from "./question";
|
|
2
|
-
import SignupAttributes from "./signup";
|
|
1
|
+
import type QuestionAttributes from "./question";
|
|
2
|
+
import type SignupAttributes from "./signup";
|
|
3
3
|
export default interface AnswerAttributes {
|
|
4
4
|
id: string;
|
|
5
5
|
answer: string | string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/models/answer.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/models/answer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,UAAU,CAAC;AAE7C,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,UAAU,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrC,QAAQ,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;CAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditlog.d.ts","sourceRoot":"","sources":["../../src/models/auditlog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"auditlog.d.ts","sourceRoot":"","sources":["../../src/models/auditlog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
|
package/dist/models/event.d.ts
CHANGED
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { QuestionLanguage, QuotaLanguage } from "../schema";
|
|
2
|
+
interface EventPerLanguageAttributes {
|
|
3
3
|
title: string;
|
|
4
|
+
description: string | null;
|
|
5
|
+
price: string | null;
|
|
6
|
+
location: string | null;
|
|
7
|
+
webpageUrl: string | null;
|
|
8
|
+
facebookUrl: string | null;
|
|
9
|
+
verificationEmail: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface EventLanguage extends EventPerLanguageAttributes {
|
|
12
|
+
quotas: QuotaLanguage[];
|
|
13
|
+
questions: QuestionLanguage[];
|
|
14
|
+
}
|
|
15
|
+
export default interface EventAttributes extends EventPerLanguageAttributes {
|
|
16
|
+
id: string;
|
|
4
17
|
slug: string;
|
|
5
18
|
date: Date | null;
|
|
6
19
|
endDate: Date | null;
|
|
7
20
|
registrationStartDate: Date | null;
|
|
8
21
|
registrationEndDate: Date | null;
|
|
9
22
|
openQuotaSize: number;
|
|
10
|
-
description: string | null;
|
|
11
|
-
price: string | null;
|
|
12
|
-
location: string | null;
|
|
13
|
-
facebookUrl: string | null;
|
|
14
|
-
webpageUrl: string | null;
|
|
15
23
|
category: string;
|
|
16
24
|
draft: boolean;
|
|
17
25
|
listed: boolean;
|
|
18
26
|
signupsPublic: boolean;
|
|
19
27
|
nameQuestion: boolean;
|
|
20
28
|
emailQuestion: boolean;
|
|
21
|
-
|
|
29
|
+
languages: Record<string, EventLanguage>;
|
|
30
|
+
defaultLanguage: string;
|
|
22
31
|
updatedAt: Date;
|
|
23
32
|
}
|
|
33
|
+
export {};
|
|
24
34
|
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/models/event.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/models/event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEjE,UAAU,0BAA0B;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,aAAc,SAAQ,0BAA0B;IAC/D,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,SAAS,EAAE,gBAAgB,EAAE,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,0BAA0B;IACzE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,qBAAqB,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,IAAI,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { default as AnswerAttributes } from "./answer";
|
|
2
2
|
export type { default as AuditLogAttributes } from "./auditlog";
|
|
3
|
-
export type { default as EventAttributes } from "./event";
|
|
3
|
+
export type { default as EventAttributes, EventLanguage } from "./event";
|
|
4
4
|
export type { default as QuestionAttributes } from "./question";
|
|
5
5
|
export type { default as QuotaAttributes } from "./quota";
|
|
6
6
|
export type { default as SignupAttributes } from "./signup";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzE,YAAY,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1D,YAAY,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../src/models/question.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../src/models/question.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,eAAe,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAChC"}
|
package/dist/models/quota.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../src/models/quota.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../src/models/quota.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,eAAe;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/models/signup.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../src/models/signup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../src/models/signup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,eAAe,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAChC"}
|
|
@@ -5,8 +5,8 @@ export declare const eventID: import("@sinclair/typebox").TString;
|
|
|
5
5
|
export declare const eventIdentity: import("@sinclair/typebox").TObject<{
|
|
6
6
|
id: import("@sinclair/typebox").TString;
|
|
7
7
|
}>;
|
|
8
|
-
/** Event attributes that are
|
|
9
|
-
export declare const
|
|
8
|
+
/** Event attributes that are public. */
|
|
9
|
+
export declare const publicEventAttributes: import("@sinclair/typebox").TObject<{
|
|
10
10
|
title: import("@sinclair/typebox").TString;
|
|
11
11
|
slug: import("@sinclair/typebox").TString;
|
|
12
12
|
date: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
@@ -15,76 +15,107 @@ export declare const userEventListAttributes: import("@sinclair/typebox").TObjec
|
|
|
15
15
|
registrationEndDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
16
16
|
openQuotaSize: import("@sinclair/typebox").TInteger;
|
|
17
17
|
category: import("@sinclair/typebox").TString;
|
|
18
|
-
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
19
|
-
price: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
20
|
-
location: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
21
|
-
webpageUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
22
|
-
facebookUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
23
18
|
signupsPublic: import("@sinclair/typebox").TBoolean;
|
|
19
|
+
nameQuestion: import("@sinclair/typebox").TBoolean;
|
|
20
|
+
emailQuestion: import("@sinclair/typebox").TBoolean;
|
|
21
|
+
defaultLanguage: import("@sinclair/typebox").TString;
|
|
24
22
|
}>;
|
|
25
|
-
/** Event attributes that are
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
23
|
+
/** Event attributes that are only for admins. */
|
|
24
|
+
export declare const adminOnlyEventAttributes: import("@sinclair/typebox").TObject<{
|
|
25
|
+
draft: import("@sinclair/typebox").TBoolean;
|
|
26
|
+
listed: import("@sinclair/typebox").TBoolean;
|
|
27
|
+
}>;
|
|
28
|
+
/** Attributes shared between events/languages that are public. */
|
|
29
|
+
export declare const publicCommonAttributes: import("@sinclair/typebox").TObject<{
|
|
28
30
|
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
29
|
-
date: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
30
|
-
slug: import("@sinclair/typebox").TString;
|
|
31
|
-
endDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
32
|
-
registrationStartDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
33
|
-
registrationEndDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
34
|
-
openQuotaSize: import("@sinclair/typebox").TInteger;
|
|
35
|
-
category: import("@sinclair/typebox").TString;
|
|
36
31
|
price: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
37
32
|
location: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
38
33
|
webpageUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
39
34
|
facebookUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
40
|
-
signupsPublic: import("@sinclair/typebox").TBoolean;
|
|
41
|
-
nameQuestion: import("@sinclair/typebox").TBoolean;
|
|
42
|
-
emailQuestion: import("@sinclair/typebox").TBoolean;
|
|
43
35
|
}>;
|
|
44
|
-
/**
|
|
45
|
-
export declare const
|
|
36
|
+
/** Attributes shared between events/languages that are only for admins, only in event details. */
|
|
37
|
+
export declare const adminDetailsOnlyCommonAttributes: import("@sinclair/typebox").TObject<{
|
|
38
|
+
verificationEmail: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
39
|
+
}>;
|
|
40
|
+
/** Language version attributes that are public. */
|
|
41
|
+
export declare const publicLanguageAttributes: import("@sinclair/typebox").TObject<{
|
|
46
42
|
title: import("@sinclair/typebox").TString;
|
|
43
|
+
quotas: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
44
|
+
title: import("@sinclair/typebox").TString;
|
|
45
|
+
}>>;
|
|
46
|
+
questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
47
|
+
question: import("@sinclair/typebox").TString;
|
|
48
|
+
options: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>, import("@sinclair/typebox").TNull]>;
|
|
49
|
+
}>>;
|
|
50
|
+
}>;
|
|
51
|
+
/** Schema for an event language version. */
|
|
52
|
+
export declare const userEventLanguage: import("@sinclair/typebox").TObject<{
|
|
47
53
|
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
48
|
-
date: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
49
|
-
slug: import("@sinclair/typebox").TString;
|
|
50
|
-
endDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
51
|
-
registrationStartDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
52
|
-
registrationEndDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
53
|
-
openQuotaSize: import("@sinclair/typebox").TInteger;
|
|
54
|
-
category: import("@sinclair/typebox").TString;
|
|
55
54
|
price: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
56
55
|
location: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
57
56
|
webpageUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
58
57
|
facebookUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
59
|
-
signupsPublic: import("@sinclair/typebox").TBoolean;
|
|
60
|
-
draft: import("@sinclair/typebox").TBoolean;
|
|
61
|
-
listed: import("@sinclair/typebox").TBoolean;
|
|
62
|
-
}>;
|
|
63
|
-
/** Event attributes that are included for admins in event details. */
|
|
64
|
-
export declare const adminEventDetailsAttributes: import("@sinclair/typebox").TObject<{
|
|
65
58
|
title: import("@sinclair/typebox").TString;
|
|
59
|
+
quotas: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
60
|
+
title: import("@sinclair/typebox").TString;
|
|
61
|
+
}>>;
|
|
62
|
+
questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
63
|
+
question: import("@sinclair/typebox").TString;
|
|
64
|
+
options: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>, import("@sinclair/typebox").TNull]>;
|
|
65
|
+
}>>;
|
|
66
|
+
}>;
|
|
67
|
+
/** Schema for an event language version for admins. */
|
|
68
|
+
export declare const adminEventLanguage: import("@sinclair/typebox").TObject<{
|
|
66
69
|
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
67
|
-
date: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
68
|
-
slug: import("@sinclair/typebox").TString;
|
|
69
|
-
endDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
70
|
-
registrationStartDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
71
|
-
registrationEndDate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
72
|
-
openQuotaSize: import("@sinclair/typebox").TInteger;
|
|
73
|
-
category: import("@sinclair/typebox").TString;
|
|
74
70
|
price: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
75
71
|
location: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
76
72
|
webpageUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
77
73
|
facebookUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
title: import("@sinclair/typebox").TString;
|
|
75
|
+
quotas: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
76
|
+
title: import("@sinclair/typebox").TString;
|
|
77
|
+
}>>;
|
|
78
|
+
questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
79
|
+
question: import("@sinclair/typebox").TString;
|
|
80
|
+
options: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>, import("@sinclair/typebox").TNull]>;
|
|
81
|
+
}>>;
|
|
83
82
|
verificationEmail: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
84
83
|
}>;
|
|
85
|
-
/**
|
|
86
|
-
export declare const
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
/** Schema for the array of event language versions. */
|
|
85
|
+
export declare const userEventLanguages: import("@sinclair/typebox").TObject<{
|
|
86
|
+
languages: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
87
|
+
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
88
|
+
price: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
89
|
+
location: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
90
|
+
webpageUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
91
|
+
facebookUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
92
|
+
title: import("@sinclair/typebox").TString;
|
|
93
|
+
quotas: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
94
|
+
title: import("@sinclair/typebox").TString;
|
|
95
|
+
}>>;
|
|
96
|
+
questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
97
|
+
question: import("@sinclair/typebox").TString;
|
|
98
|
+
options: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>, import("@sinclair/typebox").TNull]>;
|
|
99
|
+
}>>;
|
|
100
|
+
}>>;
|
|
101
|
+
}>;
|
|
102
|
+
/** Schema for the array of event language versions for admins. */
|
|
103
|
+
export declare const adminEventLanguages: import("@sinclair/typebox").TObject<{
|
|
104
|
+
languages: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
105
|
+
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
106
|
+
price: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
107
|
+
location: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
108
|
+
webpageUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
109
|
+
facebookUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
110
|
+
title: import("@sinclair/typebox").TString;
|
|
111
|
+
quotas: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
112
|
+
title: import("@sinclair/typebox").TString;
|
|
113
|
+
}>>;
|
|
114
|
+
questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
115
|
+
question: import("@sinclair/typebox").TString;
|
|
116
|
+
options: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>, import("@sinclair/typebox").TNull]>;
|
|
117
|
+
}>>;
|
|
118
|
+
verificationEmail: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
119
|
+
}>>;
|
|
89
120
|
}>;
|
|
90
121
|
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/schema/event/attributes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/schema/event/attributes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,qCAKpB,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,OAAO,qCAMlB,CAAC;AAEH,mDAAmD;AACnD,eAAO,MAAM,aAAa;;EAExB,CAAC;AAEH,wCAAwC;AACxC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;EA4ChC,CAAC;AAEH,iDAAiD;AACjD,eAAO,MAAM,wBAAwB;;;EASnC,CAAC;AAEH,kEAAkE;AAClE,eAAO,MAAM,sBAAsB;;;;;;EAgBjC,CAAC;AAEH,kGAAkG;AAClG,eAAO,MAAM,gCAAgC;;EAI3C,CAAC;AAEH,mDAAmD;AACnD,eAAO,MAAM,wBAAwB;;;;;;;;;EAQnC,CAAC;AAEH,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAAqE,CAAC;AAEpG,uDAAuD;AACvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAI7B,CAAC;AAEH,uDAAuD;AACvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;EAE7B,CAAC;AAEH,kEAAkE;AAClE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;EAE9B,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.adminEventLanguages = exports.userEventLanguages = exports.adminEventLanguage = exports.userEventLanguage = exports.publicLanguageAttributes = exports.adminDetailsOnlyCommonAttributes = exports.publicCommonAttributes = exports.adminOnlyEventAttributes = exports.publicEventAttributes = exports.eventIdentity = exports.eventID = exports.eventSlug = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const question_1 = require("../question");
|
|
6
|
+
const quota_1 = require("../quota");
|
|
5
7
|
const utils_1 = require("../utils");
|
|
6
8
|
exports.eventSlug = typebox_1.Type.String({
|
|
7
9
|
description: "Event slug, used for accessing the event by URL.",
|
|
@@ -21,13 +23,14 @@ exports.eventID = typebox_1.Type.String({
|
|
|
21
23
|
exports.eventIdentity = typebox_1.Type.Object({
|
|
22
24
|
id: exports.eventID,
|
|
23
25
|
});
|
|
24
|
-
/** Event attributes that are
|
|
25
|
-
exports.
|
|
26
|
+
/** Event attributes that are public. */
|
|
27
|
+
exports.publicEventAttributes = typebox_1.Type.Object({
|
|
26
28
|
title: typebox_1.Type.String({
|
|
27
29
|
description: "Event title.",
|
|
28
30
|
minLength: 1,
|
|
29
31
|
maxLength: 255,
|
|
30
32
|
}),
|
|
33
|
+
// Not per language as it's used for fetching events.
|
|
31
34
|
slug: exports.eventSlug,
|
|
32
35
|
date: (0, utils_1.Nullable)(typebox_1.Type.String({ format: "date-time" }), {
|
|
33
36
|
description: "Event start date. Considered to be the start date if endDate is also set. If null, " +
|
|
@@ -46,40 +49,27 @@ exports.userEventListAttributes = typebox_1.Type.Object({
|
|
|
46
49
|
description: "The size of the open quota, which will be filled with signups overflowing their dedicated quota.",
|
|
47
50
|
minimum: 0,
|
|
48
51
|
}),
|
|
52
|
+
// Not per language as it's used for filtering events.
|
|
49
53
|
category: typebox_1.Type.String({
|
|
50
54
|
description: "Category tag for the event. Can be used for filtering.",
|
|
51
55
|
maxLength: 255,
|
|
52
56
|
}),
|
|
53
|
-
description: (0, utils_1.Nullable)(typebox_1.Type.String(), {
|
|
54
|
-
description: "Description for the event. Supports Markdown.",
|
|
55
|
-
}),
|
|
56
|
-
price: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
57
|
-
description: "Free-form pricing information for the event.",
|
|
58
|
-
}),
|
|
59
|
-
location: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
60
|
-
description: "Free-form location information for the event.",
|
|
61
|
-
}),
|
|
62
|
-
webpageUrl: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
63
|
-
description: "Link to an external event webpage.",
|
|
64
|
-
}),
|
|
65
|
-
facebookUrl: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
66
|
-
description: "Link to a Facebook page for the event.",
|
|
67
|
-
}),
|
|
68
57
|
signupsPublic: typebox_1.Type.Boolean({
|
|
69
58
|
description: "Whether signups should be shown to all users.",
|
|
70
59
|
}),
|
|
71
|
-
});
|
|
72
|
-
const attributesAddedForUsersInDetails = typebox_1.Type.Object({
|
|
73
60
|
nameQuestion: typebox_1.Type.Boolean({
|
|
74
61
|
description: "Whether signups should contain a name field.",
|
|
75
62
|
}),
|
|
76
63
|
emailQuestion: typebox_1.Type.Boolean({
|
|
77
64
|
description: "Whether signups should contain an email field. Also enables confirmation emails.",
|
|
78
65
|
}),
|
|
66
|
+
defaultLanguage: typebox_1.Type.String({
|
|
67
|
+
maxLength: 8,
|
|
68
|
+
description: "The language of fields contained directly in the event body.",
|
|
69
|
+
}),
|
|
79
70
|
});
|
|
80
|
-
/** Event attributes that are
|
|
81
|
-
exports.
|
|
82
|
-
const attributesAddedForAdmins = typebox_1.Type.Object({
|
|
71
|
+
/** Event attributes that are only for admins. */
|
|
72
|
+
exports.adminOnlyEventAttributes = typebox_1.Type.Object({
|
|
83
73
|
draft: typebox_1.Type.Boolean({
|
|
84
74
|
description: "Whether the event is a draft, shown only to signed-in admins.",
|
|
85
75
|
}),
|
|
@@ -88,26 +78,53 @@ const attributesAddedForAdmins = typebox_1.Type.Object({
|
|
|
88
78
|
" Unlisted events are only accessible with a direct link",
|
|
89
79
|
}),
|
|
90
80
|
});
|
|
91
|
-
/**
|
|
92
|
-
exports.
|
|
93
|
-
|
|
81
|
+
/** Attributes shared between events/languages that are public. */
|
|
82
|
+
exports.publicCommonAttributes = typebox_1.Type.Object({
|
|
83
|
+
description: (0, utils_1.Nullable)(typebox_1.Type.String(), {
|
|
84
|
+
description: "Description for the event. Supports Markdown.",
|
|
85
|
+
}),
|
|
86
|
+
price: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
87
|
+
description: "Free-form pricing information for the event.",
|
|
88
|
+
}),
|
|
89
|
+
location: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
90
|
+
description: "Free-form location information for the event.",
|
|
91
|
+
}),
|
|
92
|
+
webpageUrl: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
93
|
+
description: "Link to an external event webpage.",
|
|
94
|
+
}),
|
|
95
|
+
facebookUrl: (0, utils_1.Nullable)(typebox_1.Type.String({ maxLength: 255 }), {
|
|
96
|
+
description: "Link to a Facebook page for the event.",
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
/** Attributes shared between events/languages that are only for admins, only in event details. */
|
|
100
|
+
exports.adminDetailsOnlyCommonAttributes = typebox_1.Type.Object({
|
|
94
101
|
verificationEmail: (0, utils_1.Nullable)(typebox_1.Type.String(), {
|
|
95
102
|
description: "Custom message for the signup confirmation email.",
|
|
96
103
|
}),
|
|
97
104
|
});
|
|
98
|
-
/**
|
|
99
|
-
exports.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
]);
|
|
105
|
-
/** Event attributes that are dynamically calculated in public event details. */
|
|
106
|
-
exports.eventDynamicAttributes = typebox_1.Type.Object({
|
|
107
|
-
millisTillOpening: (0, utils_1.Nullable)(typebox_1.Type.Integer(), {
|
|
108
|
-
description: "Time in ms until signup opens. If null, the signup will not open in the future.",
|
|
109
|
-
}),
|
|
110
|
-
registrationClosed: typebox_1.Type.Boolean({
|
|
111
|
-
description: "Whether the signup has closed.",
|
|
105
|
+
/** Language version attributes that are public. */
|
|
106
|
+
exports.publicLanguageAttributes = typebox_1.Type.Object({
|
|
107
|
+
// No minLength to allow for fallback.
|
|
108
|
+
title: typebox_1.Type.String({
|
|
109
|
+
description: "Event title.",
|
|
110
|
+
maxLength: 255,
|
|
112
111
|
}),
|
|
112
|
+
quotas: typebox_1.Type.Array(quota_1.quotaLanguage),
|
|
113
|
+
questions: typebox_1.Type.Array(question_1.questionLanguage),
|
|
114
|
+
});
|
|
115
|
+
/** Schema for an event language version. */
|
|
116
|
+
exports.userEventLanguage = typebox_1.Type.Composite([exports.publicCommonAttributes, exports.publicLanguageAttributes]);
|
|
117
|
+
/** Schema for an event language version for admins. */
|
|
118
|
+
exports.adminEventLanguage = typebox_1.Type.Composite([
|
|
119
|
+
exports.publicCommonAttributes,
|
|
120
|
+
exports.publicLanguageAttributes,
|
|
121
|
+
exports.adminDetailsOnlyCommonAttributes,
|
|
122
|
+
]);
|
|
123
|
+
/** Schema for the array of event language versions. */
|
|
124
|
+
exports.userEventLanguages = typebox_1.Type.Object({
|
|
125
|
+
languages: typebox_1.Type.Record(typebox_1.Type.String({ maxLength: 8 }), exports.userEventLanguage),
|
|
126
|
+
});
|
|
127
|
+
/** Schema for the array of event language versions for admins. */
|
|
128
|
+
exports.adminEventLanguages = typebox_1.Type.Object({
|
|
129
|
+
languages: typebox_1.Type.Record(typebox_1.Type.String({ maxLength: 8 }), exports.adminEventLanguage),
|
|
113
130
|
});
|