@fusebase/fusebase-gate-sdk 2.2.2-sdk.4 → 2.2.2-sdk.40
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/apis/BillingApi.d.ts +111 -0
- package/dist/apis/BillingApi.js +150 -0
- package/dist/apis/IsolatedStoresApi.d.ts +449 -0
- package/dist/apis/IsolatedStoresApi.js +514 -0
- package/dist/apis/NotesApi.d.ts +3 -3
- package/dist/apis/NotesApi.js +3 -3
- package/dist/apis/OrgGroupsApi.d.ts +199 -0
- package/dist/apis/OrgGroupsApi.js +246 -0
- package/dist/apis/OrgUsersApi.d.ts +1 -1
- package/dist/apis/OrgUsersApi.js +1 -1
- package/dist/apis/SystemApi.d.ts +8 -1
- package/dist/apis/SystemApi.js +13 -0
- package/dist/extras/fetchWithRetry.js +6 -1
- package/dist/extras/sqlMigrationBundle.d.ts +13 -0
- package/dist/extras/sqlMigrationBundle.js +69 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -1
- package/dist/types/billing/billing.d.ts +129 -0
- package/dist/types/billing/billing.js +13 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.js +3 -0
- package/dist/types/isolated-store/isolated-store.d.ts +591 -0
- package/dist/types/isolated-store/isolated-store.js +91 -0
- package/dist/types/note/note.d.ts +3 -3
- package/dist/types/org-group/org-group.d.ts +128 -0
- package/dist/types/org-group/org-group.js +7 -0
- package/dist/types/org-user/org-user.d.ts +7 -0
- package/dist/types/shared/enums.d.ts +1 -1
- package/dist/types/shared/enums.js +1 -1
- package/dist/types/system/system.d.ts +8 -0
- package/dist/types/token/token.d.ts +11 -0
- package/package.json +1 -1
- package/release-notes/2.2.2-sdk.40.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.2.2-sdk.4.md +0 -9
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrgGroups API
|
|
3
|
+
*
|
|
4
|
+
* Generated from contract introspection
|
|
5
|
+
* Domain: org-groups
|
|
6
|
+
*/
|
|
7
|
+
import type { Client } from "../runtime/transport";
|
|
8
|
+
import type { AddGroupToWorkspaceRequestContract, AddMembersToOrgGroupRequestContract, AddMembersToOrgGroupResponseContract, DeleteOrgGroupResponseContract, DeleteWorkspaceGroupResponseContract, OrgGroupCreateRequestContract, OrgGroupIdInPathRequired, OrgGroupIncludeWorkspaceInQueryOptional, OrgGroupListResponseContract, OrgGroupMemberListResponseContract, OrgGroupResponseContract, OrgGroupUpdateRequestContract, OrgGroupUserIdInPathRequired, OrgGroupWorkspaceIdInPathRequired, orgIdInPathRequired, OrgWorkspaceGroupCountResponseContract, OrgWorkspaceGroupListResponseContract, OrgWorkspaceGroupResponseContract, OrgWorkspaceGroupsIncludeGroupsInQueryOptional, RemoveOrgGroupMemberResponseContract, UpdateWorkspaceGroupRequestContract } from "../types";
|
|
9
|
+
export declare class OrgGroupsApi {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Add group to workspace
|
|
14
|
+
* Assigns an organization group to a workspace with the requested role. The workspace must belong to orgId.
|
|
15
|
+
*/
|
|
16
|
+
addGroupToWorkspace(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
workspaceId: OrgGroupWorkspaceIdInPathRequired;
|
|
20
|
+
};
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
body: AddGroupToWorkspaceRequestContract;
|
|
23
|
+
}): Promise<OrgWorkspaceGroupResponseContract>;
|
|
24
|
+
/**
|
|
25
|
+
* Add members to organization group
|
|
26
|
+
* Adds one or more users to the specified organization group.
|
|
27
|
+
*/
|
|
28
|
+
addMembersToOrgGroup(params: {
|
|
29
|
+
path: {
|
|
30
|
+
orgId: orgIdInPathRequired;
|
|
31
|
+
groupId: OrgGroupIdInPathRequired;
|
|
32
|
+
};
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
body: AddMembersToOrgGroupRequestContract;
|
|
35
|
+
}): Promise<AddMembersToOrgGroupResponseContract>;
|
|
36
|
+
/**
|
|
37
|
+
* Count workspace groups
|
|
38
|
+
* Returns the number of group assignments for the requested workspace. The workspace must belong to orgId.
|
|
39
|
+
*/
|
|
40
|
+
countWorkspaceGroups(params: {
|
|
41
|
+
path: {
|
|
42
|
+
orgId: orgIdInPathRequired;
|
|
43
|
+
workspaceId: OrgGroupWorkspaceIdInPathRequired;
|
|
44
|
+
};
|
|
45
|
+
headers?: Record<string, string>;
|
|
46
|
+
}): Promise<OrgWorkspaceGroupCountResponseContract>;
|
|
47
|
+
/**
|
|
48
|
+
* Create organization group
|
|
49
|
+
* Creates a group in the organization and can optionally assign it to workspace roles in the same request.
|
|
50
|
+
*/
|
|
51
|
+
createOrgGroup(params: {
|
|
52
|
+
path: {
|
|
53
|
+
orgId: orgIdInPathRequired;
|
|
54
|
+
};
|
|
55
|
+
headers?: Record<string, string>;
|
|
56
|
+
body: OrgGroupCreateRequestContract;
|
|
57
|
+
}): Promise<OrgGroupResponseContract>;
|
|
58
|
+
/**
|
|
59
|
+
* Delete organization group
|
|
60
|
+
* Deletes the group from the organization and removes its workspace assignments.
|
|
61
|
+
*/
|
|
62
|
+
deleteOrgGroup(params: {
|
|
63
|
+
path: {
|
|
64
|
+
orgId: orgIdInPathRequired;
|
|
65
|
+
groupId: OrgGroupIdInPathRequired;
|
|
66
|
+
};
|
|
67
|
+
headers?: Record<string, string>;
|
|
68
|
+
}): Promise<DeleteOrgGroupResponseContract>;
|
|
69
|
+
/**
|
|
70
|
+
* Delete workspace group assignment
|
|
71
|
+
* Removes a group from the requested workspace. The workspace must belong to orgId.
|
|
72
|
+
*/
|
|
73
|
+
deleteWorkspaceGroup(params: {
|
|
74
|
+
path: {
|
|
75
|
+
orgId: orgIdInPathRequired;
|
|
76
|
+
workspaceId: OrgGroupWorkspaceIdInPathRequired;
|
|
77
|
+
groupId: OrgGroupIdInPathRequired;
|
|
78
|
+
};
|
|
79
|
+
headers?: Record<string, string>;
|
|
80
|
+
}): Promise<DeleteWorkspaceGroupResponseContract>;
|
|
81
|
+
/**
|
|
82
|
+
* Get organization group
|
|
83
|
+
* Returns one group in the organization by id.
|
|
84
|
+
*/
|
|
85
|
+
getOrgGroup(params: {
|
|
86
|
+
path: {
|
|
87
|
+
orgId: orgIdInPathRequired;
|
|
88
|
+
groupId: OrgGroupIdInPathRequired;
|
|
89
|
+
};
|
|
90
|
+
headers?: Record<string, string>;
|
|
91
|
+
}): Promise<OrgGroupResponseContract>;
|
|
92
|
+
/**
|
|
93
|
+
* List organization group members
|
|
94
|
+
* Returns the current users assigned to the specified group.
|
|
95
|
+
*/
|
|
96
|
+
listOrgGroupMembers(params: {
|
|
97
|
+
path: {
|
|
98
|
+
orgId: orgIdInPathRequired;
|
|
99
|
+
groupId: OrgGroupIdInPathRequired;
|
|
100
|
+
};
|
|
101
|
+
headers?: Record<string, string>;
|
|
102
|
+
}): Promise<OrgGroupMemberListResponseContract>;
|
|
103
|
+
/**
|
|
104
|
+
* List organization groups
|
|
105
|
+
* Returns groups in the organization with current member and workspace counts.
|
|
106
|
+
*/
|
|
107
|
+
listOrgGroups(params: {
|
|
108
|
+
path: {
|
|
109
|
+
orgId: orgIdInPathRequired;
|
|
110
|
+
};
|
|
111
|
+
headers?: Record<string, string>;
|
|
112
|
+
}): Promise<OrgGroupListResponseContract>;
|
|
113
|
+
/**
|
|
114
|
+
* List organization group workspaces
|
|
115
|
+
* Returns workspace role assignments for a group. Set query.workspace=true to include workspace details when available from org-service.
|
|
116
|
+
*/
|
|
117
|
+
listOrgGroupWorkspaces(params: {
|
|
118
|
+
path: {
|
|
119
|
+
orgId: orgIdInPathRequired;
|
|
120
|
+
groupId: OrgGroupIdInPathRequired;
|
|
121
|
+
};
|
|
122
|
+
query?: {
|
|
123
|
+
workspace?: OrgGroupIncludeWorkspaceInQueryOptional;
|
|
124
|
+
};
|
|
125
|
+
headers?: Record<string, string>;
|
|
126
|
+
}): Promise<OrgWorkspaceGroupListResponseContract>;
|
|
127
|
+
/**
|
|
128
|
+
* List organization workspace-group assignments
|
|
129
|
+
* Returns all current workspace-group assignments visible for the organization.
|
|
130
|
+
*/
|
|
131
|
+
listOrgWorkspaceGroups(params: {
|
|
132
|
+
path: {
|
|
133
|
+
orgId: orgIdInPathRequired;
|
|
134
|
+
};
|
|
135
|
+
headers?: Record<string, string>;
|
|
136
|
+
}): Promise<OrgWorkspaceGroupListResponseContract>;
|
|
137
|
+
/**
|
|
138
|
+
* List user organization groups
|
|
139
|
+
* Returns groups that currently include the requested user inside the organization.
|
|
140
|
+
*/
|
|
141
|
+
listUserOrgGroups(params: {
|
|
142
|
+
path: {
|
|
143
|
+
orgId: orgIdInPathRequired;
|
|
144
|
+
userId: OrgGroupUserIdInPathRequired;
|
|
145
|
+
};
|
|
146
|
+
headers?: Record<string, string>;
|
|
147
|
+
}): Promise<OrgGroupListResponseContract>;
|
|
148
|
+
/**
|
|
149
|
+
* List workspace groups
|
|
150
|
+
* Returns group-to-workspace assignments for the requested workspace. The workspace must belong to orgId.
|
|
151
|
+
*/
|
|
152
|
+
listWorkspaceGroups(params: {
|
|
153
|
+
path: {
|
|
154
|
+
orgId: orgIdInPathRequired;
|
|
155
|
+
workspaceId: OrgGroupWorkspaceIdInPathRequired;
|
|
156
|
+
};
|
|
157
|
+
query?: {
|
|
158
|
+
groups?: OrgWorkspaceGroupsIncludeGroupsInQueryOptional;
|
|
159
|
+
};
|
|
160
|
+
headers?: Record<string, string>;
|
|
161
|
+
}): Promise<OrgWorkspaceGroupListResponseContract>;
|
|
162
|
+
/**
|
|
163
|
+
* Remove member from organization group
|
|
164
|
+
* Removes one user from the specified organization group.
|
|
165
|
+
*/
|
|
166
|
+
removeOrgGroupMember(params: {
|
|
167
|
+
path: {
|
|
168
|
+
orgId: orgIdInPathRequired;
|
|
169
|
+
groupId: OrgGroupIdInPathRequired;
|
|
170
|
+
userId: OrgGroupUserIdInPathRequired;
|
|
171
|
+
};
|
|
172
|
+
headers?: Record<string, string>;
|
|
173
|
+
}): Promise<RemoveOrgGroupMemberResponseContract>;
|
|
174
|
+
/**
|
|
175
|
+
* Update organization group
|
|
176
|
+
* Updates group metadata and, when provided, replaces its workspace assignments.
|
|
177
|
+
*/
|
|
178
|
+
updateOrgGroup(params: {
|
|
179
|
+
path: {
|
|
180
|
+
orgId: orgIdInPathRequired;
|
|
181
|
+
groupId: OrgGroupIdInPathRequired;
|
|
182
|
+
};
|
|
183
|
+
headers?: Record<string, string>;
|
|
184
|
+
body: OrgGroupUpdateRequestContract;
|
|
185
|
+
}): Promise<OrgGroupResponseContract>;
|
|
186
|
+
/**
|
|
187
|
+
* Update workspace group assignment
|
|
188
|
+
* Updates one group's role inside a workspace. The workspace must belong to orgId.
|
|
189
|
+
*/
|
|
190
|
+
updateWorkspaceGroup(params: {
|
|
191
|
+
path: {
|
|
192
|
+
orgId: orgIdInPathRequired;
|
|
193
|
+
workspaceId: OrgGroupWorkspaceIdInPathRequired;
|
|
194
|
+
groupId: OrgGroupIdInPathRequired;
|
|
195
|
+
};
|
|
196
|
+
headers?: Record<string, string>;
|
|
197
|
+
body: UpdateWorkspaceGroupRequestContract;
|
|
198
|
+
}): Promise<OrgWorkspaceGroupResponseContract>;
|
|
199
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OrgGroups API
|
|
4
|
+
*
|
|
5
|
+
* Generated from contract introspection
|
|
6
|
+
* Domain: org-groups
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.OrgGroupsApi = void 0;
|
|
10
|
+
class OrgGroupsApi {
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Add group to workspace
|
|
16
|
+
* Assigns an organization group to a workspace with the requested role. The workspace must belong to orgId.
|
|
17
|
+
*/
|
|
18
|
+
async addGroupToWorkspace(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/workspaces/:workspaceId/groups",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "addGroupToWorkspace",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Add members to organization group
|
|
31
|
+
* Adds one or more users to the specified organization group.
|
|
32
|
+
*/
|
|
33
|
+
async addMembersToOrgGroup(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "POST",
|
|
36
|
+
path: "/:orgId/groups/:groupId/members",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
body: params.body,
|
|
40
|
+
opId: "addMembersToOrgGroup",
|
|
41
|
+
expectedContentType: "application/json",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Count workspace groups
|
|
46
|
+
* Returns the number of group assignments for the requested workspace. The workspace must belong to orgId.
|
|
47
|
+
*/
|
|
48
|
+
async countWorkspaceGroups(params) {
|
|
49
|
+
return this.client.request({
|
|
50
|
+
method: "GET",
|
|
51
|
+
path: "/:orgId/workspaces/:workspaceId/groups/count",
|
|
52
|
+
pathParams: params.path,
|
|
53
|
+
headers: params.headers,
|
|
54
|
+
opId: "countWorkspaceGroups",
|
|
55
|
+
expectedContentType: "application/json",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create organization group
|
|
60
|
+
* Creates a group in the organization and can optionally assign it to workspace roles in the same request.
|
|
61
|
+
*/
|
|
62
|
+
async createOrgGroup(params) {
|
|
63
|
+
return this.client.request({
|
|
64
|
+
method: "POST",
|
|
65
|
+
path: "/:orgId/groups",
|
|
66
|
+
pathParams: params.path,
|
|
67
|
+
headers: params.headers,
|
|
68
|
+
body: params.body,
|
|
69
|
+
opId: "createOrgGroup",
|
|
70
|
+
expectedContentType: "application/json",
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Delete organization group
|
|
75
|
+
* Deletes the group from the organization and removes its workspace assignments.
|
|
76
|
+
*/
|
|
77
|
+
async deleteOrgGroup(params) {
|
|
78
|
+
return this.client.request({
|
|
79
|
+
method: "DELETE",
|
|
80
|
+
path: "/:orgId/groups/:groupId",
|
|
81
|
+
pathParams: params.path,
|
|
82
|
+
headers: params.headers,
|
|
83
|
+
opId: "deleteOrgGroup",
|
|
84
|
+
expectedContentType: "application/json",
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Delete workspace group assignment
|
|
89
|
+
* Removes a group from the requested workspace. The workspace must belong to orgId.
|
|
90
|
+
*/
|
|
91
|
+
async deleteWorkspaceGroup(params) {
|
|
92
|
+
return this.client.request({
|
|
93
|
+
method: "DELETE",
|
|
94
|
+
path: "/:orgId/workspaces/:workspaceId/groups/:groupId",
|
|
95
|
+
pathParams: params.path,
|
|
96
|
+
headers: params.headers,
|
|
97
|
+
opId: "deleteWorkspaceGroup",
|
|
98
|
+
expectedContentType: "application/json",
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get organization group
|
|
103
|
+
* Returns one group in the organization by id.
|
|
104
|
+
*/
|
|
105
|
+
async getOrgGroup(params) {
|
|
106
|
+
return this.client.request({
|
|
107
|
+
method: "GET",
|
|
108
|
+
path: "/:orgId/groups/:groupId",
|
|
109
|
+
pathParams: params.path,
|
|
110
|
+
headers: params.headers,
|
|
111
|
+
opId: "getOrgGroup",
|
|
112
|
+
expectedContentType: "application/json",
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* List organization group members
|
|
117
|
+
* Returns the current users assigned to the specified group.
|
|
118
|
+
*/
|
|
119
|
+
async listOrgGroupMembers(params) {
|
|
120
|
+
return this.client.request({
|
|
121
|
+
method: "GET",
|
|
122
|
+
path: "/:orgId/groups/:groupId/members",
|
|
123
|
+
pathParams: params.path,
|
|
124
|
+
headers: params.headers,
|
|
125
|
+
opId: "listOrgGroupMembers",
|
|
126
|
+
expectedContentType: "application/json",
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* List organization groups
|
|
131
|
+
* Returns groups in the organization with current member and workspace counts.
|
|
132
|
+
*/
|
|
133
|
+
async listOrgGroups(params) {
|
|
134
|
+
return this.client.request({
|
|
135
|
+
method: "GET",
|
|
136
|
+
path: "/:orgId/groups",
|
|
137
|
+
pathParams: params.path,
|
|
138
|
+
headers: params.headers,
|
|
139
|
+
opId: "listOrgGroups",
|
|
140
|
+
expectedContentType: "application/json",
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* List organization group workspaces
|
|
145
|
+
* Returns workspace role assignments for a group. Set query.workspace=true to include workspace details when available from org-service.
|
|
146
|
+
*/
|
|
147
|
+
async listOrgGroupWorkspaces(params) {
|
|
148
|
+
return this.client.request({
|
|
149
|
+
method: "GET",
|
|
150
|
+
path: "/:orgId/groups/:groupId/workspaces",
|
|
151
|
+
pathParams: params.path,
|
|
152
|
+
query: params.query,
|
|
153
|
+
headers: params.headers,
|
|
154
|
+
opId: "listOrgGroupWorkspaces",
|
|
155
|
+
expectedContentType: "application/json",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* List organization workspace-group assignments
|
|
160
|
+
* Returns all current workspace-group assignments visible for the organization.
|
|
161
|
+
*/
|
|
162
|
+
async listOrgWorkspaceGroups(params) {
|
|
163
|
+
return this.client.request({
|
|
164
|
+
method: "GET",
|
|
165
|
+
path: "/:orgId/workspace-groups",
|
|
166
|
+
pathParams: params.path,
|
|
167
|
+
headers: params.headers,
|
|
168
|
+
opId: "listOrgWorkspaceGroups",
|
|
169
|
+
expectedContentType: "application/json",
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* List user organization groups
|
|
174
|
+
* Returns groups that currently include the requested user inside the organization.
|
|
175
|
+
*/
|
|
176
|
+
async listUserOrgGroups(params) {
|
|
177
|
+
return this.client.request({
|
|
178
|
+
method: "GET",
|
|
179
|
+
path: "/:orgId/users/:userId/groups",
|
|
180
|
+
pathParams: params.path,
|
|
181
|
+
headers: params.headers,
|
|
182
|
+
opId: "listUserOrgGroups",
|
|
183
|
+
expectedContentType: "application/json",
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* List workspace groups
|
|
188
|
+
* Returns group-to-workspace assignments for the requested workspace. The workspace must belong to orgId.
|
|
189
|
+
*/
|
|
190
|
+
async listWorkspaceGroups(params) {
|
|
191
|
+
return this.client.request({
|
|
192
|
+
method: "GET",
|
|
193
|
+
path: "/:orgId/workspaces/:workspaceId/groups",
|
|
194
|
+
pathParams: params.path,
|
|
195
|
+
query: params.query,
|
|
196
|
+
headers: params.headers,
|
|
197
|
+
opId: "listWorkspaceGroups",
|
|
198
|
+
expectedContentType: "application/json",
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Remove member from organization group
|
|
203
|
+
* Removes one user from the specified organization group.
|
|
204
|
+
*/
|
|
205
|
+
async removeOrgGroupMember(params) {
|
|
206
|
+
return this.client.request({
|
|
207
|
+
method: "DELETE",
|
|
208
|
+
path: "/:orgId/groups/:groupId/members/:userId",
|
|
209
|
+
pathParams: params.path,
|
|
210
|
+
headers: params.headers,
|
|
211
|
+
opId: "removeOrgGroupMember",
|
|
212
|
+
expectedContentType: "application/json",
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Update organization group
|
|
217
|
+
* Updates group metadata and, when provided, replaces its workspace assignments.
|
|
218
|
+
*/
|
|
219
|
+
async updateOrgGroup(params) {
|
|
220
|
+
return this.client.request({
|
|
221
|
+
method: "PUT",
|
|
222
|
+
path: "/:orgId/groups/:groupId",
|
|
223
|
+
pathParams: params.path,
|
|
224
|
+
headers: params.headers,
|
|
225
|
+
body: params.body,
|
|
226
|
+
opId: "updateOrgGroup",
|
|
227
|
+
expectedContentType: "application/json",
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Update workspace group assignment
|
|
232
|
+
* Updates one group's role inside a workspace. The workspace must belong to orgId.
|
|
233
|
+
*/
|
|
234
|
+
async updateWorkspaceGroup(params) {
|
|
235
|
+
return this.client.request({
|
|
236
|
+
method: "PUT",
|
|
237
|
+
path: "/:orgId/workspaces/:workspaceId/groups/:groupId",
|
|
238
|
+
pathParams: params.path,
|
|
239
|
+
headers: params.headers,
|
|
240
|
+
body: params.body,
|
|
241
|
+
opId: "updateWorkspaceGroup",
|
|
242
|
+
expectedContentType: "application/json",
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
exports.OrgGroupsApi = OrgGroupsApi;
|
|
@@ -11,7 +11,7 @@ export declare class OrgUsersApi {
|
|
|
11
11
|
constructor(client: Client);
|
|
12
12
|
/**
|
|
13
13
|
* Add user to organization
|
|
14
|
-
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. Requires org.members.write and org access.
|
|
14
|
+
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. For org-only instant client onboarding, send orgRole=`client` with autoConfirmClientInvite=`true`. A successful write does not prove that the current session already has org access; confirm access with getMyOrgAccess. Requires org.members.write and org access.
|
|
15
15
|
*/
|
|
16
16
|
addOrgUser(params: {
|
|
17
17
|
path: {
|
package/dist/apis/OrgUsersApi.js
CHANGED
|
@@ -13,7 +13,7 @@ class OrgUsersApi {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Add user to organization
|
|
16
|
-
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. Requires org.members.write and org access.
|
|
16
|
+
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. For org-only instant client onboarding, send orgRole=`client` with autoConfirmClientInvite=`true`. A successful write does not prove that the current session already has org access; confirm access with getMyOrgAccess. Requires org.members.write and org access.
|
|
17
17
|
*/
|
|
18
18
|
async addOrgUser(params) {
|
|
19
19
|
return this.client.request({
|
package/dist/apis/SystemApi.d.ts
CHANGED
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
* Domain: system
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { ResolveOperationPermissionsRequestContract, ResolveOperationPermissionsResponseContract } from "../types";
|
|
8
|
+
import type { ListPermissionCatalogResponseContract, ResolveOperationPermissionsRequestContract, ResolveOperationPermissionsResponseContract } from "../types";
|
|
9
9
|
export declare class SystemApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* List all registered permissions
|
|
14
|
+
* Return the full permission catalog registered by the current service, including platform base permissions and service-owned permissions.
|
|
15
|
+
*/
|
|
16
|
+
listPermissionCatalog(params: {
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
}): Promise<ListPermissionCatalogResponseContract>;
|
|
12
19
|
/**
|
|
13
20
|
* Resolve required permissions for operations
|
|
14
21
|
* Return the unique required permissions for a list of operation identifiers. Supports exact operation ids and sanitized MCP tool names. Public operations contribute no permission.
|
package/dist/apis/SystemApi.js
CHANGED
|
@@ -11,6 +11,19 @@ class SystemApi {
|
|
|
11
11
|
constructor(client) {
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* List all registered permissions
|
|
16
|
+
* Return the full permission catalog registered by the current service, including platform base permissions and service-owned permissions.
|
|
17
|
+
*/
|
|
18
|
+
async listPermissionCatalog(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "GET",
|
|
21
|
+
path: "/system/permissions/catalog",
|
|
22
|
+
headers: params.headers,
|
|
23
|
+
opId: "listPermissionCatalog",
|
|
24
|
+
expectedContentType: "application/json",
|
|
25
|
+
});
|
|
26
|
+
}
|
|
14
27
|
/**
|
|
15
28
|
* Resolve required permissions for operations
|
|
16
29
|
* Return the unique required permissions for a list of operation identifiers. Supports exact operation ids and sanitized MCP tool names. Public operations contribute no permission.
|
|
@@ -27,7 +27,12 @@ function createFetchWithRetry(baseFetch, { retries = 3, backoffMs = defaultBacko
|
|
|
27
27
|
? backoffMs(attempt, lastResponse, lastError)
|
|
28
28
|
: backoffMs;
|
|
29
29
|
if (wait > 0) {
|
|
30
|
-
|
|
30
|
+
const reason = lastError instanceof Error
|
|
31
|
+
? lastError.message
|
|
32
|
+
: lastResponse != null
|
|
33
|
+
? `HTTP ${lastResponse.status} (retryable response)`
|
|
34
|
+
: "unknown error";
|
|
35
|
+
console.log(`Waiting ${wait}ms before next attempt #${attempt}, ${reason}`);
|
|
31
36
|
await sleep(wait);
|
|
32
37
|
}
|
|
33
38
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IsolatedStoreSqlMigrationBundleContract } from "../types";
|
|
2
|
+
export interface BuildSqlMigrationBundleEntryInput {
|
|
3
|
+
version: number;
|
|
4
|
+
name: string;
|
|
5
|
+
sql: string;
|
|
6
|
+
expectedChecksum?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface BuildSqlMigrationBundleInput {
|
|
9
|
+
bundleVersion?: string | null;
|
|
10
|
+
migrations: BuildSqlMigrationBundleEntryInput[];
|
|
11
|
+
}
|
|
12
|
+
export declare function calculateSqlMigrationChecksum(sql: string): Promise<string>;
|
|
13
|
+
export declare function buildSqlMigrationBundle(input: BuildSqlMigrationBundleInput): Promise<IsolatedStoreSqlMigrationBundleContract>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateSqlMigrationChecksum = calculateSqlMigrationChecksum;
|
|
4
|
+
exports.buildSqlMigrationBundle = buildSqlMigrationBundle;
|
|
5
|
+
function normalizePositiveInteger(value, field) {
|
|
6
|
+
if (!Number.isInteger(value) || value <= 0) {
|
|
7
|
+
throw new Error(`${field} must be a positive integer`);
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
function normalizeNonEmptyString(value, field) {
|
|
12
|
+
const normalized = value.trim();
|
|
13
|
+
if (normalized.length === 0) {
|
|
14
|
+
throw new Error(`${field} must be a non-empty string`);
|
|
15
|
+
}
|
|
16
|
+
return normalized;
|
|
17
|
+
}
|
|
18
|
+
function toSha256Hex(buffer) {
|
|
19
|
+
return Array.from(new Uint8Array(buffer))
|
|
20
|
+
.map((byte) => byte.toString(16).padStart(2, "0"))
|
|
21
|
+
.join("");
|
|
22
|
+
}
|
|
23
|
+
async function calculateSqlMigrationChecksum(sql) {
|
|
24
|
+
if (typeof globalThis.crypto === "undefined" ||
|
|
25
|
+
typeof globalThis.crypto.subtle === "undefined") {
|
|
26
|
+
throw new Error("SQL migration checksum requires globalThis.crypto.subtle (available in modern browsers and Node.js 20+)");
|
|
27
|
+
}
|
|
28
|
+
const bytes = new TextEncoder().encode(sql);
|
|
29
|
+
const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
30
|
+
return toSha256Hex(digest);
|
|
31
|
+
}
|
|
32
|
+
async function buildSqlMigrationBundle(input) {
|
|
33
|
+
const bundleVersion = input.bundleVersion == null ? undefined : input.bundleVersion.trim();
|
|
34
|
+
const entries = [...input.migrations].sort((left, right) => {
|
|
35
|
+
return left.version - right.version;
|
|
36
|
+
});
|
|
37
|
+
if (entries.length === 0) {
|
|
38
|
+
throw new Error("migrations must contain at least one entry");
|
|
39
|
+
}
|
|
40
|
+
let previousVersion = 0;
|
|
41
|
+
const migrations = [];
|
|
42
|
+
for (const [index, entry] of entries.entries()) {
|
|
43
|
+
const version = normalizePositiveInteger(entry.version, `migrations[${index}].version`);
|
|
44
|
+
if (version === previousVersion) {
|
|
45
|
+
throw new Error(`Duplicate migration version ${String(version)}`);
|
|
46
|
+
}
|
|
47
|
+
if (version < previousVersion) {
|
|
48
|
+
throw new Error(`Migrations must be strictly increasing by version; got ${String(version)} after ${String(previousVersion)}`);
|
|
49
|
+
}
|
|
50
|
+
const name = normalizeNonEmptyString(entry.name, `migrations[${index}].name`);
|
|
51
|
+
const sql = entry.sql;
|
|
52
|
+
const checksum = await calculateSqlMigrationChecksum(sql);
|
|
53
|
+
const expectedChecksum = entry.expectedChecksum == null ? null : entry.expectedChecksum.trim();
|
|
54
|
+
if (expectedChecksum !== null && expectedChecksum !== checksum) {
|
|
55
|
+
throw new Error(`Checksum mismatch for migration v${String(version)} ${name}: expected ${expectedChecksum}, got ${checksum}`);
|
|
56
|
+
}
|
|
57
|
+
migrations.push({
|
|
58
|
+
version,
|
|
59
|
+
name,
|
|
60
|
+
checksum,
|
|
61
|
+
sql,
|
|
62
|
+
});
|
|
63
|
+
previousVersion = version;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
...(bundleVersion && bundleVersion.length > 0 ? { bundleVersion } : {}),
|
|
67
|
+
migrations,
|
|
68
|
+
};
|
|
69
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
export * from "./runtime";
|
|
7
7
|
export * from "./types";
|
|
8
8
|
export { AccessApi } from "./apis/AccessApi";
|
|
9
|
+
export { BillingApi } from "./apis/BillingApi";
|
|
9
10
|
export { EmailsApi } from "./apis/EmailsApi";
|
|
10
11
|
export { HealthApi } from "./apis/HealthApi";
|
|
12
|
+
export { IsolatedStoresApi } from "./apis/IsolatedStoresApi";
|
|
11
13
|
export { NotesApi } from "./apis/NotesApi";
|
|
14
|
+
export { OrgGroupsApi } from "./apis/OrgGroupsApi";
|
|
12
15
|
export { OrgUsersApi } from "./apis/OrgUsersApi";
|
|
13
16
|
export { PortalsApi } from "./apis/PortalsApi";
|
|
14
17
|
export { SystemApi } from "./apis/SystemApi";
|
|
15
18
|
export { TokensApi } from "./apis/TokensApi";
|
|
16
19
|
export { WorkspacesApi } from "./apis/WorkspacesApi";
|
|
17
20
|
export * from "./extras/fetchWithRetry";
|
|
21
|
+
export * from "./extras/sqlMigrationBundle";
|
package/dist/index.js
CHANGED
|
@@ -19,17 +19,23 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.NotesApi = exports.HealthApi = exports.EmailsApi = exports.AccessApi = void 0;
|
|
22
|
+
exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.OrgGroupsApi = exports.NotesApi = exports.IsolatedStoresApi = exports.HealthApi = exports.EmailsApi = exports.BillingApi = exports.AccessApi = void 0;
|
|
23
23
|
__exportStar(require("./runtime"), exports);
|
|
24
24
|
__exportStar(require("./types"), exports);
|
|
25
25
|
var AccessApi_1 = require("./apis/AccessApi");
|
|
26
26
|
Object.defineProperty(exports, "AccessApi", { enumerable: true, get: function () { return AccessApi_1.AccessApi; } });
|
|
27
|
+
var BillingApi_1 = require("./apis/BillingApi");
|
|
28
|
+
Object.defineProperty(exports, "BillingApi", { enumerable: true, get: function () { return BillingApi_1.BillingApi; } });
|
|
27
29
|
var EmailsApi_1 = require("./apis/EmailsApi");
|
|
28
30
|
Object.defineProperty(exports, "EmailsApi", { enumerable: true, get: function () { return EmailsApi_1.EmailsApi; } });
|
|
29
31
|
var HealthApi_1 = require("./apis/HealthApi");
|
|
30
32
|
Object.defineProperty(exports, "HealthApi", { enumerable: true, get: function () { return HealthApi_1.HealthApi; } });
|
|
33
|
+
var IsolatedStoresApi_1 = require("./apis/IsolatedStoresApi");
|
|
34
|
+
Object.defineProperty(exports, "IsolatedStoresApi", { enumerable: true, get: function () { return IsolatedStoresApi_1.IsolatedStoresApi; } });
|
|
31
35
|
var NotesApi_1 = require("./apis/NotesApi");
|
|
32
36
|
Object.defineProperty(exports, "NotesApi", { enumerable: true, get: function () { return NotesApi_1.NotesApi; } });
|
|
37
|
+
var OrgGroupsApi_1 = require("./apis/OrgGroupsApi");
|
|
38
|
+
Object.defineProperty(exports, "OrgGroupsApi", { enumerable: true, get: function () { return OrgGroupsApi_1.OrgGroupsApi; } });
|
|
33
39
|
var OrgUsersApi_1 = require("./apis/OrgUsersApi");
|
|
34
40
|
Object.defineProperty(exports, "OrgUsersApi", { enumerable: true, get: function () { return OrgUsersApi_1.OrgUsersApi; } });
|
|
35
41
|
var PortalsApi_1 = require("./apis/PortalsApi");
|
|
@@ -41,3 +47,4 @@ Object.defineProperty(exports, "TokensApi", { enumerable: true, get: function ()
|
|
|
41
47
|
var WorkspacesApi_1 = require("./apis/WorkspacesApi");
|
|
42
48
|
Object.defineProperty(exports, "WorkspacesApi", { enumerable: true, get: function () { return WorkspacesApi_1.WorkspacesApi; } });
|
|
43
49
|
__exportStar(require("./extras/fetchWithRetry"), exports);
|
|
50
|
+
__exportStar(require("./extras/sqlMigrationBundle"), exports);
|