@bash-app/bash-common 1.7.0 → 1.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -509,7 +509,12 @@ enum AgeRange {
509
509
 
510
510
  enum Occupation {
511
511
  Student
512
+ Startups
513
+ SMBs
514
+ Corporations
512
515
  Professional
516
+ AngelInvestors
517
+ FamilyOffice
513
518
  Retired
514
519
  NoPreference
515
520
  }
@@ -6,6 +6,10 @@ export const CHECKOUT_RETURN_SUCCESS_URL = `/checkout-return/success/{CHECKOUT_S
6
6
  export const CHECKOUT_RETURN_CANCEL_URL = `/checkout-return/cancel/{CHECKOUT_SESSION_ID}` as const;
7
7
  export const CHECKOUT_RETURN_SUCCESS_URL_PAGE = '/checkout-return/success/$checkoutSessionId' as const;
8
8
  export const CHECKOUT_RETURN_CANCEL_URL_PAGE = '/checkout-return/cancel/$checkoutSessionId' as const;
9
+ export const DONATION_CHECKOUT_RETURN_SUCCESS_URL = `/donation-checkout-return/success/{CHECKOUT_SESSION_ID}` as const;
10
+ export const DONATION_CHECKOUT_RETURN_CANCEL_URL = `/donation-checkout-return/cancel/{CHECKOUT_SESSION_ID}` as const;
11
+ export const DONATION_CHECKOUT_RETURN_SUCCESS_URL_PAGE = '/donation-checkout-return/success/$checkoutSessionId' as const;
12
+ export const DONATION_CHECKOUT_RETURN_CANCEL_URL_PAGE = '/donation-checkout-return/cancel/$checkoutSessionId' as const;
9
13
  export const VERIFICATION_RETURN_URL = `/sign-up` as const;
10
14
  export const BASH_DETAIL_URL = `/bash-detail` as const;
11
15
 
@@ -43,6 +43,9 @@ export function ticketListStrToTicketList(ticketListStr: string): Map<string, Nu
43
43
  const ticketNumAndDatesArr: NumberOfTicketsForDate[] = [];
44
44
  // [ticketTierId]__[numberOfTickets];;[date]~~[numberOfTickets];;[date]~~...
45
45
  const [ticketTierId, ticketNumAndDatesStr] = tierIdAndTicketNumbersAndDates.split(URL_PARAMS_TICKET_ID_NUMBER_OF_TICKETS_DATE_DELIM);
46
+ if (!ticketNumAndDatesArr) {
47
+ throw new Error(`Could not parse ticketListStr. Maybe it is just an amount?`);
48
+ }
46
49
  // [numberOfTickets];;[date]~~[numberOfTickets];;[date]~~...
47
50
  const ticketNumAndDates = ticketNumAndDatesStr.split(URL_PARAMS_NUMBER_OF_TICKETS_TICKETS_DATE_DELIM)
48
51
  .filter((ticketNumAndDateStr): boolean => !!ticketNumAndDateStr);