@miosa/sdk 1.0.0 → 1.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/dist/index.d.ts +1183 -18
- package/dist/index.js +1608 -252
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +44 -0
- package/src/index.ts +100 -0
- package/src/resources/api-keys.ts +5 -1
- package/src/resources/computer.ts +16 -0
- package/src/resources/cron-jobs.ts +7 -0
- package/src/resources/custom_domains.ts +7 -0
- package/src/resources/deployments.ts +13 -2
- package/src/resources/egress.test.ts +318 -0
- package/src/resources/egressAudit.ts +245 -0
- package/src/resources/egressNetwork.ts +450 -0
- package/src/resources/egressSecrets.ts +577 -0
- package/src/resources/flat-custom-domains.ts +7 -0
- package/src/resources/functions.ts +7 -0
- package/src/resources/org-invites.ts +189 -0
- package/src/resources/phase1.test.ts +187 -0
- package/src/resources/quotas.ts +77 -0
- package/src/resources/sandbox-processes.ts +112 -0
- package/src/resources/sandbox-shares.ts +83 -0
- package/src/resources/sandboxes.ts +239 -10
- package/src/resources/storage.ts +7 -0
- package/src/resources/tenant-events.ts +32 -0
- package/src/resources/tenant.ts +82 -3
- package/src/resources/volumes.ts +7 -0
- package/src/resources/webhooks.ts +55 -0
- package/src/resources/workspace-invites.ts +188 -0
- package/src/resources/workspace-members.test.ts +121 -0
- package/src/resources/workspace-members.ts +143 -0
- package/src/resources/workspaces.ts +285 -0
- package/src/types.ts +7 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace Invites — email invite flow for workspace access.
|
|
3
|
+
*
|
|
4
|
+
* Sending an invite to an email that already belongs to a tenant member
|
|
5
|
+
* short-circuits to directly adding that user (returns `type: "added"`).
|
|
6
|
+
* Accepting a workspace invite for an unknown email auto-creates both a
|
|
7
|
+
* `tenant_members` and a `workspace_members` row atomically.
|
|
8
|
+
*
|
|
9
|
+
* Public endpoints (no auth):
|
|
10
|
+
* GET /workspace-invites/:token
|
|
11
|
+
*
|
|
12
|
+
* Authenticated endpoints:
|
|
13
|
+
* POST /workspaces/:id/invites
|
|
14
|
+
* GET /workspaces/:id/invites
|
|
15
|
+
* DELETE /workspaces/:id/invites/:invite_id
|
|
16
|
+
* POST /workspace-invites/:token/accept
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { HttpClient } from "../http.js";
|
|
20
|
+
import type {
|
|
21
|
+
WorkspaceMemberRecord,
|
|
22
|
+
WorkspaceRole,
|
|
23
|
+
} from "./workspace-members.js";
|
|
24
|
+
|
|
25
|
+
// ── Resource shapes ──────────────────────────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
export interface WorkspaceInvite {
|
|
28
|
+
id: string;
|
|
29
|
+
workspace_id: string;
|
|
30
|
+
tenant_id: string;
|
|
31
|
+
email: string;
|
|
32
|
+
role: WorkspaceRole;
|
|
33
|
+
invited_by: string | null;
|
|
34
|
+
expires_at: string;
|
|
35
|
+
accepted_at: string | null;
|
|
36
|
+
inserted_at: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface WorkspaceInvitePreview {
|
|
40
|
+
workspace_name: string;
|
|
41
|
+
tenant_name: string;
|
|
42
|
+
role: WorkspaceRole;
|
|
43
|
+
email: string;
|
|
44
|
+
expires_at: string;
|
|
45
|
+
expired: boolean;
|
|
46
|
+
revoked: boolean;
|
|
47
|
+
accepted: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// ── Request payloads ─────────────────────────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
export interface CreateWorkspaceInviteParams {
|
|
53
|
+
email: string;
|
|
54
|
+
role?: WorkspaceRole;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ── Response shapes ───────────────────────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
/** Returned when the email was unknown — an invite was created. */
|
|
60
|
+
export interface WorkspaceInviteCreatedResponse {
|
|
61
|
+
data: WorkspaceInvite;
|
|
62
|
+
type: "invited";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Returned when the email already had a tenant_members row — added directly. */
|
|
66
|
+
export interface WorkspaceMemberAddedResponse {
|
|
67
|
+
data: WorkspaceMemberRecord;
|
|
68
|
+
type: "added";
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type CreateWorkspaceInviteResponse =
|
|
72
|
+
| WorkspaceInviteCreatedResponse
|
|
73
|
+
| WorkspaceMemberAddedResponse;
|
|
74
|
+
|
|
75
|
+
export interface WorkspaceInviteListResponse {
|
|
76
|
+
data: WorkspaceInvite[];
|
|
77
|
+
total: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface WorkspaceInviteRevokeResponse {
|
|
81
|
+
invite_id: string;
|
|
82
|
+
revoked: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface WorkspaceInvitePreviewResponse {
|
|
86
|
+
data: WorkspaceInvitePreview;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface AcceptWorkspaceInviteResponse {
|
|
90
|
+
accepted: boolean;
|
|
91
|
+
workspace_id: string;
|
|
92
|
+
tenant_id: string;
|
|
93
|
+
role: WorkspaceRole;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ── Main resource ─────────────────────────────────────────────────────────────
|
|
97
|
+
|
|
98
|
+
export class WorkspaceInvites {
|
|
99
|
+
constructor(private readonly http: HttpClient) {}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Create a workspace invite or add a member directly.
|
|
103
|
+
*
|
|
104
|
+
* If `email` already maps to a tenant member the user is added directly and
|
|
105
|
+
* `type === "added"` is returned with a `WorkspaceMemberRecord`. Otherwise
|
|
106
|
+
* an invite row is created and `type === "invited"` is returned.
|
|
107
|
+
*
|
|
108
|
+
* `POST /workspaces/:id/invites`
|
|
109
|
+
*/
|
|
110
|
+
async create(
|
|
111
|
+
workspaceId: string,
|
|
112
|
+
params: CreateWorkspaceInviteParams,
|
|
113
|
+
): Promise<CreateWorkspaceInviteResponse> {
|
|
114
|
+
return this.http.post<CreateWorkspaceInviteResponse>(
|
|
115
|
+
`/workspaces/${workspaceId}/invites`,
|
|
116
|
+
params,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* List all pending (non-expired, non-accepted, non-revoked) workspace invites.
|
|
122
|
+
*
|
|
123
|
+
* `GET /workspaces/:id/invites`
|
|
124
|
+
*/
|
|
125
|
+
async list(workspaceId: string): Promise<WorkspaceInvite[]> {
|
|
126
|
+
const res = await this.http.get<WorkspaceInviteListResponse>(
|
|
127
|
+
`/workspaces/${workspaceId}/invites`,
|
|
128
|
+
);
|
|
129
|
+
return res.data ?? [];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Revoke a pending workspace invite.
|
|
134
|
+
*
|
|
135
|
+
* Already-revoked invites are idempotent (returns `revoked: true`). An invite
|
|
136
|
+
* that was legitimately accepted throws `409 ALREADY_ACCEPTED`.
|
|
137
|
+
*
|
|
138
|
+
* `DELETE /workspaces/:id/invites/:invite_id`
|
|
139
|
+
*/
|
|
140
|
+
async revoke(
|
|
141
|
+
workspaceId: string,
|
|
142
|
+
inviteId: string,
|
|
143
|
+
): Promise<WorkspaceInviteRevokeResponse> {
|
|
144
|
+
return this.http.delete<WorkspaceInviteRevokeResponse>(
|
|
145
|
+
`/workspaces/${workspaceId}/invites/${inviteId}`,
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Preview a workspace invite by token (no auth required).
|
|
151
|
+
*
|
|
152
|
+
* Use this to render the invite landing page before prompting the user to
|
|
153
|
+
* log in or sign up. Returns `null` when the token is unknown or revoked.
|
|
154
|
+
*
|
|
155
|
+
* `GET /workspace-invites/:token`
|
|
156
|
+
*/
|
|
157
|
+
async preview(token: string): Promise<WorkspaceInvitePreview | null> {
|
|
158
|
+
try {
|
|
159
|
+
const res = await this.http.get<WorkspaceInvitePreviewResponse>(
|
|
160
|
+
`/workspace-invites/${token}`,
|
|
161
|
+
);
|
|
162
|
+
return res.data ?? null;
|
|
163
|
+
} catch {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Accept a workspace invite on behalf of the authenticated user.
|
|
170
|
+
*
|
|
171
|
+
* The caller's JWT email must match the invite email (case-insensitive).
|
|
172
|
+
*
|
|
173
|
+
* Error codes:
|
|
174
|
+
* - `INVALID_TOKEN` (404) — token not found.
|
|
175
|
+
* - `EXPIRED` (410) — invite TTL elapsed.
|
|
176
|
+
* - `REVOKED` (409) — invite was revoked.
|
|
177
|
+
* - `ALREADY_ACCEPTED` (409) — already used.
|
|
178
|
+
* - `EMAIL_MISMATCH` (422) — JWT email differs from invite email.
|
|
179
|
+
*
|
|
180
|
+
* `POST /workspace-invites/:token/accept`
|
|
181
|
+
*/
|
|
182
|
+
async accept(token: string): Promise<AcceptWorkspaceInviteResponse> {
|
|
183
|
+
return this.http.post<AcceptWorkspaceInviteResponse>(
|
|
184
|
+
`/workspace-invites/${token}/accept`,
|
|
185
|
+
{},
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
import { HttpClient } from "../http.js";
|
|
3
|
+
import { WorkspaceMembers } from "./workspace-members.js";
|
|
4
|
+
|
|
5
|
+
const mockGet = vi.fn();
|
|
6
|
+
const mockPost = vi.fn();
|
|
7
|
+
const mockPatch = vi.fn();
|
|
8
|
+
const mockDelete = vi.fn();
|
|
9
|
+
const mockRequest = vi.fn();
|
|
10
|
+
|
|
11
|
+
function makeHttp(): HttpClient {
|
|
12
|
+
const http = {} as HttpClient;
|
|
13
|
+
http.get = mockGet;
|
|
14
|
+
http.post = mockPost;
|
|
15
|
+
http.patch = mockPatch;
|
|
16
|
+
http.delete = mockDelete;
|
|
17
|
+
http.request = mockRequest;
|
|
18
|
+
return http;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const MEMBER = {
|
|
22
|
+
user_id: "usr_abc",
|
|
23
|
+
email: "alice@example.com",
|
|
24
|
+
name: "Alice",
|
|
25
|
+
avatar_url: null,
|
|
26
|
+
role: "member" as const,
|
|
27
|
+
joined_at: "2026-05-01T10:00:00Z",
|
|
28
|
+
added_by: null,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
beforeEach(() => {
|
|
32
|
+
vi.clearAllMocks();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe("WorkspaceMembers", () => {
|
|
36
|
+
describe("list()", () => {
|
|
37
|
+
it("calls GET /workspaces/:id/members and returns array", async () => {
|
|
38
|
+
mockGet.mockResolvedValue({ data: [MEMBER] });
|
|
39
|
+
const resource = new WorkspaceMembers(makeHttp());
|
|
40
|
+
|
|
41
|
+
const result = await resource.list("ws-uuid");
|
|
42
|
+
|
|
43
|
+
expect(mockGet).toHaveBeenCalledWith("/workspaces/ws-uuid/members");
|
|
44
|
+
expect(result).toHaveLength(1);
|
|
45
|
+
expect(result[0].user_id).toBe("usr_abc");
|
|
46
|
+
expect(result[0].email).toBe("alice@example.com");
|
|
47
|
+
expect(result[0].role).toBe("member");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("returns empty array when data is empty", async () => {
|
|
51
|
+
mockGet.mockResolvedValue({ data: [] });
|
|
52
|
+
const resource = new WorkspaceMembers(makeHttp());
|
|
53
|
+
|
|
54
|
+
const result = await resource.list("ws-uuid");
|
|
55
|
+
expect(result).toEqual([]);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe("add()", () => {
|
|
60
|
+
it("calls POST /workspaces/:id/members with userId and role", async () => {
|
|
61
|
+
const record = {
|
|
62
|
+
user_id: "usr_def",
|
|
63
|
+
workspace_id: "ws-uuid",
|
|
64
|
+
role: "member",
|
|
65
|
+
joined_at: "2026-05-22T09:00:00Z",
|
|
66
|
+
added_by: "usr_abc",
|
|
67
|
+
};
|
|
68
|
+
mockPost.mockResolvedValue({ data: record });
|
|
69
|
+
const resource = new WorkspaceMembers(makeHttp());
|
|
70
|
+
|
|
71
|
+
const result = await resource.add("ws-uuid", {
|
|
72
|
+
user_id: "usr_def",
|
|
73
|
+
role: "member",
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
expect(mockPost).toHaveBeenCalledWith(
|
|
77
|
+
"/workspaces/ws-uuid/members",
|
|
78
|
+
expect.objectContaining({ user_id: "usr_def", role: "member" }),
|
|
79
|
+
);
|
|
80
|
+
expect(result.user_id).toBe("usr_def");
|
|
81
|
+
expect(result.role).toBe("member");
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
describe("updateRole()", () => {
|
|
86
|
+
it("calls PATCH /workspaces/:id/members/:userId with new role", async () => {
|
|
87
|
+
const updated = {
|
|
88
|
+
user_id: "usr_def",
|
|
89
|
+
workspace_id: "ws-uuid",
|
|
90
|
+
role: "admin",
|
|
91
|
+
joined_at: "2026-05-22T09:00:00Z",
|
|
92
|
+
added_by: "usr_abc",
|
|
93
|
+
};
|
|
94
|
+
mockPatch.mockResolvedValue({ data: updated });
|
|
95
|
+
const resource = new WorkspaceMembers(makeHttp());
|
|
96
|
+
|
|
97
|
+
const result = await resource.updateRole("ws-uuid", "usr_def", {
|
|
98
|
+
role: "admin",
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
expect(mockPatch).toHaveBeenCalledWith(
|
|
102
|
+
"/workspaces/ws-uuid/members/usr_def",
|
|
103
|
+
{ role: "admin" },
|
|
104
|
+
);
|
|
105
|
+
expect(result.role).toBe("admin");
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
describe("remove()", () => {
|
|
110
|
+
it("calls DELETE /workspaces/:id/members/:userId", async () => {
|
|
111
|
+
mockDelete.mockResolvedValue({ deleted: true });
|
|
112
|
+
const resource = new WorkspaceMembers(makeHttp());
|
|
113
|
+
|
|
114
|
+
await resource.remove("ws-uuid", "usr_def");
|
|
115
|
+
|
|
116
|
+
expect(mockDelete).toHaveBeenCalledWith(
|
|
117
|
+
"/workspaces/ws-uuid/members/usr_def",
|
|
118
|
+
);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace Members — per-workspace user roster.
|
|
3
|
+
*
|
|
4
|
+
* Endpoints:
|
|
5
|
+
* GET /workspaces/:id/members
|
|
6
|
+
* POST /workspaces/:id/members
|
|
7
|
+
* PATCH /workspaces/:id/members/:user_id
|
|
8
|
+
* DELETE /workspaces/:id/members/:user_id
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { HttpClient } from "../http.js";
|
|
12
|
+
|
|
13
|
+
// ── Resource shapes ──────────────────────────────────────────────────────────
|
|
14
|
+
|
|
15
|
+
/** Role a user can hold within a workspace. */
|
|
16
|
+
export type WorkspaceRole = "owner" | "admin" | "member" | "viewer";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Workspace member as returned by `list` — includes denormalised user fields
|
|
20
|
+
* for display.
|
|
21
|
+
*/
|
|
22
|
+
export interface WorkspaceMember {
|
|
23
|
+
user_id: string;
|
|
24
|
+
email: string | null;
|
|
25
|
+
name: string | null;
|
|
26
|
+
avatar_url: string | null;
|
|
27
|
+
role: WorkspaceRole;
|
|
28
|
+
joined_at: string | null;
|
|
29
|
+
added_by: string | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Raw workspace_members row returned after add/update operations. */
|
|
33
|
+
export interface WorkspaceMemberRecord {
|
|
34
|
+
user_id: string;
|
|
35
|
+
workspace_id: string;
|
|
36
|
+
role: WorkspaceRole;
|
|
37
|
+
joined_at: string | null;
|
|
38
|
+
added_by: string | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ── Request payloads ─────────────────────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
export interface AddWorkspaceMemberParams {
|
|
44
|
+
/** UUID of the tenant user to add. Must already be an org member. */
|
|
45
|
+
user_id: string;
|
|
46
|
+
/** Role to assign; defaults to `"member"`. */
|
|
47
|
+
role?: WorkspaceRole;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface UpdateWorkspaceMemberRoleParams {
|
|
51
|
+
role: WorkspaceRole;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ── Response envelopes ───────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
export interface WorkspaceMemberListResponse {
|
|
57
|
+
data: WorkspaceMember[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface WorkspaceMemberRecordResponse {
|
|
61
|
+
data: WorkspaceMemberRecord;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface WorkspaceMemberDeleteResponse {
|
|
65
|
+
deleted: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ── Main resource ─────────────────────────────────────────────────────────────
|
|
69
|
+
|
|
70
|
+
export class WorkspaceMembers {
|
|
71
|
+
constructor(private readonly http: HttpClient) {}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* List all members of a workspace.
|
|
75
|
+
*
|
|
76
|
+
* `GET /workspaces/:id/members`
|
|
77
|
+
*/
|
|
78
|
+
async list(workspaceId: string): Promise<WorkspaceMember[]> {
|
|
79
|
+
const res = await this.http.get<WorkspaceMemberListResponse>(
|
|
80
|
+
`/workspaces/${workspaceId}/members`,
|
|
81
|
+
);
|
|
82
|
+
return res.data ?? (res as unknown as WorkspaceMember[]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Add an existing tenant user to a workspace.
|
|
87
|
+
*
|
|
88
|
+
* The `user_id` must already hold a `tenant_members` row for the parent org.
|
|
89
|
+
* Use {@link WorkspaceInvites.create} to invite someone who is not yet an org
|
|
90
|
+
* member.
|
|
91
|
+
*
|
|
92
|
+
* `POST /workspaces/:id/members`
|
|
93
|
+
*
|
|
94
|
+
* @throws `MiosaError` with code `NOT_TENANT_MEMBER` if the user is not an
|
|
95
|
+
* org member.
|
|
96
|
+
*/
|
|
97
|
+
async add(
|
|
98
|
+
workspaceId: string,
|
|
99
|
+
params: AddWorkspaceMemberParams,
|
|
100
|
+
): Promise<WorkspaceMemberRecord> {
|
|
101
|
+
const res = await this.http.post<WorkspaceMemberRecordResponse>(
|
|
102
|
+
`/workspaces/${workspaceId}/members`,
|
|
103
|
+
params,
|
|
104
|
+
);
|
|
105
|
+
return res.data ?? (res as unknown as WorkspaceMemberRecord);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Change a workspace member's role.
|
|
110
|
+
*
|
|
111
|
+
* `PATCH /workspaces/:id/members/:user_id`
|
|
112
|
+
*/
|
|
113
|
+
async updateRole(
|
|
114
|
+
workspaceId: string,
|
|
115
|
+
userId: string,
|
|
116
|
+
params: UpdateWorkspaceMemberRoleParams,
|
|
117
|
+
): Promise<WorkspaceMemberRecord> {
|
|
118
|
+
const res = await this.http.patch<WorkspaceMemberRecordResponse>(
|
|
119
|
+
`/workspaces/${workspaceId}/members/${userId}`,
|
|
120
|
+
params,
|
|
121
|
+
);
|
|
122
|
+
return res.data ?? (res as unknown as WorkspaceMemberRecord);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Remove a user from a workspace.
|
|
127
|
+
*
|
|
128
|
+
* The last `owner` of a workspace cannot be removed. Promote another member
|
|
129
|
+
* to `owner` first using {@link updateRole}.
|
|
130
|
+
*
|
|
131
|
+
* `DELETE /workspaces/:id/members/:user_id`
|
|
132
|
+
*
|
|
133
|
+
* @throws `MiosaError` with code `LAST_OWNER` if the target is the sole owner.
|
|
134
|
+
*/
|
|
135
|
+
async remove(
|
|
136
|
+
workspaceId: string,
|
|
137
|
+
userId: string,
|
|
138
|
+
): Promise<WorkspaceMemberDeleteResponse> {
|
|
139
|
+
return this.http.delete<WorkspaceMemberDeleteResponse>(
|
|
140
|
+
`/workspaces/${workspaceId}/members/${userId}`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|