@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,15 +1,16 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
1
2
|
import { AuditEvent } from "../../enum";
|
|
2
3
|
/** Schema for an audit log item. */
|
|
3
|
-
export declare const auditLogItemAttributes:
|
|
4
|
-
id:
|
|
5
|
-
user:
|
|
6
|
-
ipAddress:
|
|
7
|
-
action:
|
|
8
|
-
eventId:
|
|
9
|
-
eventName:
|
|
10
|
-
signupId:
|
|
11
|
-
signupName:
|
|
12
|
-
extra:
|
|
13
|
-
createdAt:
|
|
4
|
+
export declare const auditLogItemAttributes: Type.TObject<{
|
|
5
|
+
id: Type.TInteger;
|
|
6
|
+
user: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
7
|
+
ipAddress: Type.TString;
|
|
8
|
+
action: Type.TEnum<[AuditEvent.CREATE_EVENT, AuditEvent.DELETE_EVENT, AuditEvent.PUBLISH_EVENT, AuditEvent.UNPUBLISH_EVENT, AuditEvent.EDIT_EVENT, AuditEvent.PROMOTE_SIGNUP, AuditEvent.CREATE_SIGNUP, AuditEvent.DELETE_SIGNUP, AuditEvent.EDIT_SIGNUP, AuditEvent.CREATE_USER, AuditEvent.DELETE_USER, AuditEvent.RESET_PASSWORD, AuditEvent.CHANGE_PASSWORD]>;
|
|
9
|
+
eventId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
10
|
+
eventName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
11
|
+
signupId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
12
|
+
signupName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
13
|
+
extra: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
14
|
+
createdAt: Type.TString;
|
|
14
15
|
}>;
|
|
15
16
|
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/auditLog/attributes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/schema/auditLog/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAKxC,oCAAoC;AACpC,eAAO,MAAM,sBAAsB;;;;;;;;;;;EAiCjC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.auditLogItemAttributes = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
/* eslint-disable import/prefer-default-export */
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
import { AuditEvent } from "../../enum";
|
|
3
3
|
import { auditLogItemAttributes } from "./attributes";
|
|
4
|
+
/** Default limit for audit log queries. */
|
|
5
|
+
export declare const AUDIT_LOG_DEFAULT_LIMIT = 100;
|
|
4
6
|
/** Query parameters applicable to the audit log API. */
|
|
5
|
-
export declare const auditLoqQuery:
|
|
6
|
-
user:
|
|
7
|
-
ip:
|
|
8
|
-
action:
|
|
9
|
-
event:
|
|
10
|
-
signup:
|
|
11
|
-
limit:
|
|
12
|
-
offset:
|
|
7
|
+
export declare const auditLoqQuery: Type.TObject<{
|
|
8
|
+
user: Type.TOptional<Type.TString>;
|
|
9
|
+
ip: Type.TOptional<Type.TString>;
|
|
10
|
+
action: Type.TOptional<Type.TArray<Type.TEnum<[AuditEvent.CREATE_EVENT, AuditEvent.DELETE_EVENT, AuditEvent.PUBLISH_EVENT, AuditEvent.UNPUBLISH_EVENT, AuditEvent.EDIT_EVENT, AuditEvent.PROMOTE_SIGNUP, AuditEvent.CREATE_SIGNUP, AuditEvent.DELETE_SIGNUP, AuditEvent.EDIT_SIGNUP, AuditEvent.CREATE_USER, AuditEvent.DELETE_USER, AuditEvent.RESET_PASSWORD, AuditEvent.CHANGE_PASSWORD]>>>;
|
|
11
|
+
event: Type.TOptional<Type.TString>;
|
|
12
|
+
signup: Type.TOptional<Type.TString>;
|
|
13
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
14
|
+
offset: Type.TOptional<Type.TInteger>;
|
|
13
15
|
}>;
|
|
14
16
|
/** Response schema for fetching audit logs. */
|
|
15
|
-
export declare const auditLogResponse:
|
|
16
|
-
rows:
|
|
17
|
-
id:
|
|
18
|
-
user:
|
|
19
|
-
ipAddress:
|
|
20
|
-
action:
|
|
21
|
-
eventId:
|
|
22
|
-
eventName:
|
|
23
|
-
signupId:
|
|
24
|
-
signupName:
|
|
25
|
-
extra:
|
|
26
|
-
createdAt:
|
|
17
|
+
export declare const auditLogResponse: Type.TObject<{
|
|
18
|
+
rows: Type.TArray<Type.TObject<{
|
|
19
|
+
id: Type.TInteger;
|
|
20
|
+
user: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
21
|
+
ipAddress: Type.TString;
|
|
22
|
+
action: Type.TEnum<[AuditEvent.CREATE_EVENT, AuditEvent.DELETE_EVENT, AuditEvent.PUBLISH_EVENT, AuditEvent.UNPUBLISH_EVENT, AuditEvent.EDIT_EVENT, AuditEvent.PROMOTE_SIGNUP, AuditEvent.CREATE_SIGNUP, AuditEvent.DELETE_SIGNUP, AuditEvent.EDIT_SIGNUP, AuditEvent.CREATE_USER, AuditEvent.DELETE_USER, AuditEvent.RESET_PASSWORD, AuditEvent.CHANGE_PASSWORD]>;
|
|
23
|
+
eventId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
24
|
+
eventName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
25
|
+
signupId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
26
|
+
signupName: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
27
|
+
extra: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
28
|
+
createdAt: Type.TString;
|
|
27
29
|
}>>;
|
|
28
|
-
count:
|
|
30
|
+
count: Type.TInteger;
|
|
29
31
|
}>;
|
|
30
32
|
/** Query parameters applicable to the audit log API. */
|
|
31
33
|
export type AuditLoqQuery = Static<typeof auditLoqQuery>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/auditLog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/auditLog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,2CAA2C;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,wDAAwD;AACxD,eAAO,MAAM,aAAa;;;;;;;;EAyCxB,CAAC;AAEH,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AACzD,qCAAqC;AACrC,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,iDAAiD;AACjD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.auditLogResponse = exports.auditLoqQuery = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
3
|
+
exports.auditLogResponse = exports.auditLoqQuery = exports.AUDIT_LOG_DEFAULT_LIMIT = void 0;
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const attributes_1 = require("./attributes");
|
|
7
|
+
/** Default limit for audit log queries. */
|
|
8
|
+
exports.AUDIT_LOG_DEFAULT_LIMIT = 100;
|
|
7
9
|
/** Query parameters applicable to the audit log API. */
|
|
8
10
|
exports.auditLoqQuery = typebox_1.Type.Object({
|
|
9
11
|
user: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
@@ -23,7 +25,7 @@ exports.auditLoqQuery = typebox_1.Type.Object({
|
|
|
23
25
|
})),
|
|
24
26
|
limit: typebox_1.Type.Optional(typebox_1.Type.Integer({
|
|
25
27
|
minimum: 0,
|
|
26
|
-
default:
|
|
28
|
+
default: exports.AUDIT_LOG_DEFAULT_LIMIT,
|
|
27
29
|
description: "Maximum number of log events to return.",
|
|
28
30
|
})),
|
|
29
31
|
offset: typebox_1.Type.Optional(typebox_1.Type.Integer({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
/** Type of an event category. */
|
|
3
|
-
export declare const eventCategory:
|
|
3
|
+
export declare const eventCategory: Type.TString;
|
|
4
4
|
/** Response schema for fetching event categories. */
|
|
5
|
-
export declare const categoriesResponse:
|
|
5
|
+
export declare const categoriesResponse: Type.TArray<Type.TString>;
|
|
6
6
|
/** Type of an event category. */
|
|
7
7
|
export type EventCategory = Static<typeof eventCategory>;
|
|
8
8
|
/** Response schema for fetching event categories. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/category/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/category/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvC,iCAAiC;AACjC,eAAO,MAAM,aAAa,cAExB,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,2BAA4B,CAAC;AAE5D,iCAAiC;AACjC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AACzD,qDAAqD;AACrD,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.categoriesResponse = exports.eventCategory = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
/** Type of an event category. */
|
|
6
6
|
exports.eventCategory = typebox_1.Type.String({
|
|
7
7
|
description: "Category tag for events.",
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { Static } from "
|
|
1
|
+
import { Static, Type } from "typebox";
|
|
2
2
|
import { ErrorCode, SignupFieldError } from "../../enum";
|
|
3
3
|
/** Response schema for a generic error. */
|
|
4
|
-
export declare const errorResponse:
|
|
5
|
-
statusCode:
|
|
6
|
-
code:
|
|
7
|
-
message:
|
|
4
|
+
export declare const errorResponse: Type.TObject<{
|
|
5
|
+
statusCode: Type.TNumber;
|
|
6
|
+
code: Type.TOptional<Type.TEnum<[ErrorCode.BAD_SESSION, ErrorCode.EDIT_CONFLICT, ErrorCode.WOULD_MOVE_SIGNUPS_TO_QUEUE, ErrorCode.WRONG_OLD_PASSWORD, ErrorCode.SIGNUPS_CLOSED, ErrorCode.NO_SUCH_QUOTA, ErrorCode.NO_SUCH_SIGNUP, ErrorCode.BAD_EDIT_TOKEN, ErrorCode.CANNOT_DELETE_SELF, ErrorCode.INITIAL_SETUP_NEEDED, ErrorCode.INITIAL_SETUP_ALREADY_DONE, ErrorCode.SIGNUP_VALIDATION_ERROR, ErrorCode.EVENT_VALIDATION_ERROR, ErrorCode.VALIDATION_ERROR]>>;
|
|
7
|
+
message: Type.TString;
|
|
8
8
|
}>;
|
|
9
9
|
/** Response schema for an edit conflicting with another edit on the server. */
|
|
10
|
-
export declare const editConflictError:
|
|
11
|
-
statusCode:
|
|
12
|
-
code:
|
|
13
|
-
message:
|
|
14
|
-
updatedAt:
|
|
15
|
-
deletedQuotas:
|
|
16
|
-
deletedQuestions:
|
|
10
|
+
export declare const editConflictError: Type.TObject<{
|
|
11
|
+
statusCode: Type.TNumber;
|
|
12
|
+
code: Type.TOptional<Type.TEnum<[ErrorCode.BAD_SESSION, ErrorCode.EDIT_CONFLICT, ErrorCode.WOULD_MOVE_SIGNUPS_TO_QUEUE, ErrorCode.WRONG_OLD_PASSWORD, ErrorCode.SIGNUPS_CLOSED, ErrorCode.NO_SUCH_QUOTA, ErrorCode.NO_SUCH_SIGNUP, ErrorCode.BAD_EDIT_TOKEN, ErrorCode.CANNOT_DELETE_SELF, ErrorCode.INITIAL_SETUP_NEEDED, ErrorCode.INITIAL_SETUP_ALREADY_DONE, ErrorCode.SIGNUP_VALIDATION_ERROR, ErrorCode.EVENT_VALIDATION_ERROR, ErrorCode.VALIDATION_ERROR]>>;
|
|
13
|
+
message: Type.TString;
|
|
14
|
+
updatedAt: Type.TString;
|
|
15
|
+
deletedQuotas: Type.TArray<Type.TString>;
|
|
16
|
+
deletedQuestions: Type.TArray<Type.TString>;
|
|
17
17
|
}>;
|
|
18
18
|
/** Response schema for an edit that would move some signups back to the queue. */
|
|
19
|
-
export declare const wouldMoveSignupsToQueueError:
|
|
20
|
-
statusCode:
|
|
21
|
-
code:
|
|
22
|
-
message:
|
|
23
|
-
count:
|
|
19
|
+
export declare const wouldMoveSignupsToQueueError: Type.TObject<{
|
|
20
|
+
statusCode: Type.TNumber;
|
|
21
|
+
code: Type.TOptional<Type.TEnum<[ErrorCode.BAD_SESSION, ErrorCode.EDIT_CONFLICT, ErrorCode.WOULD_MOVE_SIGNUPS_TO_QUEUE, ErrorCode.WRONG_OLD_PASSWORD, ErrorCode.SIGNUPS_CLOSED, ErrorCode.NO_SUCH_QUOTA, ErrorCode.NO_SUCH_SIGNUP, ErrorCode.BAD_EDIT_TOKEN, ErrorCode.CANNOT_DELETE_SELF, ErrorCode.INITIAL_SETUP_NEEDED, ErrorCode.INITIAL_SETUP_ALREADY_DONE, ErrorCode.SIGNUP_VALIDATION_ERROR, ErrorCode.EVENT_VALIDATION_ERROR, ErrorCode.VALIDATION_ERROR]>>;
|
|
22
|
+
message: Type.TString;
|
|
23
|
+
count: Type.TInteger;
|
|
24
24
|
}>;
|
|
25
25
|
/** Schema for validation errors on a signup. */
|
|
26
|
-
declare const signupValidationErrors:
|
|
27
|
-
firstName:
|
|
28
|
-
lastName:
|
|
29
|
-
email:
|
|
30
|
-
answers:
|
|
26
|
+
declare const signupValidationErrors: Type.TObject<{
|
|
27
|
+
firstName: Type.TOptional<Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>;
|
|
28
|
+
lastName: Type.TOptional<Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>;
|
|
29
|
+
email: Type.TOptional<Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>;
|
|
30
|
+
answers: Type.TOptional<Type.TRecord<"^.*$", Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>>;
|
|
31
31
|
}>;
|
|
32
32
|
/** Schema for validation errors on a signup. */
|
|
33
33
|
export type SignupValidationErrors = Static<typeof signupValidationErrors>;
|
|
34
34
|
/** Response schema for an invalid signup edit. */
|
|
35
|
-
export declare const signupValidationError:
|
|
36
|
-
statusCode:
|
|
37
|
-
code:
|
|
38
|
-
message:
|
|
39
|
-
errors:
|
|
40
|
-
firstName:
|
|
41
|
-
lastName:
|
|
42
|
-
email:
|
|
43
|
-
answers:
|
|
35
|
+
export declare const signupValidationError: Type.TObject<{
|
|
36
|
+
statusCode: Type.TNumber;
|
|
37
|
+
code: Type.TOptional<Type.TEnum<[ErrorCode.BAD_SESSION, ErrorCode.EDIT_CONFLICT, ErrorCode.WOULD_MOVE_SIGNUPS_TO_QUEUE, ErrorCode.WRONG_OLD_PASSWORD, ErrorCode.SIGNUPS_CLOSED, ErrorCode.NO_SUCH_QUOTA, ErrorCode.NO_SUCH_SIGNUP, ErrorCode.BAD_EDIT_TOKEN, ErrorCode.CANNOT_DELETE_SELF, ErrorCode.INITIAL_SETUP_NEEDED, ErrorCode.INITIAL_SETUP_ALREADY_DONE, ErrorCode.SIGNUP_VALIDATION_ERROR, ErrorCode.EVENT_VALIDATION_ERROR, ErrorCode.VALIDATION_ERROR]>>;
|
|
38
|
+
message: Type.TString;
|
|
39
|
+
errors: Type.TObject<{
|
|
40
|
+
firstName: Type.TOptional<Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>;
|
|
41
|
+
lastName: Type.TOptional<Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>;
|
|
42
|
+
email: Type.TOptional<Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>;
|
|
43
|
+
answers: Type.TOptional<Type.TRecord<"^.*$", Type.TEnum<[SignupFieldError.MISSING, SignupFieldError.WRONG_TYPE, SignupFieldError.TOO_LONG, SignupFieldError.INVALID_EMAIL, SignupFieldError.NOT_A_NUMBER, SignupFieldError.NOT_AN_OPTION]>>>;
|
|
44
44
|
}>;
|
|
45
45
|
}>;
|
|
46
46
|
/** Response schema for a generic error. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAIzD,2CAA2C;AAC3C,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB;;;;;;;EAW5B,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,4BAA4B;;;;;EAIvC,CAAC;AAEH,gDAAgD;AAChD,QAAA,MAAM,sBAAsB;;;;;EAS1B,CAAC;AAEH,gDAAgD;AAChD,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,kDAAkD;AAClD,eAAO,MAAM,qBAAqB;;;;;;;;;;EAEhC,CAAC;AAEH,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AACzD,+EAA+E;AAC/E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,kFAAkF;AAClF,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACvF,kDAAkD;AAClD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.signupValidationError = exports.wouldMoveSignupsToQueueError = exports.editConflictError = exports.errorResponse = void 0;
|
|
4
|
-
const typebox_1 = require("
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const attributes_1 = require("../question/attributes");
|
|
7
7
|
const attributes_2 = require("../quota/attributes");
|
|
@@ -12,30 +12,24 @@ exports.errorResponse = typebox_1.Type.Object({
|
|
|
12
12
|
message: typebox_1.Type.String(),
|
|
13
13
|
});
|
|
14
14
|
/** Response schema for an edit conflicting with another edit on the server. */
|
|
15
|
-
exports.editConflictError = typebox_1.Type.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
format: "date-time",
|
|
20
|
-
description: "Last update time of the event on the server.",
|
|
21
|
-
}),
|
|
22
|
-
deletedQuotas: typebox_1.Type.Array(attributes_2.quotaID, {
|
|
23
|
-
description: "IDs of quotas that are already deleted on the server.",
|
|
24
|
-
}),
|
|
25
|
-
deletedQuestions: typebox_1.Type.Array(attributes_1.questionID, {
|
|
26
|
-
description: "IDs of questions that are already deleted on the server.",
|
|
27
|
-
}),
|
|
15
|
+
exports.editConflictError = typebox_1.Type.Interface([exports.errorResponse], {
|
|
16
|
+
updatedAt: typebox_1.Type.String({
|
|
17
|
+
format: "date-time",
|
|
18
|
+
description: "Last update time of the event on the server.",
|
|
28
19
|
}),
|
|
29
|
-
|
|
20
|
+
deletedQuotas: typebox_1.Type.Array(attributes_2.quotaID, {
|
|
21
|
+
description: "IDs of quotas that are already deleted on the server.",
|
|
22
|
+
}),
|
|
23
|
+
deletedQuestions: typebox_1.Type.Array(attributes_1.questionID, {
|
|
24
|
+
description: "IDs of questions that are already deleted on the server.",
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
30
27
|
/** Response schema for an edit that would move some signups back to the queue. */
|
|
31
|
-
exports.wouldMoveSignupsToQueueError = typebox_1.Type.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
count: typebox_1.Type.Integer({
|
|
35
|
-
description: "Number of signups that would end up back in the queue if the action is executed.",
|
|
36
|
-
}),
|
|
28
|
+
exports.wouldMoveSignupsToQueueError = typebox_1.Type.Interface([exports.errorResponse], {
|
|
29
|
+
count: typebox_1.Type.Integer({
|
|
30
|
+
description: "Number of signups that would end up back in the queue if the action is executed.",
|
|
37
31
|
}),
|
|
38
|
-
|
|
32
|
+
});
|
|
39
33
|
/** Schema for validation errors on a signup. */
|
|
40
34
|
const signupValidationErrors = typebox_1.Type.Object({
|
|
41
35
|
firstName: typebox_1.Type.Optional(typebox_1.Type.Enum(enum_1.SignupFieldError)),
|
|
@@ -46,9 +40,6 @@ const signupValidationErrors = typebox_1.Type.Object({
|
|
|
46
40
|
})),
|
|
47
41
|
});
|
|
48
42
|
/** Response schema for an invalid signup edit. */
|
|
49
|
-
exports.signupValidationError = typebox_1.Type.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
errors: signupValidationErrors,
|
|
53
|
-
}),
|
|
54
|
-
]);
|
|
43
|
+
exports.signupValidationError = typebox_1.Type.Interface([exports.errorResponse], {
|
|
44
|
+
errors: signupValidationErrors,
|
|
45
|
+
});
|
|
@@ -1,121 +1,122 @@
|
|
|
1
|
-
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
export declare const eventSlug: Type.TString;
|
|
2
3
|
/** Event ID type. Randomly generated alphanumeric string. */
|
|
3
|
-
export declare const eventID:
|
|
4
|
+
export declare const eventID: Type.TString;
|
|
4
5
|
/** Non-editable identity attributes for events. */
|
|
5
|
-
export declare const eventIdentity:
|
|
6
|
-
id:
|
|
6
|
+
export declare const eventIdentity: Type.TObject<{
|
|
7
|
+
id: Type.TString;
|
|
7
8
|
}>;
|
|
8
9
|
/** Event attributes that are public. */
|
|
9
|
-
export declare const publicEventAttributes:
|
|
10
|
-
title:
|
|
11
|
-
slug:
|
|
12
|
-
date:
|
|
13
|
-
endDate:
|
|
14
|
-
registrationStartDate:
|
|
15
|
-
registrationEndDate:
|
|
16
|
-
openQuotaSize:
|
|
17
|
-
category:
|
|
18
|
-
signupsPublic:
|
|
19
|
-
nameQuestion:
|
|
20
|
-
emailQuestion:
|
|
21
|
-
defaultLanguage:
|
|
10
|
+
export declare const publicEventAttributes: Type.TObject<{
|
|
11
|
+
title: Type.TString;
|
|
12
|
+
slug: Type.TString;
|
|
13
|
+
date: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
14
|
+
endDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
15
|
+
registrationStartDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
16
|
+
registrationEndDate: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
17
|
+
openQuotaSize: Type.TInteger;
|
|
18
|
+
category: Type.TString;
|
|
19
|
+
signupsPublic: Type.TBoolean;
|
|
20
|
+
nameQuestion: Type.TBoolean;
|
|
21
|
+
emailQuestion: Type.TBoolean;
|
|
22
|
+
defaultLanguage: Type.TString;
|
|
22
23
|
}>;
|
|
23
24
|
/** Event attributes that are only for admins. */
|
|
24
|
-
export declare const adminOnlyEventAttributes:
|
|
25
|
-
draft:
|
|
26
|
-
listed:
|
|
25
|
+
export declare const adminOnlyEventAttributes: Type.TObject<{
|
|
26
|
+
draft: Type.TBoolean;
|
|
27
|
+
listed: Type.TBoolean;
|
|
27
28
|
}>;
|
|
28
29
|
/** Attributes shared between events/languages that are public. */
|
|
29
|
-
export declare const publicCommonAttributes:
|
|
30
|
-
description:
|
|
31
|
-
price:
|
|
32
|
-
location:
|
|
33
|
-
webpageUrl:
|
|
34
|
-
facebookUrl:
|
|
30
|
+
export declare const publicCommonAttributes: Type.TObject<{
|
|
31
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
32
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
33
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
34
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
35
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
35
36
|
}>;
|
|
36
37
|
/** Attributes shared between events/languages that are only for admins, only in event details. */
|
|
37
|
-
export declare const adminDetailsOnlyCommonAttributes:
|
|
38
|
-
verificationEmail:
|
|
38
|
+
export declare const adminDetailsOnlyCommonAttributes: Type.TObject<{
|
|
39
|
+
verificationEmail: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
39
40
|
}>;
|
|
40
41
|
/** Language version attributes that are public. */
|
|
41
|
-
export declare const publicLanguageAttributes:
|
|
42
|
-
title:
|
|
43
|
-
quotas:
|
|
44
|
-
title:
|
|
42
|
+
export declare const publicLanguageAttributes: Type.TObject<{
|
|
43
|
+
title: Type.TString;
|
|
44
|
+
quotas: Type.TArray<Type.TObject<{
|
|
45
|
+
title: Type.TString;
|
|
45
46
|
}>>;
|
|
46
|
-
questions:
|
|
47
|
-
question:
|
|
48
|
-
options:
|
|
47
|
+
questions: Type.TArray<Type.TObject<{
|
|
48
|
+
question: Type.TString;
|
|
49
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
49
50
|
}>>;
|
|
50
51
|
}>;
|
|
51
52
|
/** Schema for an event language version. */
|
|
52
|
-
export declare const userEventLanguage:
|
|
53
|
-
description:
|
|
54
|
-
price:
|
|
55
|
-
location:
|
|
56
|
-
webpageUrl:
|
|
57
|
-
facebookUrl:
|
|
58
|
-
title:
|
|
59
|
-
quotas:
|
|
60
|
-
title:
|
|
53
|
+
export declare const userEventLanguage: Type.TObject<{
|
|
54
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
55
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
56
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
57
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
58
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
59
|
+
title: Type.TString;
|
|
60
|
+
quotas: Type.TArray<Type.TObject<{
|
|
61
|
+
title: Type.TString;
|
|
61
62
|
}>>;
|
|
62
|
-
questions:
|
|
63
|
-
question:
|
|
64
|
-
options:
|
|
63
|
+
questions: Type.TArray<Type.TObject<{
|
|
64
|
+
question: Type.TString;
|
|
65
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
65
66
|
}>>;
|
|
66
67
|
}>;
|
|
67
68
|
/** Schema for an event language version for admins. */
|
|
68
|
-
export declare const adminEventLanguage:
|
|
69
|
-
description:
|
|
70
|
-
price:
|
|
71
|
-
location:
|
|
72
|
-
webpageUrl:
|
|
73
|
-
facebookUrl:
|
|
74
|
-
title:
|
|
75
|
-
quotas:
|
|
76
|
-
title:
|
|
69
|
+
export declare const adminEventLanguage: Type.TObject<{
|
|
70
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
71
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
72
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
73
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
74
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
75
|
+
title: Type.TString;
|
|
76
|
+
quotas: Type.TArray<Type.TObject<{
|
|
77
|
+
title: Type.TString;
|
|
77
78
|
}>>;
|
|
78
|
-
questions:
|
|
79
|
-
question:
|
|
80
|
-
options:
|
|
79
|
+
questions: Type.TArray<Type.TObject<{
|
|
80
|
+
question: Type.TString;
|
|
81
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
81
82
|
}>>;
|
|
82
|
-
verificationEmail:
|
|
83
|
+
verificationEmail: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
83
84
|
}>;
|
|
84
85
|
/** Schema for the array of event language versions. */
|
|
85
|
-
export declare const userEventLanguages:
|
|
86
|
-
languages:
|
|
87
|
-
description:
|
|
88
|
-
price:
|
|
89
|
-
location:
|
|
90
|
-
webpageUrl:
|
|
91
|
-
facebookUrl:
|
|
92
|
-
title:
|
|
93
|
-
quotas:
|
|
94
|
-
title:
|
|
86
|
+
export declare const userEventLanguages: Type.TObject<{
|
|
87
|
+
languages: Type.TRecord<"^.*$", Type.TObject<{
|
|
88
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
89
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
90
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
91
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
92
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
93
|
+
title: Type.TString;
|
|
94
|
+
quotas: Type.TArray<Type.TObject<{
|
|
95
|
+
title: Type.TString;
|
|
95
96
|
}>>;
|
|
96
|
-
questions:
|
|
97
|
-
question:
|
|
98
|
-
options:
|
|
97
|
+
questions: Type.TArray<Type.TObject<{
|
|
98
|
+
question: Type.TString;
|
|
99
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
99
100
|
}>>;
|
|
100
101
|
}>>;
|
|
101
102
|
}>;
|
|
102
103
|
/** Schema for the array of event language versions for admins. */
|
|
103
|
-
export declare const adminEventLanguages:
|
|
104
|
-
languages:
|
|
105
|
-
description:
|
|
106
|
-
price:
|
|
107
|
-
location:
|
|
108
|
-
webpageUrl:
|
|
109
|
-
facebookUrl:
|
|
110
|
-
title:
|
|
111
|
-
quotas:
|
|
112
|
-
title:
|
|
104
|
+
export declare const adminEventLanguages: Type.TObject<{
|
|
105
|
+
languages: Type.TRecord<"^.*$", Type.TObject<{
|
|
106
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
107
|
+
price: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
108
|
+
location: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
109
|
+
webpageUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
110
|
+
facebookUrl: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
111
|
+
title: Type.TString;
|
|
112
|
+
quotas: Type.TArray<Type.TObject<{
|
|
113
|
+
title: Type.TString;
|
|
113
114
|
}>>;
|
|
114
|
-
questions:
|
|
115
|
-
question:
|
|
116
|
-
options:
|
|
115
|
+
questions: Type.TArray<Type.TObject<{
|
|
116
|
+
question: Type.TString;
|
|
117
|
+
options: Type.TUnion<[Type.TArray<Type.TString>, Type.TNull]>;
|
|
117
118
|
}>>;
|
|
118
|
-
verificationEmail:
|
|
119
|
+
verificationEmail: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
119
120
|
}>>;
|
|
120
121
|
}>;
|
|
121
122
|
//# 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":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAM/B,eAAO,MAAM,SAAS,cAKpB,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,OAAO,cAMlB,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;;;;;;;;;;;;;;EAAyE,CAAC;AAExG,uDAAuD;AACvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAG9B,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;EAE7B,CAAC;AAEH,kEAAkE;AAClE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;EAE9B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
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
|
-
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 utils_1 = require("../utils");
|
|
@@ -113,13 +113,9 @@ exports.publicLanguageAttributes = typebox_1.Type.Object({
|
|
|
113
113
|
questions: typebox_1.Type.Array(question_1.questionLanguage),
|
|
114
114
|
});
|
|
115
115
|
/** Schema for an event language version. */
|
|
116
|
-
exports.userEventLanguage = typebox_1.Type.
|
|
116
|
+
exports.userEventLanguage = typebox_1.Type.Interface([exports.publicCommonAttributes, exports.publicLanguageAttributes], {});
|
|
117
117
|
/** Schema for an event language version for admins. */
|
|
118
|
-
exports.adminEventLanguage = typebox_1.Type.
|
|
119
|
-
exports.publicCommonAttributes,
|
|
120
|
-
exports.publicLanguageAttributes,
|
|
121
|
-
exports.adminDetailsOnlyCommonAttributes,
|
|
122
|
-
]);
|
|
118
|
+
exports.adminEventLanguage = typebox_1.Type.Interface([exports.publicCommonAttributes, exports.publicLanguageAttributes, exports.adminDetailsOnlyCommonAttributes], {});
|
|
123
119
|
/** Schema for the array of event language versions. */
|
|
124
120
|
exports.userEventLanguages = typebox_1.Type.Object({
|
|
125
121
|
languages: typebox_1.Type.Record(typebox_1.Type.String({ maxLength: 8 }), exports.userEventLanguage),
|