@dev-crew-berlin/enter-js-utils 0.97.5 → 0.98.10

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.
@@ -6,8 +6,11 @@ import { Rsvp } from './rsvp';
6
6
  import { AttendeeUpdatedEvent } from './event';
7
7
  import { Payment } from './payment';
8
8
  type AttendeeJSONInput = components['schemas']['PublicAttendee-Input'];
9
+ type CompanionInput = components['schemas']['Companion-Input'] | (Omit<components['schemas']['MainGuest-Input'], 'companionNames'> & {
10
+ companionNames?: Record<string, string>;
11
+ });
9
12
  export type AttendeeJSON = Omit<components['schemas']['PublicAttendee-Output'], 'companions'> & {
10
- companions: AttendeeJSONInput['companions'];
13
+ companions?: CompanionInput;
11
14
  };
12
15
  export declare class Attendee {
13
16
  id: string;
@@ -2,6 +2,10 @@ import { v4 as uuidv4 } from 'uuid';
2
2
  import hash from 'stable-hash';
3
3
  import { Checkins } from './checkins';
4
4
  import { Rsvp } from './rsvp';
5
+
6
+ // companionNames has default:{} on the backend so it is optional on input,
7
+ // but openapi-typescript treats absent `required` as all-required — patch it locally.
8
+
5
9
  export class Attendee {
6
10
  userdata = new Map();
7
11
  tags = new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.97.5",
3
+ "version": "0.98.10",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",
@@ -19,7 +19,7 @@
19
19
  "prepare": "husky install && npm run build",
20
20
  "build": "rm -r dist & babel src --extensions '.ts','.tsx' -d dist && tsc -d",
21
21
  "lint": "eslint src/ --ext .ts",
22
- "test": "echo \"Error: no test specified\" && exit 1",
22
+ "test": "vitest run",
23
23
  "storybook": "storybook dev -p 6006",
24
24
  "build-storybook": "storybook build",
25
25
  "generate-client": "openapi-typescript https://api.dev.enter.events/openapi.json --output src/generated/api-schema.ts --empty-objects-unknown --export-type",
@@ -55,22 +55,22 @@
55
55
  "@storybook/test": "^8.5.8",
56
56
  "@types/cookie": "^0.6.0",
57
57
  "@types/jws": "^3.2.9",
58
- "@types/node": "^17.0.38",
58
+ "@types/node": "^22.19.21",
59
59
  "@types/react": "^18.3.3",
60
60
  "@types/react-dom": "^18.3.0",
61
- "@types/uuid": "^8.3.4",
62
61
  "@typescript-eslint/eslint-plugin": "^5.27.0",
63
62
  "@typescript-eslint/parser": "^5.27.0",
64
63
  "eslint": "^8.16.0",
65
64
  "eslint-config-prettier": "^8.5.0",
66
65
  "husky": "^7.0.1",
67
- "openapi-typescript": "^6.7.6",
66
+ "openapi-typescript": "^7.13.0",
68
67
  "prettier": "^2.6.2",
69
68
  "react": "^19.0.0",
70
69
  "react-dom": "^19.0.0",
71
70
  "typedoc": "^0.27.8",
72
71
  "typedoc-plugin-rename-defaults": "^0.7.2",
73
- "typescript": "^5.7.3"
72
+ "typescript": "^5.7.3",
73
+ "vitest": "^4.1.8"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": "^19.0.0",
@@ -82,6 +82,6 @@
82
82
  "jws": "^4.0.0",
83
83
  "stable-hash": "^0.0.5",
84
84
  "styled-jsx": "^5.1.6",
85
- "uuid": "^9.0.0"
85
+ "uuid": "^14.0.0"
86
86
  }
87
87
  }
@@ -1,16 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Button } from './button';
3
- declare const meta: Meta<typeof Button>;
4
- export default meta;
5
- type Story = StoryObj<typeof Button>;
6
- export declare const Basic: Story;
7
- export declare const FullWidth: Story;
8
- export declare const Primary: Story;
9
- export declare const Danger: Story;
10
- export declare const Green: Story;
11
- export declare const Borderless: Story;
12
- export declare const BorderlessPrimary: Story;
13
- export declare const BorderlessDanger: Story;
14
- export declare const BorderlessGreen: Story;
15
- export declare const Disabled: Story;
16
- export declare const OnePrimaryAndTwoBorderless: Story;
@@ -1,14 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { CheckinCountIndicator } from './checkin-count-indicator';
3
- declare const meta: Meta<typeof CheckinCountIndicator>;
4
- export default meta;
5
- type Story = StoryObj<typeof CheckinCountIndicator>;
6
- export declare const SingleResponse: Story;
7
- export declare const Decline: Story;
8
- export declare const NoResponse: Story;
9
- export declare const MultipleResponses: Story;
10
- export declare const CheckinAndResponse: Story;
11
- export declare const MultipleCheckinsAndResponse: Story;
12
- export declare const CheckinsWithDecline: Story;
13
- export declare const CheckinWithoutResponse: Story;
14
- export declare const MultipleCheckins: Story;
@@ -1,12 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { CheckinProgressBar } from './checkin-progress-bar';
3
- declare const meta: Meta<typeof CheckinProgressBar>;
4
- export default meta;
5
- type Story = StoryObj<typeof CheckinProgressBar>;
6
- export declare const Basic: Story;
7
- export declare const WithoutTagName: Story;
8
- export declare const NoCheckins: Story;
9
- export declare const AllCheckinsComplete: Story;
10
- export declare const MoreCheckinsThanExpected: Story;
11
- export declare const NoRSVP: Story;
12
- export declare const CustomLabels: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { CompanionInfo } from './companion-info';
3
- declare const meta: Meta<typeof CompanionInfo>;
4
- export default meta;
5
- type Story = StoryObj<typeof CompanionInfo>;
6
- export declare const WithMainGuest: Story;
7
- export declare const NotACompanion: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { EnterLogo } from './enter-logo';
3
- declare const meta: Meta<typeof EnterLogo>;
4
- export default meta;
5
- type Story = StoryObj<typeof EnterLogo>;
6
- export declare const Basic: Story;
7
- export declare const White: Story;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { Input } from './input';
3
- declare const meta: Meta<typeof Input>;
4
- export default meta;
5
- type Story = StoryObj<typeof Input>;
6
- export declare const Basic: Story;
7
- export declare const NumberInput: Story;
8
- export declare const WithValue: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { Label } from './label';
3
- declare const meta: Meta<typeof Label>;
4
- export default meta;
5
- type Story = StoryObj<typeof Label>;
6
- export declare const Basic: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { SearchInput } from './search-input';
3
- declare const meta: Meta<typeof SearchInput>;
4
- export default meta;
5
- type Story = StoryObj<typeof SearchInput>;
6
- export declare const Basic: Story;
7
- export declare const WhiteText: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { SegmentedControl } from './segmented-control';
3
- declare const meta: Meta<typeof SegmentedControl>;
4
- export default meta;
5
- type Story = StoryObj<typeof SegmentedControl>;
6
- export declare const Basic: Story;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { Select } from './select';
3
- declare const meta: Meta<typeof Select>;
4
- export default meta;
5
- type Story = StoryObj<typeof Select>;
6
- export declare const Basic: Story;
7
- export declare const WithPleaseSelect: Story;
8
- export declare const WithCustomFormat: Story;
@@ -1,14 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { GuestCard } from './guest-card';
3
- declare const meta: Meta<typeof GuestCard>;
4
- export default meta;
5
- type Story = StoryObj<typeof GuestCard>;
6
- export declare const WithBackground: Story;
7
- export declare const Plain: Story;
8
- export declare const Dense: Story;
9
- export declare const FilteredTags: Story;
10
- export declare const WithColorLabel: Story;
11
- export declare const WithMultipleColorLabels: Story;
12
- export declare const WithInfoText: Story;
13
- export declare const WithCompanion: Story;
14
- export declare const WithCompanionButNoMainGuestInfo: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { AddGuestIcon } from './add-guest-icon';
3
- declare const meta: Meta<typeof AddGuestIcon>;
4
- export default meta;
5
- type Story = StoryObj<typeof AddGuestIcon>;
6
- export declare const Basic: Story;
7
- export declare const White: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { CaretIcon } from './caret-icon';
3
- declare const meta: Meta<typeof CaretIcon>;
4
- export default meta;
5
- type Story = StoryObj<typeof CaretIcon>;
6
- export declare const Basic: Story;
7
- export declare const White: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { FilterIcon } from './filter-icon';
3
- declare const meta: Meta<typeof FilterIcon>;
4
- export default meta;
5
- type Story = StoryObj<typeof FilterIcon>;
6
- export declare const Basic: Story;
7
- export declare const White: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { SearchIcon } from './search-icon';
3
- declare const meta: Meta<typeof SearchIcon>;
4
- export default meta;
5
- type Story = StoryObj<typeof SearchIcon>;
6
- export declare const Basic: Story;
7
- export declare const White: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { SettingsIcon } from './settings-icon';
3
- declare const meta: Meta<typeof SettingsIcon>;
4
- export default meta;
5
- type Story = StoryObj<typeof SettingsIcon>;
6
- export declare const Basic: Story;
7
- export declare const White: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { SortListIcon } from './sort-list-icon';
3
- declare const meta: Meta<typeof SortListIcon>;
4
- export default meta;
5
- type Story = StoryObj<typeof SortListIcon>;
6
- export declare const Basic: Story;
7
- export declare const White: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { Tag } from './tag';
3
- declare const meta: Meta<typeof Tag>;
4
- export default meta;
5
- type Story = StoryObj<typeof Tag>;
6
- export declare const Basic: Story;