@dev-crew-berlin/enter-js-utils 0.5.5 → 0.5.6
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/dist/api-client/api-base.d.ts +30 -0
- package/dist/api-client/index.d.ts +75 -0
- package/dist/lib/api-result.d.ts +25 -0
- package/dist/lib/class-names.d.ts +1 -0
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/not-undefined.d.ts +1 -0
- package/dist/lib/result.d.ts +33 -0
- package/dist/lib/theme.d.ts +18 -0
- package/dist/models/_helpers.d.ts +23 -0
- package/dist/models/access-token.d.ts +11 -0
- package/dist/models/attendee.d.ts +90 -0
- package/dist/models/checkin-counts.d.ts +10 -0
- package/dist/models/checkins.d.ts +40 -0
- package/dist/models/event.d.ts +40 -0
- package/dist/models/field-group.d.ts +484 -0
- package/dist/models/field-value.d.ts +2 -0
- package/dist/models/field.d.ts +321 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/instance.d.ts +78 -0
- package/dist/models/invite.d.ts +33 -0
- package/dist/models/meta-field.d.ts +7 -0
- package/dist/models/user.d.ts +18 -0
- package/dist/models/variable.d.ts +27 -0
- package/dist/ui/button.d.ts +7 -0
- package/dist/ui/button.stories.d.ts +18 -0
- package/dist/ui/checkin-count-indicator.d.ts +15 -0
- package/dist/ui/checkin-count-indicator.stories.d.ts +84 -0
- package/dist/ui/companion-info.d.ts +15 -0
- package/dist/ui/companion-info.stories.d.ts +44 -0
- package/dist/ui/fonts.d.ts +3 -0
- package/dist/ui/guest-card.d.ts +16 -0
- package/dist/ui/guest-card.stories.d.ts +92 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/tag.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { APIResult, APIValidator } from '../lib';
|
|
2
|
+
import { AccessToken } from '../models/access-token';
|
|
3
|
+
export interface APICredentials {
|
|
4
|
+
accessToken: string;
|
|
5
|
+
url: string;
|
|
6
|
+
}
|
|
7
|
+
export default class APIBase {
|
|
8
|
+
private credentials;
|
|
9
|
+
private isLoggedIn;
|
|
10
|
+
private onLogout;
|
|
11
|
+
constructor(args: {
|
|
12
|
+
credentials: APICredentials;
|
|
13
|
+
onLogout: (reason?: string) => void;
|
|
14
|
+
});
|
|
15
|
+
private static fetchResult;
|
|
16
|
+
static fetchAccessToken(args: {
|
|
17
|
+
url: string;
|
|
18
|
+
user: string;
|
|
19
|
+
password: string;
|
|
20
|
+
deviceName: string;
|
|
21
|
+
}): Promise<APIResult<AccessToken>>;
|
|
22
|
+
static getAuthHeader(username: string, password: string): string;
|
|
23
|
+
private fetchFromEnter;
|
|
24
|
+
protected get<Model>(endpoint: string, validate: APIValidator<Model>): Promise<APIResult<Model>>;
|
|
25
|
+
protected post<Model>(endpoint: string, data: Record<string, unknown> | Array<unknown> | null, validate: APIValidator<Model>): Promise<APIResult<Model>>;
|
|
26
|
+
protected put<Model>(endpoint: string, data: Record<string, unknown> | Array<unknown>, validate: APIValidator<Model>): Promise<APIResult<Model>>;
|
|
27
|
+
protected patch<Model>(endpoint: string, data: Record<string, unknown> | Array<unknown>, validate: APIValidator<Model>): Promise<APIResult<Model>>;
|
|
28
|
+
refreshToken(): Promise<APIResult<AccessToken>>;
|
|
29
|
+
logout(): Promise<void>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import APIBase from './api-base';
|
|
2
|
+
import { APIResult } from '../lib';
|
|
3
|
+
import { Attendee } from '../models/attendee';
|
|
4
|
+
import { Event } from '../models';
|
|
5
|
+
import { CheckinCounts } from '../models/checkin-counts';
|
|
6
|
+
import { FieldGroups } from '../models/field-group';
|
|
7
|
+
import { Instance } from '../models/instance';
|
|
8
|
+
import { Invite } from '../models/invite';
|
|
9
|
+
import { User } from '../models/user';
|
|
10
|
+
import { Variable } from '../models/variable';
|
|
11
|
+
import { Dictionary } from '../models/_helpers';
|
|
12
|
+
export type { APICredentials } from './api-base';
|
|
13
|
+
export default class API extends APIBase {
|
|
14
|
+
getInstance(args: {
|
|
15
|
+
instanceId: string;
|
|
16
|
+
}): Promise<APIResult<Instance>>;
|
|
17
|
+
getInstanceList(): Promise<APIResult<Instance[]>>;
|
|
18
|
+
getFields(args: {
|
|
19
|
+
instanceId: string;
|
|
20
|
+
}): Promise<APIResult<FieldGroups>>;
|
|
21
|
+
getCheckinCounts(args: {
|
|
22
|
+
instanceId: string;
|
|
23
|
+
}): Promise<APIResult<CheckinCounts>>;
|
|
24
|
+
getAttendeeList(args: {
|
|
25
|
+
instanceId: string;
|
|
26
|
+
}): Promise<APIResult<Attendee[]>>;
|
|
27
|
+
sendEmail(args: {
|
|
28
|
+
instanceId: string;
|
|
29
|
+
collection: 'attendees';
|
|
30
|
+
attendeeId: string;
|
|
31
|
+
mailId: string;
|
|
32
|
+
} | {
|
|
33
|
+
instanceId: string;
|
|
34
|
+
collection: 'invites';
|
|
35
|
+
index: number;
|
|
36
|
+
mailId: string;
|
|
37
|
+
}): Promise<APIResult<null>>;
|
|
38
|
+
getAttendeesByAuthCode(args: {
|
|
39
|
+
instanceId: string;
|
|
40
|
+
authCode: string;
|
|
41
|
+
}): Promise<APIResult<Attendee[]>>;
|
|
42
|
+
getInviteByAuthCode(args: {
|
|
43
|
+
instanceId: string;
|
|
44
|
+
authCode: string;
|
|
45
|
+
}): Promise<APIResult<Invite>>;
|
|
46
|
+
getAttendeeById(args: {
|
|
47
|
+
instanceId: string;
|
|
48
|
+
attendeeId: string;
|
|
49
|
+
}): Promise<APIResult<Attendee>>;
|
|
50
|
+
createEvents(args: {
|
|
51
|
+
events: Event[];
|
|
52
|
+
}): Promise<APIResult<null>>;
|
|
53
|
+
getUser(): Promise<APIResult<User>>;
|
|
54
|
+
patchUser(args: {
|
|
55
|
+
userdata: Dictionary<unknown>;
|
|
56
|
+
}): Promise<APIResult<null>>;
|
|
57
|
+
getAllVariables(args: {
|
|
58
|
+
instanceId: string;
|
|
59
|
+
}): Promise<APIResult<Variable[]>>;
|
|
60
|
+
getVariableByName(args: {
|
|
61
|
+
instanceId: string;
|
|
62
|
+
variableName: string;
|
|
63
|
+
}): Promise<APIResult<Variable>>;
|
|
64
|
+
createVariable(args: {
|
|
65
|
+
instanceId: string;
|
|
66
|
+
variable: Variable;
|
|
67
|
+
}): Promise<APIResult<Variable>>;
|
|
68
|
+
updateVariable(args: {
|
|
69
|
+
instanceId: string;
|
|
70
|
+
variableName: string;
|
|
71
|
+
update: {
|
|
72
|
+
value: string;
|
|
73
|
+
};
|
|
74
|
+
}): Promise<APIResult<Variable>>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Validator } from 'fefe';
|
|
2
|
+
import { Result } from './result';
|
|
3
|
+
export declare type NetworkError = {
|
|
4
|
+
type: 'network-error';
|
|
5
|
+
endpoint: string;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type HTTPError = {
|
|
9
|
+
type: 'http-error';
|
|
10
|
+
endpoint: string;
|
|
11
|
+
statusCode: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare type ClientError = {
|
|
15
|
+
type: 'client-error';
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
export declare type ValidationError = {
|
|
19
|
+
type: 'validation-error';
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
export declare type APIError = NetworkError | HTTPError | ClientError | ValidationError;
|
|
23
|
+
export declare type APIResult<Model> = Result<APIError[], Model>;
|
|
24
|
+
export declare type APIValidator<Model> = (value: unknown) => APIResult<Model>;
|
|
25
|
+
export declare function apiValidator<T>(validate: Validator<T>): APIValidator<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function classNames(classNames: Record<string, boolean | undefined | null>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function notUndefined<T>(value: T | undefined): value is T;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare type Failure<Reason> = {
|
|
2
|
+
success: false;
|
|
3
|
+
error: Reason;
|
|
4
|
+
};
|
|
5
|
+
export declare type Success<Payload> = {
|
|
6
|
+
success: true;
|
|
7
|
+
data: Payload;
|
|
8
|
+
};
|
|
9
|
+
export declare type Result<Reason, Payload> = Failure<Reason> | Success<Payload>;
|
|
10
|
+
export declare function success<Payload>(data: Payload): Success<Payload>;
|
|
11
|
+
export declare function failure<Reason>(reason: Reason): Failure<Reason>;
|
|
12
|
+
export declare function asSuccess<Payload>(result: Result<unknown, Payload>): Success<Payload> | undefined;
|
|
13
|
+
export declare function asFailure<Reason>(result: Result<Reason, unknown>): Failure<Reason> | undefined;
|
|
14
|
+
declare type UnwrapSuccess<T> = T extends Success<infer Payload> ? Payload : never;
|
|
15
|
+
declare type UnwrapFailure<T> = T extends Failure<infer Reason> ? Reason : never;
|
|
16
|
+
declare type UnwrapArray<T> = T extends (infer R)[] ? R : never;
|
|
17
|
+
declare type MergedSuccesses<T> = {
|
|
18
|
+
[K in keyof T]: UnwrapSuccess<T[K]>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Takes a list of Results and creates one single result out of it
|
|
22
|
+
*
|
|
23
|
+
* If all results are successfull a Success is retured.
|
|
24
|
+
* Then the data value is an array of all the data values of the original
|
|
25
|
+
* results in correct order.
|
|
26
|
+
*
|
|
27
|
+
* If a single result has a failure a Failure is retured.
|
|
28
|
+
* The error then is an array of all the original errors.
|
|
29
|
+
* @param results
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
export declare function combineResults<T extends Array<Result<any, any>> | [Result<any, any>]>(results: T): Result<UnwrapFailure<UnwrapArray<T>>[], MergedSuccesses<T>>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
enterDarkGrey: string;
|
|
3
|
+
enterLightGrey: string;
|
|
4
|
+
enterMediumGrey: string;
|
|
5
|
+
enterGrey: string;
|
|
6
|
+
enterBackground: string;
|
|
7
|
+
enterModalBackground: string;
|
|
8
|
+
enterError: string;
|
|
9
|
+
enterRed: string;
|
|
10
|
+
enterCyan: string;
|
|
11
|
+
enterGreen: string;
|
|
12
|
+
enterYellow: string;
|
|
13
|
+
enterPink: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const fonts: {
|
|
16
|
+
primary: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Result, Validator } from 'fefe';
|
|
2
|
+
export declare type Dictionary<T> = Record<string, T>;
|
|
3
|
+
/**
|
|
4
|
+
* creates a validator that tries to parse a unkown value to
|
|
5
|
+
* a Dictionary.
|
|
6
|
+
* We define a Dictionary as a js object with strings as a key.
|
|
7
|
+
* e.g: `{ key: 'value' }
|
|
8
|
+
* The value then is whatever the validator returns
|
|
9
|
+
* So `const numDict = dictionary(number())` would make shure a object
|
|
10
|
+
* has stings as a key and numbers as values.
|
|
11
|
+
* A valid object could look like this: `{ key: 1 }`
|
|
12
|
+
* @param validator the validator for the value of the record
|
|
13
|
+
*/
|
|
14
|
+
export declare function dictionary<T>(validator: Validator<T>): (value: unknown) => Result<Dictionary<T>>;
|
|
15
|
+
export declare function constant<T extends string | number | symbol | boolean>(constant: T): Validator<T>;
|
|
16
|
+
export declare function toString(value: unknown): Result<string>;
|
|
17
|
+
export declare function parseTimestamp(value: number): Result<Date>;
|
|
18
|
+
export declare function maybe<T>(validator: Validator<T>): Validator<T | null>;
|
|
19
|
+
export declare function maybe<T>(validator: Validator<T>, defaultValue: T): Validator<T>;
|
|
20
|
+
export declare function noContent(value: unknown): Result<null>;
|
|
21
|
+
export declare function unknown(): Validator<unknown>;
|
|
22
|
+
export declare const parseNoContent: import("../lib").APIValidator<null>;
|
|
23
|
+
export declare const positiveInteger: Validator<number, import("fefe").LeafError>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ValidatorReturnType } from 'fefe';
|
|
2
|
+
declare const accessToken: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
3
|
+
accessToken: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
4
|
+
expires: import("fefe").Pipe<unknown, Date>;
|
|
5
|
+
}>, import("fefe").FefeError>;
|
|
6
|
+
export declare type AccessToken = ValidatorReturnType<typeof accessToken>;
|
|
7
|
+
export declare const parseAccessToken: import("../lib").APIValidator<import("fefe").ObjectResult<{
|
|
8
|
+
accessToken: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
9
|
+
expires: import("fefe").Pipe<unknown, Date>;
|
|
10
|
+
}>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ValidatorReturnType } from 'fefe';
|
|
2
|
+
import { APIResult } from '../lib';
|
|
3
|
+
import { Checkin, Checkins, CheckinsJSON } from './checkins';
|
|
4
|
+
import { FieldValue } from './field-value';
|
|
5
|
+
export declare type AttendeeJSON = {
|
|
6
|
+
id: string;
|
|
7
|
+
auth: string | null;
|
|
8
|
+
userdata: Record<string, string>;
|
|
9
|
+
metadata: Record<string, string>;
|
|
10
|
+
tags: string[] | null;
|
|
11
|
+
language: string | null;
|
|
12
|
+
time: Date;
|
|
13
|
+
rsvp: Record<string, number | null>;
|
|
14
|
+
checkin: Record<string, CheckinsJSON>;
|
|
15
|
+
companions: {
|
|
16
|
+
isCompanion: false;
|
|
17
|
+
} | {
|
|
18
|
+
isCompanion: true;
|
|
19
|
+
mainGuestId: string;
|
|
20
|
+
};
|
|
21
|
+
payment: {
|
|
22
|
+
paid: boolean;
|
|
23
|
+
provider: 'credit' | 'paypal';
|
|
24
|
+
amount: number;
|
|
25
|
+
testmode: boolean;
|
|
26
|
+
} | null;
|
|
27
|
+
};
|
|
28
|
+
export declare class Attendee {
|
|
29
|
+
id: string;
|
|
30
|
+
auth: string | null;
|
|
31
|
+
userdata: Record<string, FieldValue>;
|
|
32
|
+
metadata: Record<string, string>;
|
|
33
|
+
tags: string[] | null;
|
|
34
|
+
language: string | null;
|
|
35
|
+
time: Date;
|
|
36
|
+
rsvp: Record<string, number | null>;
|
|
37
|
+
checkin: Record<string, Checkins>;
|
|
38
|
+
companions: {
|
|
39
|
+
isCompanion: false;
|
|
40
|
+
} | {
|
|
41
|
+
isCompanion: true;
|
|
42
|
+
mainGuestId: string;
|
|
43
|
+
};
|
|
44
|
+
payment: {
|
|
45
|
+
paid: boolean;
|
|
46
|
+
provider: 'credit' | 'paypal';
|
|
47
|
+
amount: number;
|
|
48
|
+
testmode: boolean;
|
|
49
|
+
} | null;
|
|
50
|
+
constructor(rawAttendee: RawAttendee);
|
|
51
|
+
getRsvpCountForTag(checkinTag: string): number;
|
|
52
|
+
getResponseForTag(checkinTag: string): 'no-response' | 'negative-repsone' | 'positive-response';
|
|
53
|
+
getCheckinsForTag(checkinTag: string): Checkins;
|
|
54
|
+
getCheckinCountForTag(checkinTag: string): number;
|
|
55
|
+
addCheckinForTag(args: {
|
|
56
|
+
checkinTag: string;
|
|
57
|
+
checkin: Checkin;
|
|
58
|
+
}): Attendee;
|
|
59
|
+
deleteCheckinForTag(args: {
|
|
60
|
+
checkinTag: string;
|
|
61
|
+
checkinId: string;
|
|
62
|
+
}): Attendee;
|
|
63
|
+
}
|
|
64
|
+
export declare const rawAttendee: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
65
|
+
id: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
66
|
+
auth: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
67
|
+
userdata: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<string | number | string[] | null>, import("fefe").FefeError>;
|
|
68
|
+
metadata: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<string>, import("fefe").FefeError>;
|
|
69
|
+
tags: import("fefe").Validator<string[] | null, import("fefe").FefeError>;
|
|
70
|
+
language: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
71
|
+
time: import("fefe").Pipe<unknown, Date>;
|
|
72
|
+
rsvp: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<number | null>, import("fefe").FefeError>;
|
|
73
|
+
checkin: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<Checkins>, import("fefe").FefeError>;
|
|
74
|
+
companions: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
75
|
+
isCompanion: import("fefe").Validator<false, import("fefe").FefeError>;
|
|
76
|
+
}> | import("fefe").ObjectResult<{
|
|
77
|
+
isCompanion: import("fefe").Validator<true, import("fefe").FefeError>;
|
|
78
|
+
mainGuestId: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
79
|
+
}>, import("fefe").LeafError>;
|
|
80
|
+
payment: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
81
|
+
paid: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
82
|
+
provider: import("fefe").Validator<"credit" | "paypal", import("fefe").LeafError>;
|
|
83
|
+
amount: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
84
|
+
testmode: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
85
|
+
}> | null, import("fefe").FefeError>;
|
|
86
|
+
}>, import("fefe").FefeError>;
|
|
87
|
+
declare type RawAttendee = ValidatorReturnType<typeof rawAttendee>;
|
|
88
|
+
export declare const parseAttendee: (value: unknown) => APIResult<Attendee>;
|
|
89
|
+
export declare const parseAttendeeList: (value: unknown) => APIResult<Attendee[]>;
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ValidatorReturnType } from 'fefe';
|
|
2
|
+
export declare const checkinCounts: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<import("fefe").ObjectResult<{
|
|
3
|
+
checkins: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
4
|
+
rsvp: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
5
|
+
}>>, import("fefe").FefeError>;
|
|
6
|
+
export declare type CheckinCounts = ValidatorReturnType<typeof checkinCounts>;
|
|
7
|
+
export declare const parseCheckinCounts: import("../lib").APIValidator<import("./_helpers").Dictionary<import("fefe").ObjectResult<{
|
|
8
|
+
checkins: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
9
|
+
rsvp: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
10
|
+
}>>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Result as FefeResult, ValidatorReturnType } from 'fefe';
|
|
2
|
+
export declare type Checkin = {
|
|
3
|
+
id: string;
|
|
4
|
+
time: Date;
|
|
5
|
+
main: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type CheckinsJSON = {
|
|
8
|
+
checkins: {
|
|
9
|
+
id: string;
|
|
10
|
+
time: string;
|
|
11
|
+
main: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
deleted: string[];
|
|
14
|
+
};
|
|
15
|
+
export declare class Checkins {
|
|
16
|
+
checkins: Checkin[];
|
|
17
|
+
deleted: string[];
|
|
18
|
+
constructor(rawCheckins: RawCheckins);
|
|
19
|
+
toJSON(): CheckinsJSON;
|
|
20
|
+
getAllCheckins(): Checkin[];
|
|
21
|
+
getOtherCheckins(): Checkin[];
|
|
22
|
+
getMainCheckin(): Checkin | undefined;
|
|
23
|
+
merge(otherCheckin: Checkins): Checkins;
|
|
24
|
+
}
|
|
25
|
+
export declare const checkin: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
26
|
+
id: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
27
|
+
time: import("fefe").Pipe<unknown, Date>;
|
|
28
|
+
main: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
29
|
+
}>, import("fefe").FefeError>;
|
|
30
|
+
declare const rawCheckins: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
31
|
+
checkins: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
32
|
+
id: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
33
|
+
time: import("fefe").Pipe<unknown, Date>;
|
|
34
|
+
main: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
35
|
+
}>[], import("fefe").FefeError>;
|
|
36
|
+
deleted: import("fefe").Validator<string[], import("fefe").FefeError>;
|
|
37
|
+
}>, import("fefe").FefeError>;
|
|
38
|
+
declare type RawCheckins = ValidatorReturnType<typeof rawCheckins>;
|
|
39
|
+
export declare const checkins: (value: unknown) => FefeResult<Checkins>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Attendee } from './attendee';
|
|
2
|
+
import { Checkin } from './checkins';
|
|
3
|
+
export declare type Event = {
|
|
4
|
+
id: string;
|
|
5
|
+
event: 'checkin-created';
|
|
6
|
+
instanceName: string;
|
|
7
|
+
attendeeId: string;
|
|
8
|
+
checkinTag: string;
|
|
9
|
+
checkin: Checkin;
|
|
10
|
+
} | {
|
|
11
|
+
id: string;
|
|
12
|
+
event: 'checkin-deleted';
|
|
13
|
+
instanceName: string;
|
|
14
|
+
attendeeId: string;
|
|
15
|
+
checkinTag: string;
|
|
16
|
+
checkinId: string;
|
|
17
|
+
} | {
|
|
18
|
+
id: string;
|
|
19
|
+
event: 'attendee-created';
|
|
20
|
+
instanceName: string;
|
|
21
|
+
attendee: Attendee;
|
|
22
|
+
} | {
|
|
23
|
+
id: string;
|
|
24
|
+
event: 'attendee-updated';
|
|
25
|
+
instanceName: string;
|
|
26
|
+
attendeeId: string;
|
|
27
|
+
updates: Partial<Omit<Attendee, 'id' | 'checkin'>>;
|
|
28
|
+
} | {
|
|
29
|
+
id: string;
|
|
30
|
+
event: 'attendee-responded';
|
|
31
|
+
instanceName: string;
|
|
32
|
+
attendeeId: string;
|
|
33
|
+
rsvp: Record<string, number | null>;
|
|
34
|
+
isEdit?: boolean;
|
|
35
|
+
} | {
|
|
36
|
+
id: string;
|
|
37
|
+
event: 'payment-paid';
|
|
38
|
+
instanceName: string;
|
|
39
|
+
attendeeId: string;
|
|
40
|
+
};
|