@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,36 +1,36 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
import { questionID } from "./attributes";
|
|
3
|
-
export { questionID } from "./attributes";
|
|
3
|
+
export { MAX_OPTIONS_PER_QUESTION, questionID } from "./attributes";
|
|
4
4
|
/** Schema for a question. */
|
|
5
|
-
export declare const question:
|
|
6
|
-
id:
|
|
7
|
-
question:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
required:
|
|
11
|
-
public:
|
|
5
|
+
export declare const question: Type.TObject<{
|
|
6
|
+
id: Type.TString;
|
|
7
|
+
question: Type.TString;
|
|
8
|
+
type: Type.TEnum<[import("../..").QuestionType.TEXT, import("../..").QuestionType.TEXT_AREA, import("../..").QuestionType.NUMBER, import("../..").QuestionType.SELECT, import("../..").QuestionType.CHECKBOX]>;
|
|
9
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
10
|
+
required: Type.TBoolean;
|
|
11
|
+
public: Type.TBoolean;
|
|
12
12
|
}>;
|
|
13
13
|
/** Schema for a question language version. */
|
|
14
|
-
export declare const questionLanguage:
|
|
15
|
-
question:
|
|
16
|
-
options:
|
|
14
|
+
export declare const questionLanguage: Type.TObject<{
|
|
15
|
+
question: Type.TString;
|
|
16
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
17
17
|
}>;
|
|
18
18
|
/** Schema for creating a question. */
|
|
19
|
-
export declare const questionCreate:
|
|
20
|
-
question:
|
|
21
|
-
type: import("
|
|
22
|
-
options:
|
|
23
|
-
required:
|
|
24
|
-
public:
|
|
19
|
+
export declare const questionCreate: Type.TObject<{
|
|
20
|
+
question: Type.TString;
|
|
21
|
+
type: Type.TEnum<[import("../..").QuestionType.TEXT, import("../..").QuestionType.TEXT_AREA, import("../..").QuestionType.NUMBER, import("../..").QuestionType.SELECT, import("../..").QuestionType.CHECKBOX]>;
|
|
22
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
23
|
+
required: Type.TBoolean;
|
|
24
|
+
public: Type.TBoolean;
|
|
25
25
|
}>;
|
|
26
26
|
/** Schema for updating a question. */
|
|
27
|
-
export declare const questionUpdate:
|
|
28
|
-
id:
|
|
29
|
-
question:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
required:
|
|
33
|
-
public:
|
|
27
|
+
export declare const questionUpdate: Type.TObject<{
|
|
28
|
+
id: Type.TOptional<Type.TString>;
|
|
29
|
+
question: Type.TString;
|
|
30
|
+
type: Type.TEnum<[import("../..").QuestionType.TEXT, import("../..").QuestionType.TEXT_AREA, import("../..").QuestionType.NUMBER, import("../..").QuestionType.SELECT, import("../..").QuestionType.CHECKBOX]>;
|
|
31
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
32
|
+
required: Type.TBoolean;
|
|
33
|
+
public: Type.TBoolean;
|
|
34
34
|
}>;
|
|
35
35
|
/** Question ID type. Randomly generated alphanumeric string. */
|
|
36
36
|
export type QuestionID = Static<typeof questionID>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/question/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/question/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAsB,UAAU,EAAgD,MAAM,cAAc,CAAC;AAE5G,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpE,6BAA6B;AAC7B,eAAO,MAAM,QAAQ;;;;;;;EAA6D,CAAC;AAEnF,8CAA8C;AAC9C,eAAO,MAAM,gBAAgB;;;EAA6B,CAAC;AAE3D,sCAAsC;AACtC,eAAO,MAAM,cAAc;;;;;;EAAqB,CAAC;AAEjD,sCAAsC;AACtC,eAAO,MAAM,cAAc;;;;;;;EAEzB,CAAC;AAEH,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAEnD,6BAA6B;AAC7B,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C,8CAA8C;AAC9C,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,sCAAsC;AACtC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAE3D,sCAAsC;AACtC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Type } from "
|
|
1
|
+
import { Type } from "typebox";
|
|
2
2
|
import { questionAttributes, questionIdentity, questionLanguageAttributes } from "./attributes";
|
|
3
|
-
export { questionID } from "./attributes";
|
|
3
|
+
export { MAX_OPTIONS_PER_QUESTION, questionID } from "./attributes";
|
|
4
4
|
/** Schema for a question. */
|
|
5
|
-
export const question = Type.
|
|
5
|
+
export const question = Type.Interface([questionIdentity, questionAttributes], {});
|
|
6
6
|
/** Schema for a question language version. */
|
|
7
7
|
export const questionLanguage = questionLanguageAttributes;
|
|
8
8
|
/** Schema for creating a question. */
|
|
9
9
|
export const questionCreate = questionAttributes;
|
|
10
10
|
/** Schema for updating a question. */
|
|
11
|
-
export const questionUpdate = Type.
|
|
11
|
+
export const questionUpdate = Type.Interface([Type.Partial(questionIdentity), questionCreate], {}, {
|
|
12
12
|
description: "Set id to reuse an existing question, or leave it empty to create a new one.",
|
|
13
13
|
});
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
export declare const quotaID: Type.TString;
|
|
2
3
|
/** Non-editable identity attributes of a quota. */
|
|
3
|
-
export declare const quotaIdentity:
|
|
4
|
-
id:
|
|
4
|
+
export declare const quotaIdentity: Type.TObject<{
|
|
5
|
+
id: Type.TString;
|
|
5
6
|
}>;
|
|
6
7
|
/** Editable attributes of a quota language version. */
|
|
7
|
-
export declare const quotaLanguageAttributes:
|
|
8
|
-
title:
|
|
8
|
+
export declare const quotaLanguageAttributes: Type.TObject<{
|
|
9
|
+
title: Type.TString;
|
|
9
10
|
}>;
|
|
10
11
|
/** Editable attributes of a quota. */
|
|
11
|
-
export declare const quotaAttributes:
|
|
12
|
-
title:
|
|
13
|
-
size:
|
|
12
|
+
export declare const quotaAttributes: Type.TObject<{
|
|
13
|
+
title: Type.TString;
|
|
14
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
14
15
|
}>;
|
|
15
16
|
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/quota/attributes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/quota/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,eAAO,MAAM,OAAO,cAIlB,CAAC;AAEH,mDAAmD;AACnD,eAAO,MAAM,aAAa;;EAExB,CAAC;AAEH,uDAAuD;AACvD,eAAO,MAAM,uBAAuB;;EAMlC,CAAC;AAEH,sCAAsC;AACtC,eAAO,MAAM,eAAe;;;EAS1B,CAAC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
import { quotaID } from "./attributes";
|
|
3
3
|
export { quotaID } from "./attributes";
|
|
4
4
|
/** Schema for a quota. */
|
|
5
|
-
export declare const quota:
|
|
6
|
-
id:
|
|
7
|
-
title:
|
|
8
|
-
size:
|
|
5
|
+
export declare const quota: Type.TObject<{
|
|
6
|
+
id: Type.TString;
|
|
7
|
+
title: Type.TString;
|
|
8
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
9
9
|
}>;
|
|
10
10
|
/** Schema for a quota language version. */
|
|
11
|
-
export declare const quotaLanguage:
|
|
12
|
-
title:
|
|
11
|
+
export declare const quotaLanguage: Type.TObject<{
|
|
12
|
+
title: Type.TString;
|
|
13
13
|
}>;
|
|
14
14
|
/** Schema for creating a quota. */
|
|
15
|
-
export declare const quotaCreate:
|
|
16
|
-
title:
|
|
17
|
-
size:
|
|
15
|
+
export declare const quotaCreate: Type.TObject<{
|
|
16
|
+
title: Type.TString;
|
|
17
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
18
18
|
}>;
|
|
19
19
|
/** Schema for updating a quota. */
|
|
20
|
-
export declare const quotaUpdate:
|
|
21
|
-
id:
|
|
22
|
-
title:
|
|
23
|
-
size:
|
|
20
|
+
export declare const quotaUpdate: Type.TObject<{
|
|
21
|
+
id: Type.TOptional<Type.TString>;
|
|
22
|
+
title: Type.TString;
|
|
23
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
24
24
|
}>;
|
|
25
25
|
/** Quota ID type. Randomly generated alphanumeric string. */
|
|
26
26
|
export type QuotaID = Static<typeof quotaID>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/quota/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/quota/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAmB,OAAO,EAA0C,MAAM,cAAc,CAAC;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,0BAA0B;AAC1B,eAAO,MAAM,KAAK;;;;EAAuD,CAAC;AAE1E,2CAA2C;AAC3C,eAAO,MAAM,aAAa;;EAA0B,CAAC;AAErD,mCAAmC;AACnC,eAAO,MAAM,WAAW;;;EAAkB,CAAC;AAE3C,mCAAmC;AACnC,eAAO,MAAM,WAAW;;;;EAEtB,CAAC;AAEH,6DAA6D;AAC7D,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE7C,0BAA0B;AAC1B,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC;AAEzC,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzD,mCAAmC;AACnC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AAErD,mCAAmC;AACnC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Type } from "
|
|
1
|
+
import { Type } from "typebox";
|
|
2
2
|
import { quotaAttributes, quotaIdentity, quotaLanguageAttributes } from "./attributes";
|
|
3
3
|
export { quotaID } from "./attributes";
|
|
4
4
|
/** Schema for a quota. */
|
|
5
|
-
export const quota = Type.
|
|
5
|
+
export const quota = Type.Interface([quotaIdentity, quotaAttributes], {});
|
|
6
6
|
/** Schema for a quota language version. */
|
|
7
7
|
export const quotaLanguage = quotaLanguageAttributes;
|
|
8
8
|
/** Schema for creating a quota. */
|
|
9
9
|
export const quotaCreate = quotaAttributes;
|
|
10
10
|
/** Schema for updating a quota. */
|
|
11
|
-
export const quotaUpdate = Type.
|
|
11
|
+
export const quotaUpdate = Type.Interface([Type.Partial(quotaIdentity), quotaCreate], {}, {
|
|
12
12
|
description: "Set id to reuse an existing quota, or leave it empty to create a new one.",
|
|
13
13
|
});
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
/** Schema for a quota with a count of its signups. */
|
|
3
|
-
export declare const quotaWithSignupCount:
|
|
4
|
-
id:
|
|
5
|
-
title:
|
|
6
|
-
size:
|
|
7
|
-
signupCount:
|
|
3
|
+
export declare const quotaWithSignupCount: Type.TObject<{
|
|
4
|
+
id: Type.TString;
|
|
5
|
+
title: Type.TString;
|
|
6
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
7
|
+
signupCount: Type.TInteger;
|
|
8
8
|
}>;
|
|
9
9
|
/** Schema for a quota with public information of its signups. */
|
|
10
|
-
export declare const userQuotaWithSignups:
|
|
11
|
-
id:
|
|
12
|
-
title:
|
|
13
|
-
size:
|
|
14
|
-
signupCount:
|
|
15
|
-
signups:
|
|
16
|
-
firstName:
|
|
17
|
-
lastName:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
export declare const userQuotaWithSignups: Type.TObject<{
|
|
11
|
+
id: Type.TString;
|
|
12
|
+
title: Type.TString;
|
|
13
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
14
|
+
signupCount: Type.TInteger;
|
|
15
|
+
signups: Type.TArray<Type.TObject<{
|
|
16
|
+
firstName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
17
|
+
lastName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
18
|
+
namePublic: Type.TBoolean;
|
|
19
|
+
answers: Type.TArray<Type.TObject<{
|
|
20
|
+
questionId: Type.TString;
|
|
21
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
21
22
|
}>>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
confirmed: import("@sinclair/typebox").TBoolean;
|
|
23
|
+
status: Type.TUnion<[Type.TEnum<[import("../..").SignupStatus.IN_QUOTA, import("../..").SignupStatus.IN_OPEN_QUOTA, import("../..").SignupStatus.IN_QUEUE]>, Type.TNull]>;
|
|
24
|
+
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
25
|
+
createdAt: Type.TString;
|
|
26
|
+
confirmed: Type.TBoolean;
|
|
27
27
|
}>>;
|
|
28
28
|
}>;
|
|
29
29
|
/** Schema for a quota with full information of its signups. */
|
|
30
|
-
export declare const adminQuotaWithSignups:
|
|
31
|
-
id:
|
|
32
|
-
title:
|
|
33
|
-
size:
|
|
34
|
-
signupCount:
|
|
35
|
-
signups:
|
|
36
|
-
id:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
export declare const adminQuotaWithSignups: Type.TObject<{
|
|
31
|
+
id: Type.TString;
|
|
32
|
+
title: Type.TString;
|
|
33
|
+
size: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
34
|
+
signupCount: Type.TInteger;
|
|
35
|
+
signups: Type.TArray<Type.TObject<{
|
|
36
|
+
id: Type.TString;
|
|
37
|
+
firstName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
38
|
+
lastName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
39
|
+
email: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
40
|
+
namePublic: Type.TBoolean;
|
|
41
|
+
answers: Type.TArray<Type.TObject<{
|
|
42
|
+
questionId: Type.TString;
|
|
43
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
43
44
|
}>>;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
confirmed: import("@sinclair/typebox").TBoolean;
|
|
45
|
+
status: Type.TUnion<[Type.TEnum<[import("../..").SignupStatus.IN_QUOTA, import("../..").SignupStatus.IN_OPEN_QUOTA, import("../..").SignupStatus.IN_QUEUE]>, Type.TNull]>;
|
|
46
|
+
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
47
|
+
createdAt: Type.TString;
|
|
48
|
+
confirmed: Type.TBoolean;
|
|
49
49
|
}>>;
|
|
50
50
|
}>;
|
|
51
51
|
/** Schema for a quota with a count of its signups. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/quotaWithSignups/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/quotaWithSignups/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAKvC,sDAAsD;AACtD,eAAO,MAAM,oBAAoB;;;;;EAI/B,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEH,sDAAsD;AACtD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,kEAAkE;AAClE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import { Type } from "
|
|
1
|
+
import { Type } from "typebox";
|
|
2
2
|
import { quota } from "../quota";
|
|
3
3
|
import { adminSignupSchema, publicSignupSchema } from "../signup";
|
|
4
4
|
/** Schema for a quota with a count of its signups. */
|
|
5
|
-
export const quotaWithSignupCount = Type.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
signupCount: Type.Integer({
|
|
9
|
-
description: "Total number of signups in this quota.",
|
|
10
|
-
}),
|
|
5
|
+
export const quotaWithSignupCount = Type.Interface([quota], {
|
|
6
|
+
signupCount: Type.Integer({
|
|
7
|
+
description: "Total number of signups in this quota.",
|
|
11
8
|
}),
|
|
12
|
-
|
|
9
|
+
});
|
|
13
10
|
/** Schema for a quota with public information of its signups. */
|
|
14
|
-
export const userQuotaWithSignups = Type.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
signups: Type.Array(publicSignupSchema, {
|
|
18
|
-
description: "Public information of signups in the quota.",
|
|
19
|
-
}),
|
|
11
|
+
export const userQuotaWithSignups = Type.Interface([quotaWithSignupCount], {
|
|
12
|
+
signups: Type.Array(publicSignupSchema, {
|
|
13
|
+
description: "Public information of signups in the quota.",
|
|
20
14
|
}),
|
|
21
|
-
|
|
15
|
+
});
|
|
22
16
|
/** Schema for a quota with full information of its signups. */
|
|
23
|
-
export const adminQuotaWithSignups = Type.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
signups: Type.Array(adminSignupSchema, {
|
|
27
|
-
description: "Signups in the quota.",
|
|
28
|
-
}),
|
|
17
|
+
export const adminQuotaWithSignups = Type.Interface([quotaWithSignupCount], {
|
|
18
|
+
signups: Type.Array(adminSignupSchema, {
|
|
19
|
+
description: "Signups in the quota.",
|
|
29
20
|
}),
|
|
30
|
-
|
|
21
|
+
});
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
1
2
|
import { SignupStatus } from "../../enum";
|
|
2
|
-
export declare const signupID:
|
|
3
|
-
export declare const signupIdentity:
|
|
4
|
-
id:
|
|
3
|
+
export declare const signupID: Type.TString;
|
|
4
|
+
export declare const signupIdentity: Type.TObject<{
|
|
5
|
+
id: Type.TString;
|
|
5
6
|
}>;
|
|
6
|
-
export declare const editToken:
|
|
7
|
+
export declare const editToken: Type.TString;
|
|
7
8
|
/** Answer to a single signup question */
|
|
8
|
-
export declare const signupAnswer:
|
|
9
|
-
questionId:
|
|
10
|
-
answer:
|
|
9
|
+
export declare const signupAnswer: Type.TObject<{
|
|
10
|
+
questionId: Type.TString;
|
|
11
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
11
12
|
}>;
|
|
12
13
|
/** Editable attributes of a signup. */
|
|
13
|
-
export declare const editableSignupAttributes:
|
|
14
|
-
firstName:
|
|
15
|
-
lastName:
|
|
16
|
-
email:
|
|
17
|
-
namePublic:
|
|
18
|
-
answers:
|
|
19
|
-
questionId:
|
|
20
|
-
answer:
|
|
14
|
+
export declare const editableSignupAttributes: Type.TObject<{
|
|
15
|
+
firstName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
16
|
+
lastName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
17
|
+
email: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
18
|
+
namePublic: Type.TBoolean;
|
|
19
|
+
answers: Type.TArray<Type.TObject<{
|
|
20
|
+
questionId: Type.TString;
|
|
21
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
21
22
|
}>>;
|
|
22
23
|
}>;
|
|
23
24
|
/** Editable attributes of a signup with non-public information removed. */
|
|
24
|
-
export declare const publicEditableSignupAttributes:
|
|
25
|
-
firstName:
|
|
26
|
-
lastName:
|
|
27
|
-
namePublic:
|
|
28
|
-
answers:
|
|
29
|
-
questionId:
|
|
30
|
-
answer:
|
|
25
|
+
export declare const publicEditableSignupAttributes: Type.TObject<{
|
|
26
|
+
firstName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
27
|
+
lastName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
28
|
+
namePublic: Type.TBoolean;
|
|
29
|
+
answers: Type.TArray<Type.TObject<{
|
|
30
|
+
questionId: Type.TString;
|
|
31
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
31
32
|
}>>;
|
|
32
33
|
}>;
|
|
33
34
|
/** Non-editable, automatically updated signup attributes. */
|
|
34
|
-
export declare const dynamicSignupAttributes:
|
|
35
|
-
status:
|
|
36
|
-
position:
|
|
37
|
-
createdAt:
|
|
38
|
-
confirmed:
|
|
35
|
+
export declare const dynamicSignupAttributes: Type.TObject<{
|
|
36
|
+
status: Type.TUnion<[Type.TEnum<[SignupStatus.IN_QUOTA, SignupStatus.IN_OPEN_QUOTA, SignupStatus.IN_QUEUE]>, Type.TNull]>;
|
|
37
|
+
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
38
|
+
createdAt: Type.TString;
|
|
39
|
+
confirmed: Type.TBoolean;
|
|
39
40
|
}>;
|
|
40
41
|
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/signup/attributes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/signup/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,eAAO,MAAM,QAAQ,cAMnB,CAAC;AAEH,eAAO,MAAM,cAAc;;EAEzB,CAAC;AAMH,eAAO,MAAM,SAAS,cAEpB,CAAC;AAEH,yCAAyC;AACzC,eAAO,MAAM,YAAY;;;EAevB,CAAC;AAEH,uCAAuC;AACvC,eAAO,MAAM,wBAAwB;;;;;;;;;EAiBnC,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,8BAA8B;;;;;;;;EAWzC,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,uBAAuB;;;;;EAclC,CAAC"}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
import { editToken, signupID } from "./attributes";
|
|
3
3
|
/** Request body for creating a signup. */
|
|
4
|
-
export declare const signupCreateBody:
|
|
5
|
-
quotaId:
|
|
4
|
+
export declare const signupCreateBody: Type.TObject<{
|
|
5
|
+
quotaId: Type.TString;
|
|
6
6
|
}>;
|
|
7
7
|
/** Response schema for successfully creating a signup. */
|
|
8
|
-
export declare const signupCreateResponse:
|
|
9
|
-
id:
|
|
10
|
-
editToken:
|
|
8
|
+
export declare const signupCreateResponse: Type.TObject<{
|
|
9
|
+
id: Type.TString;
|
|
10
|
+
editToken: Type.TString;
|
|
11
11
|
}>;
|
|
12
12
|
/** Request body for editing an existing signup. */
|
|
13
|
-
export declare const signupUpdateBody:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
export declare const signupUpdateBody: Type.TObject<{
|
|
14
|
+
firstName: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
15
|
+
lastName: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
16
|
+
email: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
17
|
+
namePublic: Type.TOptional<Type.TBoolean>;
|
|
18
|
+
answers: Type.TOptional<Type.TArray<Type.TObject<{
|
|
19
|
+
questionId: Type.TString;
|
|
20
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
20
21
|
}>>>;
|
|
21
|
-
|
|
22
|
-
language: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
22
|
+
language: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
23
23
|
}>;
|
|
24
24
|
/** Request body for editing an existing signup as an admin. */
|
|
25
|
-
export declare const adminSignupUpdateBody:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
export declare const adminSignupUpdateBody: Type.TObject<{
|
|
26
|
+
firstName: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
27
|
+
lastName: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
28
|
+
email: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
29
|
+
namePublic: Type.TOptional<Type.TBoolean>;
|
|
30
|
+
answers: Type.TOptional<Type.TArray<Type.TObject<{
|
|
31
|
+
questionId: Type.TString;
|
|
32
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
32
33
|
}>>>;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
sendEmail: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
34
|
+
language: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
35
|
+
sendEmail: Type.TOptional<Type.TBoolean>;
|
|
36
36
|
}>;
|
|
37
37
|
/** Request body for creating a signup as an admin. */
|
|
38
|
-
export declare const adminSignupCreateBody:
|
|
39
|
-
quotaId:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
export declare const adminSignupCreateBody: Type.TObject<{
|
|
39
|
+
quotaId: Type.TString;
|
|
40
|
+
firstName: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
41
|
+
lastName: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
42
|
+
email: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
43
|
+
namePublic: Type.TOptional<Type.TBoolean>;
|
|
44
|
+
answers: Type.TOptional<Type.TArray<Type.TObject<{
|
|
45
|
+
questionId: Type.TString;
|
|
46
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
46
47
|
}>>>;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
sendEmail: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
48
|
+
language: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
49
|
+
sendEmail: Type.TOptional<Type.TBoolean>;
|
|
50
50
|
}>;
|
|
51
51
|
/** Response schema for successfully editing a signup. */
|
|
52
|
-
export declare const signupUpdateResponse:
|
|
53
|
-
id:
|
|
52
|
+
export declare const signupUpdateResponse: Type.TObject<{
|
|
53
|
+
id: Type.TString;
|
|
54
54
|
}>;
|
|
55
55
|
/** Schema for signups in event details from the public API. */
|
|
56
|
-
export declare const publicSignupSchema:
|
|
57
|
-
firstName:
|
|
58
|
-
lastName:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
export declare const publicSignupSchema: Type.TObject<{
|
|
57
|
+
firstName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
58
|
+
lastName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
59
|
+
namePublic: Type.TBoolean;
|
|
60
|
+
answers: Type.TArray<Type.TObject<{
|
|
61
|
+
questionId: Type.TString;
|
|
62
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
62
63
|
}>>;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
confirmed: import("@sinclair/typebox").TBoolean;
|
|
64
|
+
status: Type.TUnion<[Type.TEnum<[import("../..").SignupStatus.IN_QUOTA, import("../..").SignupStatus.IN_OPEN_QUOTA, import("../..").SignupStatus.IN_QUEUE]>, Type.TNull]>;
|
|
65
|
+
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
66
|
+
createdAt: Type.TString;
|
|
67
|
+
confirmed: Type.TBoolean;
|
|
68
68
|
}>;
|
|
69
69
|
/** Schema for signups in event details from the admin API. */
|
|
70
|
-
export declare const adminSignupSchema:
|
|
71
|
-
id:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
export declare const adminSignupSchema: Type.TObject<{
|
|
71
|
+
id: Type.TString;
|
|
72
|
+
firstName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
73
|
+
lastName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
74
|
+
email: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
75
|
+
namePublic: Type.TBoolean;
|
|
76
|
+
answers: Type.TArray<Type.TObject<{
|
|
77
|
+
questionId: Type.TString;
|
|
78
|
+
answer: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
78
79
|
}>>;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
confirmed: import("@sinclair/typebox").TBoolean;
|
|
80
|
+
status: Type.TUnion<[Type.TEnum<[import("../..").SignupStatus.IN_QUOTA, import("../..").SignupStatus.IN_OPEN_QUOTA, import("../..").SignupStatus.IN_QUEUE]>, Type.TNull]>;
|
|
81
|
+
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
82
|
+
createdAt: Type.TString;
|
|
83
|
+
confirmed: Type.TBoolean;
|
|
84
84
|
}>;
|
|
85
85
|
/** Path parameters necessary to fetch and manipulate signups. */
|
|
86
|
-
export declare const signupPathParams:
|
|
87
|
-
id:
|
|
86
|
+
export declare const signupPathParams: Type.TObject<{
|
|
87
|
+
id: Type.TString;
|
|
88
88
|
}>;
|
|
89
89
|
/** Signup ID type. Randomly generated alphanumeric string. */
|
|
90
90
|
export type SignupID = Static<typeof signupID>;
|