@dev-crew-berlin/enter-js-utils 0.18.0 → 0.19.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.
@@ -23,6 +23,7 @@ export declare type AttendeeJSON = {
23
23
  amount: number;
24
24
  testmode: boolean;
25
25
  } | null;
26
+ deleted: boolean;
26
27
  };
27
28
  export declare class Attendee {
28
29
  id: string;
@@ -45,6 +46,7 @@ export declare class Attendee {
45
46
  amount: number;
46
47
  testmode: boolean;
47
48
  } | null;
49
+ deleted: boolean;
48
50
  constructor(rawAttendee: RawAttendee);
49
51
  getRsvpCountForTag(checkinTag: string): number;
50
52
  getResponseForTag(checkinTag: string): 'no-response' | 'negative-repsone' | 'positive-response';
@@ -83,6 +85,7 @@ export declare const rawAttendee: import("fefe").Validator<import("fefe").Object
83
85
  amount: import("fefe").Validator<number, import("fefe").LeafError>;
84
86
  testmode: import("fefe").Validator<boolean, import("fefe").LeafError>;
85
87
  }> | null, import("fefe").FefeError>;
88
+ deleted: import("fefe").Validator<boolean, import("fefe").FefeError>;
86
89
  }>, import("fefe").FefeError>;
87
90
  declare type RawAttendee = ValidatorReturnType<typeof rawAttendee>;
88
91
  export declare const parseAttendee: (value: unknown) => APIResult<Attendee>;
@@ -15,6 +15,7 @@ export class Attendee {
15
15
  this.checkin = rawAttendee.checkin;
16
16
  this.companions = rawAttendee.companions;
17
17
  this.payment = rawAttendee.payment;
18
+ this.deleted = rawAttendee.deleted;
18
19
  }
19
20
 
20
21
  getRsvpCountForTag(checkinTag) {
@@ -99,7 +100,8 @@ export const rawAttendee = object({
99
100
  integer: true
100
101
  }),
101
102
  testmode: boolean()
102
- })), null)
103
+ })), null),
104
+ deleted: defaultTo(boolean(), false)
103
105
  }, {
104
106
  allowExcessProperties: true
105
107
  });
@@ -26,7 +26,8 @@ const mainGuest = new Attendee({
26
26
  },
27
27
  userdata: {
28
28
  name: 'Max Mustermann'
29
- }
29
+ },
30
+ deleted: false
30
31
  });
31
32
 
32
33
  const Template = args => /*#__PURE__*/React.createElement(CompanionInfo, args);
@@ -27,7 +27,8 @@ const attendee = new Attendee({
27
27
  },
28
28
  userdata: {
29
29
  name: 'Max Mustermann'
30
- }
30
+ },
31
+ deleted: false
31
32
  });
32
33
  const companion = new Attendee({
33
34
  id: 'my-companion',
@@ -46,7 +47,8 @@ const companion = new Attendee({
46
47
  },
47
48
  userdata: {
48
49
  name: 'Jhon Doe'
49
- }
50
+ },
51
+ deleted: false
50
52
  });
51
53
 
52
54
  const Template = args => /*#__PURE__*/React.createElement(GuestCard, args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",