@dev-crew-berlin/enter-js-utils 0.60.2 → 0.60.4

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.
@@ -242,8 +242,7 @@ export declare type components = {
242
242
  rsvp?: {
243
243
  [key: string]: number | null;
244
244
  };
245
- /** Companions */
246
- companions?: components["schemas"]["MainGuestJSON-Input"] | components["schemas"]["CompanionJSON-Input"];
245
+ companions?: components["schemas"]["RootModel_Union_MainGuest__Companion__-Input"];
247
246
  payment?: components["schemas"]["Payment"] | null;
248
247
  };
249
248
  /**
@@ -452,7 +451,7 @@ export declare type components = {
452
451
  * Items
453
452
  * @default []
454
453
  */
455
- items?: components["schemas"]["ItemOption"][];
454
+ items?: components["schemas"]["ItemOption-Input"][];
456
455
  };
457
456
  /** CheckboxGroupField */
458
457
  "CheckboxGroupField-Output": {
@@ -505,7 +504,7 @@ export declare type components = {
505
504
  * Items
506
505
  * @default []
507
506
  */
508
- items: components["schemas"]["ItemOption"][];
507
+ items: components["schemas"]["ItemOption-Output"][];
509
508
  };
510
509
  /**
511
510
  * Checkin
@@ -746,27 +745,29 @@ export declare type components = {
746
745
  */
747
746
  max: number;
748
747
  };
749
- /** CompanionJSON */
750
- "CompanionJSON-Input": {
748
+ /** Companion */
749
+ "Companion-Input": {
750
+ /** Mainguestid */
751
+ mainGuestId: string;
751
752
  /**
752
753
  * Iscompanion
754
+ * @default true
753
755
  * @constant
754
756
  * @enum {boolean}
755
757
  */
756
- iscompanion: true;
757
- /** Mainguestid */
758
- mainguestid: string;
758
+ isCompanion?: true;
759
759
  };
760
- /** CompanionJSON */
761
- "CompanionJSON-Output": {
760
+ /** Companion */
761
+ "Companion-Output": {
762
+ /** Mainguestid */
763
+ mainGuestId: string;
762
764
  /**
763
765
  * Iscompanion
766
+ * @default true
764
767
  * @constant
765
768
  * @enum {boolean}
766
769
  */
767
770
  isCompanion: true;
768
- /** Mainguestid */
769
- mainGuestId: string;
770
771
  };
771
772
  /** CustomCountQuery */
772
773
  CustomCountQuery: {
@@ -934,7 +935,7 @@ export declare type components = {
934
935
  * Items
935
936
  * @default []
936
937
  */
937
- items?: components["schemas"]["ItemOption"][];
938
+ items?: components["schemas"]["ItemOption-Input"][];
938
939
  };
939
940
  /** DropdownField */
940
941
  "DropdownField-Output": {
@@ -987,7 +988,7 @@ export declare type components = {
987
988
  * Items
988
989
  * @default []
989
990
  */
990
- items: components["schemas"]["ItemOption"][];
991
+ items: components["schemas"]["ItemOption-Output"][];
991
992
  };
992
993
  /** EmailConfig */
993
994
  EmailConfig: {
@@ -1595,7 +1596,7 @@ export declare type components = {
1595
1596
  ext: string[] | null;
1596
1597
  };
1597
1598
  /** ItemOption */
1598
- ItemOption: {
1599
+ "ItemOption-Input": {
1599
1600
  /**
1600
1601
  * Name
1601
1602
  * @default
@@ -1606,6 +1607,18 @@ export declare type components = {
1606
1607
  /** Value */
1607
1608
  value?: string | null;
1608
1609
  };
1610
+ /** ItemOption */
1611
+ "ItemOption-Output": {
1612
+ /**
1613
+ * Name
1614
+ * @default
1615
+ */
1616
+ name: string | {
1617
+ [key: string]: string;
1618
+ };
1619
+ /** Value */
1620
+ value: string | null;
1621
+ };
1609
1622
  /** LongtextField */
1610
1623
  "LongtextField-Input": {
1611
1624
  /**
@@ -1722,19 +1735,21 @@ export declare type components = {
1722
1735
  */
1723
1736
  max: number;
1724
1737
  };
1725
- /** MainGuestJSON */
1726
- "MainGuestJSON-Input": {
1738
+ /** MainGuest */
1739
+ "MainGuest-Input": {
1727
1740
  /**
1728
1741
  * Iscompanion
1742
+ * @default false
1729
1743
  * @constant
1730
1744
  * @enum {boolean}
1731
1745
  */
1732
- iscompanion: false;
1746
+ isCompanion?: false;
1733
1747
  };
1734
- /** MainGuestJSON */
1735
- "MainGuestJSON-Output": {
1748
+ /** MainGuest */
1749
+ "MainGuest-Output": {
1736
1750
  /**
1737
1751
  * Iscompanion
1752
+ * @default false
1738
1753
  * @constant
1739
1754
  * @enum {boolean}
1740
1755
  */
@@ -1946,12 +1961,11 @@ export declare type components = {
1946
1961
  [key: string]: components["schemas"]["Checkins-Input"];
1947
1962
  };
1948
1963
  /**
1949
- * Companions
1950
1964
  * @default {
1951
1965
  * "isCompanion": false
1952
1966
  * }
1953
1967
  */
1954
- companions?: components["schemas"]["MainGuestJSON-Input"] | components["schemas"]["CompanionJSON-Input"];
1968
+ companions?: components["schemas"]["RootModel_Union_MainGuest__Companion__-Input"];
1955
1969
  payment?: components["schemas"]["Payment"] | null;
1956
1970
  /**
1957
1971
  * Deleted
@@ -1997,12 +2011,11 @@ export declare type components = {
1997
2011
  [key: string]: components["schemas"]["Checkins-Output"];
1998
2012
  };
1999
2013
  /**
2000
- * Companions
2001
2014
  * @default {
2002
2015
  * "isCompanion": false
2003
2016
  * }
2004
2017
  */
2005
- companions: components["schemas"]["MainGuestJSON-Output"] | components["schemas"]["CompanionJSON-Output"];
2018
+ companions: components["schemas"]["RootModel_Union_MainGuest__Companion__-Output"];
2006
2019
  payment: components["schemas"]["Payment"] | null;
2007
2020
  /**
2008
2021
  * Deleted
@@ -2145,7 +2158,7 @@ export declare type components = {
2145
2158
  * Items
2146
2159
  * @default []
2147
2160
  */
2148
- items?: components["schemas"]["ItemOption"][];
2161
+ items?: components["schemas"]["ItemOption-Input"][];
2149
2162
  };
2150
2163
  /** RadioButtonGroupField */
2151
2164
  "RadioButtonGroupField-Output": {
@@ -2198,7 +2211,7 @@ export declare type components = {
2198
2211
  * Items
2199
2212
  * @default []
2200
2213
  */
2201
- items: components["schemas"]["ItemOption"][];
2214
+ items: components["schemas"]["ItemOption-Output"][];
2202
2215
  };
2203
2216
  /** RegistrationInfo */
2204
2217
  RegistrationInfo: {
@@ -2225,6 +2238,10 @@ export declare type components = {
2225
2238
  allowRegistrationWithAuthCode?: boolean;
2226
2239
  auth_code_generator?: components["schemas"]["AuthCodeGenerator"];
2227
2240
  };
2241
+ /** RootModel[Union[MainGuest, Companion]] */
2242
+ "RootModel_Union_MainGuest__Companion__-Input": components["schemas"]["MainGuest-Input"] | components["schemas"]["Companion-Input"];
2243
+ /** RootModel[Union[MainGuest, Companion]] */
2244
+ "RootModel_Union_MainGuest__Companion__-Output": components["schemas"]["MainGuest-Output"] | components["schemas"]["Companion-Output"];
2228
2245
  /** RootModel[list[Annotated[Union[AttendeeCreatedEvent, AttendeeUpdatedEvent, AttendeeRespondedEvent, AttendeeAuthCodeRequested, EmailUnsubscribedEvent, AttendeeDeletedEvent, CheckinCreatedEvent, CheckinDeletedEvent, PaymentPaidEvent], FieldInfo(annotation=NoneType, required=True, discriminator='event')]]] */
2229
2246
  RootModel_list_Annotated_Union_AttendeeCreatedEvent__AttendeeUpdatedEvent__AttendeeRespondedEvent__AttendeeAuthCodeRequested__EmailUnsubscribedEvent__AttendeeDeletedEvent__CheckinCreatedEvent__CheckinDeletedEvent__PaymentPaidEvent___FieldInfo_annotation_NoneType__required_True__discriminator__event_____: (components["schemas"]["AttendeeCreatedEvent"] | components["schemas"]["AttendeeUpdatedEvent"] | components["schemas"]["AttendeeRespondedEvent"] | components["schemas"]["AttendeeAuthCodeRequested"] | components["schemas"]["EmailUnsubscribedEvent"] | components["schemas"]["AttendeeDeletedEvent"] | components["schemas"]["CheckinCreatedEvent"] | components["schemas"]["CheckinDeletedEvent"] | components["schemas"]["PaymentPaidEvent"])[];
2230
2247
  /** SecurityQuestion */
@@ -2486,7 +2503,7 @@ export declare type components = {
2486
2503
  * @description Variables store values which can be used on a global per instance basis,
2487
2504
  * for example in multiple E-Mails.
2488
2505
  */
2489
- Variable: {
2506
+ "Variable-Input": {
2490
2507
  /** Name */
2491
2508
  name: string;
2492
2509
  /** Title */
@@ -2508,6 +2525,33 @@ export declare type components = {
2508
2525
  */
2509
2526
  isPrivate?: boolean;
2510
2527
  };
2528
+ /**
2529
+ * Variable
2530
+ * @description Variables store values which can be used on a global per instance basis,
2531
+ * for example in multiple E-Mails.
2532
+ */
2533
+ "Variable-Output": {
2534
+ /** Name */
2535
+ name: string;
2536
+ /** Title */
2537
+ title: string;
2538
+ /**
2539
+ * Variabletype
2540
+ * @constant
2541
+ * @enum {string}
2542
+ */
2543
+ variableType: "text";
2544
+ /**
2545
+ * Value
2546
+ * @default
2547
+ */
2548
+ value: string;
2549
+ /**
2550
+ * Isprivate
2551
+ * @default false
2552
+ */
2553
+ isPrivate: boolean;
2554
+ };
2511
2555
  /** VariableUpdate */
2512
2556
  VariableUpdate: {
2513
2557
  /** Value */
@@ -2915,7 +2959,7 @@ export declare type operations = {
2915
2959
  /** @description Successful Response */
2916
2960
  200: {
2917
2961
  content: {
2918
- "application/json": components["schemas"]["Variable"][];
2962
+ "application/json": components["schemas"]["Variable-Output"][];
2919
2963
  };
2920
2964
  };
2921
2965
  /** @description Validation Error */
@@ -2938,14 +2982,14 @@ export declare type operations = {
2938
2982
  };
2939
2983
  requestBody: {
2940
2984
  content: {
2941
- "application/json": components["schemas"]["Variable"];
2985
+ "application/json": components["schemas"]["Variable-Input"];
2942
2986
  };
2943
2987
  };
2944
2988
  responses: {
2945
2989
  /** @description Successful Response */
2946
2990
  200: {
2947
2991
  content: {
2948
- "application/json": components["schemas"]["Variable"];
2992
+ "application/json": components["schemas"]["Variable-Output"];
2949
2993
  };
2950
2994
  };
2951
2995
  /** @description Validation Error */
@@ -2971,7 +3015,7 @@ export declare type operations = {
2971
3015
  /** @description Successful Response */
2972
3016
  200: {
2973
3017
  content: {
2974
- "application/json": components["schemas"]["Variable"];
3018
+ "application/json": components["schemas"]["Variable-Output"];
2975
3019
  };
2976
3020
  };
2977
3021
  /** @description Validation Error */
@@ -3002,7 +3046,7 @@ export declare type operations = {
3002
3046
  /** @description Successful Response */
3003
3047
  200: {
3004
3048
  content: {
3005
- "application/json": components["schemas"]["Variable"];
3049
+ "application/json": components["schemas"]["Variable-Output"];
3006
3050
  };
3007
3051
  };
3008
3052
  /** @description Validation Error */
@@ -4,7 +4,8 @@ export declare type TokenOptions = {
4
4
  jwtSecret: string;
5
5
  instanceName: string;
6
6
  };
7
- export declare type TokenValidationError = 'token_missing' | 'token_invalid' | 'token_expired' | 'security_question_check_failed';
7
+ export declare const tokenValidationErrorCodes: readonly ["token_missing", "token_invalid", "token_expired", "security_question_check_failed"];
8
+ export declare type TokenValidationError = typeof tokenValidationErrorCodes[number];
8
9
  export declare type RegistrationTokenOptions = {
9
10
  registrationTokenCookieName?: string;
10
11
  };
@@ -1,5 +1,6 @@
1
1
  import jws from 'jws';
2
2
  import { failure, success } from './result';
3
+ export const tokenValidationErrorCodes = ['token_missing', 'token_invalid', 'token_expired', 'security_question_check_failed'];
3
4
  const REGISTRATION_TOKEN_COOKIE_NAME = 'enter-frontend.registation-token';
4
5
  function parseJWS(tokenString, options) {
5
6
  if (!tokenString) return failure('token_missing');
@@ -1,2 +1,2 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type Variable = components['schemas']['Variable'];
2
+ export declare type Variable = components['schemas']['Variable-Output'];
@@ -56,4 +56,4 @@ export declare const Disabled: ComponentStory<React.FunctionComponent<Omit<React
56
56
  borderless?: boolean | undefined;
57
57
  fullWidth?: boolean | undefined;
58
58
  }>>;
59
- export declare const OnePrimaryAndTwoBorderless: () => JSX.Element;
59
+ export declare const OnePrimaryAndTwoBorderless: () => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.60.2",
3
+ "version": "0.60.4",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",
@@ -43,7 +43,6 @@
43
43
  "@babel/preset-env": "^7.18.2",
44
44
  "@babel/preset-react": "^7.17.12",
45
45
  "@babel/preset-typescript": "^7.17.12",
46
- "@liangskyli/openapi-typescript": "^5.4.1",
47
46
  "@storybook/addon-actions": "^6.5.15",
48
47
  "@storybook/addon-essentials": "^6.5.15",
49
48
  "@storybook/addon-interactions": "^6.5.15",
@@ -55,17 +54,18 @@
55
54
  "@types/cookie": "^0.6.0",
56
55
  "@types/jws": "^3.2.9",
57
56
  "@types/node": "^17.0.38",
58
- "@types/react": "^18.0.10",
59
- "@types/react-dom": "^18.0.5",
57
+ "@types/react": "^18.3.3",
58
+ "@types/react-dom": "^18.3.0",
60
59
  "@types/uuid": "^8.3.4",
61
60
  "@typescript-eslint/eslint-plugin": "^5.27.0",
62
61
  "@typescript-eslint/parser": "^5.27.0",
63
62
  "eslint": "^8.16.0",
64
63
  "eslint-config-prettier": "^8.5.0",
65
64
  "husky": "^7.0.1",
65
+ "openapi-typescript": "^6.7.6",
66
66
  "prettier": "^2.6.2",
67
- "react": "^18.1.0",
68
- "react-dom": "^18.1.0",
67
+ "react": "^18.3.1",
68
+ "react-dom": "^18.3.1",
69
69
  "typescript": "^4.8.4"
70
70
  },
71
71
  "peerDependencies": {
@@ -74,7 +74,6 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "cookie": "^0.6.0",
77
- "fp-ts": "^2.12.1",
78
77
  "jws": "^4.0.0",
79
78
  "styled-jsx": "^5.0.2",
80
79
  "uuid": "^9.0.0"