@arbidocs/sdk 0.4.145 → 0.4.146
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/{browser-BUKI5Mtb.d.cts → browser-Cd9i8TIR.d.cts} +7 -2
- package/dist/{browser-BUKI5Mtb.d.ts → browser-Cd9i8TIR.d.ts} +7 -2
- package/dist/browser.cjs +13 -4
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +13 -4
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1977,7 +1977,9 @@ declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'o
|
|
|
1977
1977
|
target?: {
|
|
1978
1978
|
workspaceExtId: string;
|
|
1979
1979
|
workspaceKey: string;
|
|
1980
|
-
}
|
|
1980
|
+
},
|
|
1981
|
+
/** Invite an email that is not a user yet (they get access once they sign up). */
|
|
1982
|
+
confirmInvite?: boolean): Promise<{
|
|
1981
1983
|
user: {
|
|
1982
1984
|
external_id: string;
|
|
1983
1985
|
parent_ext_id?: string | null | undefined;
|
|
@@ -7069,7 +7071,10 @@ declare class Arbi {
|
|
|
7069
7071
|
}[];
|
|
7070
7072
|
next_cursor?: string | null | undefined;
|
|
7071
7073
|
}>;
|
|
7072
|
-
|
|
7074
|
+
/** Add users to the open workspace; `confirmInvite` also invites emails not on ARBI yet. */
|
|
7075
|
+
addUsers: (emails: string[], role?: "owner" | "collaborator" | "guest", options?: {
|
|
7076
|
+
confirmInvite?: boolean;
|
|
7077
|
+
}) => Promise<{
|
|
7073
7078
|
user: {
|
|
7074
7079
|
external_id: string;
|
|
7075
7080
|
parent_ext_id?: string | null | undefined;
|
|
@@ -1977,7 +1977,9 @@ declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'o
|
|
|
1977
1977
|
target?: {
|
|
1978
1978
|
workspaceExtId: string;
|
|
1979
1979
|
workspaceKey: string;
|
|
1980
|
-
}
|
|
1980
|
+
},
|
|
1981
|
+
/** Invite an email that is not a user yet (they get access once they sign up). */
|
|
1982
|
+
confirmInvite?: boolean): Promise<{
|
|
1981
1983
|
user: {
|
|
1982
1984
|
external_id: string;
|
|
1983
1985
|
parent_ext_id?: string | null | undefined;
|
|
@@ -7069,7 +7071,10 @@ declare class Arbi {
|
|
|
7069
7071
|
}[];
|
|
7070
7072
|
next_cursor?: string | null | undefined;
|
|
7071
7073
|
}>;
|
|
7072
|
-
|
|
7074
|
+
/** Add users to the open workspace; `confirmInvite` also invites emails not on ARBI yet. */
|
|
7075
|
+
addUsers: (emails: string[], role?: "owner" | "collaborator" | "guest", options?: {
|
|
7076
|
+
confirmInvite?: boolean;
|
|
7077
|
+
}) => Promise<{
|
|
7073
7078
|
user: {
|
|
7074
7079
|
external_id: string;
|
|
7075
7080
|
parent_ext_id?: string | null | undefined;
|
package/dist/browser.cjs
CHANGED
|
@@ -5010,15 +5010,17 @@ async function updateWorkspace(arbi, body) {
|
|
|
5010
5010
|
async function listWorkspaceUsers(arbi) {
|
|
5011
5011
|
return requireData(await arbi.fetch.GET("/v1/workspace/users"), "Failed to fetch workspace users");
|
|
5012
5012
|
}
|
|
5013
|
-
async function addWorkspaceUsers(arbi, emails, role = "collaborator", target) {
|
|
5013
|
+
async function addWorkspaceUsers(arbi, emails, role = "collaborator", target, confirmInvite = false) {
|
|
5014
|
+
const invite = confirmInvite ? { confirm_invite: true } : {};
|
|
5014
5015
|
return requireData(
|
|
5015
5016
|
await arbi.fetch.POST("/v1/workspace/users", {
|
|
5016
5017
|
body: target ? {
|
|
5017
5018
|
emails,
|
|
5018
5019
|
role,
|
|
5019
5020
|
workspace_ext_id: target.workspaceExtId,
|
|
5020
|
-
workspace_key: target.workspaceKey
|
|
5021
|
-
|
|
5021
|
+
workspace_key: target.workspaceKey,
|
|
5022
|
+
...invite
|
|
5023
|
+
} : { emails, role, ...invite }
|
|
5022
5024
|
}),
|
|
5023
5025
|
"Failed to add users"
|
|
5024
5026
|
);
|
|
@@ -8877,7 +8879,14 @@ var Arbi = class {
|
|
|
8877
8879
|
listUsers: () => listWorkspaceUsers(this.requireClient()),
|
|
8878
8880
|
/** One page of a workspace's activity feed, newest first (see `getWorkspaceActivity`). */
|
|
8879
8881
|
activity: (workspaceId, options) => getWorkspaceActivity(this.requireClient(), workspaceId, options),
|
|
8880
|
-
|
|
8882
|
+
/** Add users to the open workspace; `confirmInvite` also invites emails not on ARBI yet. */
|
|
8883
|
+
addUsers: (emails, role, options) => addWorkspaceUsers(
|
|
8884
|
+
this.requireClient(),
|
|
8885
|
+
emails,
|
|
8886
|
+
role,
|
|
8887
|
+
void 0,
|
|
8888
|
+
options?.confirmInvite
|
|
8889
|
+
),
|
|
8881
8890
|
/**
|
|
8882
8891
|
* Grant users a temporary key scoped to ONE session (identified by its public key), for
|
|
8883
8892
|
* example an agent's run session minted by `agents.authorize()`. Nothing standing is created:
|