@tietokilta/ilmomasiina-models 2.0.0 → 2.1.0-beta.2
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/cjs/schema/auditLog/attributes.d.ts +12 -11
- package/dist/cjs/schema/auditLog/attributes.d.ts.map +1 -1
- package/dist/cjs/schema/auditLog/attributes.js +1 -1
- package/dist/cjs/schema/auditLog/index.d.ts +24 -22
- package/dist/cjs/schema/auditLog/index.d.ts.map +1 -1
- package/dist/cjs/schema/auditLog/index.js +5 -3
- package/dist/cjs/schema/category/index.d.ts +3 -3
- package/dist/cjs/schema/category/index.d.ts.map +1 -1
- package/dist/cjs/schema/category/index.js +1 -1
- package/dist/cjs/schema/errors/index.d.ts +31 -31
- package/dist/cjs/schema/errors/index.d.ts.map +1 -1
- package/dist/cjs/schema/errors/index.js +19 -28
- package/dist/cjs/schema/event/attributes.d.ts +88 -87
- package/dist/cjs/schema/event/attributes.d.ts.map +1 -1
- package/dist/cjs/schema/event/attributes.js +3 -7
- package/dist/cjs/schema/event/index.d.ts +256 -256
- package/dist/cjs/schema/event/index.d.ts.map +1 -1
- package/dist/cjs/schema/event/index.js +39 -63
- package/dist/cjs/schema/eventList/index.d.ts +128 -128
- package/dist/cjs/schema/eventList/index.d.ts.map +1 -1
- package/dist/cjs/schema/eventList/index.js +9 -21
- package/dist/cjs/schema/login/index.d.ts +6 -6
- package/dist/cjs/schema/login/index.d.ts.map +1 -1
- package/dist/cjs/schema/login/index.js +1 -1
- package/dist/cjs/schema/question/attributes.d.ts +15 -12
- package/dist/cjs/schema/question/attributes.d.ts.map +1 -1
- package/dist/cjs/schema/question/attributes.js +5 -4
- package/dist/cjs/schema/question/index.d.ts +25 -25
- package/dist/cjs/schema/question/index.d.ts.map +1 -1
- package/dist/cjs/schema/question/index.js +5 -4
- package/dist/cjs/schema/quota/attributes.d.ts +9 -8
- package/dist/cjs/schema/quota/attributes.d.ts.map +1 -1
- package/dist/cjs/schema/quota/attributes.js +1 -1
- package/dist/cjs/schema/quota/index.d.ts +14 -14
- package/dist/cjs/schema/quota/index.d.ts.map +1 -1
- package/dist/cjs/schema/quota/index.js +3 -3
- package/dist/cjs/schema/quotaWithSignups/index.d.ts +40 -40
- package/dist/cjs/schema/quotaWithSignups/index.d.ts.map +1 -1
- package/dist/cjs/schema/quotaWithSignups/index.js +13 -22
- package/dist/cjs/schema/signup/attributes.d.ts +28 -27
- package/dist/cjs/schema/signup/attributes.d.ts.map +1 -1
- package/dist/cjs/schema/signup/attributes.js +1 -1
- package/dist/cjs/schema/signup/index.d.ts +64 -64
- package/dist/cjs/schema/signup/index.d.ts.map +1 -1
- package/dist/cjs/schema/signup/index.js +6 -9
- package/dist/cjs/schema/signupForEdit/index.d.ts +82 -82
- package/dist/cjs/schema/signupForEdit/index.d.ts.map +1 -1
- package/dist/cjs/schema/signupForEdit/index.js +9 -14
- package/dist/cjs/schema/slug/index.d.ts +6 -6
- package/dist/cjs/schema/slug/index.d.ts.map +1 -1
- package/dist/cjs/schema/slug/index.js +1 -1
- package/dist/cjs/schema/user/attributes.d.ts +8 -7
- package/dist/cjs/schema/user/attributes.d.ts.map +1 -1
- package/dist/cjs/schema/user/attributes.js +1 -1
- package/dist/cjs/schema/user/index.d.ts +17 -17
- package/dist/cjs/schema/user/index.d.ts.map +1 -1
- package/dist/cjs/schema/user/index.js +6 -9
- package/dist/cjs/schema/utils.d.ts +2 -2
- package/dist/cjs/schema/utils.d.ts.map +1 -1
- package/dist/cjs/schema/utils.js +1 -1
- package/dist/esm/schema/auditLog/attributes.d.ts +12 -11
- package/dist/esm/schema/auditLog/attributes.d.ts.map +1 -1
- package/dist/esm/schema/auditLog/attributes.js +1 -1
- package/dist/esm/schema/auditLog/index.d.ts +24 -22
- package/dist/esm/schema/auditLog/index.d.ts.map +1 -1
- package/dist/esm/schema/auditLog/index.js +4 -2
- package/dist/esm/schema/category/index.d.ts +3 -3
- package/dist/esm/schema/category/index.d.ts.map +1 -1
- package/dist/esm/schema/category/index.js +1 -1
- package/dist/esm/schema/errors/index.d.ts +31 -31
- package/dist/esm/schema/errors/index.d.ts.map +1 -1
- package/dist/esm/schema/errors/index.js +19 -28
- package/dist/esm/schema/event/attributes.d.ts +88 -87
- package/dist/esm/schema/event/attributes.d.ts.map +1 -1
- package/dist/esm/schema/event/attributes.js +3 -7
- package/dist/esm/schema/event/index.d.ts +256 -256
- package/dist/esm/schema/event/index.d.ts.map +1 -1
- package/dist/esm/schema/event/index.js +39 -63
- package/dist/esm/schema/eventList/index.d.ts +128 -128
- package/dist/esm/schema/eventList/index.d.ts.map +1 -1
- package/dist/esm/schema/eventList/index.js +9 -21
- package/dist/esm/schema/login/index.d.ts +6 -6
- package/dist/esm/schema/login/index.d.ts.map +1 -1
- package/dist/esm/schema/login/index.js +1 -1
- package/dist/esm/schema/question/attributes.d.ts +15 -12
- package/dist/esm/schema/question/attributes.d.ts.map +1 -1
- package/dist/esm/schema/question/attributes.js +4 -3
- package/dist/esm/schema/question/index.d.ts +25 -25
- package/dist/esm/schema/question/index.d.ts.map +1 -1
- package/dist/esm/schema/question/index.js +4 -4
- package/dist/esm/schema/quota/attributes.d.ts +9 -8
- package/dist/esm/schema/quota/attributes.d.ts.map +1 -1
- package/dist/esm/schema/quota/attributes.js +1 -1
- package/dist/esm/schema/quota/index.d.ts +14 -14
- package/dist/esm/schema/quota/index.d.ts.map +1 -1
- package/dist/esm/schema/quota/index.js +3 -3
- package/dist/esm/schema/quotaWithSignups/index.d.ts +40 -40
- package/dist/esm/schema/quotaWithSignups/index.d.ts.map +1 -1
- package/dist/esm/schema/quotaWithSignups/index.js +13 -22
- package/dist/esm/schema/signup/attributes.d.ts +28 -27
- package/dist/esm/schema/signup/attributes.d.ts.map +1 -1
- package/dist/esm/schema/signup/attributes.js +1 -1
- package/dist/esm/schema/signup/index.d.ts +64 -64
- package/dist/esm/schema/signup/index.d.ts.map +1 -1
- package/dist/esm/schema/signup/index.js +6 -9
- package/dist/esm/schema/signupForEdit/index.d.ts +82 -82
- package/dist/esm/schema/signupForEdit/index.d.ts.map +1 -1
- package/dist/esm/schema/signupForEdit/index.js +9 -14
- package/dist/esm/schema/slug/index.d.ts +6 -6
- package/dist/esm/schema/slug/index.d.ts.map +1 -1
- package/dist/esm/schema/slug/index.js +1 -1
- package/dist/esm/schema/user/attributes.d.ts +8 -7
- package/dist/esm/schema/user/attributes.d.ts.map +1 -1
- package/dist/esm/schema/user/attributes.js +1 -1
- package/dist/esm/schema/user/index.d.ts +17 -17
- package/dist/esm/schema/user/index.d.ts.map +1 -1
- package/dist/esm/schema/user/index.js +6 -9
- package/dist/esm/schema/utils.d.ts +2 -2
- package/dist/esm/schema/utils.d.ts.map +1 -1
- package/dist/esm/schema/utils.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAMvC,OAAO,EAEL,kBAAkB,EAGlB,OAAO,EAEP,SAAS,EAGT,iBAAiB,EAElB,MAAM,cAAc,CAAC;AAKtB,iEAAiE;AACjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS5B,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AAQH,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH,0CAA0C;AAC1C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1B,CAAC;AAEH,kDAAkD;AAClD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3B,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,mBAAmB;;EAE9B,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,oBAAoB;;EAE/B,CAAC;AAEH,6DAA6D;AAC7D,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAC7C,uBAAuB;AACvB,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC;AAEjD,sEAAsE;AACtE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAErE,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,kDAAkD;AAClD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAE7D,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,84 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.adminEventPathParams = exports.userEventPathParams = exports.eventUpdateBody = exports.eventCreateBody = exports.adminEventResponse = exports.userEventForSignup = exports.userEventResponse = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
const question_1 = require("../question");
|
|
6
6
|
const quota_1 = require("../quota");
|
|
7
7
|
const quotaWithSignups_1 = require("../quotaWithSignups");
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
const attributes_1 = require("./attributes");
|
|
10
10
|
/** Non-relation attributes for the public API. */
|
|
11
|
-
const publicAttributes = typebox_1.Type.
|
|
11
|
+
const publicAttributes = typebox_1.Type.Interface([attributes_1.publicEventAttributes, attributes_1.publicCommonAttributes, attributes_1.userEventLanguages], {});
|
|
12
12
|
/** Response schema for fetching an event from the public API. */
|
|
13
|
-
exports.userEventResponse = typebox_1.Type.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
typebox_1.Type.
|
|
17
|
-
|
|
18
|
-
quotas: typebox_1.Type.Array(quotaWithSignups_1.userQuotaWithSignups),
|
|
19
|
-
millisTillOpening: (0, utils_1.Nullable)(typebox_1.Type.Integer(), {
|
|
20
|
-
description: "Time in ms until signup opens. If null, the signup will not open in the future.",
|
|
21
|
-
}),
|
|
22
|
-
registrationClosed: typebox_1.Type.Boolean({
|
|
23
|
-
description: "Whether the signup has closed.",
|
|
24
|
-
}),
|
|
13
|
+
exports.userEventResponse = typebox_1.Type.Interface([attributes_1.eventIdentity, publicAttributes], {
|
|
14
|
+
questions: typebox_1.Type.Array(question_1.question),
|
|
15
|
+
quotas: typebox_1.Type.Array(quotaWithSignups_1.userQuotaWithSignups),
|
|
16
|
+
millisTillOpening: (0, utils_1.Nullable)(typebox_1.Type.Integer(), {
|
|
17
|
+
description: "Time in ms until signup opens. If null, the signup will not open in the future.",
|
|
25
18
|
}),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.userEventForSignup = typebox_1.Type.Composite([
|
|
29
|
-
attributes_1.eventIdentity,
|
|
30
|
-
publicAttributes,
|
|
31
|
-
typebox_1.Type.Object({
|
|
32
|
-
questions: typebox_1.Type.Array(question_1.question),
|
|
33
|
-
quotas: typebox_1.Type.Array(quota_1.quota),
|
|
19
|
+
registrationClosed: typebox_1.Type.Boolean({
|
|
20
|
+
description: "Whether the signup has closed.",
|
|
34
21
|
}),
|
|
35
|
-
|
|
22
|
+
});
|
|
23
|
+
/** Response schema when an event is fetched as part of an editable signup. */
|
|
24
|
+
exports.userEventForSignup = typebox_1.Type.Interface([attributes_1.eventIdentity, publicAttributes], {
|
|
25
|
+
questions: typebox_1.Type.Array(question_1.question),
|
|
26
|
+
quotas: typebox_1.Type.Array(quota_1.quota),
|
|
27
|
+
});
|
|
36
28
|
/** Non-relation attributes for the admin API. */
|
|
37
|
-
const adminAttributes = typebox_1.Type.
|
|
38
|
-
attributes_1.publicEventAttributes,
|
|
39
|
-
attributes_1.publicCommonAttributes,
|
|
40
|
-
attributes_1.adminOnlyEventAttributes,
|
|
41
|
-
attributes_1.adminDetailsOnlyCommonAttributes,
|
|
42
|
-
attributes_1.adminEventLanguages,
|
|
43
|
-
]);
|
|
29
|
+
const adminAttributes = typebox_1.Type.Interface([attributes_1.publicEventAttributes, attributes_1.publicCommonAttributes, attributes_1.adminOnlyEventAttributes, attributes_1.adminDetailsOnlyCommonAttributes, attributes_1.adminEventLanguages], {});
|
|
44
30
|
/** Response schema for fetching or modifying an event in the admin API. */
|
|
45
|
-
exports.adminEventResponse = typebox_1.Type.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
typebox_1.Type.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
updatedAt: typebox_1.Type.String({
|
|
52
|
-
description: "Last update time of the event. Used for edit conflict handling.",
|
|
53
|
-
format: "date-time",
|
|
54
|
-
}),
|
|
31
|
+
exports.adminEventResponse = typebox_1.Type.Interface([attributes_1.eventIdentity, adminAttributes], {
|
|
32
|
+
questions: typebox_1.Type.Array(question_1.question),
|
|
33
|
+
quotas: typebox_1.Type.Array(quotaWithSignups_1.adminQuotaWithSignups),
|
|
34
|
+
updatedAt: typebox_1.Type.String({
|
|
35
|
+
description: "Last update time of the event. Used for edit conflict handling.",
|
|
36
|
+
format: "date-time",
|
|
55
37
|
}),
|
|
56
|
-
|
|
38
|
+
});
|
|
57
39
|
/** Request body for creating an event. */
|
|
58
|
-
exports.eventCreateBody = typebox_1.Type.
|
|
59
|
-
|
|
60
|
-
typebox_1.Type.
|
|
61
|
-
|
|
62
|
-
questions: typebox_1.Type.Array(question_1.questionCreate),
|
|
63
|
-
}),
|
|
64
|
-
]);
|
|
40
|
+
exports.eventCreateBody = typebox_1.Type.Interface([adminAttributes], {
|
|
41
|
+
quotas: typebox_1.Type.Array(quota_1.quotaCreate),
|
|
42
|
+
questions: typebox_1.Type.Array(question_1.questionCreate),
|
|
43
|
+
});
|
|
65
44
|
/** Request body for editing an existing event. */
|
|
66
|
-
exports.eventUpdateBody = typebox_1.Type.Partial(typebox_1.Type.
|
|
67
|
-
|
|
68
|
-
typebox_1.Type.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
description: "Last update time of the event. An edit conflict is detected if this does not match the update " +
|
|
78
|
-
"date on the server.",
|
|
79
|
-
}),
|
|
45
|
+
exports.eventUpdateBody = typebox_1.Type.Partial(typebox_1.Type.Interface([adminAttributes], {
|
|
46
|
+
quotas: typebox_1.Type.Array(quota_1.quotaUpdate),
|
|
47
|
+
questions: typebox_1.Type.Array(question_1.questionUpdate),
|
|
48
|
+
moveSignupsToQueue: typebox_1.Type.Boolean({
|
|
49
|
+
default: false,
|
|
50
|
+
description: "Whether to allow moving signups to the queue, if caused by quota changes.",
|
|
51
|
+
}),
|
|
52
|
+
updatedAt: typebox_1.Type.String({
|
|
53
|
+
format: "date-time",
|
|
54
|
+
description: "Last update time of the event. An edit conflict is detected if this does not match the update " +
|
|
55
|
+
"date on the server.",
|
|
80
56
|
}),
|
|
81
|
-
|
|
57
|
+
}));
|
|
82
58
|
/** Path parameters necessary to fetch an event from the public API. */
|
|
83
59
|
exports.userEventPathParams = typebox_1.Type.Object({
|
|
84
60
|
slug: attributes_1.eventSlug,
|
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
/** Schema for an item of an event list from the public API. */
|
|
3
|
-
declare const userEventListItem:
|
|
4
|
-
id:
|
|
5
|
-
title:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
endDate:
|
|
9
|
-
registrationStartDate:
|
|
10
|
-
registrationEndDate:
|
|
11
|
-
openQuotaSize:
|
|
12
|
-
category:
|
|
13
|
-
signupsPublic:
|
|
14
|
-
nameQuestion:
|
|
15
|
-
emailQuestion:
|
|
16
|
-
defaultLanguage:
|
|
17
|
-
description:
|
|
18
|
-
price:
|
|
19
|
-
location:
|
|
20
|
-
webpageUrl:
|
|
21
|
-
facebookUrl:
|
|
22
|
-
languages:
|
|
23
|
-
description:
|
|
24
|
-
price:
|
|
25
|
-
location:
|
|
26
|
-
webpageUrl:
|
|
27
|
-
facebookUrl:
|
|
28
|
-
title:
|
|
29
|
-
quotas:
|
|
30
|
-
title:
|
|
3
|
+
declare const userEventListItem: Type.TObject<{
|
|
4
|
+
id: Type.TString;
|
|
5
|
+
title: Type.TString;
|
|
6
|
+
slug: Type.TString;
|
|
7
|
+
date: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
8
|
+
endDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
9
|
+
registrationStartDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
10
|
+
registrationEndDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
11
|
+
openQuotaSize: Type.TInteger;
|
|
12
|
+
category: Type.TString;
|
|
13
|
+
signupsPublic: Type.TBoolean;
|
|
14
|
+
nameQuestion: Type.TBoolean;
|
|
15
|
+
emailQuestion: Type.TBoolean;
|
|
16
|
+
defaultLanguage: Type.TString;
|
|
17
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
18
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
19
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
20
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
21
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
22
|
+
languages: Type.TRecord<"^.*$", Type.TObject<{
|
|
23
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
24
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
25
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
26
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
27
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
28
|
+
title: Type.TString;
|
|
29
|
+
quotas: Type.TArray<Type.TObject<{
|
|
30
|
+
title: Type.TString;
|
|
31
31
|
}>>;
|
|
32
|
-
questions:
|
|
33
|
-
question:
|
|
34
|
-
options:
|
|
32
|
+
questions: Type.TArray<Type.TObject<{
|
|
33
|
+
question: Type.TString;
|
|
34
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
35
35
|
}>>;
|
|
36
36
|
}>>;
|
|
37
|
-
quotas:
|
|
38
|
-
id:
|
|
39
|
-
title:
|
|
40
|
-
size:
|
|
41
|
-
signupCount:
|
|
37
|
+
quotas: Type.TArray<Type.TObject<{
|
|
38
|
+
id: Type.TString;
|
|
39
|
+
title: Type.TString;
|
|
40
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
41
|
+
signupCount: Type.TInteger;
|
|
42
42
|
}>>;
|
|
43
43
|
}>;
|
|
44
44
|
/** Response schema for fetching a list of events from the public API. */
|
|
45
|
-
export declare const userEventListResponse:
|
|
46
|
-
id:
|
|
47
|
-
title:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
endDate:
|
|
51
|
-
registrationStartDate:
|
|
52
|
-
registrationEndDate:
|
|
53
|
-
openQuotaSize:
|
|
54
|
-
category:
|
|
55
|
-
signupsPublic:
|
|
56
|
-
nameQuestion:
|
|
57
|
-
emailQuestion:
|
|
58
|
-
defaultLanguage:
|
|
59
|
-
description:
|
|
60
|
-
price:
|
|
61
|
-
location:
|
|
62
|
-
webpageUrl:
|
|
63
|
-
facebookUrl:
|
|
64
|
-
languages:
|
|
65
|
-
description:
|
|
66
|
-
price:
|
|
67
|
-
location:
|
|
68
|
-
webpageUrl:
|
|
69
|
-
facebookUrl:
|
|
70
|
-
title:
|
|
71
|
-
quotas:
|
|
72
|
-
title:
|
|
45
|
+
export declare const userEventListResponse: Type.TArray<Type.TObject<{
|
|
46
|
+
id: Type.TString;
|
|
47
|
+
title: Type.TString;
|
|
48
|
+
slug: Type.TString;
|
|
49
|
+
date: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
50
|
+
endDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
51
|
+
registrationStartDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
52
|
+
registrationEndDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
53
|
+
openQuotaSize: Type.TInteger;
|
|
54
|
+
category: Type.TString;
|
|
55
|
+
signupsPublic: Type.TBoolean;
|
|
56
|
+
nameQuestion: Type.TBoolean;
|
|
57
|
+
emailQuestion: Type.TBoolean;
|
|
58
|
+
defaultLanguage: Type.TString;
|
|
59
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
60
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
61
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
62
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
63
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
64
|
+
languages: Type.TRecord<"^.*$", Type.TObject<{
|
|
65
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
66
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
67
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
68
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
69
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
70
|
+
title: Type.TString;
|
|
71
|
+
quotas: Type.TArray<Type.TObject<{
|
|
72
|
+
title: Type.TString;
|
|
73
73
|
}>>;
|
|
74
|
-
questions:
|
|
75
|
-
question:
|
|
76
|
-
options:
|
|
74
|
+
questions: Type.TArray<Type.TObject<{
|
|
75
|
+
question: Type.TString;
|
|
76
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
77
77
|
}>>;
|
|
78
78
|
}>>;
|
|
79
|
-
quotas:
|
|
80
|
-
id:
|
|
81
|
-
title:
|
|
82
|
-
size:
|
|
83
|
-
signupCount:
|
|
79
|
+
quotas: Type.TArray<Type.TObject<{
|
|
80
|
+
id: Type.TString;
|
|
81
|
+
title: Type.TString;
|
|
82
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
83
|
+
signupCount: Type.TInteger;
|
|
84
84
|
}>>;
|
|
85
85
|
}>>;
|
|
86
86
|
/** Schema for an item of an event list from the admin API. */
|
|
87
|
-
declare const adminEventListItem:
|
|
88
|
-
id:
|
|
89
|
-
title:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
endDate:
|
|
93
|
-
registrationStartDate:
|
|
94
|
-
registrationEndDate:
|
|
95
|
-
openQuotaSize:
|
|
96
|
-
category:
|
|
97
|
-
signupsPublic:
|
|
98
|
-
nameQuestion:
|
|
99
|
-
emailQuestion:
|
|
100
|
-
defaultLanguage:
|
|
101
|
-
description:
|
|
102
|
-
price:
|
|
103
|
-
location:
|
|
104
|
-
webpageUrl:
|
|
105
|
-
facebookUrl:
|
|
106
|
-
draft:
|
|
107
|
-
listed:
|
|
108
|
-
quotas:
|
|
109
|
-
id:
|
|
110
|
-
title:
|
|
111
|
-
size:
|
|
112
|
-
signupCount:
|
|
87
|
+
declare const adminEventListItem: Type.TObject<{
|
|
88
|
+
id: Type.TString;
|
|
89
|
+
title: Type.TString;
|
|
90
|
+
slug: Type.TString;
|
|
91
|
+
date: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
92
|
+
endDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
93
|
+
registrationStartDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
94
|
+
registrationEndDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
95
|
+
openQuotaSize: Type.TInteger;
|
|
96
|
+
category: Type.TString;
|
|
97
|
+
signupsPublic: Type.TBoolean;
|
|
98
|
+
nameQuestion: Type.TBoolean;
|
|
99
|
+
emailQuestion: Type.TBoolean;
|
|
100
|
+
defaultLanguage: Type.TString;
|
|
101
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
102
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
103
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
104
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
105
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
106
|
+
draft: Type.TBoolean;
|
|
107
|
+
listed: Type.TBoolean;
|
|
108
|
+
quotas: Type.TArray<Type.TObject<{
|
|
109
|
+
id: Type.TString;
|
|
110
|
+
title: Type.TString;
|
|
111
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
112
|
+
signupCount: Type.TInteger;
|
|
113
113
|
}>>;
|
|
114
114
|
}>;
|
|
115
115
|
/** Response schema for fetching a list of events from the admin API. */
|
|
116
|
-
export declare const adminEventListResponse:
|
|
117
|
-
id:
|
|
118
|
-
title:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
endDate:
|
|
122
|
-
registrationStartDate:
|
|
123
|
-
registrationEndDate:
|
|
124
|
-
openQuotaSize:
|
|
125
|
-
category:
|
|
126
|
-
signupsPublic:
|
|
127
|
-
nameQuestion:
|
|
128
|
-
emailQuestion:
|
|
129
|
-
defaultLanguage:
|
|
130
|
-
description:
|
|
131
|
-
price:
|
|
132
|
-
location:
|
|
133
|
-
webpageUrl:
|
|
134
|
-
facebookUrl:
|
|
135
|
-
draft:
|
|
136
|
-
listed:
|
|
137
|
-
quotas:
|
|
138
|
-
id:
|
|
139
|
-
title:
|
|
140
|
-
size:
|
|
141
|
-
signupCount:
|
|
116
|
+
export declare const adminEventListResponse: Type.TArray<Type.TObject<{
|
|
117
|
+
id: Type.TString;
|
|
118
|
+
title: Type.TString;
|
|
119
|
+
slug: Type.TString;
|
|
120
|
+
date: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
121
|
+
endDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
122
|
+
registrationStartDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
123
|
+
registrationEndDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
124
|
+
openQuotaSize: Type.TInteger;
|
|
125
|
+
category: Type.TString;
|
|
126
|
+
signupsPublic: Type.TBoolean;
|
|
127
|
+
nameQuestion: Type.TBoolean;
|
|
128
|
+
emailQuestion: Type.TBoolean;
|
|
129
|
+
defaultLanguage: Type.TString;
|
|
130
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
131
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
132
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
133
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
134
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
135
|
+
draft: Type.TBoolean;
|
|
136
|
+
listed: Type.TBoolean;
|
|
137
|
+
quotas: Type.TArray<Type.TObject<{
|
|
138
|
+
id: Type.TString;
|
|
139
|
+
title: Type.TString;
|
|
140
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
141
|
+
signupCount: Type.TInteger;
|
|
142
142
|
}>>;
|
|
143
143
|
}>>;
|
|
144
144
|
/** Query parameters applicable to the public event list API. */
|
|
145
|
-
export declare const eventListQuery:
|
|
146
|
-
category:
|
|
147
|
-
maxAge:
|
|
145
|
+
export declare const eventListQuery: Type.TObject<{
|
|
146
|
+
category: Type.TOptional<Type.TString>;
|
|
147
|
+
maxAge: Type.TOptional<Type.TInteger>;
|
|
148
148
|
}>;
|
|
149
149
|
/** Query parameters applicable to the public event list API. */
|
|
150
150
|
export type EventListQuery = Static<typeof eventListQuery>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/eventList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/eventList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAWvC,+DAA+D;AAC/D,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOtB,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgC,CAAC;AAEnE,8DAA8D;AAC9D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOvB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiC,CAAC;AAErE,gEAAgE;AAChE,eAAO,MAAM,cAAc;;;EAWzB,CAAC;AAEH,gEAAgE;AAChE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAE3D,yEAAyE;AACzE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACzE,+DAA+D;AAC/D,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,wEAAwE;AACxE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC3E,8DAA8D;AAC9D,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.eventListQuery = exports.adminEventListResponse = exports.userEventListResponse = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
const attributes_1 = require("../event/attributes");
|
|
6
6
|
const quotaWithSignups_1 = require("../quotaWithSignups");
|
|
7
7
|
/** Schema for an item of an event list from the public API. */
|
|
8
|
-
const userEventListItem = typebox_1.Type.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
attributes_1.publicCommonAttributes,
|
|
12
|
-
attributes_1.userEventLanguages,
|
|
13
|
-
typebox_1.Type.Object({
|
|
14
|
-
quotas: typebox_1.Type.Array(quotaWithSignups_1.quotaWithSignupCount, {
|
|
15
|
-
description: "The quotas in this event, with signup counts.",
|
|
16
|
-
}),
|
|
8
|
+
const userEventListItem = typebox_1.Type.Interface([attributes_1.eventIdentity, attributes_1.publicEventAttributes, attributes_1.publicCommonAttributes, attributes_1.userEventLanguages], {
|
|
9
|
+
quotas: typebox_1.Type.Array(quotaWithSignups_1.quotaWithSignupCount, {
|
|
10
|
+
description: "The quotas in this event, with signup counts.",
|
|
17
11
|
}),
|
|
18
|
-
|
|
12
|
+
});
|
|
19
13
|
/** Response schema for fetching a list of events from the public API. */
|
|
20
14
|
exports.userEventListResponse = typebox_1.Type.Array(userEventListItem);
|
|
21
15
|
/** Schema for an item of an event list from the admin API. */
|
|
22
|
-
const adminEventListItem = typebox_1.Type.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
attributes_1.publicCommonAttributes,
|
|
26
|
-
attributes_1.adminOnlyEventAttributes,
|
|
27
|
-
typebox_1.Type.Object({
|
|
28
|
-
quotas: typebox_1.Type.Array(quotaWithSignups_1.quotaWithSignupCount, {
|
|
29
|
-
description: "The quotas in this event, with signup counts.",
|
|
30
|
-
}),
|
|
16
|
+
const adminEventListItem = typebox_1.Type.Interface([attributes_1.eventIdentity, attributes_1.publicEventAttributes, attributes_1.publicCommonAttributes, attributes_1.adminOnlyEventAttributes], {
|
|
17
|
+
quotas: typebox_1.Type.Array(quotaWithSignups_1.quotaWithSignupCount, {
|
|
18
|
+
description: "The quotas in this event, with signup counts.",
|
|
31
19
|
}),
|
|
32
|
-
|
|
20
|
+
});
|
|
33
21
|
/** Response schema for fetching a list of events from the admin API. */
|
|
34
22
|
exports.adminEventListResponse = typebox_1.Type.Array(adminEventListItem);
|
|
35
23
|
/** Query parameters applicable to the public event list API. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
/** Request body for login. */
|
|
3
|
-
export declare const adminLoginBody:
|
|
4
|
-
email:
|
|
5
|
-
password:
|
|
3
|
+
export declare const adminLoginBody: Type.TObject<{
|
|
4
|
+
email: Type.TString;
|
|
5
|
+
password: Type.TString;
|
|
6
6
|
}>;
|
|
7
7
|
/** Response schema for a successful login. */
|
|
8
|
-
export declare const adminLoginResponse:
|
|
9
|
-
accessToken:
|
|
8
|
+
export declare const adminLoginResponse: Type.TObject<{
|
|
9
|
+
accessToken: Type.TString;
|
|
10
10
|
}>;
|
|
11
11
|
/** Request body for login. */
|
|
12
12
|
export type AdminLoginBody = Static<typeof adminLoginBody>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAIvC,8BAA8B;AAC9B,eAAO,MAAM,cAAc;;;EAGzB,CAAC;AACH,8CAA8C;AAC9C,eAAO,MAAM,kBAAkB;;EAI7B,CAAC;AAEH,8BAA8B;AAC9B,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAC3D,8CAA8C;AAC9C,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.adminLoginResponse = exports.adminLoginBody = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
const attributes_1 = require("../user/attributes");
|
|
6
6
|
/** Request body for login. */
|
|
7
7
|
exports.adminLoginBody = typebox_1.Type.Object({
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
1
2
|
import { QuestionType } from "../../enum";
|
|
2
|
-
export declare const questionID:
|
|
3
|
+
export declare const questionID: Type.TString;
|
|
3
4
|
/** Non-editable identity attributes of a question. */
|
|
4
|
-
export declare const questionIdentity:
|
|
5
|
-
id:
|
|
5
|
+
export declare const questionIdentity: Type.TObject<{
|
|
6
|
+
id: Type.TString;
|
|
6
7
|
}>;
|
|
8
|
+
/** Maximum number of options per question. */
|
|
9
|
+
export declare const MAX_OPTIONS_PER_QUESTION = 64;
|
|
7
10
|
/** Editable attributes of a question language version. */
|
|
8
|
-
export declare const questionLanguageAttributes:
|
|
9
|
-
question:
|
|
10
|
-
options:
|
|
11
|
+
export declare const questionLanguageAttributes: Type.TObject<{
|
|
12
|
+
question: Type.TString;
|
|
13
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
11
14
|
}>;
|
|
12
15
|
/** Editable attributes of a question. */
|
|
13
|
-
export declare const questionAttributes:
|
|
14
|
-
question:
|
|
15
|
-
type:
|
|
16
|
-
options:
|
|
17
|
-
required:
|
|
18
|
-
public:
|
|
16
|
+
export declare const questionAttributes: Type.TObject<{
|
|
17
|
+
question: Type.TString;
|
|
18
|
+
type: Type.TEnum<[QuestionType.TEXT, QuestionType.TEXT_AREA, QuestionType.NUMBER, QuestionType.SELECT, QuestionType.CHECKBOX]>;
|
|
19
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
20
|
+
required: Type.TBoolean;
|
|
21
|
+
public: Type.TBoolean;
|
|
19
22
|
}>;
|
|
20
23
|
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/question/attributes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/question/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,eAAO,MAAM,UAAU,cAGrB,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,gBAAgB;;EAE3B,CAAC;AAEH,8CAA8C;AAE9C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAS3C,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B;;;EAOrC,CAAC;AAEH,yCAAyC;AACzC,eAAO,MAAM,kBAAkB;;;;;;EAiB7B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.questionAttributes = exports.questionLanguageAttributes = exports.questionIdentity = exports.questionID = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
3
|
+
exports.questionAttributes = exports.questionLanguageAttributes = exports.MAX_OPTIONS_PER_QUESTION = exports.questionIdentity = exports.questionID = void 0;
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
exports.questionID = typebox_1.Type.String({
|
|
@@ -12,9 +12,10 @@ exports.questionID = typebox_1.Type.String({
|
|
|
12
12
|
exports.questionIdentity = typebox_1.Type.Object({
|
|
13
13
|
id: exports.questionID,
|
|
14
14
|
});
|
|
15
|
-
|
|
15
|
+
/** Maximum number of options per question. */
|
|
16
16
|
// This was a practical limit before an explicit limitation was added, so seems reasonable to set it here.
|
|
17
|
-
|
|
17
|
+
exports.MAX_OPTIONS_PER_QUESTION = 64;
|
|
18
|
+
const questionOptions = (0, utils_1.Nullable)(typebox_1.Type.Array(typebox_1.Type.String({ maxLength: 255 }), { maxItems: exports.MAX_OPTIONS_PER_QUESTION }), {
|
|
18
19
|
description: "For select or checkbox questions, the options available.",
|
|
19
20
|
});
|
|
20
21
|
/** Editable attributes of a question language version. */
|