@dev-crew-berlin/enter-js-utils 0.14.2 → 0.14.3
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.
|
@@ -24,6 +24,7 @@ export declare type AttendeeJSON = {
|
|
|
24
24
|
amount: number;
|
|
25
25
|
testmode: boolean;
|
|
26
26
|
} | null;
|
|
27
|
+
deleted: boolean;
|
|
27
28
|
};
|
|
28
29
|
export declare class Attendee {
|
|
29
30
|
id: string;
|
|
@@ -47,6 +48,7 @@ export declare class Attendee {
|
|
|
47
48
|
amount: number;
|
|
48
49
|
testmode: boolean;
|
|
49
50
|
} | null;
|
|
51
|
+
deleted: boolean;
|
|
50
52
|
constructor(rawAttendee: RawAttendee);
|
|
51
53
|
getRsvpCountForTag(checkinTag: string): number;
|
|
52
54
|
getResponseForTag(checkinTag: string): 'no-response' | 'negative-repsone' | 'positive-response';
|
|
@@ -86,6 +88,7 @@ export declare const rawAttendee: import("fefe").Validator<import("fefe").Object
|
|
|
86
88
|
amount: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
87
89
|
testmode: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
88
90
|
}> | null, import("fefe").FefeError>;
|
|
91
|
+
deleted: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
89
92
|
}>, import("fefe").FefeError>;
|
|
90
93
|
declare type RawAttendee = ValidatorReturnType<typeof rawAttendee>;
|
|
91
94
|
export declare const parseAttendee: (value: unknown) => APIResult<Attendee>;
|
package/dist/models/attendee.js
CHANGED
|
@@ -16,6 +16,7 @@ export class Attendee {
|
|
|
16
16
|
this.checkin = rawAttendee.checkin;
|
|
17
17
|
this.companions = rawAttendee.companions;
|
|
18
18
|
this.payment = rawAttendee.payment;
|
|
19
|
+
this.deleted = rawAttendee.deleted;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
getRsvpCountForTag(checkinTag) {
|
|
@@ -101,7 +102,8 @@ export const rawAttendee = object({
|
|
|
101
102
|
integer: true
|
|
102
103
|
}),
|
|
103
104
|
testmode: boolean()
|
|
104
|
-
})), null)
|
|
105
|
+
})), null),
|
|
106
|
+
deleted: defaultTo(boolean(), false)
|
|
105
107
|
}, {
|
|
106
108
|
allowExcessProperties: true
|
|
107
109
|
});
|
|
@@ -28,7 +28,8 @@ const attendee = new Attendee({
|
|
|
28
28
|
userdata: {
|
|
29
29
|
name: 'Max Mustermann'
|
|
30
30
|
},
|
|
31
|
-
metadata: {}
|
|
31
|
+
metadata: {},
|
|
32
|
+
deleted: false
|
|
32
33
|
});
|
|
33
34
|
const companion = new Attendee({
|
|
34
35
|
id: 'my-companion',
|
|
@@ -48,7 +49,8 @@ const companion = new Attendee({
|
|
|
48
49
|
userdata: {
|
|
49
50
|
name: 'Jhon Doe'
|
|
50
51
|
},
|
|
51
|
-
metadata: {}
|
|
52
|
+
metadata: {},
|
|
53
|
+
deleted: false
|
|
52
54
|
});
|
|
53
55
|
|
|
54
56
|
const Template = args => /*#__PURE__*/React.createElement(GuestCard, args);
|