@tietokilta/ilmomasiina-models 2.0.0-alpha10

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.
Files changed (84) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +10 -0
  3. package/dist/index.d.ts +9 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +2 -0
  6. package/dist/models/answer.d.ts +9 -0
  7. package/dist/models/answer.d.ts.map +1 -0
  8. package/dist/models/answer.js +2 -0
  9. package/dist/models/auditlog.d.ts +12 -0
  10. package/dist/models/auditlog.d.ts.map +1 -0
  11. package/dist/models/auditlog.js +2 -0
  12. package/dist/models/event.d.ts +24 -0
  13. package/dist/models/event.d.ts.map +1 -0
  14. package/dist/models/event.js +2 -0
  15. package/dist/models/question.d.ts +14 -0
  16. package/dist/models/question.d.ts.map +1 -0
  17. package/dist/models/question.js +4 -0
  18. package/dist/models/quota.d.ts +10 -0
  19. package/dist/models/quota.d.ts.map +1 -0
  20. package/dist/models/quota.js +2 -0
  21. package/dist/models/signup.d.ts +16 -0
  22. package/dist/models/signup.d.ts.map +1 -0
  23. package/dist/models/signup.js +4 -0
  24. package/dist/models/user.d.ts +6 -0
  25. package/dist/models/user.d.ts.map +1 -0
  26. package/dist/models/user.js +2 -0
  27. package/dist/services/admin/categories/index.d.ts +7 -0
  28. package/dist/services/admin/categories/index.d.ts.map +1 -0
  29. package/dist/services/admin/categories/index.js +2 -0
  30. package/dist/services/admin/categories/list.d.ts +2 -0
  31. package/dist/services/admin/categories/list.d.ts.map +1 -0
  32. package/dist/services/admin/categories/list.js +2 -0
  33. package/dist/services/admin/events/create.d.ts +15 -0
  34. package/dist/services/admin/events/create.d.ts.map +1 -0
  35. package/dist/services/admin/events/create.js +38 -0
  36. package/dist/services/admin/events/index.d.ts +32 -0
  37. package/dist/services/admin/events/index.d.ts.map +1 -0
  38. package/dist/services/admin/events/index.js +2 -0
  39. package/dist/services/admin/events/update.d.ts +17 -0
  40. package/dist/services/admin/events/update.d.ts.map +1 -0
  41. package/dist/services/admin/events/update.js +2 -0
  42. package/dist/services/admin/slug/get.d.ts +6 -0
  43. package/dist/services/admin/slug/get.d.ts.map +1 -0
  44. package/dist/services/admin/slug/get.js +2 -0
  45. package/dist/services/admin/slug/index.d.ts +7 -0
  46. package/dist/services/admin/slug/index.d.ts.map +1 -0
  47. package/dist/services/admin/slug/index.js +2 -0
  48. package/dist/services/auditlog/index.d.ts +26 -0
  49. package/dist/services/auditlog/index.d.ts.map +1 -0
  50. package/dist/services/auditlog/index.js +2 -0
  51. package/dist/services/auth/index.d.ts +18 -0
  52. package/dist/services/auth/index.d.ts.map +1 -0
  53. package/dist/services/auth/index.js +2 -0
  54. package/dist/services/events/details.d.ts +45 -0
  55. package/dist/services/events/details.d.ts.map +1 -0
  56. package/dist/services/events/details.js +67 -0
  57. package/dist/services/events/index.d.ts +26 -0
  58. package/dist/services/events/index.d.ts.map +1 -0
  59. package/dist/services/events/index.js +2 -0
  60. package/dist/services/events/list.d.ts +18 -0
  61. package/dist/services/events/list.d.ts.map +1 -0
  62. package/dist/services/events/list.js +26 -0
  63. package/dist/services/signups/create.d.ts +10 -0
  64. package/dist/services/signups/create.d.ts.map +1 -0
  65. package/dist/services/signups/create.js +2 -0
  66. package/dist/services/signups/getForEdit.d.ts +29 -0
  67. package/dist/services/signups/getForEdit.d.ts.map +1 -0
  68. package/dist/services/signups/getForEdit.js +29 -0
  69. package/dist/services/signups/index.d.ts +28 -0
  70. package/dist/services/signups/index.d.ts.map +1 -0
  71. package/dist/services/signups/index.js +2 -0
  72. package/dist/services/signups/update.d.ts +19 -0
  73. package/dist/services/signups/update.d.ts.map +1 -0
  74. package/dist/services/signups/update.js +2 -0
  75. package/dist/services/users/details.d.ts +10 -0
  76. package/dist/services/users/details.d.ts.map +1 -0
  77. package/dist/services/users/details.js +5 -0
  78. package/dist/services/users/index.d.ts +13 -0
  79. package/dist/services/users/index.d.ts.map +1 -0
  80. package/dist/services/users/index.js +2 -0
  81. package/dist/utils.d.ts +5 -0
  82. package/dist/utils.d.ts.map +1 -0
  83. package/dist/utils.js +2 -0
  84. package/package.json +33 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Informaatioverkostojen kilta Athene ry
4
+ Copyright (c) 2021 Tietokilta ry
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # `ilmomasiina-models`
2
+
3
+ This package provides type definitions for the [Ilmomasiina](https://github.com/Tietokilta/ilmomasiina) API.
4
+
5
+ Frontend developers should import the supported types directly from `@tietokilta/ilmomasiina-models`. The files in
6
+ `dist` are not part of the public interface and are only to be used by the backend.
7
+
8
+ **Note:** This package follows the versioning of Ilmomasiina. We will avoid breaking changes in the API, but minor
9
+ versions may occasionally be incompatible with each other. If writing custom frontends, we recommend fixing the
10
+ minor version (`"@tietokilta/ilmomasiina-models": "~2.x.x"` in `package.json`).
@@ -0,0 +1,9 @@
1
+ export type { AdminCategory } from './services/admin/categories';
2
+ export type { AdminEvent } from './services/admin/events';
3
+ export type { AdminSlug } from './services/admin/slug';
4
+ export type { Auth } from './services/auth';
5
+ export type { AuditLog } from './services/auditlog';
6
+ export type { Event, Question, Quota } from './services/events';
7
+ export type { Signup } from './services/signups';
8
+ export type { User } from './services/users';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import QuestionAttributes from './question';
2
+ import SignupAttributes from './signup';
3
+ export default interface AnswerAttributes {
4
+ id: string;
5
+ answer: string;
6
+ questionId: QuestionAttributes['id'];
7
+ signupId: SignupAttributes['id'];
8
+ }
9
+ //# sourceMappingURL=answer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/models/answer.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,YAAY,CAAC;AAC5C,OAAO,gBAAgB,MAAM,UAAU,CAAC;AAExC,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrC,QAAQ,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;CAClC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export default interface AuditLogAttributes {
2
+ id: number;
3
+ user: string | null;
4
+ ipAddress: string;
5
+ action: string | null;
6
+ eventId: string | null;
7
+ eventName: string | null;
8
+ signupId: string | null;
9
+ signupName: string | null;
10
+ extra: string | null;
11
+ }
12
+ //# sourceMappingURL=auditlog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditlog.d.ts","sourceRoot":"","sources":["../../src/models/auditlog.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ export default interface EventAttributes {
2
+ id: string;
3
+ title: string;
4
+ slug: string;
5
+ date: Date | null;
6
+ endDate: Date | null;
7
+ registrationStartDate: Date | null;
8
+ registrationEndDate: Date | null;
9
+ openQuotaSize: number;
10
+ description: string | null;
11
+ price: string | null;
12
+ location: string | null;
13
+ facebookUrl: string | null;
14
+ webpageUrl: string | null;
15
+ category: string;
16
+ draft: boolean;
17
+ listed: boolean;
18
+ signupsPublic: boolean;
19
+ nameQuestion: boolean;
20
+ emailQuestion: boolean;
21
+ verificationEmail: string | null;
22
+ updatedAt: Date;
23
+ }
24
+ //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/models/event.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,eAAe;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,qBAAqB,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,IAAI,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import EventAttributes from './event';
2
+ export declare const questionTypes: readonly ["text", "textarea", "number", "select", "checkbox"];
3
+ export declare type QuestionType = typeof questionTypes[number];
4
+ export default interface QuestionAttributes {
5
+ id: string;
6
+ order: number;
7
+ question: string;
8
+ type: QuestionType;
9
+ options: string | null;
10
+ required: boolean;
11
+ public: boolean;
12
+ eventId: EventAttributes['id'];
13
+ }
14
+ //# sourceMappingURL=question.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../src/models/question.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,aAAa,+DAAgE,CAAC;AAC3F,oBAAY,YAAY,GAAG,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAChC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.questionTypes = void 0;
4
+ exports.questionTypes = ['text', 'textarea', 'number', 'select', 'checkbox'];
@@ -0,0 +1,10 @@
1
+ import EventAttributes from './event';
2
+ export default interface QuotaAttributes {
3
+ id: string;
4
+ order: number;
5
+ title: string;
6
+ size: number | null;
7
+ eventId: EventAttributes['id'];
8
+ signupCount?: number;
9
+ }
10
+ //# sourceMappingURL=quota.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../src/models/quota.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,SAAS,CAAC;AAEtC,MAAM,CAAC,OAAO,WAAW,eAAe;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import QuotaAttributes from './quota';
2
+ export declare const signupStatuses: readonly ["in-quota", "in-open", "in-queue"];
3
+ export declare type SignupStatus = typeof signupStatuses[number];
4
+ export default interface SignupAttributes {
5
+ id: string;
6
+ firstName: string | null;
7
+ lastName: string | null;
8
+ namePublic: boolean;
9
+ email: string | null;
10
+ confirmedAt: Date | null;
11
+ status: SignupStatus | null;
12
+ position: number | null;
13
+ createdAt: Date;
14
+ quotaId: QuotaAttributes['id'];
15
+ }
16
+ //# sourceMappingURL=signup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../src/models/signup.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,cAAc,8CAA+C,CAAC;AAC3E,oBAAY,YAAY,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAChC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.signupStatuses = void 0;
4
+ exports.signupStatuses = ['in-quota', 'in-open', 'in-queue'];
@@ -0,0 +1,6 @@
1
+ export default interface UserAttributes {
2
+ id: number;
3
+ email: string;
4
+ password: string;
5
+ }
6
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/models/user.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { StringifyApi } from '../../../utils';
2
+ import { AdminListCategoriesResponse } from './list';
3
+ export declare type AdminCategoriesServiceTypes = AdminListCategoriesResponse;
4
+ export declare namespace AdminCategory {
5
+ type List = StringifyApi<AdminListCategoriesResponse>;
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/admin/categories/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAErD,oBAAY,2BAA2B,GAAG,2BAA2B,CAAC;AAEtE,yBAAiB,aAAa,CAAC;IAC7B,KAAY,IAAI,GAAG,YAAY,CAAC,2BAA2B,CAAC,CAAC;CAC9D"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export declare type AdminListCategoriesResponse = string[];
2
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/services/admin/categories/list.ts"],"names":[],"mappings":"AAAA,oBAAY,2BAA2B,GAAG,MAAM,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import EventAttributes from '../../../models/event';
2
+ import QuestionAttributes from '../../../models/question';
3
+ import QuotaAttributes from '../../../models/quota';
4
+ export declare const adminEventCreateEventAttrs: readonly ["title", "slug", "date", "endDate", "registrationStartDate", "registrationEndDate", "openQuotaSize", "description", "price", "location", "webpageUrl", "facebookUrl", "category", "draft", "listed", "signupsPublic", "nameQuestion", "emailQuestion", "verificationEmail"];
5
+ export declare const adminEventCreateQuestionAttrs: readonly ["question", "type", "options", "required", "public"];
6
+ export declare const adminEventCreateQuotaAttrs: readonly ["title", "size"];
7
+ export interface AdminEventCreateQuestion extends Pick<QuestionAttributes, typeof adminEventCreateQuestionAttrs[number]> {
8
+ }
9
+ export interface AdminEventCreateQuota extends Pick<QuotaAttributes, typeof adminEventCreateQuotaAttrs[number]> {
10
+ }
11
+ export interface AdminEventCreateBody extends Pick<EventAttributes, typeof adminEventCreateEventAttrs[number]> {
12
+ questions: AdminEventCreateQuestion[];
13
+ quotas: AdminEventCreateQuota[];
14
+ }
15
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/services/admin/events/create.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAC;AACpD,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,eAAe,MAAM,uBAAuB,CAAC;AAGpD,eAAO,MAAM,0BAA0B,uRAoB7B,CAAC;AAGX,eAAO,MAAM,6BAA6B,gEAMhC,CAAC;AAGX,eAAO,MAAM,0BAA0B,4BAG7B,CAAC;AAGX,MAAM,WAAW,wBACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC;CAAG;AAEnF,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAC;CAAG;AAElH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC5G,SAAS,EAAE,wBAAwB,EAAE,CAAC;IACtC,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.adminEventCreateQuotaAttrs = exports.adminEventCreateQuestionAttrs = exports.adminEventCreateEventAttrs = void 0;
4
+ // Attributes included in POST /api/events for Event instances.
5
+ exports.adminEventCreateEventAttrs = [
6
+ 'title',
7
+ 'slug',
8
+ 'date',
9
+ 'endDate',
10
+ 'registrationStartDate',
11
+ 'registrationEndDate',
12
+ 'openQuotaSize',
13
+ 'description',
14
+ 'price',
15
+ 'location',
16
+ 'webpageUrl',
17
+ 'facebookUrl',
18
+ 'category',
19
+ 'draft',
20
+ 'listed',
21
+ 'signupsPublic',
22
+ 'nameQuestion',
23
+ 'emailQuestion',
24
+ 'verificationEmail',
25
+ ];
26
+ // Attributes included in POST /api/events for Question instances.
27
+ exports.adminEventCreateQuestionAttrs = [
28
+ 'question',
29
+ 'type',
30
+ 'options',
31
+ 'required',
32
+ 'public',
33
+ ];
34
+ // Attributes included in POST /api/events for Quota instances.
35
+ exports.adminEventCreateQuotaAttrs = [
36
+ 'title',
37
+ 'size',
38
+ ];
@@ -0,0 +1,32 @@
1
+ import { StringifyApi } from '../../../utils';
2
+ import { AdminEventGetAnswerItem, AdminEventGetQuestionItem, AdminEventGetQuotaItem, AdminEventGetResponse, AdminEventGetSignupItem } from '../../events/details';
3
+ import { AdminEventListItem, AdminEventListQuotaItem, AdminEventListResponse } from '../../events/list';
4
+ import { AdminEventCreateBody, AdminEventCreateQuestion, AdminEventCreateQuota } from './create';
5
+ import { AdminEventUpdateBody, AdminEventUpdateQuestion, AdminEventUpdateQuota } from './update';
6
+ export declare type AdminEventsServiceTypes = AdminEventListResponse | AdminEventGetResponse | AdminEventCreateBody | AdminEventGetResponse | AdminEventUpdateBody | AdminEventGetResponse | null;
7
+ export declare namespace AdminEvent {
8
+ type Id = Details['id'];
9
+ type List = StringifyApi<AdminEventListResponse>;
10
+ namespace List {
11
+ type Event = StringifyApi<AdminEventListItem>;
12
+ type Quota = StringifyApi<AdminEventListQuotaItem>;
13
+ }
14
+ type Details = StringifyApi<AdminEventGetResponse>;
15
+ namespace Details {
16
+ type Quota = StringifyApi<AdminEventGetQuotaItem>;
17
+ type Signup = StringifyApi<AdminEventGetSignupItem>;
18
+ type Question = StringifyApi<AdminEventGetQuestionItem>;
19
+ type Answer = StringifyApi<AdminEventGetAnswerItem>;
20
+ }
21
+ namespace Create {
22
+ type Body = StringifyApi<AdminEventCreateBody>;
23
+ type Question = StringifyApi<AdminEventCreateQuestion>;
24
+ type Quota = StringifyApi<AdminEventCreateQuota>;
25
+ }
26
+ namespace Update {
27
+ type Body = StringifyApi<AdminEventUpdateBody>;
28
+ type Question = StringifyApi<AdminEventUpdateQuestion>;
29
+ type Quota = StringifyApi<AdminEventUpdateQuota>;
30
+ }
31
+ }
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/admin/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,oBAAY,uBAAuB,GACjC,sBAAsB,GACpB,qBAAqB,GACrB,oBAAoB,GAAG,qBAAqB,GAC5C,oBAAoB,GAAG,qBAAqB,GAC5C,IAAI,CAAC;AAET,yBAAiB,UAAU,CAAC;IAC1B,KAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B,KAAY,IAAI,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;IACxD,UAAiB,IAAI,CAAC;QACpB,KAAY,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;QACrD,KAAY,KAAK,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;KAC3D;IAED,KAAY,OAAO,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAC;IAC1D,UAAiB,OAAO,CAAC;QACvB,KAAY,KAAK,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;QACzD,KAAY,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;QAC3D,KAAY,QAAQ,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAC;QAC/D,KAAY,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;KAC5D;IAED,UAAiB,MAAM,CAAC;QACtB,KAAY,IAAI,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC;QACtD,KAAY,QAAQ,GAAG,YAAY,CAAC,wBAAwB,CAAC,CAAC;QAC9D,KAAY,KAAK,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAC;KACzD;IAED,UAAiB,MAAM,CAAC;QACtB,KAAY,IAAI,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC;QACtD,KAAY,QAAQ,GAAG,YAAY,CAAC,wBAAwB,CAAC,CAAC;QAC9D,KAAY,KAAK,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAC;KACzD;CACF"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import EventAttributes from '../../../models/event';
2
+ import QuestionAttributes from '../../../models/question';
3
+ import QuotaAttributes from '../../../models/quota';
4
+ import { adminEventCreateEventAttrs, adminEventCreateQuestionAttrs, adminEventCreateQuotaAttrs } from './create';
5
+ export interface AdminEventUpdateQuestion extends Pick<QuestionAttributes, typeof adminEventCreateQuestionAttrs[number]> {
6
+ id?: QuestionAttributes['id'];
7
+ }
8
+ export interface AdminEventUpdateQuota extends Pick<QuotaAttributes, typeof adminEventCreateQuotaAttrs[number]> {
9
+ id?: QuotaAttributes['id'];
10
+ }
11
+ export interface AdminEventUpdateBody extends Pick<EventAttributes, typeof adminEventCreateEventAttrs[number]> {
12
+ questions: AdminEventUpdateQuestion[];
13
+ quotas: AdminEventUpdateQuota[];
14
+ moveSignupsToQueue?: boolean;
15
+ updatedAt: string;
16
+ }
17
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/services/admin/events/update.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAC;AACpD,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,eAAe,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAGlB,MAAM,WAAW,wBACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC;IAC9E,EAAE,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC7G,EAAE,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC5G,SAAS,EAAE,wBAAwB,EAAE,CAAC;IACtC,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import EventAttributes from '../../../models/event';
2
+ export interface AdminCheckSlugResponse {
3
+ id: EventAttributes['id'] | null;
4
+ title: string | null;
5
+ }
6
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/services/admin/slug/get.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { StringifyApi } from '../../../utils';
2
+ import { AdminCheckSlugResponse } from './get';
3
+ export declare type AdminSlugServiceTypes = AdminCheckSlugResponse;
4
+ export declare namespace AdminSlug {
5
+ type Check = StringifyApi<AdminCheckSlugResponse>;
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/admin/slug/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE/C,oBAAY,qBAAqB,GAAG,sBAAsB,CAAC;AAE3D,yBAAiB,SAAS,CAAC;IACzB,KAAY,KAAK,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;CAC1D"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import AuditLogAttributes from '../../models/auditlog';
2
+ import { StringifyApi } from '../../utils';
3
+ export interface AuditLogQuery {
4
+ user?: string;
5
+ ip?: string;
6
+ action?: string;
7
+ event?: string;
8
+ signup?: string;
9
+ $offset?: number;
10
+ $limit?: number;
11
+ }
12
+ export interface AuditLogItem extends AuditLogAttributes {
13
+ createdAt: Date;
14
+ }
15
+ export interface AuditLogResponse {
16
+ rows: AuditLogItem[];
17
+ count: number;
18
+ }
19
+ export declare namespace AuditLog {
20
+ type List = StringifyApi<AuditLogResponse>;
21
+ namespace List {
22
+ type Query = AuditLogQuery;
23
+ type Item = StringifyApi<AuditLogItem>;
24
+ }
25
+ }
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/auditlog/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACtD,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,QAAQ,CAAC;IACxB,KAAY,IAAI,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAClD,UAAiB,IAAI,CAAC;QACpB,KAAY,KAAK,GAAG,aAAa,CAAC;QAClC,KAAY,IAAI,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;KAC/C;CACF"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { StringifyApi } from '../../utils';
2
+ import { UserDetails } from '../users/details';
3
+ export interface AuthResponse {
4
+ accessToken: string;
5
+ user: UserDetails;
6
+ authentication: {
7
+ strategy: string;
8
+ accessToken: string;
9
+ payload: {
10
+ iat: number;
11
+ exp: number;
12
+ };
13
+ };
14
+ }
15
+ export declare namespace Auth {
16
+ type Response = StringifyApi<AuthResponse>;
17
+ }
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,cAAc,EAAE;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE;YACP,GAAG,EAAE,MAAM,CAAC;YACZ,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;KACH,CAAC;CACH;AAED,yBAAiB,IAAI,CAAC;IACpB,KAAY,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;CACnD"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,45 @@
1
+ import AnswerAttributes from '../../models/answer';
2
+ import EventAttributes from '../../models/event';
3
+ import QuestionAttributes from '../../models/question';
4
+ import QuotaAttributes from '../../models/quota';
5
+ import SignupAttributes from '../../models/signup';
6
+ export declare const eventGetEventAttrs: readonly ["id", "title", "slug", "date", "endDate", "registrationStartDate", "registrationEndDate", "openQuotaSize", "description", "price", "location", "webpageUrl", "facebookUrl", "category", "signupsPublic", "nameQuestion", "emailQuestion"];
7
+ export declare const adminEventGetEventAttrs: readonly ["id", "title", "slug", "date", "endDate", "registrationStartDate", "registrationEndDate", "openQuotaSize", "description", "price", "location", "webpageUrl", "facebookUrl", "category", "signupsPublic", "nameQuestion", "emailQuestion", "draft", "listed", "verificationEmail", "updatedAt"];
8
+ export declare const eventGetQuestionAttrs: readonly ["id", "question", "type", "options", "required", "public"];
9
+ export declare const eventGetQuotaAttrs: readonly ["id", "title", "size"];
10
+ export declare const eventGetSignupAttrs: readonly ["firstName", "lastName", "namePublic", "status", "position", "createdAt"];
11
+ export declare const adminEventGetSignupAttrs: readonly ["firstName", "lastName", "namePublic", "status", "position", "createdAt", "id", "email", "confirmedAt"];
12
+ export declare const eventGetAnswerAttrs: readonly ["questionId", "answer"];
13
+ export interface EventGetQuestionItem extends Omit<Pick<QuestionAttributes, typeof eventGetQuestionAttrs[number]>, 'options'> {
14
+ options: string[] | null;
15
+ }
16
+ export interface EventGetAnswerItem extends Pick<AnswerAttributes, typeof eventGetAnswerAttrs[number]> {
17
+ }
18
+ export interface EventGetSignupItem extends Pick<SignupAttributes, typeof eventGetSignupAttrs[number]> {
19
+ answers: EventGetAnswerItem[];
20
+ confirmed: boolean;
21
+ }
22
+ export interface EventGetQuotaItem extends Pick<QuotaAttributes, typeof eventGetQuotaAttrs[number]> {
23
+ signups: EventGetSignupItem[] | null;
24
+ signupCount: number;
25
+ }
26
+ export interface EventGetResponse extends Pick<EventAttributes, typeof eventGetEventAttrs[number]> {
27
+ questions: EventGetQuestionItem[];
28
+ quotas: EventGetQuotaItem[];
29
+ millisTillOpening: number | null;
30
+ registrationClosed: boolean;
31
+ }
32
+ export declare type AdminEventGetQuestionItem = EventGetQuestionItem;
33
+ export declare type AdminEventGetAnswerItem = EventGetAnswerItem;
34
+ export interface AdminEventGetSignupItem extends Pick<SignupAttributes, typeof adminEventGetSignupAttrs[number]> {
35
+ answers: AdminEventGetAnswerItem[];
36
+ }
37
+ export interface AdminEventGetQuotaItem extends Pick<QuotaAttributes, typeof eventGetQuotaAttrs[number]> {
38
+ signups: AdminEventGetSignupItem[];
39
+ signupCount: number;
40
+ }
41
+ export interface AdminEventGetResponse extends Pick<EventAttributes, typeof adminEventGetEventAttrs[number]> {
42
+ questions: AdminEventGetQuestionItem[];
43
+ quotas: AdminEventGetQuotaItem[];
44
+ }
45
+ //# sourceMappingURL=details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../src/services/events/details.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAGnD,eAAO,MAAM,kBAAkB,qPAkBrB,CAAC;AAGX,eAAO,MAAM,uBAAuB,0SAM1B,CAAC;AAGX,eAAO,MAAM,qBAAqB,sEAOxB,CAAC;AAGX,eAAO,MAAM,kBAAkB,kCAIrB,CAAC;AAGX,eAAO,MAAM,mBAAmB,qFAOtB,CAAC;AAGX,eAAO,MAAM,wBAAwB,mHAK3B,CAAC;AAGX,eAAO,MAAM,mBAAmB,mCAGtB,CAAC;AAIX,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;CAAG;AAEzG,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACpG,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACjG,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAChG,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAID,oBAAY,yBAAyB,GAAG,oBAAoB,CAAC;AAE7D,oBAAY,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;IAC9G,OAAO,EAAE,uBAAuB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACtG,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC1G,SAAS,EAAE,yBAAyB,EAAE,CAAC;IACvC,MAAM,EAAE,sBAAsB,EAAE,CAAC;CAClC"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eventGetAnswerAttrs = exports.adminEventGetSignupAttrs = exports.eventGetSignupAttrs = exports.eventGetQuotaAttrs = exports.eventGetQuestionAttrs = exports.adminEventGetEventAttrs = exports.eventGetEventAttrs = void 0;
4
+ // Attributes included in GET /api/events/ID for Event instances.
5
+ exports.eventGetEventAttrs = [
6
+ 'id',
7
+ 'title',
8
+ 'slug',
9
+ 'date',
10
+ 'endDate',
11
+ 'registrationStartDate',
12
+ 'registrationEndDate',
13
+ 'openQuotaSize',
14
+ 'description',
15
+ 'price',
16
+ 'location',
17
+ 'webpageUrl',
18
+ 'facebookUrl',
19
+ 'category',
20
+ 'signupsPublic',
21
+ 'nameQuestion',
22
+ 'emailQuestion',
23
+ ];
24
+ // Attributes included in GET /api/admin/events/ID for Event instances.
25
+ exports.adminEventGetEventAttrs = [
26
+ ...exports.eventGetEventAttrs,
27
+ 'draft',
28
+ 'listed',
29
+ 'verificationEmail',
30
+ 'updatedAt',
31
+ ];
32
+ // Attributes included in results for Question instances.
33
+ exports.eventGetQuestionAttrs = [
34
+ 'id',
35
+ 'question',
36
+ 'type',
37
+ 'options',
38
+ 'required',
39
+ 'public',
40
+ ];
41
+ // Attributes included in results for Quota instances.
42
+ exports.eventGetQuotaAttrs = [
43
+ 'id',
44
+ 'title',
45
+ 'size',
46
+ ];
47
+ // Attributes included in GET /api/events/ID for Signup instances.
48
+ exports.eventGetSignupAttrs = [
49
+ 'firstName',
50
+ 'lastName',
51
+ 'namePublic',
52
+ 'status',
53
+ 'position',
54
+ 'createdAt',
55
+ ];
56
+ // Attributes included in GET /api/admin/events/ID for Signup instances.
57
+ exports.adminEventGetSignupAttrs = [
58
+ ...exports.eventGetSignupAttrs,
59
+ 'id',
60
+ 'email',
61
+ 'confirmedAt',
62
+ ];
63
+ // Attributes included in results for Answer instances.
64
+ exports.eventGetAnswerAttrs = [
65
+ 'questionId',
66
+ 'answer',
67
+ ];
@@ -0,0 +1,26 @@
1
+ import { StringifyApi } from '../../utils';
2
+ import { EventGetAnswerItem, EventGetQuestionItem, EventGetQuotaItem, EventGetResponse, EventGetSignupItem } from './details';
3
+ import { EventListItem, EventListQuotaItem, EventListResponse } from './list';
4
+ export declare type EventsServiceTypes = EventListResponse | EventGetResponse;
5
+ export declare namespace Event {
6
+ type Slug = Details['slug'];
7
+ type Details = StringifyApi<EventGetResponse>;
8
+ namespace Details {
9
+ type Quota = StringifyApi<EventGetQuotaItem>;
10
+ type Signup = StringifyApi<EventGetSignupItem>;
11
+ type Question = StringifyApi<EventGetQuestionItem>;
12
+ type Answer = StringifyApi<EventGetAnswerItem>;
13
+ }
14
+ type List = StringifyApi<EventListResponse>;
15
+ namespace List {
16
+ type Event = StringifyApi<EventListItem>;
17
+ type Quota = StringifyApi<EventListQuotaItem>;
18
+ }
19
+ }
20
+ export declare namespace Question {
21
+ type Id = Event.Details.Question['id'];
22
+ }
23
+ export declare namespace Quota {
24
+ type Id = Event.Details.Quota['id'];
25
+ }
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE9E,oBAAY,kBAAkB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAEtE,yBAAiB,KAAK,CAAC;IACrB,KAAY,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnC,KAAY,OAAO,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACrD,UAAiB,OAAO,CAAC;QACvB,KAAY,KAAK,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;QACpD,KAAY,MAAM,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;QACtD,KAAY,QAAQ,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC;QAC1D,KAAY,MAAM,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;KACvD;IAED,KAAY,IAAI,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACnD,UAAiB,IAAI,CAAC;QACpB,KAAY,KAAK,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;QAChD,KAAY,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;KACtD;CACF;AAED,yBAAiB,QAAQ,CAAC;IACxB,KAAY,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED,yBAAiB,KAAK,CAAC;IACrB,KAAY,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CAC5C"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import EventAttributes from '../../models/event';
2
+ import QuotaAttributes from '../../models/quota';
3
+ export declare const eventListEventAttrs: readonly ["id", "slug", "title", "date", "endDate", "registrationStartDate", "registrationEndDate", "openQuotaSize", "signupsPublic"];
4
+ export declare const adminEventListEventAttrs: readonly ["id", "slug", "title", "date", "endDate", "registrationStartDate", "registrationEndDate", "openQuotaSize", "signupsPublic", "draft", "listed"];
5
+ export declare const eventListQuotaAttrs: readonly ["id", "title", "size"];
6
+ export interface EventListQuotaItem extends Pick<QuotaAttributes, typeof eventListQuotaAttrs[number]> {
7
+ signupCount: number;
8
+ }
9
+ export interface EventListItem extends Pick<EventAttributes, typeof eventListEventAttrs[number]> {
10
+ quotas: EventListQuotaItem[];
11
+ }
12
+ export declare type EventListResponse = EventListItem[];
13
+ export declare type AdminEventListQuotaItem = EventListQuotaItem;
14
+ export interface AdminEventListItem extends Pick<EventAttributes, typeof adminEventListEventAttrs[number]> {
15
+ quotas: AdminEventListQuotaItem[];
16
+ }
17
+ export declare type AdminEventListResponse = AdminEventListItem[];
18
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/services/events/list.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAGjD,eAAO,MAAM,mBAAmB,uIAUtB,CAAC;AAGX,eAAO,MAAM,wBAAwB,0JAI3B,CAAC;AAEX,eAAO,MAAM,mBAAmB,kCAItB,CAAC;AAIX,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnG,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9F,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,oBAAY,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAIhD,oBAAY,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;IACxG,MAAM,EAAE,uBAAuB,EAAE,CAAC;CACnC;AAED,oBAAY,sBAAsB,GAAG,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eventListQuotaAttrs = exports.adminEventListEventAttrs = exports.eventListEventAttrs = void 0;
4
+ // Attributes included in GET /api/events for Event instances.
5
+ exports.eventListEventAttrs = [
6
+ 'id',
7
+ 'slug',
8
+ 'title',
9
+ 'date',
10
+ 'endDate',
11
+ 'registrationStartDate',
12
+ 'registrationEndDate',
13
+ 'openQuotaSize',
14
+ 'signupsPublic',
15
+ ];
16
+ // Attributes included in GET /api/admin/events for Event instances.
17
+ exports.adminEventListEventAttrs = [
18
+ ...exports.eventListEventAttrs,
19
+ 'draft',
20
+ 'listed',
21
+ ];
22
+ exports.eventListQuotaAttrs = [
23
+ 'id',
24
+ 'title',
25
+ 'size',
26
+ ];
@@ -0,0 +1,10 @@
1
+ import QuotaAttributes from '../../models/quota';
2
+ import SignupAttributes from '../../models/signup';
3
+ export interface SignupCreateBody {
4
+ quotaId: QuotaAttributes['id'];
5
+ }
6
+ export interface SignupCreateResponse {
7
+ id: SignupAttributes['id'];
8
+ editToken: string;
9
+ }
10
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/services/signups/create.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAGnD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAChC;AAGD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ import AnswerAttributes from '../../models/answer';
2
+ import EventAttributes from '../../models/event';
3
+ import QuestionAttributes from '../../models/question';
4
+ import QuotaAttributes from '../../models/quota';
5
+ import SignupAttributes from '../../models/signup';
6
+ export declare const signupGetEventAttrs: readonly ["id", "title", "slug", "date", "endDate", "registrationStartDate", "registrationEndDate", "openQuotaSize", "description", "price", "location", "webpageUrl", "facebookUrl", "category", "signupsPublic", "nameQuestion", "emailQuestion"];
7
+ export declare const signupGetQuestionAttrs: readonly ["id", "question", "type", "options", "required", "public"];
8
+ export declare const signupGetAnswerAttrs: readonly ["questionId", "answer"];
9
+ export declare const signupGetQuotaAttrs: readonly ["id", "title", "size"];
10
+ export declare const signupGetSignupAttrs: readonly ["id", "firstName", "lastName", "namePublic", "email", "confirmedAt", "status", "position"];
11
+ export interface SignupGetAnswerItem extends Pick<AnswerAttributes, typeof signupGetAnswerAttrs[number]> {
12
+ }
13
+ export interface SignupGetQuotaItem extends Pick<QuotaAttributes, typeof signupGetQuotaAttrs[number]> {
14
+ }
15
+ export interface SignupGetSignupItem extends Pick<SignupAttributes, typeof signupGetSignupAttrs[number]> {
16
+ quota: SignupGetQuotaItem;
17
+ answers: SignupGetAnswerItem[];
18
+ }
19
+ export interface SignupGetQuestionItem extends Omit<Pick<QuestionAttributes, typeof signupGetQuestionAttrs[number]>, 'options'> {
20
+ options: string[] | null;
21
+ }
22
+ export interface SignupGetEventItem extends Pick<EventAttributes, typeof signupGetEventAttrs[number]> {
23
+ questions: SignupGetQuestionItem[];
24
+ }
25
+ export interface SignupGetResponse {
26
+ signup: SignupGetSignupItem;
27
+ event: SignupGetEventItem;
28
+ }
29
+ //# sourceMappingURL=getForEdit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getForEdit.d.ts","sourceRoot":"","sources":["../../../src/services/signups/getForEdit.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAInD,eAAO,MAAM,mBAAmB,qPAAqB,CAAC;AAEtD,eAAO,MAAM,sBAAsB,sEAAwB,CAAC;AAG5D,eAAO,MAAM,oBAAoB,mCAGvB,CAAC;AAGX,eAAO,MAAM,mBAAmB,kCAItB,CAAC;AAGX,eAAO,MAAM,oBAAoB,sGASvB,CAAC;AAIX,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;CAAG;AAE3G,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;CAAG;AAExG,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACtG,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC;IACxF,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnG,SAAS,EAAE,qBAAqB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,kBAAkB,CAAC;CAC3B"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.signupGetSignupAttrs = exports.signupGetQuotaAttrs = exports.signupGetAnswerAttrs = exports.signupGetQuestionAttrs = exports.signupGetEventAttrs = void 0;
4
+ const details_1 = require("../events/details");
5
+ // Include the same attributes from Event as /api/events.
6
+ exports.signupGetEventAttrs = details_1.eventGetEventAttrs;
7
+ exports.signupGetQuestionAttrs = details_1.eventGetQuestionAttrs;
8
+ // Attributes included from Answer.
9
+ exports.signupGetAnswerAttrs = [
10
+ 'questionId',
11
+ 'answer',
12
+ ];
13
+ // Attributes included from Quota.
14
+ exports.signupGetQuotaAttrs = [
15
+ 'id',
16
+ 'title',
17
+ 'size',
18
+ ];
19
+ // Attributes included from Signup.
20
+ exports.signupGetSignupAttrs = [
21
+ 'id',
22
+ 'firstName',
23
+ 'lastName',
24
+ 'namePublic',
25
+ 'email',
26
+ 'confirmedAt',
27
+ 'status',
28
+ 'position',
29
+ ];
@@ -0,0 +1,28 @@
1
+ import { StringifyApi } from '../../utils';
2
+ import { SignupCreateBody, SignupCreateResponse } from './create';
3
+ import { SignupGetAnswerItem, SignupGetEventItem, SignupGetQuestionItem, SignupGetQuotaItem, SignupGetResponse, SignupGetSignupItem } from './getForEdit';
4
+ import { SignupUpdateBody, SignupUpdateBodyAnswer, SignupUpdateResponse } from './update';
5
+ export declare type SignupServiceTypes = SignupGetResponse | SignupCreateBody | SignupCreateResponse | SignupUpdateBody | SignupUpdateResponse | null;
6
+ export declare namespace Signup {
7
+ type Id = Details.Signup['id'];
8
+ type Details = StringifyApi<SignupGetResponse>;
9
+ namespace Details {
10
+ type Event = StringifyApi<SignupGetEventItem>;
11
+ type Question = StringifyApi<SignupGetQuestionItem>;
12
+ type Signup = StringifyApi<SignupGetSignupItem>;
13
+ type Quota = StringifyApi<SignupGetQuotaItem>;
14
+ type Answer = StringifyApi<SignupGetAnswerItem>;
15
+ }
16
+ namespace Create {
17
+ type Body = StringifyApi<SignupCreateBody>;
18
+ type Response = StringifyApi<SignupCreateResponse>;
19
+ }
20
+ namespace Update {
21
+ type Body = StringifyApi<SignupUpdateBody>;
22
+ namespace Body {
23
+ type Answer = StringifyApi<SignupUpdateBodyAnswer>;
24
+ }
25
+ type Response = StringifyApi<SignupUpdateResponse>;
26
+ }
27
+ }
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/signups/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAElB,oBAAY,kBAAkB,GAC5B,iBAAiB,GACf,gBAAgB,GAAG,oBAAoB,GACvC,gBAAgB,GAAG,oBAAoB,GACvC,IAAI,CAAC;AAET,yBAAiB,MAAM,CAAC;IACtB,KAAY,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAEtC,KAAY,OAAO,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACtD,UAAiB,OAAO,CAAC;QACvB,KAAY,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;QACrD,KAAY,QAAQ,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAC;QAC3D,KAAY,MAAM,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACvD,KAAY,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;QACrD,KAAY,MAAM,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;KACxD;IAED,UAAiB,MAAM,CAAC;QACtB,KAAY,IAAI,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;QAClD,KAAY,QAAQ,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC;KAC3D;IAED,UAAiB,MAAM,CAAC;QACtB,KAAY,IAAI,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;QAClD,UAAiB,IAAI,CAAC;YACpB,KAAY,MAAM,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;SAC3D;QACD,KAAY,QAAQ,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC;KAC3D;CACF"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import QuestionAttributes from '../../models/question';
2
+ import SignupAttributes from '../../models/signup';
3
+ export interface SignupUpdateBodyAnswer {
4
+ questionId: QuestionAttributes['id'];
5
+ answer: string;
6
+ }
7
+ export interface SignupUpdateBody {
8
+ firstName: string;
9
+ lastName: string;
10
+ namePublic: boolean;
11
+ email: string;
12
+ answers: SignupUpdateBodyAnswer[];
13
+ editToken?: string;
14
+ }
15
+ export interface SignupUpdateResponse {
16
+ id: SignupAttributes['id'];
17
+ confirmedAt: Date;
18
+ }
19
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/services/signups/update.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAGnD,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import UserAttributes from '../../models/user';
2
+ export interface UserCreateBody {
3
+ email: string;
4
+ }
5
+ export declare const userGetAttributes: readonly ["id", "email"];
6
+ export interface UserDetails extends Pick<UserAttributes, typeof userGetAttributes[number]> {
7
+ }
8
+ export declare type UserListItem = UserDetails;
9
+ export declare type UserListResponse = UserListItem[];
10
+ //# sourceMappingURL=details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../src/services/users/details.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAG/C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,eAAO,MAAM,iBAAiB,0BAA2B,CAAC;AAG1D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;CAAG;AAE9F,oBAAY,YAAY,GAAG,WAAW,CAAC;AAEvC,oBAAY,gBAAgB,GAAG,YAAY,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.userGetAttributes = void 0;
4
+ // Attributes returned for User instances.
5
+ exports.userGetAttributes = ['id', 'email'];
@@ -0,0 +1,13 @@
1
+ import { StringifyApi } from '../../utils';
2
+ import { UserCreateBody, UserListItem, UserListResponse } from './details';
3
+ export declare namespace User {
4
+ type Id = List.User['id'];
5
+ type List = StringifyApi<UserListResponse>;
6
+ namespace List {
7
+ type User = StringifyApi<UserListItem>;
8
+ }
9
+ namespace Create {
10
+ type Body = StringifyApi<UserCreateBody>;
11
+ }
12
+ }
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG3E,yBAAiB,IAAI,CAAC;IACpB,KAAY,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEjC,KAAY,IAAI,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAClD,UAAiB,IAAI,CAAC;QACpB,KAAY,IAAI,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;KAC/C;IAED,UAAiB,MAAM,CAAC;QACtB,KAAY,IAAI,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;KACjD;CACF"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /** Utility type that converts fields in the imported API to string. */
2
+ export declare type StringifyApi<T> = {
3
+ [P in keyof T]: (T[P] extends (infer E)[] ? StringifyApi<E>[] : T[P] extends Date | null ? (null extends T[P] ? string | null : string) : T[P] extends boolean | number | string | null ? T[P] : StringifyApi<T[P]>);
4
+ };
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,oBAAY,YAAY,CAAC,CAAC,IAAI;KAC3B,CAAC,IAAI,MAAM,CAAC,GAAG,CAEd,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE,GAIxC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,GAErE,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAElD,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3B;CACF,CAAC"}
package/dist/utils.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@tietokilta/ilmomasiina-models",
3
+ "version": "2.0.0-alpha10",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/Tietokilta/ilmomasiina.git"
7
+ },
8
+ "license": "MIT",
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "node": "./dist/index.js",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./dist/*": {
18
+ "types": "./dist/*.d.ts",
19
+ "import": "./dist/*.js",
20
+ "node": "./dist/*.js"
21
+ },
22
+ "./src/*": "./src/*.ts"
23
+ },
24
+ "devDependencies": {
25
+ "rimraf": "^3.0.2",
26
+ "typescript": "~4.3.5"
27
+ },
28
+ "scripts": {
29
+ "build": "tsc --build",
30
+ "clean": "rimraf dist",
31
+ "typecheck": "tsc --build"
32
+ }
33
+ }