@cacic-fct/event-manager-public-contracts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @cacic-fct/event-manager-public-contracts
2
+
3
+ Framework-agnostic TypeScript contracts and GraphQL snippets for CACiC Event
4
+ Manager public queries.
5
+
6
+ This package is for projects that read public Event Manager data without
7
+ depending on Angular, NestJS, Prisma, or internal monorepo libraries.
8
+
9
+ ## Install
10
+
11
+ Install from the public npm registry with Bun:
12
+
13
+ ```bash
14
+ bun add @cacic-fct/event-manager-public-contracts
15
+ ```
16
+
17
+ ## Use
18
+
19
+ ```ts
20
+ import {
21
+ PUBLIC_CALENDAR_EVENTS_QUERY,
22
+ type PublicCalendarEventsQuery,
23
+ type PublicCalendarEventsQueryVariables,
24
+ } from '@cacic-fct/event-manager-public-contracts';
25
+
26
+ async function loadCalendarEvents(endpoint: string, variables: PublicCalendarEventsQueryVariables) {
27
+ const response = await fetch(endpoint, {
28
+ method: 'POST',
29
+ headers: { 'content-type': 'application/json' },
30
+ body: JSON.stringify({
31
+ query: PUBLIC_CALENDAR_EVENTS_QUERY,
32
+ variables,
33
+ }),
34
+ });
35
+
36
+ const payload = (await response.json()) as { data?: PublicCalendarEventsQuery };
37
+ return payload.data?.publicCalendarEvents ?? [];
38
+ }
39
+ ```
40
+
41
+ Types are also available through modular subpath exports:
42
+
43
+ ```ts
44
+ import type { PublicEvent } from '@cacic-fct/event-manager-public-contracts/types/events';
45
+ import { PUBLIC_EVENT_PAGE_QUERY } from '@cacic-fct/event-manager-public-contracts/graphql/queries';
46
+ ```
47
+
48
+ ## Building
49
+
50
+ Run `bunx nx build event-manager-public-contracts` to build the library.
51
+
52
+ ## Publishing
53
+
54
+ This package has an independent release cycle. Bump this package's own
55
+ `version` before merging changes that should be published.
56
+
57
+ Run `bun run publish:event-manager-public-contracts` from the repository root
58
+ when publishing manually. The CI workflow publishes this package to npm through
59
+ Trusted Publishing.
@@ -0,0 +1,3 @@
1
+ import baseConfig from '../../eslint.config.mjs';
2
+
3
+ export default [...baseConfig];
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@cacic-fct/event-manager-public-contracts",
3
+ "version": "0.1.0",
4
+ "description": "Framework-agnostic CACiC Event Manager public GraphQL contracts.",
5
+ "license": "AGPL-3.0-only",
6
+ "type": "commonjs",
7
+ "main": "./index.js",
8
+ "types": "./index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./index.d.ts",
12
+ "default": "./index.js"
13
+ },
14
+ "./types": {
15
+ "types": "./lib/types/index.d.ts",
16
+ "default": "./lib/types/index.js"
17
+ },
18
+ "./types/events": {
19
+ "types": "./lib/types/events.d.ts",
20
+ "default": "./lib/types/events.js"
21
+ },
22
+ "./types/certificates": {
23
+ "types": "./lib/types/certificates.d.ts",
24
+ "default": "./lib/types/certificates.js"
25
+ },
26
+ "./graphql": {
27
+ "types": "./lib/graphql/index.d.ts",
28
+ "default": "./lib/graphql/index.js"
29
+ },
30
+ "./graphql/fragments": {
31
+ "types": "./lib/graphql/fragments.d.ts",
32
+ "default": "./lib/graphql/fragments.js"
33
+ },
34
+ "./graphql/queries": {
35
+ "types": "./lib/graphql/queries.d.ts",
36
+ "default": "./lib/graphql/queries.js"
37
+ }
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/cacic-fct/event-manager.git",
42
+ "directory": "libs/event-manager-public-contracts"
43
+ },
44
+ "publishConfig": {
45
+ "registry": "https://registry.npmjs.org",
46
+ "access": "public"
47
+ },
48
+ "sideEffects": false
49
+ }
package/project.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "event-manager-public-contracts",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "libs/event-manager-public-contracts/src",
5
+ "projectType": "library",
6
+ "tags": ["scope:shared", "type:contract"],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "nx:run-commands",
10
+ "outputs": ["{workspaceRoot}/dist/libs/event-manager-public-contracts"],
11
+ "options": {
12
+ "cwd": "libs/event-manager-public-contracts",
13
+ "command": "bun run tsc -p tsconfig.lib.json && cp package.json README.md ../../dist/libs/event-manager-public-contracts/"
14
+ }
15
+ }
16
+ }
17
+ }
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/types';
2
+ export * from './lib/graphql';
@@ -0,0 +1,263 @@
1
+ export const PUBLIC_PAYMENT_INFO_FIELDS = `
2
+ id
3
+ bankName
4
+ agency
5
+ account
6
+ holder
7
+ document
8
+ pixKey
9
+ pixCity
10
+ majorEventId
11
+ `;
12
+
13
+ export const PUBLIC_MAJOR_EVENT_PRICE_FIELDS = `
14
+ id
15
+ type
16
+ tiers {
17
+ id
18
+ name
19
+ value
20
+ }
21
+ `;
22
+
23
+ export const PUBLIC_MAJOR_EVENT_SUMMARY_FIELDS = `
24
+ id
25
+ name
26
+ subscriptionStartDate
27
+ subscriptionEndDate
28
+ `;
29
+
30
+ export const PUBLIC_MAJOR_EVENT_CARD_FIELDS = `
31
+ id
32
+ name
33
+ emoji
34
+ startDate
35
+ endDate
36
+ description
37
+ subscriptionStartDate
38
+ subscriptionEndDate
39
+ rankedSubscriptionEnabled
40
+ buttonText
41
+ buttonLink
42
+ isPaymentRequired
43
+ `;
44
+
45
+ export const PUBLIC_MAJOR_EVENT_SUBSCRIPTION_FIELDS = `
46
+ id
47
+ name
48
+ emoji
49
+ startDate
50
+ endDate
51
+ description
52
+ subscriptionStartDate
53
+ subscriptionEndDate
54
+ maxCoursesPerAttendee
55
+ maxLecturesPerAttendee
56
+ maxUncategorizedPerAttendee
57
+ rankedSubscriptionEnabled
58
+ isPaymentRequired
59
+ additionalPaymentInfo
60
+ paymentInfo {
61
+ ${PUBLIC_PAYMENT_INFO_FIELDS}
62
+ }
63
+ majorEventPrices {
64
+ ${PUBLIC_MAJOR_EVENT_PRICE_FIELDS}
65
+ }
66
+ `;
67
+
68
+ export const PUBLIC_MAJOR_EVENT_PROFILE_FIELDS = `
69
+ id
70
+ name
71
+ emoji
72
+ startDate
73
+ endDate
74
+ description
75
+ subscriptionStartDate
76
+ subscriptionEndDate
77
+ maxCoursesPerAttendee
78
+ maxLecturesPerAttendee
79
+ buttonText
80
+ buttonLink
81
+ contactInfo
82
+ contactType
83
+ isPaymentRequired
84
+ additionalPaymentInfo
85
+ shouldIssueCertificate
86
+ `;
87
+
88
+ export const PUBLIC_NAMED_ENTITY_FIELDS = `
89
+ id
90
+ name
91
+ `;
92
+
93
+ export const PUBLIC_EVENT_GROUP_DETAIL_FIELDS = `
94
+ id
95
+ name
96
+ emoji
97
+ shouldIssueCertificateForEachEvent
98
+ shouldIssuePartialCertificate
99
+ shouldIssueCertificate
100
+ `;
101
+
102
+ export const PUBLIC_LECTURER_PROFILE_FIELDS = `
103
+ id
104
+ displayName
105
+ biography
106
+ publishGoogleUserPicture
107
+ googleUserPicture
108
+ email
109
+ whatsapp
110
+ `;
111
+
112
+ export const PUBLIC_CALENDAR_EVENT_FIELDS = `
113
+ id
114
+ name
115
+ startDate
116
+ endDate
117
+ emoji
118
+ type
119
+ shortDescription
120
+ locationDescription
121
+ majorEvent {
122
+ ${PUBLIC_NAMED_ENTITY_FIELDS}
123
+ }
124
+ eventGroup {
125
+ ${PUBLIC_NAMED_ENTITY_FIELDS}
126
+ }
127
+ `;
128
+
129
+ export const PUBLIC_EVENT_PAGE_FIELDS = `
130
+ id
131
+ name
132
+ creditMinutes
133
+ startDate
134
+ endDate
135
+ emoji
136
+ type
137
+ description
138
+ shortDescription
139
+ latitude
140
+ longitude
141
+ locationDescription
142
+ majorEventId
143
+ eventGroupId
144
+ allowSubscription
145
+ subscriptionStartDate
146
+ subscriptionEndDate
147
+ shouldIssueCertificate
148
+ shouldCollectAttendance
149
+ isOnlineAttendanceAllowed
150
+ onlineAttendanceStartDate
151
+ onlineAttendanceEndDate
152
+ publiclyVisible
153
+ youtubeCode
154
+ buttonText
155
+ buttonLink
156
+ majorEvent {
157
+ ${PUBLIC_MAJOR_EVENT_SUMMARY_FIELDS}
158
+ }
159
+ eventGroup {
160
+ ${PUBLIC_NAMED_ENTITY_FIELDS}
161
+ }
162
+ lecturers {
163
+ ${PUBLIC_LECTURER_PROFILE_FIELDS}
164
+ }
165
+ `;
166
+
167
+ export const PUBLIC_SUBSCRIPTION_EVENT_FIELDS = `
168
+ id
169
+ name
170
+ startDate
171
+ endDate
172
+ emoji
173
+ type
174
+ shortDescription
175
+ locationDescription
176
+ eventGroupId
177
+ autoSubscribe
178
+ eventGroup {
179
+ ${PUBLIC_NAMED_ENTITY_FIELDS}
180
+ }
181
+ `;
182
+
183
+ export const PUBLIC_ATTENDANCE_EVENT_FIELDS = `
184
+ id
185
+ name
186
+ creditMinutes
187
+ startDate
188
+ endDate
189
+ emoji
190
+ type
191
+ description
192
+ shortDescription
193
+ locationDescription
194
+ majorEventId
195
+ eventGroupId
196
+ subscriptionStartDate
197
+ subscriptionEndDate
198
+ slots
199
+ shouldIssueCertificate
200
+ shouldCollectAttendance
201
+ isOnlineAttendanceAllowed
202
+ onlineAttendanceStartDate
203
+ onlineAttendanceEndDate
204
+ youtubeCode
205
+ buttonText
206
+ buttonLink
207
+ majorEvent {
208
+ ${PUBLIC_MAJOR_EVENT_PROFILE_FIELDS}
209
+ }
210
+ eventGroup {
211
+ ${PUBLIC_EVENT_GROUP_DETAIL_FIELDS}
212
+ }
213
+ lecturers {
214
+ ${PUBLIC_LECTURER_PROFILE_FIELDS}
215
+ }
216
+ `;
217
+
218
+ export const PUBLIC_EVENT_SUBSCRIPTION_SUMMARY_FIELDS = `
219
+ eventId
220
+ hasAvailableSlots
221
+ `;
222
+
223
+ export const PUBLIC_EVENT_WEATHER_FIELDS = `
224
+ eventId
225
+ temperature
226
+ weatherCode
227
+ summary
228
+ materialIcon
229
+ forecastTime
230
+ fetchedAt
231
+ attribution
232
+ `;
233
+
234
+ export const PUBLIC_CERTIFICATE_VALIDATION_FIELDS = `
235
+ id
236
+ issuedAt
237
+ personName
238
+ maskedIdentityDocument
239
+ scope
240
+ certificateName
241
+ targetName
242
+ targetEmoji
243
+ totalCreditMinutes
244
+ sections {
245
+ title
246
+ type
247
+ creditMinutes
248
+ events {
249
+ name
250
+ id
251
+ emoji
252
+ startDate
253
+ endDate
254
+ creditMinutes
255
+ }
256
+ }
257
+ `;
258
+
259
+ export const CERTIFICATE_DOWNLOAD_FIELDS = `
260
+ fileName
261
+ mimeType
262
+ contentBase64
263
+ `;
@@ -0,0 +1,2 @@
1
+ export * from './fragments';
2
+ export * from './queries';
@@ -0,0 +1,213 @@
1
+ import type {
2
+ CertificateDownload,
3
+ DateTimeString,
4
+ EventType,
5
+ GraphqlVariables,
6
+ PublicCertificateValidation,
7
+ PublicEvent,
8
+ PublicEventSubscriptionSummary,
9
+ PublicEventWeather,
10
+ PublicMajorEvent,
11
+ PublicMajorEventSubscriptionPage,
12
+ } from '../types';
13
+ import {
14
+ CERTIFICATE_DOWNLOAD_FIELDS,
15
+ PUBLIC_CALENDAR_EVENT_FIELDS,
16
+ PUBLIC_CERTIFICATE_VALIDATION_FIELDS,
17
+ PUBLIC_EVENT_PAGE_FIELDS,
18
+ PUBLIC_EVENT_SUBSCRIPTION_SUMMARY_FIELDS,
19
+ PUBLIC_EVENT_WEATHER_FIELDS,
20
+ PUBLIC_MAJOR_EVENT_CARD_FIELDS,
21
+ PUBLIC_MAJOR_EVENT_SUBSCRIPTION_FIELDS,
22
+ PUBLIC_SUBSCRIPTION_EVENT_FIELDS,
23
+ } from './fragments';
24
+
25
+ export type PublicMajorEventsQueryVariables = GraphqlVariables & {
26
+ query?: string | null;
27
+ startDateFrom?: DateTimeString | null;
28
+ startDateUntil?: DateTimeString | null;
29
+ skip?: number | null;
30
+ take?: number | null;
31
+ };
32
+
33
+ export interface PublicMajorEventsQuery {
34
+ publicMajorEvents: PublicMajorEvent[];
35
+ }
36
+
37
+ export const PUBLIC_MAJOR_EVENTS_QUERY = `
38
+ query PublicMajorEvents(
39
+ $query: String
40
+ $startDateFrom: DateTime
41
+ $startDateUntil: DateTime
42
+ $skip: Int
43
+ $take: Int
44
+ ) {
45
+ publicMajorEvents(
46
+ query: $query
47
+ startDateFrom: $startDateFrom
48
+ startDateUntil: $startDateUntil
49
+ skip: $skip
50
+ take: $take
51
+ ) {
52
+ ${PUBLIC_MAJOR_EVENT_CARD_FIELDS}
53
+ }
54
+ }
55
+ `;
56
+
57
+ export type PublicCalendarEventsQueryVariables = GraphqlVariables & {
58
+ query?: string | null;
59
+ eventType?: EventType | null;
60
+ startDateFrom?: DateTimeString | null;
61
+ startDateUntil?: DateTimeString | null;
62
+ };
63
+
64
+ export interface PublicCalendarEventsQuery {
65
+ publicCalendarEvents: PublicEvent[];
66
+ }
67
+
68
+ export const PUBLIC_CALENDAR_EVENTS_QUERY = `
69
+ query PublicCalendarEvents(
70
+ $query: String
71
+ $eventType: EventType
72
+ $startDateFrom: DateTime
73
+ $startDateUntil: DateTime
74
+ ) {
75
+ publicCalendarEvents(
76
+ query: $query
77
+ eventType: $eventType
78
+ startDateFrom: $startDateFrom
79
+ startDateUntil: $startDateUntil
80
+ ) {
81
+ ${PUBLIC_CALENDAR_EVENT_FIELDS}
82
+ }
83
+ }
84
+ `;
85
+
86
+ export interface PublicEventQueryVariables {
87
+ eventId: string;
88
+ }
89
+
90
+ export interface PublicEventQuery {
91
+ publicEvent: PublicEvent;
92
+ }
93
+
94
+ export const PUBLIC_EVENT_QUERY = `
95
+ query PublicEvent($eventId: String!) {
96
+ publicEvent(id: $eventId) {
97
+ ${PUBLIC_EVENT_PAGE_FIELDS}
98
+ }
99
+ }
100
+ `;
101
+
102
+ export interface PublicEventSubscriptionSummaryQueryVariables {
103
+ eventId: string;
104
+ }
105
+
106
+ export interface PublicEventSubscriptionSummaryQuery {
107
+ publicEventSubscriptionSummary: PublicEventSubscriptionSummary;
108
+ }
109
+
110
+ export const PUBLIC_EVENT_SUBSCRIPTION_SUMMARY_QUERY = `
111
+ query PublicEventSubscriptionSummary($eventId: String!) {
112
+ publicEventSubscriptionSummary(eventId: $eventId) {
113
+ ${PUBLIC_EVENT_SUBSCRIPTION_SUMMARY_FIELDS}
114
+ }
115
+ }
116
+ `;
117
+
118
+ export interface PublicEventWeatherQueryVariables {
119
+ eventId: string;
120
+ }
121
+
122
+ export interface PublicEventWeatherQuery {
123
+ publicEventWeather: PublicEventWeather | null;
124
+ }
125
+
126
+ export const PUBLIC_EVENT_WEATHER_QUERY = `
127
+ query PublicEventWeather($eventId: String!) {
128
+ publicEventWeather(eventId: $eventId) {
129
+ ${PUBLIC_EVENT_WEATHER_FIELDS}
130
+ }
131
+ }
132
+ `;
133
+
134
+ export interface PublicEventPageQueryVariables {
135
+ eventId: string;
136
+ }
137
+
138
+ export interface PublicEventPageQuery {
139
+ publicEvent: PublicEvent;
140
+ publicEventSubscriptionSummary: PublicEventSubscriptionSummary;
141
+ publicEventWeather: PublicEventWeather | null;
142
+ }
143
+
144
+ export const PUBLIC_EVENT_PAGE_QUERY = `
145
+ query PublicEventPage($eventId: String!) {
146
+ publicEvent(id: $eventId) {
147
+ ${PUBLIC_EVENT_PAGE_FIELDS}
148
+ }
149
+ publicEventSubscriptionSummary(eventId: $eventId) {
150
+ ${PUBLIC_EVENT_SUBSCRIPTION_SUMMARY_FIELDS}
151
+ }
152
+ publicEventWeather(eventId: $eventId) {
153
+ ${PUBLIC_EVENT_WEATHER_FIELDS}
154
+ }
155
+ }
156
+ `;
157
+
158
+ export interface PublicMajorEventSubscriptionPageQueryVariables {
159
+ majorEventId: string;
160
+ }
161
+
162
+ export interface PublicMajorEventSubscriptionPageQuery {
163
+ publicMajorEventSubscriptionPage: PublicMajorEventSubscriptionPage;
164
+ }
165
+
166
+ export const PUBLIC_MAJOR_EVENT_SUBSCRIPTION_PAGE_QUERY = `
167
+ query PublicMajorEventSubscriptionPage($majorEventId: String!) {
168
+ publicMajorEventSubscriptionPage(majorEventId: $majorEventId) {
169
+ majorEvent {
170
+ ${PUBLIC_MAJOR_EVENT_SUBSCRIPTION_FIELDS}
171
+ }
172
+ events {
173
+ ${PUBLIC_SUBSCRIPTION_EVENT_FIELDS}
174
+ }
175
+ subscriptionSummaries {
176
+ ${PUBLIC_EVENT_SUBSCRIPTION_SUMMARY_FIELDS}
177
+ }
178
+ }
179
+ }
180
+ `;
181
+
182
+ export interface PublicCertificateValidationQueryVariables {
183
+ certificateId: string;
184
+ turnstileToken?: string | null;
185
+ }
186
+
187
+ export interface PublicCertificateValidationQuery {
188
+ publicCertificateValidation: PublicCertificateValidation | null;
189
+ }
190
+
191
+ export const PUBLIC_CERTIFICATE_VALIDATION_QUERY = `
192
+ query PublicCertificateValidation($certificateId: String!, $turnstileToken: String) {
193
+ publicCertificateValidation(certificateId: $certificateId, turnstileToken: $turnstileToken) {
194
+ ${PUBLIC_CERTIFICATE_VALIDATION_FIELDS}
195
+ }
196
+ }
197
+ `;
198
+
199
+ export interface DownloadPublicCertificateQueryVariables {
200
+ certificateId: string;
201
+ }
202
+
203
+ export interface DownloadPublicCertificateQuery {
204
+ downloadPublicCertificate: CertificateDownload;
205
+ }
206
+
207
+ export const DOWNLOAD_PUBLIC_CERTIFICATE_QUERY = `
208
+ query DownloadPublicCertificate($certificateId: String!) {
209
+ downloadPublicCertificate(certificateId: $certificateId) {
210
+ ${CERTIFICATE_DOWNLOAD_FIELDS}
211
+ }
212
+ }
213
+ `;
@@ -0,0 +1,36 @@
1
+ import type { CertificateScope, DateTimeString, EventType } from './common';
2
+
3
+ export interface CertificateDownload {
4
+ fileName: string;
5
+ mimeType: string;
6
+ contentBase64: string;
7
+ }
8
+
9
+ export interface PublicCertificateValidationEvent {
10
+ name: string;
11
+ id: string;
12
+ emoji: string;
13
+ startDate: DateTimeString;
14
+ endDate: DateTimeString;
15
+ creditMinutes?: number | null;
16
+ }
17
+
18
+ export interface PublicCertificateValidationEventSection {
19
+ title: string;
20
+ type?: EventType | null;
21
+ creditMinutes: number;
22
+ events: PublicCertificateValidationEvent[];
23
+ }
24
+
25
+ export interface PublicCertificateValidation {
26
+ id: string;
27
+ issuedAt: DateTimeString;
28
+ personName: string;
29
+ maskedIdentityDocument?: string | null;
30
+ scope: CertificateScope;
31
+ certificateName: string;
32
+ targetName?: string | null;
33
+ targetEmoji?: string | null;
34
+ sections: PublicCertificateValidationEventSection[];
35
+ totalCreditMinutes: number;
36
+ }
@@ -0,0 +1,18 @@
1
+ export type DateTimeString = string;
2
+
3
+ export type EventTargetType = 'event' | 'event-group' | 'major-event';
4
+ export type CertificateScope = 'EVENT' | 'EVENT_GROUP' | 'MAJOR_EVENT' | 'OTHER';
5
+ export type EventType = 'MINICURSO' | 'PALESTRA' | 'OTHER';
6
+ export type ContactType = 'EMAIL' | 'PHONE' | 'WHATSAPP' | 'OTHER';
7
+
8
+ export type GraphqlVariable = string | number | boolean | null | undefined | readonly string[];
9
+ export type GraphqlVariables = Record<string, GraphqlVariable>;
10
+
11
+ export interface GraphqlError {
12
+ message: string;
13
+ }
14
+
15
+ export interface GraphqlResponse<TData> {
16
+ data?: TData;
17
+ errors?: GraphqlError[];
18
+ }
@@ -0,0 +1,132 @@
1
+ import type { ContactType, DateTimeString, EventType } from './common';
2
+
3
+ export interface PublicPaymentInfo {
4
+ id: string;
5
+ bankName: string;
6
+ agency: string;
7
+ account: string;
8
+ holder: string;
9
+ document: string;
10
+ pixKey?: string | null;
11
+ pixCity?: string | null;
12
+ majorEventId: string;
13
+ }
14
+
15
+ export interface PublicMajorEventPriceTier {
16
+ id: string;
17
+ name: string;
18
+ value: number;
19
+ }
20
+
21
+ export interface PublicMajorEventPrice {
22
+ id: string;
23
+ type: 'SINGLE' | 'TIERED';
24
+ tiers: PublicMajorEventPriceTier[];
25
+ }
26
+
27
+ export interface PublicMajorEvent {
28
+ id: string;
29
+ name: string;
30
+ emoji: string;
31
+ startDate: DateTimeString;
32
+ endDate: DateTimeString;
33
+ description?: string | null;
34
+ subscriptionStartDate?: DateTimeString | null;
35
+ subscriptionEndDate?: DateTimeString | null;
36
+ maxCoursesPerAttendee?: number | null;
37
+ maxLecturesPerAttendee?: number | null;
38
+ maxUncategorizedPerAttendee?: number | null;
39
+ rankedSubscriptionEnabled?: boolean | null;
40
+ buttonText?: string | null;
41
+ buttonLink?: string | null;
42
+ contactInfo?: string | null;
43
+ contactType?: ContactType | null;
44
+ isPaymentRequired?: boolean | null;
45
+ shouldIssueCertificateForNonPayingAttendees?: boolean | null;
46
+ shouldIssueCertificateForNonSubscribedAttendees?: boolean | null;
47
+ additionalPaymentInfo?: string | null;
48
+ shouldIssueCertificate?: boolean | null;
49
+ paymentInfo?: PublicPaymentInfo | null;
50
+ majorEventPrices?: PublicMajorEventPrice[];
51
+ }
52
+
53
+ export interface PublicEventGroup {
54
+ id: string;
55
+ name: string;
56
+ emoji: string;
57
+ shouldIssueCertificateForEachEvent?: boolean | null;
58
+ shouldIssuePartialCertificate?: boolean | null;
59
+ shouldIssueCertificate?: boolean | null;
60
+ shouldIssueCertificateForNonPayingAttendees?: boolean | null;
61
+ shouldIssueCertificateForNonSubscribedAttendees?: boolean | null;
62
+ }
63
+
64
+ export interface PublicLecturerProfile {
65
+ id: string;
66
+ displayName: string;
67
+ biography?: string | null;
68
+ publishGoogleUserPicture: boolean;
69
+ googleUserPicture?: string | null;
70
+ email?: string | null;
71
+ whatsapp?: string | null;
72
+ }
73
+
74
+ export interface PublicEvent {
75
+ id: string;
76
+ name: string;
77
+ creditMinutes?: number | null;
78
+ startDate: DateTimeString;
79
+ endDate: DateTimeString;
80
+ emoji: string;
81
+ type: EventType;
82
+ description?: string | null;
83
+ shortDescription?: string | null;
84
+ latitude?: number | null;
85
+ longitude?: number | null;
86
+ locationDescription?: string | null;
87
+ majorEventId?: string | null;
88
+ majorEvent?: PublicMajorEvent | null;
89
+ eventGroupId?: string | null;
90
+ eventGroup?: PublicEventGroup | null;
91
+ allowSubscription?: boolean | null;
92
+ subscriptionStartDate?: DateTimeString | null;
93
+ subscriptionEndDate?: DateTimeString | null;
94
+ slots?: number | null;
95
+ slotsAvailable?: number | null;
96
+ queueCount?: number | null;
97
+ autoSubscribe?: boolean | null;
98
+ shouldIssueCertificate?: boolean | null;
99
+ shouldIssueCertificateForNonPayingAttendees?: boolean | null;
100
+ shouldIssueCertificateForNonSubscribedAttendees?: boolean | null;
101
+ shouldCollectAttendance?: boolean | null;
102
+ isOnlineAttendanceAllowed?: boolean | null;
103
+ onlineAttendanceStartDate?: DateTimeString | null;
104
+ onlineAttendanceEndDate?: DateTimeString | null;
105
+ publiclyVisible?: boolean | null;
106
+ youtubeCode?: string | null;
107
+ buttonText?: string | null;
108
+ buttonLink?: string | null;
109
+ lecturers?: PublicLecturerProfile[];
110
+ }
111
+
112
+ export interface PublicEventSubscriptionSummary {
113
+ eventId: string;
114
+ hasAvailableSlots: boolean;
115
+ }
116
+
117
+ export interface PublicMajorEventSubscriptionPage {
118
+ majorEvent: PublicMajorEvent;
119
+ events: PublicEvent[];
120
+ subscriptionSummaries: PublicEventSubscriptionSummary[];
121
+ }
122
+
123
+ export interface PublicEventWeather {
124
+ eventId: string;
125
+ temperature: number;
126
+ weatherCode: number;
127
+ summary: string;
128
+ materialIcon: string;
129
+ forecastTime: DateTimeString;
130
+ fetchedAt: DateTimeString;
131
+ attribution: string;
132
+ }
@@ -0,0 +1,3 @@
1
+ export * from './common';
2
+ export * from './events';
3
+ export * from './certificates';
package/tsconfig.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "module": "Node16",
5
+ "moduleResolution": "node16",
6
+ "forceConsistentCasingInFileNames": true,
7
+ "strict": true,
8
+ "importHelpers": false,
9
+ "noImplicitOverride": true,
10
+ "noImplicitReturns": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "noPropertyAccessFromIndexSignature": true
13
+ },
14
+ "files": [],
15
+ "include": [],
16
+ "references": [
17
+ {
18
+ "path": "./tsconfig.lib.json"
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/libs/event-manager-public-contracts",
5
+ "rootDir": "src",
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "types": []
9
+ },
10
+ "include": ["src/**/*.ts"]
11
+ }