@adaptive-ai/sdk 0.1.8 → 0.1.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.
- package/dist/client/index.d.ts +30 -14
- package/dist/client/index.js +94 -8
- package/dist/server/index.d.ts +94 -541
- package/dist/server/index.js +1 -1
- package/package.json +6 -5
package/dist/client/index.d.ts
CHANGED
|
@@ -18,36 +18,52 @@ declare const AuthProvider: {
|
|
|
18
18
|
readonly PLAID: "PLAID";
|
|
19
19
|
};
|
|
20
20
|
export type AuthProvider = (typeof AuthProvider)[keyof typeof AuthProvider];
|
|
21
|
-
export type
|
|
22
|
-
provider: AuthProvider;
|
|
23
|
-
scope?: string[];
|
|
24
|
-
redirectUri?: string;
|
|
25
|
-
};
|
|
26
|
-
export type RedirectInput = {
|
|
21
|
+
export type SignInInput = {
|
|
27
22
|
email: string;
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
phoneNumber?: null | undefined;
|
|
24
|
+
redirectUri?: string;
|
|
30
25
|
} | {
|
|
31
26
|
phoneNumber: string;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} |
|
|
27
|
+
email?: null | undefined;
|
|
28
|
+
redirectUri?: string;
|
|
29
|
+
} | {
|
|
30
|
+
redirectUri?: string;
|
|
31
|
+
};
|
|
32
|
+
export type ConnectInput = {
|
|
33
|
+
provider: AuthProvider | `APP:${string}`;
|
|
34
|
+
scope?: string[];
|
|
35
|
+
mode?: "check_only" | "get_or_request" | "request_only";
|
|
36
|
+
};
|
|
37
|
+
export type ConnectionToken = {
|
|
38
|
+
token: string;
|
|
39
|
+
provider: string;
|
|
40
|
+
scope: string[];
|
|
41
|
+
};
|
|
42
|
+
export type ConnectResult = {
|
|
43
|
+
status: "connected";
|
|
44
|
+
connections: ConnectionToken[];
|
|
45
|
+
} | {
|
|
46
|
+
status: "error";
|
|
47
|
+
error: string;
|
|
48
|
+
errorDescription?: string;
|
|
49
|
+
};
|
|
50
|
+
export declare function connect(input: ConnectInput): Promise<ConnectResult>;
|
|
35
51
|
export type AuthenticatedResult = {
|
|
36
52
|
userId: string;
|
|
37
|
-
signIn: (i?:
|
|
53
|
+
signIn: (i?: SignInInput) => void;
|
|
38
54
|
status: "authenticated";
|
|
39
55
|
providers: AuthProvider[];
|
|
40
56
|
};
|
|
41
57
|
export type UnauthenticatedResult = {
|
|
42
58
|
userId: null;
|
|
43
|
-
signIn: (i?:
|
|
59
|
+
signIn: (i?: SignInInput) => void;
|
|
44
60
|
status: "unauthenticated";
|
|
45
61
|
providers: [
|
|
46
62
|
];
|
|
47
63
|
};
|
|
48
64
|
export type LoadingAuthResult = {
|
|
49
65
|
userId: undefined;
|
|
50
|
-
signIn: (i?:
|
|
66
|
+
signIn: (i?: SignInInput) => void;
|
|
51
67
|
status: "loading";
|
|
52
68
|
providers: [
|
|
53
69
|
];
|