forked from product-fruits/npm-product-fruits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.d.ts
47 lines (39 loc) · 1.42 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
declare global {
type ProductFruitsPushObject = Array<any> & {
}
type ProductFruitsInitOptions = {
disableLocationChangeDetection?: boolean;
disableBannersAutoMargin?: boolean;
}
type ProductFruitsUserObject = {
username: string;
email?: string;
role?: string;
signUpAt?: string;
firstname?: string;
lastname?: string;
props?: UserCustomProps,
hmac?: {
hash: string,
expiration?: string | null | undefined
}
group?: {
groupId?: string;
props?: UserGroupCustomProps
}
}
type UserCustomProps = {
[key: string]: string | number | Array<string> | Array<number> | UserCustomProps;
}
type UserGroupCustomProps = {
[key: string]: string | number | Array<string> | Array<number> | UserCustomProps;
}
}
// declare function init(workspaceCode: string, language: string, userObject: any, options?: Options): void;
// declare function safeExec(callback: ($productFruits: ProductFruitsPushObject) => void): void;
declare const productFruits: {
init: (workspaceCode: string, language: string, userObject: ProductFruitsUserObject, options?: ProductFruitsInitOptions) => void,
//updateUserData: (user: ProductFruitsUserObject) => void,
safeExec: (callback: ($productFruits: ProductFruitsPushObject) => void) => void
}
export { productFruits };