Skip to content

Commit 7eba358

Browse files
committed
#74 introduced buyTicketsUrl allowing to show a button routing to event registration page
1 parent fd0a078 commit 7eba358

File tree

14 files changed

+42
-11
lines changed

14 files changed

+42
-11
lines changed

cloud/functions/src/crawlers/bdxio/crawler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ export const BDXIO_CRAWLER: CrawlerKind<typeof BDXIO_PARSER> = {
283283
infos: descriptor.infos,
284284
features: descriptor.features,
285285
supportedTalkLanguages: descriptor.supportedTalkLanguages,
286+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
286287
formattings: descriptor.formattings || {
287288
talkFormatTitle: 'with-duration',
288289
parseMarkdownOn: [],
@@ -360,7 +361,8 @@ export const BDXIO_CRAWLER: CrawlerKind<typeof BDXIO_PARSER> = {
360361
location: descriptor.location,
361362
logoUrl: descriptor.logoUrl,
362363
timezone: descriptor.timezone,
363-
peopleDescription: descriptor.peopleDescription as any,
364+
peopleDescription: descriptor.peopleDescription,
365+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
364366
backgroundUrl: descriptor.backgroundUrl
365367
},
366368
conferenceDescriptor: confDescriptor,

cloud/functions/src/crawlers/camping-des-speakers/crawler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export const CAMPING_DES_SPEAKERS_CRAWLER: CrawlerKind<typeof CAMPING_DES_SPEAKE
151151
logoUrl: descriptor.logoUrl,
152152
timezone: descriptor.timezone,
153153
peopleDescription: descriptor.peopleDescription || "",
154+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
154155
backgroundUrl: descriptor.backgroundUrl,
155156
theming: descriptor.theming as ConferenceDescriptor['theming'],
156157
rooms: descriptor.rooms,
@@ -261,7 +262,8 @@ export const CAMPING_DES_SPEAKERS_CRAWLER: CrawlerKind<typeof CAMPING_DES_SPEAKE
261262
location: descriptor.location,
262263
logoUrl: descriptor.logoUrl,
263264
timezone: descriptor.timezone,
264-
peopleDescription: descriptor.peopleDescription as any,
265+
peopleDescription: descriptor.peopleDescription,
266+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
265267
backgroundUrl: descriptor.backgroundUrl
266268
},
267269
conferenceDescriptor: confDescriptor,

cloud/functions/src/crawlers/codeurs-en-seine/crawler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ export const CODEURS_EN_SEINE_CRAWLER: CrawlerKind<typeof CODEURS_EN_SEINE_PARSE
271271
logoUrl: descriptor.logoUrl,
272272
timezone: descriptor.timezone,
273273
peopleDescription: descriptor.peopleDescription || "",
274+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
274275
backgroundUrl: descriptor.backgroundUrl,
275276
theming: descriptor.theming,
276277
rooms: descriptor.rooms,
@@ -298,6 +299,7 @@ export const CODEURS_EN_SEINE_CRAWLER: CrawlerKind<typeof CODEURS_EN_SEINE_PARSE
298299
logoUrl: confDescriptor.logoUrl,
299300
timezone: confDescriptor.timezone,
300301
peopleDescription: confDescriptor.peopleDescription,
302+
buyTicketsUrl: confDescriptor.buyTicketsUrl || null,
301303
backgroundUrl: confDescriptor.backgroundUrl
302304
},
303305
conferenceDescriptor: confDescriptor,

cloud/functions/src/crawlers/crawler-parsers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export const LISTABLE_EVENT_PARSER = z.object({
9292
backgroundUrl: z.string(),
9393
logoUrl: z.string(),
9494
theming: EVENT_THEME_PARSER,
95+
buyTicketsUrl: z.string().nullish().optional(),
9596
})
9697

9798
export const INFOS_PARSER = z.object({

cloud/functions/src/crawlers/devoxx-scala/crawler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export const DEVOXX_SCALA_CRAWLER: CrawlerKind<typeof DEVOXX_SCALA_DESCRIPTOR_PA
273273
title: descriptor.title,
274274
description: conferenceResourceUrl.resource.label,
275275
peopleDescription: descriptor.peopleDescription,
276+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
276277
timezone: descriptor.timezone,
277278
days: descriptor.days,
278279
logoUrl: descriptor.logoUrl,

cloud/functions/src/crawlers/devoxx/crawler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ Please, unless event id is made configurable at cfp.dev level, you should rather
278278
title: cfpEvent.name,
279279
description: cfpEvent.description,
280280
peopleDescription: descriptor.peopleDescription,
281+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
281282
timezone: cfpEvent.timezone,
282283
days: days,
283284
logoUrl: descriptor.logoUrl,

cloud/functions/src/crawlers/full-event.builder.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,20 @@ export class FullEventBuilder {
337337
}
338338

339339
public usingInfosAndDescriptor(listableEventInfo: FullEvent['listableEventInfo'], descriptor: Omit<FullEvent['conferenceDescriptor'], "rooms"|"talkTracks"|"talkFormats"|"supportedTalkLanguages"|keyof FullEvent['listableEventInfo']>): this {
340-
this.listableEventInfo = listableEventInfo;
340+
this.listableEventInfo = {
341+
...listableEventInfo,
342+
// converting undefined unsupported firestore values to null
343+
description: listableEventInfo.description || null,
344+
peopleDescription: listableEventInfo.peopleDescription || null,
345+
buyTicketsUrl: listableEventInfo.buyTicketsUrl || null,
346+
location: {
347+
...listableEventInfo.location,
348+
address: listableEventInfo.location.address || null,
349+
coords: listableEventInfo.location.coords || null,
350+
},
351+
};
341352
this.descriptor = {
342-
...pick(listableEventInfo, ['id', 'title', 'days', 'timezone', 'keywords', 'location', 'backgroundUrl', 'logoUrl', 'theming']),
353+
...pick(this.listableEventInfo, ['id', 'title', 'days', 'timezone', 'keywords', 'location', 'backgroundUrl', 'logoUrl', 'theming', 'buyTicketsUrl']),
343354
...pick(descriptor, ['headingTitle', 'headingBackground', 'features', 'formattings', 'infos']),
344355
rooms: [...this.roomsById.values()],
345356
talkTracks: [...this.tracksById.values()],

cloud/functions/src/crawlers/jugsummercamp/crawler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export const JUG_SUMMERCAMP_CRAWLER: CrawlerKind<typeof JUG_SUMMERCAMP_PARSER> =
142142
logoUrl: descriptor.logoUrl,
143143
timezone: descriptor.timezone,
144144
peopleDescription: descriptor.peopleDescription || "",
145+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
145146
backgroundUrl: descriptor.backgroundUrl,
146147
theming: descriptor.theming as ConferenceDescriptor['theming'],
147148
rooms: descriptor.rooms,
@@ -253,7 +254,8 @@ export const JUG_SUMMERCAMP_CRAWLER: CrawlerKind<typeof JUG_SUMMERCAMP_PARSER> =
253254
location: descriptor.location,
254255
logoUrl: descriptor.logoUrl,
255256
timezone: descriptor.timezone,
256-
peopleDescription: descriptor.peopleDescription as any,
257+
peopleDescription: descriptor.peopleDescription,
258+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
257259
backgroundUrl: descriptor.backgroundUrl
258260
},
259261
conferenceDescriptor: confDescriptor,

cloud/functions/src/crawlers/la-product-conf/crawler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ export const LA_PRODUCT_CONF_CRAWLER: CrawlerKind<typeof LA_PRODUCT_CONF_DESCRIP
255255
logoUrl: descriptor.logoUrl,
256256
timezone: descriptor.timezone,
257257
peopleDescription: descriptor.peopleDescription || "",
258+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
258259
backgroundUrl: descriptor.backgroundUrl,
259260
theming: descriptor.theming as ConferenceDescriptor['theming'],
260261
rooms: descriptor.rooms,
@@ -281,7 +282,8 @@ export const LA_PRODUCT_CONF_CRAWLER: CrawlerKind<typeof LA_PRODUCT_CONF_DESCRIP
281282
location: descriptor.location,
282283
logoUrl: descriptor.logoUrl,
283284
timezone: descriptor.timezone,
284-
peopleDescription: descriptor.peopleDescription as any,
285+
peopleDescription: descriptor.peopleDescription,
286+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
285287
backgroundUrl: descriptor.backgroundUrl
286288
},
287289
conferenceDescriptor: confDescriptor,

cloud/functions/src/crawlers/openplanner/crawler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ export const OPENPLANNER_CRAWLER: CrawlerKind<typeof OPENPLANNER_DESCRIPTOR_PARS
293293
title: descriptor.title || openPlannerSchedule.title,
294294
description: descriptor.description,
295295
peopleDescription: descriptor.peopleDescription || '',
296+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
296297
timezone,
297298
logoUrl: descriptor.logoUrl || openPlannerSchedule.logoUrl,
298299
backgroundUrl: descriptor.backgroundUrl || openPlannerSchedule.backgroundUrl,
@@ -322,6 +323,7 @@ export const OPENPLANNER_CRAWLER: CrawlerKind<typeof OPENPLANNER_DESCRIPTOR_PARS
322323
title: descriptor.title || openPlannerSchedule.title,
323324
description: descriptor.description,
324325
peopleDescription: descriptor.peopleDescription || '',
326+
buyTicketsUrl: descriptor.buyTicketsUrl || null,
325327
timezone,
326328
days: openPlannerSchedule.days,
327329
logoUrl: descriptor.logoUrl || openPlannerSchedule.logoUrl,

0 commit comments

Comments
 (0)