@adaptive-ai/sdk 0.1.0 → 0.1.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.
- package/dist/client/index.d.ts +31 -102
- package/dist/client/index.js +126 -7
- package/dist/server/index.d.ts +4894 -376
- package/dist/server/index.js +2 -2
- package/package.json +7 -4
package/dist/client/index.d.ts
CHANGED
|
@@ -1,107 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
readonly GITHUB_USER: "GITHUB_USER";
|
|
5
|
-
readonly GITHUB_BOT: "GITHUB_BOT";
|
|
6
|
-
readonly GOOGLE: "GOOGLE";
|
|
7
|
-
readonly AC1: "AC1";
|
|
8
|
-
readonly SLACK: "SLACK";
|
|
9
|
-
readonly SLACK_BOT: "SLACK_BOT";
|
|
10
|
-
readonly DISCORD: "DISCORD";
|
|
11
|
-
readonly NOTION: "NOTION";
|
|
12
|
-
readonly TWITTER: "TWITTER";
|
|
13
|
-
readonly LINKEDIN: "LINKEDIN";
|
|
14
|
-
readonly YAHOO: "YAHOO";
|
|
15
|
-
readonly FIGMA: "FIGMA";
|
|
16
|
-
};
|
|
17
|
-
type AuthProvider = (typeof AuthProvider)[keyof typeof AuthProvider];
|
|
18
|
-
type ProviderInput = {
|
|
19
|
-
provider: AuthProvider;
|
|
20
|
-
scope?: string[];
|
|
21
|
-
redirectUri?: string;
|
|
22
|
-
};
|
|
23
|
-
type RedirectInput = {
|
|
24
|
-
email: string;
|
|
25
|
-
provider: 'AC1';
|
|
26
|
-
phoneNumber: null | undefined;
|
|
27
|
-
} | {
|
|
28
|
-
phoneNumber: string;
|
|
29
|
-
provider: 'AC1';
|
|
30
|
-
email: null | undefined;
|
|
31
|
-
} | ProviderInput;
|
|
32
|
-
type AuthenticatedResult = {
|
|
33
|
-
userId: string;
|
|
34
|
-
signIn: (i?: RedirectInput) => void;
|
|
35
|
-
status: 'authenticated';
|
|
36
|
-
providers: AuthProvider[];
|
|
37
|
-
};
|
|
38
|
-
type UnauthenticatedResult = {
|
|
39
|
-
userId: null;
|
|
40
|
-
signIn: (i?: RedirectInput) => void;
|
|
41
|
-
status: 'unauthenticated';
|
|
42
|
-
providers: [];
|
|
43
|
-
};
|
|
44
|
-
type LoadingAuthResult = {
|
|
45
|
-
userId: undefined;
|
|
46
|
-
signIn: (i?: RedirectInput) => void;
|
|
47
|
-
status: 'loading';
|
|
48
|
-
providers: [];
|
|
49
|
-
};
|
|
50
|
-
declare global {
|
|
51
|
-
interface EmailHandlerInput {
|
|
52
|
-
subject: string;
|
|
53
|
-
body: string;
|
|
54
|
-
fromUserId: string;
|
|
55
|
-
}
|
|
56
|
-
interface Window {
|
|
57
|
-
__VERSION_ID__?: string;
|
|
58
|
-
__APP_ID__: string;
|
|
59
|
-
__IS_TESTING__: boolean;
|
|
60
|
-
__ROOT_URL__: string;
|
|
61
|
-
__BASE_URL__: string;
|
|
62
|
-
__REALTIME_DOMAIN__: string;
|
|
63
|
-
__OPEN_AUTH_DRAWER__: (url: string) => void;
|
|
64
|
-
}
|
|
65
|
-
var env: {
|
|
66
|
-
BASE_URL: string;
|
|
67
|
-
REALTIME_DOMAIN: string;
|
|
68
|
-
GUEST_SERVICES_URL: string;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
3
|
+
import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
71
4
|
|
|
72
|
-
declare function
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
versionId?: string;
|
|
78
|
-
isTesting: boolean;
|
|
79
|
-
realtimeDomain: string;
|
|
80
|
-
}): void;
|
|
81
|
-
declare function useRedirectToLogin(): {
|
|
82
|
-
redirectToLogin: (input?: {
|
|
83
|
-
email?: string;
|
|
84
|
-
}) => void;
|
|
85
|
-
};
|
|
86
|
-
declare function useAuth(input: {
|
|
87
|
-
required: true;
|
|
88
|
-
}): AuthenticatedResult | LoadingAuthResult;
|
|
89
|
-
declare function useAuth(input: {
|
|
90
|
-
required: false;
|
|
91
|
-
}): AuthenticatedResult | UnauthenticatedResult | LoadingAuthResult;
|
|
92
|
-
declare function useAuth(): AuthenticatedResult | UnauthenticatedResult | LoadingAuthResult;
|
|
93
|
-
declare function getBaseUrl(): string;
|
|
94
|
-
declare function connectToRealtimeStore<T extends object>({ channelId, initialData, broadcastOnly, onUpdate, }: {
|
|
95
|
-
channelId: string;
|
|
96
|
-
initialData: T;
|
|
97
|
-
broadcastOnly?: boolean;
|
|
98
|
-
onUpdate?: (data: T) => void;
|
|
5
|
+
export declare function connectToRealtimeStore<T extends object>({ channelId, initialData, broadcastOnly, onUpdate, }: {
|
|
6
|
+
channelId: string;
|
|
7
|
+
initialData: T;
|
|
8
|
+
broadcastOnly?: boolean;
|
|
9
|
+
onUpdate?: (data: T) => void;
|
|
99
10
|
}): Promise<{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
11
|
+
getData(): T;
|
|
12
|
+
setData(data: T): void;
|
|
13
|
+
destroy(): void;
|
|
103
14
|
}>;
|
|
104
|
-
declare function useRealtimeStore<T extends object>(channelId: string | null, initialData: T): readonly [
|
|
105
|
-
|
|
15
|
+
export declare function useRealtimeStore<T extends object>(channelId: string | null, initialData: T): readonly [
|
|
16
|
+
T | undefined,
|
|
17
|
+
(data: T) => void
|
|
18
|
+
];
|
|
19
|
+
export declare function useRealtimeMutation<TData extends object, TError = unknown, TVariables = void, TContext = unknown>(opts: UseMutationOptions<TData, TError, TVariables, TContext>): UseMutationResult<TData, TError, TVariables, TContext>;
|
|
20
|
+
export declare function apiClient<T extends object>(): {
|
|
21
|
+
$abort: (promise: Promise<any>) => void;
|
|
22
|
+
} & {
|
|
23
|
+
[K in keyof T]: T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends (...args: any[]) => Promise<any> ? T_1 : T_1 extends (...args: infer A) => infer R ? (...args: A) => Promise<R> : T_1 : never : never;
|
|
24
|
+
};
|
|
25
|
+
export declare function encodeFileAsBase64DataURL(file: File): Promise<string>;
|
|
26
|
+
export declare function initializeClientEnvironment({ appId, rootUrl, baseUrl, isTesting, realtimeDomain, boxId, }: {
|
|
27
|
+
appId: string;
|
|
28
|
+
rootUrl: string;
|
|
29
|
+
baseUrl: string;
|
|
30
|
+
isTesting: boolean;
|
|
31
|
+
realtimeDomain: string;
|
|
32
|
+
boxId: string;
|
|
33
|
+
}): void;
|
|
34
|
+
export declare function getBaseUrl(): string;
|
|
106
35
|
|
|
107
|
-
export {
|
|
36
|
+
export {};
|