@airstore/sdk 0.1.0
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/README.md +341 -0
- package/dist/cjs/airstore.js +127 -0
- package/dist/cjs/airstore.js.map +1 -0
- package/dist/cjs/client.js +214 -0
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/errors.js +129 -0
- package/dist/cjs/errors.js.map +1 -0
- package/dist/cjs/index.js +40 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/resources/connections.js +74 -0
- package/dist/cjs/resources/connections.js.map +1 -0
- package/dist/cjs/resources/filesystem.js +101 -0
- package/dist/cjs/resources/filesystem.js.map +1 -0
- package/dist/cjs/resources/index.js +18 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/members.js +63 -0
- package/dist/cjs/resources/members.js.map +1 -0
- package/dist/cjs/resources/oauth.js +85 -0
- package/dist/cjs/resources/oauth.js.map +1 -0
- package/dist/cjs/resources/smart-folders.js +102 -0
- package/dist/cjs/resources/smart-folders.js.map +1 -0
- package/dist/cjs/resources/tokens.js +73 -0
- package/dist/cjs/resources/tokens.js.map +1 -0
- package/dist/cjs/resources/workspaces.js +75 -0
- package/dist/cjs/resources/workspaces.js.map +1 -0
- package/dist/cjs/types/connections.js +3 -0
- package/dist/cjs/types/connections.js.map +1 -0
- package/dist/cjs/types/filesystem.js +3 -0
- package/dist/cjs/types/filesystem.js.map +1 -0
- package/dist/cjs/types/index.js +25 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/types/members.js +3 -0
- package/dist/cjs/types/members.js.map +1 -0
- package/dist/cjs/types/oauth.js +3 -0
- package/dist/cjs/types/oauth.js.map +1 -0
- package/dist/cjs/types/shared.js +3 -0
- package/dist/cjs/types/shared.js.map +1 -0
- package/dist/cjs/types/smart-folders.js +3 -0
- package/dist/cjs/types/smart-folders.js.map +1 -0
- package/dist/cjs/types/tokens.js +3 -0
- package/dist/cjs/types/tokens.js.map +1 -0
- package/dist/cjs/types/workspaces.js +3 -0
- package/dist/cjs/types/workspaces.js.map +1 -0
- package/dist/cjs/version.js +6 -0
- package/dist/cjs/version.js.map +1 -0
- package/dist/esm/airstore.js +123 -0
- package/dist/esm/airstore.js.map +1 -0
- package/dist/esm/client.js +209 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/errors.js +115 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/resources/connections.js +70 -0
- package/dist/esm/resources/connections.js.map +1 -0
- package/dist/esm/resources/filesystem.js +97 -0
- package/dist/esm/resources/filesystem.js.map +1 -0
- package/dist/esm/resources/index.js +8 -0
- package/dist/esm/resources/index.js.map +1 -0
- package/dist/esm/resources/members.js +59 -0
- package/dist/esm/resources/members.js.map +1 -0
- package/dist/esm/resources/oauth.js +81 -0
- package/dist/esm/resources/oauth.js.map +1 -0
- package/dist/esm/resources/smart-folders.js +98 -0
- package/dist/esm/resources/smart-folders.js.map +1 -0
- package/dist/esm/resources/tokens.js +69 -0
- package/dist/esm/resources/tokens.js.map +1 -0
- package/dist/esm/resources/workspaces.js +71 -0
- package/dist/esm/resources/workspaces.js.map +1 -0
- package/dist/esm/types/connections.js +2 -0
- package/dist/esm/types/connections.js.map +1 -0
- package/dist/esm/types/filesystem.js +2 -0
- package/dist/esm/types/filesystem.js.map +1 -0
- package/dist/esm/types/index.js +9 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/members.js +2 -0
- package/dist/esm/types/members.js.map +1 -0
- package/dist/esm/types/oauth.js +2 -0
- package/dist/esm/types/oauth.js.map +1 -0
- package/dist/esm/types/shared.js +2 -0
- package/dist/esm/types/shared.js.map +1 -0
- package/dist/esm/types/smart-folders.js +2 -0
- package/dist/esm/types/smart-folders.js.map +1 -0
- package/dist/esm/types/tokens.js +2 -0
- package/dist/esm/types/tokens.js.map +1 -0
- package/dist/esm/types/workspaces.js +2 -0
- package/dist/esm/types/workspaces.js.map +1 -0
- package/dist/esm/version.js +3 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/types/airstore.d.ts +114 -0
- package/dist/types/airstore.d.ts.map +1 -0
- package/dist/types/client.d.ts +86 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/errors.d.ts +61 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/resources/connections.d.ts +50 -0
- package/dist/types/resources/connections.d.ts.map +1 -0
- package/dist/types/resources/filesystem.d.ts +81 -0
- package/dist/types/resources/filesystem.d.ts.map +1 -0
- package/dist/types/resources/index.d.ts +8 -0
- package/dist/types/resources/index.d.ts.map +1 -0
- package/dist/types/resources/members.d.ts +49 -0
- package/dist/types/resources/members.d.ts.map +1 -0
- package/dist/types/resources/oauth.d.ts +57 -0
- package/dist/types/resources/oauth.d.ts.map +1 -0
- package/dist/types/resources/smart-folders.d.ts +70 -0
- package/dist/types/resources/smart-folders.d.ts.map +1 -0
- package/dist/types/resources/tokens.d.ts +54 -0
- package/dist/types/resources/tokens.d.ts.map +1 -0
- package/dist/types/resources/workspaces.d.ts +63 -0
- package/dist/types/resources/workspaces.d.ts.map +1 -0
- package/dist/types/types/connections.d.ts +41 -0
- package/dist/types/types/connections.d.ts.map +1 -0
- package/dist/types/types/filesystem.d.ts +39 -0
- package/dist/types/types/filesystem.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +9 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/members.d.ts +30 -0
- package/dist/types/types/members.d.ts.map +1 -0
- package/dist/types/types/oauth.d.ts +40 -0
- package/dist/types/types/oauth.d.ts.map +1 -0
- package/dist/types/types/shared.d.ts +27 -0
- package/dist/types/types/shared.d.ts.map +1 -0
- package/dist/types/types/smart-folders.d.ts +45 -0
- package/dist/types/types/smart-folders.d.ts.map +1 -0
- package/dist/types/types/tokens.d.ts +40 -0
- package/dist/types/types/tokens.d.ts.map +1 -0
- package/dist/types/types/workspaces.d.ts +26 -0
- package/dist/types/types/workspaces.d.ts.map +1 -0
- package/dist/types/version.d.ts +3 -0
- package/dist/types/version.d.ts.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CoreClient, RequestOptions } from '../client.js';
|
|
2
|
+
import type { Member, MemberCreateParams } from '../types/members.js';
|
|
3
|
+
/**
|
|
4
|
+
* Manage workspace members.
|
|
5
|
+
*
|
|
6
|
+
* Members are users with roles (admin, member, viewer) in a workspace.
|
|
7
|
+
* Tokens are always associated with a member.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const member = await airstore.members.create("ws_abc", {
|
|
12
|
+
* email: "agent@internal",
|
|
13
|
+
* name: "Agent",
|
|
14
|
+
* role: "member",
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class Members {
|
|
19
|
+
private readonly client;
|
|
20
|
+
constructor(client: CoreClient);
|
|
21
|
+
/**
|
|
22
|
+
* Add a member to a workspace.
|
|
23
|
+
*
|
|
24
|
+
* @param workspaceId - Workspace external ID.
|
|
25
|
+
* @param params - Member creation parameters.
|
|
26
|
+
* @param options - Per-request overrides.
|
|
27
|
+
* @returns The created member.
|
|
28
|
+
*/
|
|
29
|
+
create(workspaceId: string, params: MemberCreateParams, options?: RequestOptions): Promise<Member>;
|
|
30
|
+
/**
|
|
31
|
+
* List members of a workspace.
|
|
32
|
+
*
|
|
33
|
+
* @param workspaceId - Workspace external ID.
|
|
34
|
+
* @param options - Per-request overrides.
|
|
35
|
+
* @returns Array of members.
|
|
36
|
+
*/
|
|
37
|
+
list(workspaceId: string, options?: RequestOptions): Promise<Member[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Remove a member from a workspace.
|
|
40
|
+
*
|
|
41
|
+
* @param workspaceId - Workspace external ID.
|
|
42
|
+
* @param memberId - Member external ID.
|
|
43
|
+
* @param options - Per-request overrides.
|
|
44
|
+
*
|
|
45
|
+
* @throws {NotFoundError} If the member doesn't exist.
|
|
46
|
+
*/
|
|
47
|
+
del(workspaceId: string, memberId: string, options?: RequestOptions): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../../src/resources/members.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,qBAAa,OAAO;IACN,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;;;;;;OAOG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC;IAclB;;;;;;OAMG;IACG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAU5E;;;;;;;;OAQG;IACG,GAAG,CACP,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;CASjB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { CoreClient, RequestOptions } from '../client.js';
|
|
2
|
+
import type { OAuthSession, OAuthSessionCreateParams, OAuthSessionStatus, OAuthPollOptions } from '../types/oauth.js';
|
|
3
|
+
/**
|
|
4
|
+
* Manage OAuth sessions for interactive connection setup.
|
|
5
|
+
*
|
|
6
|
+
* Use this when you want users to authorize via browser redirect
|
|
7
|
+
* rather than passing tokens directly.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const session = await airstore.oauth.createSession({
|
|
12
|
+
* integrationType: "gmail",
|
|
13
|
+
* returnTo: "https://myapp.com/callback",
|
|
14
|
+
* });
|
|
15
|
+
* console.log(session.authorize_url); // redirect user here
|
|
16
|
+
* const completed = await airstore.oauth.poll(session.session_id);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class OAuth {
|
|
20
|
+
private readonly client;
|
|
21
|
+
constructor(client: CoreClient);
|
|
22
|
+
/**
|
|
23
|
+
* Create an OAuth session to initiate the authorization flow.
|
|
24
|
+
*
|
|
25
|
+
* Returns a session with an `authorize_url` that the user should be
|
|
26
|
+
* redirected to. Once they complete authorization, poll the session
|
|
27
|
+
* for the resulting connection ID.
|
|
28
|
+
*
|
|
29
|
+
* @param params - Session creation parameters.
|
|
30
|
+
* @param options - Per-request overrides.
|
|
31
|
+
* @returns The session with authorize_url to redirect the user to.
|
|
32
|
+
*/
|
|
33
|
+
createSession(params: OAuthSessionCreateParams, options?: RequestOptions): Promise<OAuthSession>;
|
|
34
|
+
/**
|
|
35
|
+
* Get the current status of an OAuth session.
|
|
36
|
+
*
|
|
37
|
+
* @param sessionId - Session ID from createSession.
|
|
38
|
+
* @param options - Per-request overrides.
|
|
39
|
+
* @returns The session status.
|
|
40
|
+
*/
|
|
41
|
+
getSession(sessionId: string, options?: RequestOptions): Promise<OAuthSessionStatus>;
|
|
42
|
+
/**
|
|
43
|
+
* Poll an OAuth session until completion or timeout.
|
|
44
|
+
*
|
|
45
|
+
* Repeatedly checks session status at the specified interval until
|
|
46
|
+
* the session completes, errors, or the timeout is reached.
|
|
47
|
+
*
|
|
48
|
+
* @param sessionId - Session ID from createSession.
|
|
49
|
+
* @param pollOpts - Polling configuration (timeout, interval).
|
|
50
|
+
* @param options - Per-request overrides.
|
|
51
|
+
* @returns The completed session status with connection_id.
|
|
52
|
+
*
|
|
53
|
+
* @throws {AirstoreError} If the session errors or times out.
|
|
54
|
+
*/
|
|
55
|
+
poll(sessionId: string, pollOpts?: OAuthPollOptions, options?: RequestOptions): Promise<OAuthSessionStatus>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/resources/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAG3B;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,KAAK;IACJ,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;;;;;;;;;OAUG;IACG,aAAa,CACjB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,CAAC;IAexB;;;;;;OAMG;IACG,UAAU,CACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC;IAU9B;;;;;;;;;;;;OAYG;IACG,IAAI,CACR,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC;CAoB/B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { CoreClient, RequestOptions } from '../client.js';
|
|
2
|
+
import type { SmartFolder, SmartFolderCreateParams, SmartFolderUpdateParams } from '../types/smart-folders.js';
|
|
3
|
+
/**
|
|
4
|
+
* Manage smart folders (filesystem queries) within a workspace.
|
|
5
|
+
*
|
|
6
|
+
* Smart folders use LLM inference to automatically organize and filter
|
|
7
|
+
* data from connected integrations into virtual folders or files.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* await airstore.smartFolders.create("ws_abc", {
|
|
12
|
+
* integration: "gmail",
|
|
13
|
+
* name: "Recent Emails",
|
|
14
|
+
* guidance: "Last 7 days of emails",
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class SmartFolders {
|
|
19
|
+
private readonly client;
|
|
20
|
+
constructor(client: CoreClient);
|
|
21
|
+
/**
|
|
22
|
+
* Create a new smart folder.
|
|
23
|
+
*
|
|
24
|
+
* @param workspaceId - Workspace external ID.
|
|
25
|
+
* @param params - Smart folder creation parameters.
|
|
26
|
+
* @param options - Per-request overrides.
|
|
27
|
+
* @returns The created smart folder.
|
|
28
|
+
*/
|
|
29
|
+
create(workspaceId: string, params: SmartFolderCreateParams, options?: RequestOptions): Promise<SmartFolder>;
|
|
30
|
+
/**
|
|
31
|
+
* List all smart folders in a workspace.
|
|
32
|
+
*
|
|
33
|
+
* @param workspaceId - Workspace external ID.
|
|
34
|
+
* @param options - Per-request overrides.
|
|
35
|
+
* @returns Array of smart folders.
|
|
36
|
+
*/
|
|
37
|
+
list(workspaceId: string, options?: RequestOptions): Promise<SmartFolder[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve a smart folder by its virtual filesystem path.
|
|
40
|
+
*
|
|
41
|
+
* @param workspaceId - Workspace external ID.
|
|
42
|
+
* @param queryPath - Virtual path of the smart folder.
|
|
43
|
+
* @param options - Per-request overrides.
|
|
44
|
+
* @returns The smart folder.
|
|
45
|
+
*
|
|
46
|
+
* @throws {NotFoundError} If the smart folder doesn't exist.
|
|
47
|
+
*/
|
|
48
|
+
retrieve(workspaceId: string, queryPath: string, options?: RequestOptions): Promise<SmartFolder>;
|
|
49
|
+
/**
|
|
50
|
+
* Update an existing smart folder.
|
|
51
|
+
*
|
|
52
|
+
* @param workspaceId - Workspace external ID.
|
|
53
|
+
* @param queryId - Smart folder external ID.
|
|
54
|
+
* @param params - Fields to update.
|
|
55
|
+
* @param options - Per-request overrides.
|
|
56
|
+
* @returns The updated smart folder.
|
|
57
|
+
*/
|
|
58
|
+
update(workspaceId: string, queryId: string, params: SmartFolderUpdateParams, options?: RequestOptions): Promise<SmartFolder>;
|
|
59
|
+
/**
|
|
60
|
+
* Delete a smart folder.
|
|
61
|
+
*
|
|
62
|
+
* @param workspaceId - Workspace external ID.
|
|
63
|
+
* @param queryId - Smart folder external ID.
|
|
64
|
+
* @param options - Per-request overrides.
|
|
65
|
+
*
|
|
66
|
+
* @throws {NotFoundError} If the smart folder doesn't exist.
|
|
67
|
+
*/
|
|
68
|
+
del(workspaceId: string, queryId: string, options?: RequestOptions): Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=smart-folders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-folders.d.ts","sourceRoot":"","sources":["../../../src/resources/smart-folders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EACV,WAAW,EACX,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;;;;;;OAOG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,CAAC;IAkBvB;;;;;;OAMG;IACG,IAAI,CACR,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,EAAE,CAAC;IAazB;;;;;;;;;OASG;IACG,QAAQ,CACZ,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,CAAC;IAUvB;;;;;;;;OAQG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,CAAC;IAcvB;;;;;;;;OAQG;IACG,GAAG,CACP,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;CASjB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CoreClient, RequestOptions } from '../client.js';
|
|
2
|
+
import type { Token, TokenCreateParams, TokenCreated } from '../types/tokens.js';
|
|
3
|
+
/**
|
|
4
|
+
* Manage workspace-scoped authentication tokens.
|
|
5
|
+
*
|
|
6
|
+
* Tokens are used for CLI mounting (`airstore start --token <token>`)
|
|
7
|
+
* and per-workspace programmatic access.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const token = await airstore.tokens.create("ws_abc", {
|
|
12
|
+
* email: "agent@internal",
|
|
13
|
+
* name: "vm-mount",
|
|
14
|
+
* });
|
|
15
|
+
* // token.token -> pass to: airstore start --token <this>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class Tokens {
|
|
19
|
+
private readonly client;
|
|
20
|
+
constructor(client: CoreClient);
|
|
21
|
+
/**
|
|
22
|
+
* Create a workspace-scoped token.
|
|
23
|
+
*
|
|
24
|
+
* Either `memberId` or `email` must be provided. If `email` is given
|
|
25
|
+
* and no member with that email exists, one is auto-created.
|
|
26
|
+
*
|
|
27
|
+
* @param workspaceId - Workspace external ID.
|
|
28
|
+
* @param params - Token creation parameters.
|
|
29
|
+
* @param options - Per-request overrides.
|
|
30
|
+
* @returns The created token with raw value (shown once — store it safely).
|
|
31
|
+
*/
|
|
32
|
+
create(workspaceId: string, params: TokenCreateParams, options?: RequestOptions): Promise<TokenCreated>;
|
|
33
|
+
/**
|
|
34
|
+
* List tokens in a workspace.
|
|
35
|
+
*
|
|
36
|
+
* Raw token values are never returned — only metadata.
|
|
37
|
+
*
|
|
38
|
+
* @param workspaceId - Workspace external ID.
|
|
39
|
+
* @param options - Per-request overrides.
|
|
40
|
+
* @returns Array of token metadata.
|
|
41
|
+
*/
|
|
42
|
+
list(workspaceId: string, options?: RequestOptions): Promise<Token[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Revoke (delete) a token. Once revoked, the token can no longer be used.
|
|
45
|
+
*
|
|
46
|
+
* @param workspaceId - Workspace external ID.
|
|
47
|
+
* @param tokenId - Token external ID.
|
|
48
|
+
* @param options - Per-request overrides.
|
|
49
|
+
*
|
|
50
|
+
* @throws {NotFoundError} If the token doesn't exist.
|
|
51
|
+
*/
|
|
52
|
+
revoke(workspaceId: string, tokenId: string, options?: RequestOptions): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/resources/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjF;;;;;;;;;;;;;;GAcG;AACH,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;;;;;;;;;OAUG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,CAAC;IAgBxB;;;;;;;;OAQG;IACG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAU3E;;;;;;;;OAQG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;CASjB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { CoreClient, RequestOptions } from '../client.js';
|
|
2
|
+
import type { Workspace, WorkspaceCreateParams } from '../types/workspaces.js';
|
|
3
|
+
/**
|
|
4
|
+
* Manage workspaces.
|
|
5
|
+
*
|
|
6
|
+
* Workspaces are the top-level container for connections, smart folders,
|
|
7
|
+
* members, and the virtual filesystem. When using an organization token,
|
|
8
|
+
* workspaces are automatically scoped to the token's tenant.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const ws = await airstore.workspaces.create({ name: "user-123" });
|
|
13
|
+
* console.log(ws.external_id);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare class Workspaces {
|
|
17
|
+
private readonly client;
|
|
18
|
+
constructor(client: CoreClient);
|
|
19
|
+
/**
|
|
20
|
+
* Create a new workspace.
|
|
21
|
+
*
|
|
22
|
+
* When called with an organization token, the workspace is automatically
|
|
23
|
+
* tagged with the token's `tenant_id`.
|
|
24
|
+
*
|
|
25
|
+
* @param params - Workspace creation parameters.
|
|
26
|
+
* @param options - Per-request overrides.
|
|
27
|
+
* @returns The newly created workspace.
|
|
28
|
+
*
|
|
29
|
+
* @throws {AuthenticationError} If the API key is invalid or missing.
|
|
30
|
+
* @throws {PermissionDeniedError} If the token lacks workspace creation rights.
|
|
31
|
+
*/
|
|
32
|
+
create(params: WorkspaceCreateParams, options?: RequestOptions): Promise<Workspace>;
|
|
33
|
+
/**
|
|
34
|
+
* List all workspaces accessible to the authenticated token.
|
|
35
|
+
*
|
|
36
|
+
* Organization tokens only see workspaces belonging to their tenant.
|
|
37
|
+
* Cluster admin tokens see all workspaces.
|
|
38
|
+
*
|
|
39
|
+
* @param options - Per-request overrides.
|
|
40
|
+
* @returns Array of workspaces.
|
|
41
|
+
*/
|
|
42
|
+
list(options?: RequestOptions): Promise<Workspace[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Retrieve a workspace by its external ID.
|
|
45
|
+
*
|
|
46
|
+
* @param id - Workspace external ID (UUID).
|
|
47
|
+
* @param options - Per-request overrides.
|
|
48
|
+
* @returns The workspace.
|
|
49
|
+
*
|
|
50
|
+
* @throws {NotFoundError} If the workspace doesn't exist.
|
|
51
|
+
*/
|
|
52
|
+
retrieve(id: string, options?: RequestOptions): Promise<Workspace>;
|
|
53
|
+
/**
|
|
54
|
+
* Delete a workspace and all associated data.
|
|
55
|
+
*
|
|
56
|
+
* @param id - Workspace external ID (UUID).
|
|
57
|
+
* @param options - Per-request overrides.
|
|
58
|
+
*
|
|
59
|
+
* @throws {NotFoundError} If the workspace doesn't exist.
|
|
60
|
+
*/
|
|
61
|
+
del(id: string, options?: RequestOptions): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/resources/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/E;;;;;;;;;;;;GAYG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;;;;;;;;;;;OAYG;IACG,MAAM,CACV,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC;IAUrB;;;;;;;;OAQG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAU1D;;;;;;;;OAQG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC;IAUxE;;;;;;;OAOG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAS/D"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IntegrationType } from './shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for creating a connection to an external service.
|
|
4
|
+
*
|
|
5
|
+
* Provide either OAuth credentials (`accessToken`/`refreshToken`) or an
|
|
6
|
+
* `apiKey`, depending on the integration type.
|
|
7
|
+
*/
|
|
8
|
+
export interface ConnectionCreateParams {
|
|
9
|
+
/** The integration provider to connect. */
|
|
10
|
+
integrationType: IntegrationType;
|
|
11
|
+
/** OAuth access token from the provider. */
|
|
12
|
+
accessToken?: string;
|
|
13
|
+
/** OAuth refresh token for automatic credential renewal. */
|
|
14
|
+
refreshToken?: string;
|
|
15
|
+
/** API key for key-based integrations (e.g., PostHog). */
|
|
16
|
+
apiKey?: string;
|
|
17
|
+
/** OAuth scope string. */
|
|
18
|
+
scope?: string;
|
|
19
|
+
/** Provider-specific extra fields. */
|
|
20
|
+
extra?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A connection to an external service within a workspace.
|
|
24
|
+
*/
|
|
25
|
+
export interface Connection {
|
|
26
|
+
/** Unique identifier. */
|
|
27
|
+
external_id: string;
|
|
28
|
+
/** The workspace this connection belongs to. */
|
|
29
|
+
workspace_id: string;
|
|
30
|
+
/** Integration provider type. */
|
|
31
|
+
integration_type: string;
|
|
32
|
+
/** OAuth scope granted. */
|
|
33
|
+
scope?: string;
|
|
34
|
+
/** When credentials expire. */
|
|
35
|
+
expires_at?: string;
|
|
36
|
+
/** ISO 8601 creation timestamp. */
|
|
37
|
+
created_at: string;
|
|
38
|
+
/** ISO 8601 last update timestamp. */
|
|
39
|
+
updated_at: string;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../../src/types/connections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,2CAA2C;IAC3C,eAAe,EAAE,eAAe,CAAC;IACjC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A virtual file or directory in the workspace filesystem.
|
|
3
|
+
*/
|
|
4
|
+
export interface VirtualFile {
|
|
5
|
+
/** Unique identifier. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** File or directory name. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Full path. */
|
|
10
|
+
path: string;
|
|
11
|
+
/** MIME type. */
|
|
12
|
+
type: string;
|
|
13
|
+
/** Whether this is a directory. */
|
|
14
|
+
is_folder: boolean;
|
|
15
|
+
/** File size in bytes. */
|
|
16
|
+
size: number;
|
|
17
|
+
/** ISO 8601 last modified timestamp. */
|
|
18
|
+
modified_at?: string;
|
|
19
|
+
/** Number of children (for directories). */
|
|
20
|
+
child_count?: number;
|
|
21
|
+
/** Provider-specific metadata. */
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Directory listing result.
|
|
26
|
+
*/
|
|
27
|
+
export interface DirectoryListing {
|
|
28
|
+
entries: VirtualFile[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Tree listing result.
|
|
32
|
+
*/
|
|
33
|
+
export interface TreeListing {
|
|
34
|
+
path: string;
|
|
35
|
+
entries: VirtualFile[];
|
|
36
|
+
truncated: boolean;
|
|
37
|
+
continuation_token?: string;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=filesystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../../src/types/filesystem.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './shared.js';
|
|
2
|
+
export * from './workspaces.js';
|
|
3
|
+
export * from './connections.js';
|
|
4
|
+
export * from './smart-folders.js';
|
|
5
|
+
export * from './tokens.js';
|
|
6
|
+
export * from './members.js';
|
|
7
|
+
export * from './oauth.js';
|
|
8
|
+
export * from './filesystem.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MemberRole } from './shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for adding a member to a workspace.
|
|
4
|
+
*/
|
|
5
|
+
export interface MemberCreateParams {
|
|
6
|
+
/** Member email address. */
|
|
7
|
+
email: string;
|
|
8
|
+
/** Display name. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Role in the workspace. @default "member" */
|
|
11
|
+
role?: MemberRole;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A workspace member.
|
|
15
|
+
*/
|
|
16
|
+
export interface Member {
|
|
17
|
+
/** Unique external identifier. */
|
|
18
|
+
external_id: string;
|
|
19
|
+
/** Email address. */
|
|
20
|
+
email: string;
|
|
21
|
+
/** Display name. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Role in the workspace. */
|
|
24
|
+
role: MemberRole;
|
|
25
|
+
/** ISO 8601 creation timestamp. */
|
|
26
|
+
created_at: string;
|
|
27
|
+
/** ISO 8601 last update timestamp. */
|
|
28
|
+
updated_at: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../../src/types/members.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IntegrationType } from './shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for creating an OAuth session.
|
|
4
|
+
*/
|
|
5
|
+
export interface OAuthSessionCreateParams {
|
|
6
|
+
/** The integration provider. */
|
|
7
|
+
integrationType: IntegrationType;
|
|
8
|
+
/** URL to redirect after OAuth callback. */
|
|
9
|
+
returnTo?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An OAuth session for interactive connection setup.
|
|
13
|
+
*/
|
|
14
|
+
export interface OAuthSession {
|
|
15
|
+
/** Session identifier for polling. */
|
|
16
|
+
session_id: string;
|
|
17
|
+
/** URL to redirect the user to for authorization. */
|
|
18
|
+
authorize_url: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* OAuth session status when polling.
|
|
22
|
+
*/
|
|
23
|
+
export interface OAuthSessionStatus {
|
|
24
|
+
/** Current status. */
|
|
25
|
+
status: 'pending' | 'complete' | 'error';
|
|
26
|
+
/** Error message if status is "error". */
|
|
27
|
+
error?: string;
|
|
28
|
+
/** Connection ID if status is "complete". */
|
|
29
|
+
connection_id?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Options for the OAuth poll helper.
|
|
33
|
+
*/
|
|
34
|
+
export interface OAuthPollOptions {
|
|
35
|
+
/** Maximum time to wait in ms. @default 300000 */
|
|
36
|
+
timeout?: number;
|
|
37
|
+
/** Polling interval in ms. @default 2000 */
|
|
38
|
+
interval?: number;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/types/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,gCAAgC;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sBAAsB;IACtB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IACzC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Per-request overrides. Re-exported from client for convenience. */
|
|
2
|
+
export type { RequestOptions, ResponseMeta } from '../client.js';
|
|
3
|
+
/**
|
|
4
|
+
* A paginated list response from the Airstore API.
|
|
5
|
+
*
|
|
6
|
+
* Check `hasMore` and pass `nextCursor` to subsequent requests
|
|
7
|
+
* to retrieve additional pages.
|
|
8
|
+
*/
|
|
9
|
+
export interface PaginatedList<T> {
|
|
10
|
+
/** Items in the current page. */
|
|
11
|
+
data: T[];
|
|
12
|
+
/** Whether more items are available beyond this page. */
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
/** Cursor to pass to the next request for the following page. */
|
|
15
|
+
nextCursor?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Supported integration provider types.
|
|
19
|
+
*
|
|
20
|
+
* Each value corresponds to a provider that can be connected to a workspace.
|
|
21
|
+
*/
|
|
22
|
+
export type IntegrationType = 'gmail' | 'gdrive' | 'github' | 'notion' | 'linear' | 'slack' | 'posthog';
|
|
23
|
+
/** Workspace member roles. */
|
|
24
|
+
export type MemberRole = 'admin' | 'member' | 'viewer';
|
|
25
|
+
/** Smart folder output format. */
|
|
26
|
+
export type OutputFormat = 'folder' | 'file';
|
|
27
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/types/shared.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,iCAAiC;IACjC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;IACjB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,SAAS,CAAC;AAEd,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvD,kCAAkC;AAClC,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { OutputFormat } from './shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for creating a smart folder.
|
|
4
|
+
*/
|
|
5
|
+
export interface SmartFolderCreateParams {
|
|
6
|
+
/** Integration source (e.g., "gmail", "gdrive"). */
|
|
7
|
+
integration: string;
|
|
8
|
+
/** Display name for the smart folder. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Natural language guidance for LLM inference. */
|
|
11
|
+
guidance?: string;
|
|
12
|
+
/** Output format: "folder" for directory of files, "file" for single aggregated file. @default "folder" */
|
|
13
|
+
outputFormat?: OutputFormat;
|
|
14
|
+
/** File extension for "file" output format (e.g., ".md", ".json"). */
|
|
15
|
+
fileExt?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parameters for updating a smart folder.
|
|
19
|
+
*/
|
|
20
|
+
export interface SmartFolderUpdateParams {
|
|
21
|
+
/** New display name. */
|
|
22
|
+
name?: string;
|
|
23
|
+
/** New guidance for LLM inference. */
|
|
24
|
+
guidance?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A smart folder (filesystem query) in a workspace.
|
|
28
|
+
*/
|
|
29
|
+
export interface SmartFolder {
|
|
30
|
+
/** Unique external identifier. */
|
|
31
|
+
external_id: string;
|
|
32
|
+
/** Integration source. */
|
|
33
|
+
integration: string;
|
|
34
|
+
/** Virtual filesystem path. */
|
|
35
|
+
path: string;
|
|
36
|
+
/** Display name. */
|
|
37
|
+
name: string;
|
|
38
|
+
/** LLM guidance text. */
|
|
39
|
+
guidance: string;
|
|
40
|
+
/** Output format. */
|
|
41
|
+
output_format: string;
|
|
42
|
+
/** ISO 8601 creation timestamp. */
|
|
43
|
+
created_at: string;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=smart-folders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-folders.d.ts","sourceRoot":"","sources":["../../../src/types/smart-folders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2GAA2G;IAC3G,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for creating a workspace-scoped mount token.
|
|
3
|
+
*/
|
|
4
|
+
export interface TokenCreateParams {
|
|
5
|
+
/** Member ID (external) to associate the token with. */
|
|
6
|
+
memberId?: string;
|
|
7
|
+
/** Email to auto-create a member if memberId not provided. */
|
|
8
|
+
email?: string;
|
|
9
|
+
/** Display name for the token. */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** Token expiration in seconds (0 = no expiration). */
|
|
12
|
+
expiresIn?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A workspace authentication token.
|
|
16
|
+
*/
|
|
17
|
+
export interface Token {
|
|
18
|
+
/** Unique external identifier. */
|
|
19
|
+
external_id: string;
|
|
20
|
+
/** Display name. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Token type. */
|
|
23
|
+
token_type: string;
|
|
24
|
+
/** ISO 8601 creation timestamp. */
|
|
25
|
+
created_at: string;
|
|
26
|
+
/** ISO 8601 last used timestamp. */
|
|
27
|
+
last_used_at?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Response when creating a token (includes the raw token value).
|
|
31
|
+
*/
|
|
32
|
+
export interface TokenCreated {
|
|
33
|
+
/** The raw token value. Only shown once at creation time. */
|
|
34
|
+
token: string;
|
|
35
|
+
/** Token metadata. */
|
|
36
|
+
info: Token;
|
|
37
|
+
/** Auto-created member ID, if email was provided instead of memberId. */
|
|
38
|
+
member_id?: string;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/types/tokens.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,IAAI,EAAE,KAAK,CAAC;IACZ,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for creating a new workspace.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkspaceCreateParams {
|
|
5
|
+
/** Display name for the workspace. */
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A workspace in Airstore.
|
|
10
|
+
*
|
|
11
|
+
* Workspaces contain connections, smart folders, members, and a virtual filesystem.
|
|
12
|
+
* When created with an org token, they are automatically scoped to the token's tenant.
|
|
13
|
+
*/
|
|
14
|
+
export interface Workspace {
|
|
15
|
+
/** Unique external identifier (UUID). */
|
|
16
|
+
external_id: string;
|
|
17
|
+
/** Display name. */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Tenant ID, if workspace was created by an org token. */
|
|
20
|
+
tenant_id?: string;
|
|
21
|
+
/** ISO 8601 creation timestamp. */
|
|
22
|
+
created_at: string;
|
|
23
|
+
/** ISO 8601 last update timestamp. */
|
|
24
|
+
updated_at: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=workspaces.d.ts.map
|