@fusebase/fusebase-gate-sdk 2.2.2-sdk.33 → 2.2.2-sdk.35
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/IsolatedStoresApi.d.ts +14 -1
- package/dist/apis/IsolatedStoresApi.js +15 -0
- package/dist/apis/OrgGroupsApi.d.ts +199 -0
- package/dist/apis/OrgGroupsApi.js +246 -0
- package/dist/extras/sqlMigrationBundle.d.ts +13 -0
- package/dist/extras/sqlMigrationBundle.js +69 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/isolated-store/isolated-store.d.ts +19 -2
- package/dist/types/isolated-store/isolated-store.js +2 -0
- package/dist/types/org-group/org-group.d.ts +128 -0
- package/dist/types/org-group/org-group.js +7 -0
- package/package.json +1 -1
- package/release-notes/2.2.2-sdk.35.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.2.2-sdk.33.md +0 -9
|
@@ -5,10 +5,23 @@
|
|
|
5
5
|
* Domain: isolated-stores
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { ApplyIsolatedStoreSqlMigrationsRequestContract, ApplyIsolatedStoreSqlMigrationsResponseContract, CountIsolatedStoreNoSqlDocumentsRequestContract, CountIsolatedStoreNoSqlDocumentsResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreNoSqlCollectionRequestContract, CreateIsolatedStoreNoSqlCollectionResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreNoSqlDocumentResponseContract, DeleteIsolatedStoreResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, ImportIsolatedStoreNoSqlDocumentsRequestContract, ImportIsolatedStoreNoSqlDocumentsResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreNoSqlCollectionNameInPathRequired, IsolatedStoreNoSqlDocumentIdInPathRequired, IsolatedStoreNoSqlDocumentResponseContract, IsolatedStoreNoSqlListCollectionsResponseContract, IsolatedStoreNoSqlStatsResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlMigrationStatusContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlStatsResponseContract, IsolatedStoreSqlTableNameInPathRequired, IsolatedStoreSqlUpdateRequestContract, IsolatedStoreSqlUpdateResponseContract, IsolatedStoreStageInPathRequired, IsolatedStoreStageListResponseContract, ListIsolatedStoresClientIdInQueryOptional, orgIdInPathRequired, PutIsolatedStoreNoSqlDocumentRequestContract, PutIsolatedStoreNoSqlDocumentResponseContract, QueryIsolatedStoreNoSqlDocumentsRequestContract, QueryIsolatedStoreNoSqlDocumentsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
8
|
+
import type { AdoptIsolatedStoreSqlMigrationBaselineRequestContract, AdoptIsolatedStoreSqlMigrationBaselineResponseContract, ApplyIsolatedStoreSqlMigrationsRequestContract, ApplyIsolatedStoreSqlMigrationsResponseContract, CountIsolatedStoreNoSqlDocumentsRequestContract, CountIsolatedStoreNoSqlDocumentsResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreNoSqlCollectionRequestContract, CreateIsolatedStoreNoSqlCollectionResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreNoSqlDocumentResponseContract, DeleteIsolatedStoreResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, ImportIsolatedStoreNoSqlDocumentsRequestContract, ImportIsolatedStoreNoSqlDocumentsResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreNoSqlCollectionNameInPathRequired, IsolatedStoreNoSqlDocumentIdInPathRequired, IsolatedStoreNoSqlDocumentResponseContract, IsolatedStoreNoSqlListCollectionsResponseContract, IsolatedStoreNoSqlStatsResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlMigrationStatusContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlStatsResponseContract, IsolatedStoreSqlTableNameInPathRequired, IsolatedStoreSqlUpdateRequestContract, IsolatedStoreSqlUpdateResponseContract, IsolatedStoreStageInPathRequired, IsolatedStoreStageListResponseContract, ListIsolatedStoresClientIdInQueryOptional, orgIdInPathRequired, PutIsolatedStoreNoSqlDocumentRequestContract, PutIsolatedStoreNoSqlDocumentResponseContract, QueryIsolatedStoreNoSqlDocumentsRequestContract, QueryIsolatedStoreNoSqlDocumentsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
9
9
|
export declare class IsolatedStoresApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Adopt existing SQL schema as migration baseline
|
|
14
|
+
* Records the supplied ordered migration bundle as already applied in the stage journal without executing SQL. Use this only for legacy or demo-created stages where schema objects already exist but the migration journal is empty or missing.
|
|
15
|
+
*/
|
|
16
|
+
adoptIsolatedStoreSqlMigrationBaseline(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
20
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
21
|
+
};
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
body: AdoptIsolatedStoreSqlMigrationBaselineRequestContract;
|
|
24
|
+
}): Promise<AdoptIsolatedStoreSqlMigrationBaselineResponseContract>;
|
|
12
25
|
/**
|
|
13
26
|
* Apply SQL migrations
|
|
14
27
|
* Workflow: call `getIsolatedStoreSqlMigrationStatus` with the **same** bundle, confirm `canApply` and expected `pendingCount`, then apply. Applies pending postgres migrations from an ordered bundle into the selected stage database. For prod, gate creates a checkpoint automatically before applying pending migrations. Applied history must match the bundle prefix exactly; drift returns HTTP 409 with `data.issues` (version/name/checksum, journal vs bundle). Optional `dryRun: true` performs the same prefix + optimistic-lock checks as apply but does not run SQL or write the journal (returns `dryRun: true` and the computed status). Optional `expectedLastAppliedVersion` / `expectedLastAppliedChecksum` reject with HTTP 409 before migrations run when the journal tail changed since the client's last status snapshot. Never change name, checksum, or sql for migrations already in the journal — ship fixes as new higher versions (see MCP prompt isolatedSqlMigrationDiscipline). MCP clients often cap tool_call JSON body size (on the order of a few thousand characters); the request includes full SQL text for every bundle version cumulatively, so large bundles may fail or truncate in chat-only MCP. Keep canonical SQL plus a manifest for apply from SDK, CLI, or any non-MCP caller without a tight body-size limit.
|
|
@@ -11,6 +11,21 @@ class IsolatedStoresApi {
|
|
|
11
11
|
constructor(client) {
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Adopt existing SQL schema as migration baseline
|
|
16
|
+
* Records the supplied ordered migration bundle as already applied in the stage journal without executing SQL. Use this only for legacy or demo-created stages where schema objects already exist but the migration journal is empty or missing.
|
|
17
|
+
*/
|
|
18
|
+
async adoptIsolatedStoreSqlMigrationBaseline(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/migrations/adopt-baseline",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "adoptIsolatedStoreSqlMigrationBaseline",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
14
29
|
/**
|
|
15
30
|
* Apply SQL migrations
|
|
16
31
|
* Workflow: call `getIsolatedStoreSqlMigrationStatus` with the **same** bundle, confirm `canApply` and expected `pendingCount`, then apply. Applies pending postgres migrations from an ordered bundle into the selected stage database. For prod, gate creates a checkpoint automatically before applying pending migrations. Applied history must match the bundle prefix exactly; drift returns HTTP 409 with `data.issues` (version/name/checksum, journal vs bundle). Optional `dryRun: true` performs the same prefix + optimistic-lock checks as apply but does not run SQL or write the journal (returns `dryRun: true` and the computed status). Optional `expectedLastAppliedVersion` / `expectedLastAppliedChecksum` reject with HTTP 409 before migrations run when the journal tail changed since the client's last status snapshot. Never change name, checksum, or sql for migrations already in the journal — ship fixes as new higher versions (see MCP prompt isolatedSqlMigrationDiscipline). MCP clients often cap tool_call JSON body size (on the order of a few thousand characters); the request includes full SQL text for every bundle version cumulatively, so large bundles may fail or truncate in chat-only MCP. Keep canonical SQL plus a manifest for apply from SDK, CLI, or any non-MCP caller without a tight body-size limit.
|
|
@@ -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;
|
|
@@ -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
|
@@ -11,9 +11,11 @@ export { EmailsApi } from "./apis/EmailsApi";
|
|
|
11
11
|
export { HealthApi } from "./apis/HealthApi";
|
|
12
12
|
export { IsolatedStoresApi } from "./apis/IsolatedStoresApi";
|
|
13
13
|
export { NotesApi } from "./apis/NotesApi";
|
|
14
|
+
export { OrgGroupsApi } from "./apis/OrgGroupsApi";
|
|
14
15
|
export { OrgUsersApi } from "./apis/OrgUsersApi";
|
|
15
16
|
export { PortalsApi } from "./apis/PortalsApi";
|
|
16
17
|
export { SystemApi } from "./apis/SystemApi";
|
|
17
18
|
export { TokensApi } from "./apis/TokensApi";
|
|
18
19
|
export { WorkspacesApi } from "./apis/WorkspacesApi";
|
|
19
20
|
export * from "./extras/fetchWithRetry";
|
|
21
|
+
export * from "./extras/sqlMigrationBundle";
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ 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.IsolatedStoresApi = exports.HealthApi = exports.EmailsApi = exports.BillingApi = 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");
|
|
@@ -34,6 +34,8 @@ var IsolatedStoresApi_1 = require("./apis/IsolatedStoresApi");
|
|
|
34
34
|
Object.defineProperty(exports, "IsolatedStoresApi", { enumerable: true, get: function () { return IsolatedStoresApi_1.IsolatedStoresApi; } });
|
|
35
35
|
var NotesApi_1 = require("./apis/NotesApi");
|
|
36
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; } });
|
|
37
39
|
var OrgUsersApi_1 = require("./apis/OrgUsersApi");
|
|
38
40
|
Object.defineProperty(exports, "OrgUsersApi", { enumerable: true, get: function () { return OrgUsersApi_1.OrgUsersApi; } });
|
|
39
41
|
var PortalsApi_1 = require("./apis/PortalsApi");
|
|
@@ -45,3 +47,4 @@ Object.defineProperty(exports, "TokensApi", { enumerable: true, get: function ()
|
|
|
45
47
|
var WorkspacesApi_1 = require("./apis/WorkspacesApi");
|
|
46
48
|
Object.defineProperty(exports, "WorkspacesApi", { enumerable: true, get: function () { return WorkspacesApi_1.WorkspacesApi; } });
|
|
47
49
|
__exportStar(require("./extras/fetchWithRetry"), exports);
|
|
50
|
+
__exportStar(require("./extras/sqlMigrationBundle"), exports);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./billing/billing";
|
|
|
9
9
|
export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
|
|
10
10
|
export * from "./isolated-store/isolated-store";
|
|
11
11
|
export * from "./note/note";
|
|
12
|
+
export * from "./org-group/org-group";
|
|
12
13
|
export type { OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
|
|
13
14
|
export * from "./shared/common";
|
|
14
15
|
export * from "./shared/enums";
|
package/dist/types/index.js
CHANGED
|
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
__exportStar(require("./billing/billing"), exports);
|
|
24
24
|
__exportStar(require("./isolated-store/isolated-store"), exports);
|
|
25
25
|
__exportStar(require("./note/note"), exports);
|
|
26
|
+
__exportStar(require("./org-group/org-group"), exports);
|
|
26
27
|
__exportStar(require("./shared/common"), exports);
|
|
27
28
|
__exportStar(require("./shared/enums"), exports);
|
|
28
29
|
__exportStar(require("./system/system"), exports);
|
|
@@ -133,8 +133,8 @@ export interface IsolatedStoreSqlAppliedMigrationContract {
|
|
|
133
133
|
appliedAt: string;
|
|
134
134
|
appliedBy: string;
|
|
135
135
|
}
|
|
136
|
-
export type IsolatedStoreSqlMigrationIssueCodeContract = "isolated_sql_journal_longer_than_bundle" | "isolated_sql_version_mismatch" | "isolated_sql_name_mismatch" | "isolated_sql_checksum_mismatch" | "isolated_sql_journal_head_mismatch";
|
|
137
|
-
export type IsolatedStoreSqlMigrationIssueFieldContract = "history_length" | "version" | "name" | "checksum" | "journal_head";
|
|
136
|
+
export type IsolatedStoreSqlMigrationIssueCodeContract = "isolated_sql_journal_longer_than_bundle" | "isolated_sql_version_mismatch" | "isolated_sql_name_mismatch" | "isolated_sql_checksum_mismatch" | "isolated_sql_schema_exists_without_journal" | "isolated_sql_journal_head_mismatch";
|
|
137
|
+
export type IsolatedStoreSqlMigrationIssueFieldContract = "history_length" | "version" | "name" | "checksum" | "bootstrap" | "journal_head";
|
|
138
138
|
/** Machine-readable drift detail; omits raw SQL (only safe fingerprints). */
|
|
139
139
|
export interface IsolatedStoreSqlMigrationIssueContract {
|
|
140
140
|
code: IsolatedStoreSqlMigrationIssueCodeContract;
|
|
@@ -173,6 +173,8 @@ export interface IsolatedStoreSqlMigrationStatusContract {
|
|
|
173
173
|
appliedCount: number;
|
|
174
174
|
pendingCount: number;
|
|
175
175
|
isDrifted: boolean;
|
|
176
|
+
/** True when the stage already has schema objects but no matching journaled migration history. */
|
|
177
|
+
requiresBaselineAdoption: boolean;
|
|
176
178
|
/** True when the bundle prefix matches the journal and pending migrations may run. */
|
|
177
179
|
canApply: boolean;
|
|
178
180
|
issues: string[];
|
|
@@ -214,6 +216,19 @@ export interface ApplyIsolatedStoreSqlMigrationsResponseContract {
|
|
|
214
216
|
/** Present and true when the request used `dryRun` and no migrations were executed. */
|
|
215
217
|
dryRun?: boolean | null;
|
|
216
218
|
}
|
|
219
|
+
export interface AdoptIsolatedStoreSqlMigrationBaselineRequestContract {
|
|
220
|
+
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
221
|
+
bundle: IsolatedStoreSqlMigrationBundleContract;
|
|
222
|
+
/** Validate eligibility and return the projected post-adoption status without writing the journal. */
|
|
223
|
+
dryRun?: boolean | null;
|
|
224
|
+
}
|
|
225
|
+
export interface AdoptIsolatedStoreSqlMigrationBaselineResponseContract {
|
|
226
|
+
adoptedCount: number;
|
|
227
|
+
adoptedVersions: number[];
|
|
228
|
+
checkpointRevision?: IsolatedStoreRevisionContract | null;
|
|
229
|
+
status: IsolatedStoreSqlMigrationStatusContract;
|
|
230
|
+
dryRun?: boolean | null;
|
|
231
|
+
}
|
|
217
232
|
/** Documented shape of JSON error responses for migration state conflicts (HTTP 409). */
|
|
218
233
|
export interface IsolatedStoreSqlMigrationConflictErrorBodyContract {
|
|
219
234
|
success: false;
|
|
@@ -524,6 +539,7 @@ export declare const IsolatedStoreSqlMigrationIssueCodeContract: {
|
|
|
524
539
|
readonly IsolatedSqlVersionMismatch: "isolated_sql_version_mismatch";
|
|
525
540
|
readonly IsolatedSqlNameMismatch: "isolated_sql_name_mismatch";
|
|
526
541
|
readonly IsolatedSqlChecksumMismatch: "isolated_sql_checksum_mismatch";
|
|
542
|
+
readonly IsolatedSqlSchemaExistsWithoutJournal: "isolated_sql_schema_exists_without_journal";
|
|
527
543
|
readonly IsolatedSqlJournalHeadMismatch: "isolated_sql_journal_head_mismatch";
|
|
528
544
|
};
|
|
529
545
|
export declare const IsolatedStoreSqlMigrationIssueFieldContract: {
|
|
@@ -531,6 +547,7 @@ export declare const IsolatedStoreSqlMigrationIssueFieldContract: {
|
|
|
531
547
|
readonly Version: "version";
|
|
532
548
|
readonly Name: "name";
|
|
533
549
|
readonly Checksum: "checksum";
|
|
550
|
+
readonly Bootstrap: "bootstrap";
|
|
534
551
|
readonly JournalHead: "journal_head";
|
|
535
552
|
};
|
|
536
553
|
export declare const IsolatedStoreSqlFilterOperatorContract: {
|
|
@@ -39,6 +39,7 @@ exports.IsolatedStoreSqlMigrationIssueCodeContract = {
|
|
|
39
39
|
IsolatedSqlVersionMismatch: "isolated_sql_version_mismatch",
|
|
40
40
|
IsolatedSqlNameMismatch: "isolated_sql_name_mismatch",
|
|
41
41
|
IsolatedSqlChecksumMismatch: "isolated_sql_checksum_mismatch",
|
|
42
|
+
IsolatedSqlSchemaExistsWithoutJournal: "isolated_sql_schema_exists_without_journal",
|
|
42
43
|
IsolatedSqlJournalHeadMismatch: "isolated_sql_journal_head_mismatch"
|
|
43
44
|
};
|
|
44
45
|
exports.IsolatedStoreSqlMigrationIssueFieldContract = {
|
|
@@ -46,6 +47,7 @@ exports.IsolatedStoreSqlMigrationIssueFieldContract = {
|
|
|
46
47
|
Version: "version",
|
|
47
48
|
Name: "name",
|
|
48
49
|
Checksum: "checksum",
|
|
50
|
+
Bootstrap: "bootstrap",
|
|
49
51
|
JournalHead: "journal_head"
|
|
50
52
|
};
|
|
51
53
|
exports.IsolatedStoreSqlFilterOperatorContract = {
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export type OrgGroupIdInPathRequired = string;
|
|
2
|
+
export type OrgGroupUserIdInPathRequired = number;
|
|
3
|
+
export type OrgGroupWorkspaceIdInPathRequired = string;
|
|
4
|
+
export type OrgGroupIncludeWorkspaceInQueryOptional = boolean | null;
|
|
5
|
+
export type OrgWorkspaceGroupsIncludeGroupsInQueryOptional = boolean | null;
|
|
6
|
+
export type OrgGroupWorkspaceAssignmentTypeContract = "full" | "partial";
|
|
7
|
+
export interface OrgGroupContract {
|
|
8
|
+
id: string;
|
|
9
|
+
orgId: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description?: string | null;
|
|
12
|
+
userId?: number;
|
|
13
|
+
createdAt: number;
|
|
14
|
+
updatedAt: number;
|
|
15
|
+
memberCount?: number;
|
|
16
|
+
workspaceCount?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface OrgGroupListResponseContract {
|
|
19
|
+
groups: OrgGroupContract[];
|
|
20
|
+
}
|
|
21
|
+
export interface OrgGroupResponseContract {
|
|
22
|
+
group: OrgGroupContract;
|
|
23
|
+
}
|
|
24
|
+
export interface OrgGroupMemberContract {
|
|
25
|
+
groupId: string;
|
|
26
|
+
orgId: string;
|
|
27
|
+
userId: number;
|
|
28
|
+
addedByUserId: number;
|
|
29
|
+
createdAt: number;
|
|
30
|
+
updatedAt: number;
|
|
31
|
+
}
|
|
32
|
+
export interface OrgGroupMemberListResponseContract {
|
|
33
|
+
members: OrgGroupMemberContract[];
|
|
34
|
+
}
|
|
35
|
+
export interface OrgGroupWorkspaceRoleContract {
|
|
36
|
+
workspaceId: string;
|
|
37
|
+
role: string;
|
|
38
|
+
}
|
|
39
|
+
export interface OrgGroupWorkspaceDetailsContract {
|
|
40
|
+
id?: string;
|
|
41
|
+
orgId?: string;
|
|
42
|
+
userId?: number;
|
|
43
|
+
createdAt?: number;
|
|
44
|
+
updatedAt?: number;
|
|
45
|
+
title?: string | null;
|
|
46
|
+
isDefault?: boolean;
|
|
47
|
+
defaultEncryptionKeyId?: string | null;
|
|
48
|
+
isNotesLimited?: boolean;
|
|
49
|
+
color?: string | null;
|
|
50
|
+
brandingProfileId?: string | null;
|
|
51
|
+
webClientBrandingProfileId?: string | null;
|
|
52
|
+
orgSubscriptionType?: string;
|
|
53
|
+
orgSubscriptionPrivileges?: string[];
|
|
54
|
+
}
|
|
55
|
+
export interface OrgWorkspaceGroupContract {
|
|
56
|
+
addedByUserId: number;
|
|
57
|
+
groupId: string;
|
|
58
|
+
createdAt: number;
|
|
59
|
+
updatedAt: number;
|
|
60
|
+
type: OrgGroupWorkspaceAssignmentTypeContract;
|
|
61
|
+
workspaceId: string;
|
|
62
|
+
role: string;
|
|
63
|
+
orgId: string;
|
|
64
|
+
workspace?: OrgGroupWorkspaceDetailsContract;
|
|
65
|
+
}
|
|
66
|
+
export interface OrgWorkspaceGroupListResponseContract {
|
|
67
|
+
workspaceGroups: OrgWorkspaceGroupContract[];
|
|
68
|
+
}
|
|
69
|
+
export interface OrgWorkspaceGroupCountResponseContract {
|
|
70
|
+
count: number;
|
|
71
|
+
}
|
|
72
|
+
export interface OrgGroupCreateRequestContract {
|
|
73
|
+
name: string;
|
|
74
|
+
description?: string | null;
|
|
75
|
+
workspaces?: OrgGroupWorkspaceRoleContract[] | null;
|
|
76
|
+
}
|
|
77
|
+
export interface OrgGroupUpdateRequestContract {
|
|
78
|
+
name?: string;
|
|
79
|
+
description?: string | null;
|
|
80
|
+
workspaces?: OrgGroupWorkspaceRoleContract[] | null;
|
|
81
|
+
}
|
|
82
|
+
export interface AddMembersToOrgGroupRequestContract {
|
|
83
|
+
userIds: number[];
|
|
84
|
+
}
|
|
85
|
+
export interface AddMembersToOrgGroupResponseContract {
|
|
86
|
+
members: OrgGroupMemberContract[];
|
|
87
|
+
}
|
|
88
|
+
export interface RemoveOrgGroupMemberResponseContract {
|
|
89
|
+
removed: boolean;
|
|
90
|
+
groupId: string;
|
|
91
|
+
userId: number;
|
|
92
|
+
}
|
|
93
|
+
export interface AddGroupToWorkspaceRequestContract {
|
|
94
|
+
groupId: string;
|
|
95
|
+
role: string;
|
|
96
|
+
type?: OrgGroupWorkspaceAssignmentTypeContract | null;
|
|
97
|
+
}
|
|
98
|
+
export interface UpdateWorkspaceGroupRequestContract {
|
|
99
|
+
role: string;
|
|
100
|
+
}
|
|
101
|
+
export interface OrgWorkspaceGroupResponseContract {
|
|
102
|
+
workspaceGroup: OrgWorkspaceGroupContract;
|
|
103
|
+
}
|
|
104
|
+
export interface DeleteOrgGroupResponseContract {
|
|
105
|
+
deleted: boolean;
|
|
106
|
+
groupId: string;
|
|
107
|
+
}
|
|
108
|
+
export interface DeleteWorkspaceGroupResponseContract {
|
|
109
|
+
deleted: boolean;
|
|
110
|
+
workspaceId: string;
|
|
111
|
+
groupId: string;
|
|
112
|
+
}
|
|
113
|
+
export interface OrgGroupWorkspacesQueryContract {
|
|
114
|
+
/**
|
|
115
|
+
* Include workspace details in each workspace-group record.
|
|
116
|
+
*/
|
|
117
|
+
workspace?: OrgGroupIncludeWorkspaceInQueryOptional;
|
|
118
|
+
}
|
|
119
|
+
export interface WorkspaceGroupsQueryContract {
|
|
120
|
+
/**
|
|
121
|
+
* Forward the org-service `groups` flag for workspace group listings.
|
|
122
|
+
*/
|
|
123
|
+
groups?: OrgWorkspaceGroupsIncludeGroupsInQueryOptional;
|
|
124
|
+
}
|
|
125
|
+
export declare const OrgGroupWorkspaceAssignmentTypeContract: {
|
|
126
|
+
readonly Full: "full";
|
|
127
|
+
readonly Partial: "partial";
|
|
128
|
+
};
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Release Notes 2.2.2-sdk.
|
|
1
|
+
# Release Notes 2.2.2-sdk.35
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.2.2-sdk.
|
|
5
|
-
- Generated at: 2026-04-
|
|
4
|
+
- Previous tag: `v2.2.2-sdk.35`
|
|
5
|
+
- Generated at: 2026-04-09T17:57:21.578Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|