@adaptive-ai/sdk 0.1.25 → 0.1.27
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 +307 -4
- package/dist/client/index.js +12 -22
- package/dist/server/index.d.ts +76 -7
- package/package.json +2 -2
package/dist/client/index.d.ts
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
4
4
|
|
|
5
|
+
declare const OAuthProvider: {
|
|
6
|
+
readonly GITHUB_USER: "GITHUB_USER";
|
|
7
|
+
readonly GITHUB_BOT: "GITHUB_BOT";
|
|
8
|
+
readonly GOOGLE: "GOOGLE";
|
|
9
|
+
readonly SLACK: "SLACK";
|
|
10
|
+
readonly SLACK_BOT: "SLACK_BOT";
|
|
11
|
+
readonly DISCORD: "DISCORD";
|
|
12
|
+
readonly NOTION: "NOTION";
|
|
13
|
+
readonly TWITTER: "TWITTER";
|
|
14
|
+
readonly LINKEDIN: "LINKEDIN";
|
|
15
|
+
readonly YAHOO: "YAHOO";
|
|
16
|
+
readonly FIGMA: "FIGMA";
|
|
17
|
+
readonly PLAID: "PLAID";
|
|
18
|
+
readonly SQUARE: "SQUARE";
|
|
19
|
+
readonly WHOOP: "WHOOP";
|
|
20
|
+
};
|
|
21
|
+
export type OAuthProvider = (typeof OAuthProvider)[keyof typeof OAuthProvider];
|
|
5
22
|
declare const AuthProvider: {
|
|
6
23
|
readonly AC1: "AC1";
|
|
7
24
|
readonly GITHUB_USER: "GITHUB_USER";
|
|
@@ -13,13 +30,288 @@ declare const AuthProvider: {
|
|
|
13
30
|
readonly NOTION: "NOTION";
|
|
14
31
|
readonly TWITTER: "TWITTER";
|
|
15
32
|
readonly LINKEDIN: "LINKEDIN";
|
|
16
|
-
readonly LINKEDIN_MEMBER_DATA: "LINKEDIN_MEMBER_DATA";
|
|
17
33
|
readonly YAHOO: "YAHOO";
|
|
18
34
|
readonly FIGMA: "FIGMA";
|
|
19
35
|
readonly PLAID: "PLAID";
|
|
36
|
+
readonly SQUARE: "SQUARE";
|
|
20
37
|
readonly WHOOP: "WHOOP";
|
|
21
38
|
};
|
|
22
39
|
export type AuthProvider = (typeof AuthProvider)[keyof typeof AuthProvider];
|
|
40
|
+
declare const oauthProviderRecognizedScopes: {
|
|
41
|
+
readonly GITHUB_USER: readonly [
|
|
42
|
+
"repo",
|
|
43
|
+
"repo:status",
|
|
44
|
+
"repo_deployment",
|
|
45
|
+
"public_repo",
|
|
46
|
+
"repo:invite",
|
|
47
|
+
"security_events",
|
|
48
|
+
"admin:repo_hook",
|
|
49
|
+
"write:repo_hook",
|
|
50
|
+
"read:repo_hook",
|
|
51
|
+
"admin:org",
|
|
52
|
+
"write:org",
|
|
53
|
+
"read:org",
|
|
54
|
+
"admin:public_key",
|
|
55
|
+
"write:public_key",
|
|
56
|
+
"read:public_key",
|
|
57
|
+
"admin:org_hook",
|
|
58
|
+
"gist",
|
|
59
|
+
"notifications",
|
|
60
|
+
"user",
|
|
61
|
+
"read:user",
|
|
62
|
+
"user:email",
|
|
63
|
+
"user:follow",
|
|
64
|
+
"project",
|
|
65
|
+
"read:project",
|
|
66
|
+
"delete_repo",
|
|
67
|
+
"write:packages",
|
|
68
|
+
"read:packages",
|
|
69
|
+
"delete:packages",
|
|
70
|
+
"admin:gpg_key",
|
|
71
|
+
"write:gpg_key",
|
|
72
|
+
"read:gpg_key",
|
|
73
|
+
"codespace",
|
|
74
|
+
"workflow",
|
|
75
|
+
"read:audit_log"
|
|
76
|
+
];
|
|
77
|
+
readonly GITHUB_BOT: readonly [
|
|
78
|
+
"repo",
|
|
79
|
+
"repo:status",
|
|
80
|
+
"repo_deployment",
|
|
81
|
+
"public_repo",
|
|
82
|
+
"repo:invite",
|
|
83
|
+
"security_events",
|
|
84
|
+
"admin:repo_hook",
|
|
85
|
+
"write:repo_hook",
|
|
86
|
+
"read:repo_hook",
|
|
87
|
+
"admin:org",
|
|
88
|
+
"write:org",
|
|
89
|
+
"read:org",
|
|
90
|
+
"admin:public_key",
|
|
91
|
+
"write:public_key",
|
|
92
|
+
"read:public_key",
|
|
93
|
+
"admin:org_hook",
|
|
94
|
+
"gist",
|
|
95
|
+
"notifications",
|
|
96
|
+
"user",
|
|
97
|
+
"read:user",
|
|
98
|
+
"user:email",
|
|
99
|
+
"user:follow",
|
|
100
|
+
"project",
|
|
101
|
+
"read:project",
|
|
102
|
+
"delete_repo",
|
|
103
|
+
"write:packages",
|
|
104
|
+
"read:packages",
|
|
105
|
+
"delete:packages",
|
|
106
|
+
"admin:gpg_key",
|
|
107
|
+
"write:gpg_key",
|
|
108
|
+
"read:gpg_key",
|
|
109
|
+
"codespace",
|
|
110
|
+
"workflow",
|
|
111
|
+
"read:audit_log"
|
|
112
|
+
];
|
|
113
|
+
readonly GOOGLE: readonly [
|
|
114
|
+
"openid",
|
|
115
|
+
"https://www.googleapis.com/auth/userinfo.email",
|
|
116
|
+
"https://www.googleapis.com/auth/userinfo.profile",
|
|
117
|
+
"https://www.googleapis.com/auth/calendar.app.created",
|
|
118
|
+
"https://www.googleapis.com/auth/calendar.calendarlist.readonly",
|
|
119
|
+
"https://www.googleapis.com/auth/calendar.events.freebusy",
|
|
120
|
+
"https://www.googleapis.com/auth/calendar.events.public.readonly",
|
|
121
|
+
"https://www.googleapis.com/auth/calendar.freebusy",
|
|
122
|
+
"https://www.googleapis.com/auth/drive.file",
|
|
123
|
+
"https://www.googleapis.com/auth/gmail.labels",
|
|
124
|
+
"https://www.googleapis.com/auth/calendar.calendars",
|
|
125
|
+
"https://www.googleapis.com/auth/calendar.events",
|
|
126
|
+
"https://www.googleapis.com/auth/calendar.readonly",
|
|
127
|
+
"https://www.googleapis.com/auth/calendar.events.readonly",
|
|
128
|
+
"https://www.googleapis.com/auth/gmail.send",
|
|
129
|
+
"https://www.googleapis.com/auth/gmail.modify",
|
|
130
|
+
"https://www.googleapis.com/auth/gmail.compose",
|
|
131
|
+
"https://www.googleapis.com/auth/gmail.readonly"
|
|
132
|
+
];
|
|
133
|
+
readonly SLACK: readonly [
|
|
134
|
+
"users:write",
|
|
135
|
+
"im:write",
|
|
136
|
+
"chat:write",
|
|
137
|
+
"reactions:write",
|
|
138
|
+
"channels:read",
|
|
139
|
+
"groups:read",
|
|
140
|
+
"groups:history",
|
|
141
|
+
"im:history",
|
|
142
|
+
"mpim:history",
|
|
143
|
+
"im:read",
|
|
144
|
+
"mpim:read",
|
|
145
|
+
"canvases:read",
|
|
146
|
+
"channels:history",
|
|
147
|
+
"files:read",
|
|
148
|
+
"reactions:read",
|
|
149
|
+
"users:read",
|
|
150
|
+
"dnd:read",
|
|
151
|
+
"emoji:read",
|
|
152
|
+
"mpim:write",
|
|
153
|
+
"search:read"
|
|
154
|
+
];
|
|
155
|
+
readonly SLACK_BOT: readonly [
|
|
156
|
+
"users:write",
|
|
157
|
+
"im:write",
|
|
158
|
+
"chat:write",
|
|
159
|
+
"reactions:write",
|
|
160
|
+
"channels:read",
|
|
161
|
+
"groups:read",
|
|
162
|
+
"groups:history",
|
|
163
|
+
"im:history",
|
|
164
|
+
"mpim:history",
|
|
165
|
+
"im:read",
|
|
166
|
+
"mpim:read",
|
|
167
|
+
"canvases:read",
|
|
168
|
+
"channels:history",
|
|
169
|
+
"files:read",
|
|
170
|
+
"reactions:read",
|
|
171
|
+
"users:read",
|
|
172
|
+
"dnd:read",
|
|
173
|
+
"emoji:read",
|
|
174
|
+
"app_mentions:read",
|
|
175
|
+
"chat:write.customize",
|
|
176
|
+
"assistant:write",
|
|
177
|
+
"commands",
|
|
178
|
+
"channels:join",
|
|
179
|
+
"chat:write.public",
|
|
180
|
+
"incoming-webhook"
|
|
181
|
+
];
|
|
182
|
+
readonly DISCORD: readonly [
|
|
183
|
+
"identify",
|
|
184
|
+
"email",
|
|
185
|
+
"connections",
|
|
186
|
+
"guilds",
|
|
187
|
+
"guilds.join",
|
|
188
|
+
"guilds.members.read",
|
|
189
|
+
"messages.read",
|
|
190
|
+
"applications.commands.permissions.update",
|
|
191
|
+
"openid",
|
|
192
|
+
"gdm.join",
|
|
193
|
+
"webhook.incoming",
|
|
194
|
+
"bot",
|
|
195
|
+
"applications.commands",
|
|
196
|
+
"applications.entitlements",
|
|
197
|
+
"applications.store.update",
|
|
198
|
+
"applications.builds.read"
|
|
199
|
+
];
|
|
200
|
+
readonly NOTION: readonly [
|
|
201
|
+
];
|
|
202
|
+
readonly TWITTER: readonly [
|
|
203
|
+
"tweet.read",
|
|
204
|
+
"tweet.write",
|
|
205
|
+
"tweet.moderate.write",
|
|
206
|
+
"users.email",
|
|
207
|
+
"users.read",
|
|
208
|
+
"follows.read",
|
|
209
|
+
"follows.write",
|
|
210
|
+
"offline.access",
|
|
211
|
+
"space.read",
|
|
212
|
+
"mute.read",
|
|
213
|
+
"mute.write",
|
|
214
|
+
"like.read",
|
|
215
|
+
"like.write",
|
|
216
|
+
"list.read",
|
|
217
|
+
"list.write",
|
|
218
|
+
"block.read",
|
|
219
|
+
"block.write",
|
|
220
|
+
"bookmark.read",
|
|
221
|
+
"bookmark.write",
|
|
222
|
+
"dm.read",
|
|
223
|
+
"dm.write",
|
|
224
|
+
"media.write"
|
|
225
|
+
];
|
|
226
|
+
readonly LINKEDIN: readonly [
|
|
227
|
+
"openid",
|
|
228
|
+
"profile",
|
|
229
|
+
"email",
|
|
230
|
+
"w_member_social"
|
|
231
|
+
];
|
|
232
|
+
readonly YAHOO: readonly [
|
|
233
|
+
];
|
|
234
|
+
readonly FIGMA: readonly [
|
|
235
|
+
"current_user:read",
|
|
236
|
+
"file_comments:read",
|
|
237
|
+
"file_comments:write",
|
|
238
|
+
"file_content:read",
|
|
239
|
+
"file_metadata:read",
|
|
240
|
+
"file_versions:read",
|
|
241
|
+
"library_assets:read",
|
|
242
|
+
"library_content:read",
|
|
243
|
+
"team_library_content:read",
|
|
244
|
+
"webhooks:read",
|
|
245
|
+
"webhooks:write"
|
|
246
|
+
];
|
|
247
|
+
readonly PLAID: readonly [
|
|
248
|
+
"assets",
|
|
249
|
+
"auth",
|
|
250
|
+
"identity",
|
|
251
|
+
"investments",
|
|
252
|
+
"investments_auth",
|
|
253
|
+
"liabilities",
|
|
254
|
+
"transactions",
|
|
255
|
+
"transfer"
|
|
256
|
+
];
|
|
257
|
+
readonly SQUARE: readonly [
|
|
258
|
+
"BANK_ACCOUNTS_WRITE",
|
|
259
|
+
"BANK_ACCOUNTS_READ",
|
|
260
|
+
"APPOINTMENTS_WRITE",
|
|
261
|
+
"APPOINTMENTS_ALL_WRITE",
|
|
262
|
+
"APPOINTMENTS_READ",
|
|
263
|
+
"APPOINTMENTS_ALL_READ",
|
|
264
|
+
"APPOINTMENTS_BUSINESS_SETTINGS_READ",
|
|
265
|
+
"PAYMENTS_READ",
|
|
266
|
+
"PAYMENTS_WRITE",
|
|
267
|
+
"CASH_DRAWER_READ",
|
|
268
|
+
"ITEMS_WRITE",
|
|
269
|
+
"ITEMS_READ",
|
|
270
|
+
"ORDERS_WRITE",
|
|
271
|
+
"ORDERS_READ",
|
|
272
|
+
"CUSTOMERS_WRITE",
|
|
273
|
+
"CUSTOMERS_READ",
|
|
274
|
+
"DEVICE_CREDENTIAL_MANAGEMENT",
|
|
275
|
+
"DEVICES_READ",
|
|
276
|
+
"DISPUTES_WRITE",
|
|
277
|
+
"DISPUTES_READ",
|
|
278
|
+
"EMPLOYEES_READ",
|
|
279
|
+
"GIFTCARDS_READ",
|
|
280
|
+
"GIFTCARDS_WRITE",
|
|
281
|
+
"INVENTORY_WRITE",
|
|
282
|
+
"INVENTORY_READ",
|
|
283
|
+
"INVOICES_WRITE",
|
|
284
|
+
"INVOICES_READ",
|
|
285
|
+
"TIMECARDS_SETTINGS_WRITE",
|
|
286
|
+
"TIMECARDS_SETTINGS_READ",
|
|
287
|
+
"TIMECARDS_WRITE",
|
|
288
|
+
"TIMECARDS_READ",
|
|
289
|
+
"MERCHANT_PROFILE_WRITE",
|
|
290
|
+
"MERCHANT_PROFILE_READ",
|
|
291
|
+
"LOYALTY_READ",
|
|
292
|
+
"LOYALTY_WRITE",
|
|
293
|
+
"PAYMENTS_WRITE_IN_PERSON",
|
|
294
|
+
"PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS",
|
|
295
|
+
"PAYOUTS_READ",
|
|
296
|
+
"ONLINE_STORE_SITE_READ",
|
|
297
|
+
"ONLINE_STORE_SNIPPETS_WRITE",
|
|
298
|
+
"ONLINE_STORE_SNIPPETS_READ",
|
|
299
|
+
"SUBSCRIPTIONS_WRITE",
|
|
300
|
+
"SUBSCRIPTIONS_READ",
|
|
301
|
+
"EMPLOYEES_WRITE",
|
|
302
|
+
"VENDOR_WRITE",
|
|
303
|
+
"VENDOR_READ"
|
|
304
|
+
];
|
|
305
|
+
readonly WHOOP: readonly [
|
|
306
|
+
"read:recovery",
|
|
307
|
+
"read:cycles",
|
|
308
|
+
"read:workout",
|
|
309
|
+
"read:sleep",
|
|
310
|
+
"read:profile",
|
|
311
|
+
"read:body_measurement",
|
|
312
|
+
"offline"
|
|
313
|
+
];
|
|
314
|
+
};
|
|
23
315
|
export type SignInInput = {
|
|
24
316
|
email: string;
|
|
25
317
|
phoneNumber?: null | undefined;
|
|
@@ -31,11 +323,22 @@ export type SignInInput = {
|
|
|
31
323
|
} | {
|
|
32
324
|
redirectUri?: string;
|
|
33
325
|
};
|
|
34
|
-
export type
|
|
35
|
-
|
|
326
|
+
export type ConnectMode = "check_only" | "get_or_request" | "request_only";
|
|
327
|
+
export type ScopeForProvider<P extends OAuthProvider> = (typeof oauthProviderRecognizedScopes)[P] extends readonly [
|
|
328
|
+
] ? string : (typeof oauthProviderRecognizedScopes)[P][number];
|
|
329
|
+
export type OAuthConnectInput = {
|
|
330
|
+
[P in OAuthProvider]: {
|
|
331
|
+
provider: P;
|
|
332
|
+
scope?: Array<ScopeForProvider<P>>;
|
|
333
|
+
mode?: ConnectMode;
|
|
334
|
+
};
|
|
335
|
+
}[OAuthProvider];
|
|
336
|
+
export type ConsentConnectInput = {
|
|
337
|
+
provider: "AC1" | `APP:${string}`;
|
|
36
338
|
scope?: string[];
|
|
37
|
-
mode?:
|
|
339
|
+
mode?: ConnectMode;
|
|
38
340
|
};
|
|
341
|
+
export type ConnectInput = OAuthConnectInput | ConsentConnectInput;
|
|
39
342
|
export type ConnectionToken = {
|
|
40
343
|
token: string;
|
|
41
344
|
provider: string;
|