@itwin/core-backend 5.8.0-dev.10 → 5.8.0-dev.11
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/lib/cjs/core-backend.d.ts +2 -0
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +2 -0
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts +38 -0
- package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/SettingsDbImpl.js +106 -0
- package/lib/cjs/internal/workspace/SettingsDbImpl.js.map +1 -0
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts +3 -0
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js +251 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts +14 -0
- package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/SettingsSqliteDb.js +40 -0
- package/lib/cjs/internal/workspace/SettingsSqliteDb.js.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +1 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js +44 -3
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.d.ts +8 -0
- package/lib/cjs/workspace/Settings.d.ts.map +1 -1
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsDb.d.ts +109 -0
- package/lib/cjs/workspace/SettingsDb.d.ts.map +1 -0
- package/lib/cjs/workspace/SettingsDb.js +19 -0
- package/lib/cjs/workspace/SettingsDb.js.map +1 -0
- package/lib/cjs/workspace/SettingsEditor.d.ts +246 -0
- package/lib/cjs/workspace/SettingsEditor.d.ts.map +1 -0
- package/lib/cjs/workspace/SettingsEditor.js +51 -0
- package/lib/cjs/workspace/SettingsEditor.js.map +1 -0
- package/lib/cjs/workspace/Workspace.d.ts +39 -18
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.d.ts +28 -0
- package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.js +17 -0
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
- package/lib/esm/core-backend.d.ts +2 -0
- package/lib/esm/core-backend.d.ts.map +1 -1
- package/lib/esm/core-backend.js +2 -0
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsDbImpl.d.ts +38 -0
- package/lib/esm/internal/workspace/SettingsDbImpl.d.ts.map +1 -0
- package/lib/esm/internal/workspace/SettingsDbImpl.js +102 -0
- package/lib/esm/internal/workspace/SettingsDbImpl.js.map +1 -0
- package/lib/esm/internal/workspace/SettingsImpl.d.ts +3 -0
- package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -1
- package/lib/esm/internal/workspace/SettingsImpl.js +253 -4
- package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts +14 -0
- package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts.map +1 -0
- package/lib/esm/internal/workspace/SettingsSqliteDb.js +36 -0
- package/lib/esm/internal/workspace/SettingsSqliteDb.js.map +1 -0
- package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +1 -0
- package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceImpl.js +44 -4
- package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/esm/test/standalone/Settings.test.js +18 -0
- package/lib/esm/test/standalone/Settings.test.js.map +1 -1
- package/lib/esm/test/standalone/Workspace.test.js +60 -0
- package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
- package/lib/esm/test/workspace/SettingsDb.test.d.ts +2 -0
- package/lib/esm/test/workspace/SettingsDb.test.d.ts.map +1 -0
- package/lib/esm/test/workspace/SettingsDb.test.js +372 -0
- package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -0
- package/lib/esm/workspace/Settings.d.ts +8 -0
- package/lib/esm/workspace/Settings.d.ts.map +1 -1
- package/lib/esm/workspace/Settings.js.map +1 -1
- package/lib/esm/workspace/SettingsDb.d.ts +109 -0
- package/lib/esm/workspace/SettingsDb.d.ts.map +1 -0
- package/lib/esm/workspace/SettingsDb.js +16 -0
- package/lib/esm/workspace/SettingsDb.js.map +1 -0
- package/lib/esm/workspace/SettingsEditor.d.ts +246 -0
- package/lib/esm/workspace/SettingsEditor.d.ts.map +1 -0
- package/lib/esm/workspace/SettingsEditor.js +48 -0
- package/lib/esm/workspace/SettingsEditor.js.map +1 -0
- package/lib/esm/workspace/Workspace.d.ts +39 -18
- package/lib/esm/workspace/Workspace.d.ts.map +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/lib/esm/workspace/WorkspaceEditor.d.ts +28 -0
- package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/lib/esm/workspace/WorkspaceEditor.js +17 -0
- package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Workspace
|
|
3
|
+
*/
|
|
4
|
+
import { LocalFileName } from "@itwin/core-common";
|
|
5
|
+
import { GuidString } from "@itwin/core-bentley";
|
|
6
|
+
import { Setting, SettingName, SettingsContainer } from "./Settings";
|
|
7
|
+
import { BlobContainer } from "../BlobContainerService";
|
|
8
|
+
import { CloudSqliteContainer, GetWorkspaceContainerArgs, Workspace, WorkspaceContainerProps, WorkspaceDbName, WorkspaceDbNameAndVersion, WorkspaceDbVersion } from "./Workspace";
|
|
9
|
+
import { SettingsDb, SettingsDbManifest, SettingsDbProps } from "./SettingsDb";
|
|
10
|
+
import { _implementationProhibited } from "../internal/Symbols";
|
|
11
|
+
import { CloudSqlite } from "../CloudSqlite";
|
|
12
|
+
/** @beta */
|
|
13
|
+
export declare namespace SettingsEditor {
|
|
14
|
+
/**
|
|
15
|
+
* Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.
|
|
16
|
+
* @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.
|
|
17
|
+
* @note It is illegal to have more than one SettingsEditor active in a single session.
|
|
18
|
+
*/
|
|
19
|
+
function construct(): SettingsEditor;
|
|
20
|
+
/**
|
|
21
|
+
* Create a new, empty, [[SettingsDb]] file on the local filesystem for importing settings dictionaries.
|
|
22
|
+
*/
|
|
23
|
+
function createEmptyDb(args: {
|
|
24
|
+
localFileName: LocalFileName;
|
|
25
|
+
manifest: SettingsDbManifest;
|
|
26
|
+
}): void;
|
|
27
|
+
/** Arguments for [[SettingsEditor.queryContainers]] and [[SettingsEditor.findContainers]]. */
|
|
28
|
+
interface QuerySettingsContainersArgs {
|
|
29
|
+
/** The iTwinId whose settings containers should be queried. */
|
|
30
|
+
iTwinId: GuidString;
|
|
31
|
+
/** Optional iModelId to further scope the query to containers associated with a specific iModel. */
|
|
32
|
+
iModelId?: GuidString;
|
|
33
|
+
/** Optional label filter. */
|
|
34
|
+
label?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.
|
|
38
|
+
* This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that
|
|
39
|
+
* automatically filters by `containerType: "settings"`.
|
|
40
|
+
* @param args - The query arguments including the iTwinId.
|
|
41
|
+
* @returns A promise that resolves to the matching container metadata entries.
|
|
42
|
+
* @note Requires [[IModelHost.authorizationClient]] to be configured.
|
|
43
|
+
*/
|
|
44
|
+
function queryContainers(args: QuerySettingsContainersArgs): Promise<BlobContainer.MetadataResponse[]>;
|
|
45
|
+
}
|
|
46
|
+
/** Arguments supplied to [[SettingsEditor.createNewCloudContainer]] to create a new [[EditableSettingsCloudContainer]].
|
|
47
|
+
* The created container will automatically have `containerType: "settings"` in its metadata, enabling discovery
|
|
48
|
+
* via `BlobContainer.service.queryContainersMetadata({ containerType: "settings" })`.
|
|
49
|
+
* @beta
|
|
50
|
+
*/
|
|
51
|
+
export interface CreateNewSettingsContainerArgs {
|
|
52
|
+
/**
|
|
53
|
+
* The scope of the container. This determines the ownership of the container, how RBAC rights are assigned,
|
|
54
|
+
* and the location of the datacenter.
|
|
55
|
+
*/
|
|
56
|
+
scope: BlobContainer.Scope;
|
|
57
|
+
/** The manifest to be stored in the default SettingsDb in the new container. */
|
|
58
|
+
manifest: SettingsDbManifest;
|
|
59
|
+
/** Metadata stored by the BlobContainer service. The `containerType` field is omitted here because it is
|
|
60
|
+
* automatically set to `"settings"` when the container is created (mirroring the `"workspace"` convention for WorkspaceDb containers).
|
|
61
|
+
*/
|
|
62
|
+
metadata: Omit<BlobContainer.Metadata, "containerType">;
|
|
63
|
+
/** The name of the default [[SettingsDb]] created inside the new container.
|
|
64
|
+
* Default: "settings-db";
|
|
65
|
+
*/
|
|
66
|
+
dbName?: WorkspaceDbName;
|
|
67
|
+
}
|
|
68
|
+
/** Arguments supplied to [[EditableSettingsCloudContainer.createNewSettingsDbVersion]].
|
|
69
|
+
* @beta
|
|
70
|
+
*/
|
|
71
|
+
export interface CreateNewSettingsDbVersionArgs {
|
|
72
|
+
/**
|
|
73
|
+
* The properties that determine the source [[SettingsDb]] to serve as the basis for the new version.
|
|
74
|
+
* This is usually the latest version, but it is possible to create patches to older versions.
|
|
75
|
+
*/
|
|
76
|
+
fromProps?: SettingsDbProps;
|
|
77
|
+
/** The type of version increment to apply to the source version. */
|
|
78
|
+
versionType: CloudSqlite.SemverIncrement;
|
|
79
|
+
/** For prerelease versions, a string that becomes part of the version name. */
|
|
80
|
+
identifier?: string;
|
|
81
|
+
}
|
|
82
|
+
/** The result of creating a new version of a [[SettingsDb]].
|
|
83
|
+
* @beta
|
|
84
|
+
*/
|
|
85
|
+
export interface SettingsDbVersionResult {
|
|
86
|
+
/** The name and version of the source SettingsDb. */
|
|
87
|
+
oldDb: WorkspaceDbNameAndVersion;
|
|
88
|
+
/** The name and version of the newly-created SettingsDb. */
|
|
89
|
+
newDb: WorkspaceDbNameAndVersion;
|
|
90
|
+
}
|
|
91
|
+
/** Arguments supplied to [[EditableSettingsCloudContainer.createDb]] to create a new [[SettingsDb]] in a container.
|
|
92
|
+
* @beta
|
|
93
|
+
*/
|
|
94
|
+
export interface CreateSettingsDbArgs {
|
|
95
|
+
/** The name of the new SettingsDb. Default: `"settings-db"`. */
|
|
96
|
+
dbName?: WorkspaceDbName;
|
|
97
|
+
/** The initial version of the new SettingsDb. Default: `"0.0.0"`. */
|
|
98
|
+
version?: WorkspaceDbVersion;
|
|
99
|
+
/** The manifest for the new SettingsDb. */
|
|
100
|
+
manifest: SettingsDbManifest;
|
|
101
|
+
}
|
|
102
|
+
/** Arguments supplied to [[EditableSettingsDb.updateSetting]] to add or update a single [[Setting]].
|
|
103
|
+
* @beta
|
|
104
|
+
*/
|
|
105
|
+
export interface UpdateSettingArgs {
|
|
106
|
+
/** The [[SettingName]] of the setting to add or update. */
|
|
107
|
+
readonly settingName: SettingName;
|
|
108
|
+
/** The new value for the setting. */
|
|
109
|
+
readonly value: Setting;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* A [[CloudSqliteContainer]] opened for editing settings by a [[SettingsEditor]].
|
|
113
|
+
* You can create new [[SettingsDb]]s or new versions of existing [[SettingsDb]]s inside it.
|
|
114
|
+
* Before actually making any changes to the container's contents, you must first obtain an exclusive write lock on it via
|
|
115
|
+
* [[acquireWriteLock]]. Only one user can hold the write lock at any given time. When you have finished making changes,
|
|
116
|
+
* you can use [[releaseWriteLock]] to publish your changes, or [[abandonChanges]] to discard them.
|
|
117
|
+
* @note Settings containers are separate from workspace containers, providing independent write locks.
|
|
118
|
+
* Editing settings does not block workspace resource editing, and vice versa.
|
|
119
|
+
* @beta
|
|
120
|
+
*/
|
|
121
|
+
export interface EditableSettingsCloudContainer extends CloudSqliteContainer {
|
|
122
|
+
/**
|
|
123
|
+
* Create a copy of an existing [[SettingsDb]] in this container with a new [[WorkspaceDbVersion]].
|
|
124
|
+
* The copy should be modified with new content before the write lock is released,
|
|
125
|
+
* and thereafter may never be modified again.
|
|
126
|
+
* @param args - The properties that determine the source SettingsDb and the version increment to apply.
|
|
127
|
+
* @returns A promise that resolves to an object containing the old and new SettingsDb names and versions.
|
|
128
|
+
*/
|
|
129
|
+
createNewSettingsDbVersion(args: CreateNewSettingsDbVersionArgs): Promise<SettingsDbVersionResult>;
|
|
130
|
+
/**
|
|
131
|
+
* Create a new, empty [[SettingsDb]].
|
|
132
|
+
* @param args - The arguments for creating the new SettingsDb.
|
|
133
|
+
* @returns A promise that resolves to an EditableSettingsDb.
|
|
134
|
+
*/
|
|
135
|
+
createDb(args: CreateSettingsDbArgs): Promise<EditableSettingsDb>;
|
|
136
|
+
/**
|
|
137
|
+
* Get the cloud properties of this container.
|
|
138
|
+
*/
|
|
139
|
+
readonly cloudProps: WorkspaceContainerProps | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Get an editable [[SettingsDb]] to add, delete, or update settings *within a newly created version* of a SettingsDb.
|
|
142
|
+
* @param props - The properties of the SettingsDb.
|
|
143
|
+
* @returns An EditableSettingsDb for modifying settings.
|
|
144
|
+
* @throws if the targeted SettingsDb has already been published and is immutable. Use [[createNewSettingsDbVersion]] first to create an editable version.
|
|
145
|
+
*/
|
|
146
|
+
getEditableDb(props?: SettingsDbProps): EditableSettingsDb;
|
|
147
|
+
/**
|
|
148
|
+
* Acquire the write lock on the container. Use [[releaseWriteLock]] to release the lock after publishing your changes, or
|
|
149
|
+
* [[abandonChanges]] to release the lock and discard your changes.
|
|
150
|
+
* Only one user can hold the write lock at any given time. However, readers can continue to read the published contents of the container while
|
|
151
|
+
* a writer holds the write lock. Readers will only see the writer's changes after they are published by [[releaseWriteLock]].
|
|
152
|
+
* @param user - The name of the user acquiring the write lock.
|
|
153
|
+
* @throws if the write lock is already held by another user.
|
|
154
|
+
*/
|
|
155
|
+
acquireWriteLock(user: string): void;
|
|
156
|
+
/**
|
|
157
|
+
* Release the write lock on the container. This should be called after all changes to the container's contents are complete. It
|
|
158
|
+
* publishes and uploads the changes made to any [[SettingsDb]]s while the lock was held, after which those dbs become immutable.
|
|
159
|
+
*/
|
|
160
|
+
releaseWriteLock(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Abandon any changes made to the container and release the write lock. Any newly created versions of SettingsDbs are discarded.
|
|
163
|
+
*/
|
|
164
|
+
abandonChanges(): void;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* An editable [[SettingsDb]]. This is used only by tools to allow administrators to create and modify SettingsDbs.
|
|
168
|
+
* For cloud-based SettingsDbs, the container's write token must be obtained via [[EditableSettingsCloudContainer.acquireWriteLock]] before the methods in this interface may be used.
|
|
169
|
+
* Normally, only admins will have write access.
|
|
170
|
+
* Only one admin at a time may be editing a settings container.
|
|
171
|
+
* @note Unlike [[EditableWorkspaceDb]], this interface only supports settings operations — no blob, file, or string resource methods.
|
|
172
|
+
* @beta
|
|
173
|
+
*/
|
|
174
|
+
export interface EditableSettingsDb extends SettingsDb {
|
|
175
|
+
readonly container: EditableSettingsCloudContainer;
|
|
176
|
+
/**
|
|
177
|
+
* Update the contents of the manifest in this SettingsDb.
|
|
178
|
+
* @note This replaces the stored manifest entirely; omitted fields are lost.
|
|
179
|
+
* @param manifest - The updated manifest.
|
|
180
|
+
*/
|
|
181
|
+
updateManifest(manifest: SettingsDbManifest): void;
|
|
182
|
+
/**
|
|
183
|
+
* Replace all settings in this SettingsDb with the given container.
|
|
184
|
+
* @param settings - The settings object to store.
|
|
185
|
+
*/
|
|
186
|
+
updateSettings(settings: SettingsContainer): void;
|
|
187
|
+
/**
|
|
188
|
+
* Add or update a single [[Setting]] by name.
|
|
189
|
+
* If a setting with the given name already exists, its value is replaced.
|
|
190
|
+
* If it does not exist, it is added. Other settings are preserved.
|
|
191
|
+
* @param args - The arguments specifying the setting name and value.
|
|
192
|
+
*/
|
|
193
|
+
updateSetting(args: UpdateSettingArgs): void;
|
|
194
|
+
/**
|
|
195
|
+
* Remove a single [[Setting]] by name. Other settings are preserved.
|
|
196
|
+
* @param settingName - The name of the setting to remove.
|
|
197
|
+
*/
|
|
198
|
+
removeSetting(settingName: SettingName): void;
|
|
199
|
+
}
|
|
200
|
+
/** An object that permits administrators to modify the contents of settings containers.
|
|
201
|
+
* Use [[SettingsEditor.construct]] to obtain a SettingsEditor, and [[close]] when finished using it.
|
|
202
|
+
* Only one SettingsEditor may be in use at any given time.
|
|
203
|
+
* Use [[getContainer]] to edit an existing container, or [[createNewCloudContainer]] to create a new container.
|
|
204
|
+
* @beta
|
|
205
|
+
*/
|
|
206
|
+
export interface SettingsEditor {
|
|
207
|
+
/** @internal */
|
|
208
|
+
[_implementationProhibited]: unknown;
|
|
209
|
+
/**
|
|
210
|
+
* The workspace dedicated to this editor.
|
|
211
|
+
* @note This workspace is independent from [[IModelHost.appWorkspace]] and all [[IModelDb.workspace]]s.
|
|
212
|
+
*/
|
|
213
|
+
readonly workspace: Workspace;
|
|
214
|
+
/**
|
|
215
|
+
* Retrieves a container for the editor with the specified properties and access token.
|
|
216
|
+
*/
|
|
217
|
+
getContainer(args: GetWorkspaceContainerArgs): EditableSettingsCloudContainer;
|
|
218
|
+
/**
|
|
219
|
+
* Asynchronously retrieves a container for the editor with the specified properties.
|
|
220
|
+
*/
|
|
221
|
+
getContainerAsync(props: WorkspaceContainerProps): Promise<EditableSettingsCloudContainer>;
|
|
222
|
+
/**
|
|
223
|
+
* Creates a new cloud container for holding SettingsDbs, from the [[BlobContainer]] service.
|
|
224
|
+
* The container is automatically assigned `containerType: "settings"` in its metadata and
|
|
225
|
+
* initialized with a default [[SettingsDb]].
|
|
226
|
+
* @param args - The arguments for creating the container, including scope, metadata, and manifest.
|
|
227
|
+
* @returns A promise that resolves to the new EditableSettingsCloudContainer.
|
|
228
|
+
* @note The current user must have administrator rights for the iTwin for the container.
|
|
229
|
+
* @note Requires [[IModelHost.authorizationClient]] to be configured.
|
|
230
|
+
*/
|
|
231
|
+
createNewCloudContainer(args: CreateNewSettingsContainerArgs): Promise<EditableSettingsCloudContainer>;
|
|
232
|
+
/**
|
|
233
|
+
* Find and open existing settings containers by querying the [[BlobContainer]] service.
|
|
234
|
+
* This is a convenience method that queries for all settings containers matching the given iTwinId
|
|
235
|
+
* (and optionally iModelId), requests write access tokens, and opens each matching container.
|
|
236
|
+
* @param args - The query arguments including iTwinId and optionally iModelId and label.
|
|
237
|
+
* @returns A promise that resolves to an array of opened [[EditableSettingsCloudContainer]]s.
|
|
238
|
+
* @note Requires [[IModelHost.authorizationClient]] and [[BlobContainer.service]] to be configured.
|
|
239
|
+
*/
|
|
240
|
+
findContainers(args: SettingsEditor.QuerySettingsContainersArgs): Promise<EditableSettingsCloudContainer[]>;
|
|
241
|
+
/**
|
|
242
|
+
* Closes this editor. All settings containers are dropped.
|
|
243
|
+
*/
|
|
244
|
+
close(): void;
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=SettingsEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsEditor.d.ts","sourceRoot":"","sources":["../../../src/workspace/SettingsEditor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OA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AU;IACpD,QAAQ,CAAC,SAAS,EAAE,8BAA8B,CAAC;IAEnD;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAEnD;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAElD;;;;;OAKG;IACH,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAE7C;;;OAGG;IACH,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CAC/C;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,gBAAgB;IAChB,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAErC;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,yBAAyB,GAAG,8BAA8B,CAAC;IAE9E;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAE3F;;;;;;;;OAQG;IACH,uBAAuB,CAAC,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAEvG;;;;;;;OAOG;IACH,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,2BAA2B,GAAG,OAAO,CAAC,8BAA8B,EAAE,CAAC,CAAC;IAE5G;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Workspace
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SettingsEditor = void 0;
|
|
11
|
+
const BlobContainerService_1 = require("../BlobContainerService");
|
|
12
|
+
const SettingsSqliteDb_1 = require("../internal/workspace/SettingsSqliteDb");
|
|
13
|
+
const SettingsImpl_1 = require("../internal/workspace/SettingsImpl");
|
|
14
|
+
const Symbols_1 = require("../internal/Symbols");
|
|
15
|
+
const IModelHost_1 = require("../IModelHost");
|
|
16
|
+
/** @beta */
|
|
17
|
+
var SettingsEditor;
|
|
18
|
+
(function (SettingsEditor) {
|
|
19
|
+
/**
|
|
20
|
+
* Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.
|
|
21
|
+
* @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.
|
|
22
|
+
* @note It is illegal to have more than one SettingsEditor active in a single session.
|
|
23
|
+
*/
|
|
24
|
+
function construct() {
|
|
25
|
+
return (0, SettingsImpl_1.constructSettingsEditor)();
|
|
26
|
+
}
|
|
27
|
+
SettingsEditor.construct = construct;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new, empty, [[SettingsDb]] file on the local filesystem for importing settings dictionaries.
|
|
30
|
+
*/
|
|
31
|
+
function createEmptyDb(args) {
|
|
32
|
+
SettingsSqliteDb_1.SettingsSqliteDb.createNewDb(args.localFileName, args);
|
|
33
|
+
}
|
|
34
|
+
SettingsEditor.createEmptyDb = createEmptyDb;
|
|
35
|
+
/**
|
|
36
|
+
* Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.
|
|
37
|
+
* This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that
|
|
38
|
+
* automatically filters by `containerType: "settings"`.
|
|
39
|
+
* @param args - The query arguments including the iTwinId.
|
|
40
|
+
* @returns A promise that resolves to the matching container metadata entries.
|
|
41
|
+
* @note Requires [[IModelHost.authorizationClient]] to be configured.
|
|
42
|
+
*/
|
|
43
|
+
async function queryContainers(args) {
|
|
44
|
+
if (undefined === BlobContainerService_1.BlobContainer.service)
|
|
45
|
+
throw new Error("BlobContainer.service is not available. Ensure IModelHost is initialized with a valid configuration.");
|
|
46
|
+
const userToken = await IModelHost_1.IModelHost.getAccessToken();
|
|
47
|
+
return BlobContainerService_1.BlobContainer.service.queryContainersMetadata(userToken, { ...args, containerType: "settings" });
|
|
48
|
+
}
|
|
49
|
+
SettingsEditor.queryContainers = queryContainers;
|
|
50
|
+
})(SettingsEditor || (exports.SettingsEditor = SettingsEditor = {}));
|
|
51
|
+
//# sourceMappingURL=SettingsEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsEditor.js","sourceRoot":"","sources":["../../../src/workspace/SettingsEditor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,kEAAwD;AAGxD,6EAA0E;AAC1E,qEAA6E;AAC7E,iDAAgE;AAEhE,8CAA2C;AAE3C,YAAY;AACZ,IAAiB,cAAc,CAyC9B;AAzCD,WAAiB,cAAc;IAC7B;;;;OAIG;IACH,SAAgB,SAAS;QACvB,OAAO,IAAA,sCAAuB,GAAE,CAAC;IACnC,CAAC;IAFe,wBAAS,YAExB,CAAA;IAED;;OAEG;IACH,SAAgB,aAAa,CAAC,IAAoE;QAChG,mCAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAFe,4BAAa,gBAE5B,CAAA;IAYD;;;;;;;OAOG;IACI,KAAK,UAAU,eAAe,CAAC,IAAiC;QACrE,IAAI,SAAS,KAAK,oCAAa,CAAC,OAAO;YACrC,MAAM,IAAI,KAAK,CAAC,sGAAsG,CAAC,CAAC;QAC1H,MAAM,SAAS,GAAG,MAAM,uBAAU,CAAC,cAAc,EAAE,CAAC;QACpD,OAAO,oCAAa,CAAC,OAAO,CAAC,uBAAuB,CAAC,SAAS,EAAE,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC;IAC1G,CAAC;IALqB,8BAAe,kBAKpC,CAAA;AACH,CAAC,EAzCgB,cAAc,8BAAd,cAAc,QAyC9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Workspace\r\n */\r\n\r\nimport { LocalFileName } from \"@itwin/core-common\";\r\nimport { GuidString } from \"@itwin/core-bentley\";\r\nimport { Setting, SettingName, SettingsContainer } from \"./Settings\";\r\nimport { BlobContainer } from \"../BlobContainerService\";\r\nimport { CloudSqliteContainer, GetWorkspaceContainerArgs, Workspace, WorkspaceContainerProps, WorkspaceDbName, WorkspaceDbNameAndVersion, WorkspaceDbVersion } from \"./Workspace\";\r\nimport { SettingsDb, SettingsDbManifest, SettingsDbProps } from \"./SettingsDb\";\r\nimport { SettingsSqliteDb } from \"../internal/workspace/SettingsSqliteDb\";\r\nimport { constructSettingsEditor } from \"../internal/workspace/SettingsImpl\";\r\nimport { _implementationProhibited } from \"../internal/Symbols\";\r\nimport { CloudSqlite } from \"../CloudSqlite\";\r\nimport { IModelHost } from \"../IModelHost\";\r\n\r\n/** @beta */\r\nexport namespace SettingsEditor {\r\n /**\r\n * Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.\r\n * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.\r\n * @note It is illegal to have more than one SettingsEditor active in a single session.\r\n */\r\n export function construct(): SettingsEditor {\r\n return constructSettingsEditor();\r\n }\r\n\r\n /**\r\n * Create a new, empty, [[SettingsDb]] file on the local filesystem for importing settings dictionaries.\r\n */\r\n export function createEmptyDb(args: { localFileName: LocalFileName; manifest: SettingsDbManifest }): void {\r\n SettingsSqliteDb.createNewDb(args.localFileName, args);\r\n }\r\n\r\n /** Arguments for [[SettingsEditor.queryContainers]] and [[SettingsEditor.findContainers]]. */\r\n export interface QuerySettingsContainersArgs {\r\n /** The iTwinId whose settings containers should be queried. */\r\n iTwinId: GuidString;\r\n /** Optional iModelId to further scope the query to containers associated with a specific iModel. */\r\n iModelId?: GuidString;\r\n /** Optional label filter. */\r\n label?: string;\r\n }\r\n\r\n /**\r\n * Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.\r\n * This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that\r\n * automatically filters by `containerType: \"settings\"`.\r\n * @param args - The query arguments including the iTwinId.\r\n * @returns A promise that resolves to the matching container metadata entries.\r\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\r\n */\r\n export async function queryContainers(args: QuerySettingsContainersArgs): Promise<BlobContainer.MetadataResponse[]> {\r\n if (undefined === BlobContainer.service)\r\n throw new Error(\"BlobContainer.service is not available. Ensure IModelHost is initialized with a valid configuration.\");\r\n const userToken = await IModelHost.getAccessToken();\r\n return BlobContainer.service.queryContainersMetadata(userToken, { ...args, containerType: \"settings\" });\r\n }\r\n}\r\n\r\n/** Arguments supplied to [[SettingsEditor.createNewCloudContainer]] to create a new [[EditableSettingsCloudContainer]].\r\n * The created container will automatically have `containerType: \"settings\"` in its metadata, enabling discovery\r\n * via `BlobContainer.service.queryContainersMetadata({ containerType: \"settings\" })`.\r\n * @beta\r\n */\r\nexport interface CreateNewSettingsContainerArgs {\r\n /**\r\n * The scope of the container. This determines the ownership of the container, how RBAC rights are assigned,\r\n * and the location of the datacenter.\r\n */\r\n scope: BlobContainer.Scope;\r\n /** The manifest to be stored in the default SettingsDb in the new container. */\r\n manifest: SettingsDbManifest;\r\n /** Metadata stored by the BlobContainer service. The `containerType` field is omitted here because it is\r\n * automatically set to `\"settings\"` when the container is created (mirroring the `\"workspace\"` convention for WorkspaceDb containers).\r\n */\r\n metadata: Omit<BlobContainer.Metadata, \"containerType\">;\r\n /** The name of the default [[SettingsDb]] created inside the new container.\r\n * Default: \"settings-db\";\r\n */\r\n dbName?: WorkspaceDbName;\r\n}\r\n\r\n/** Arguments supplied to [[EditableSettingsCloudContainer.createNewSettingsDbVersion]].\r\n * @beta\r\n */\r\nexport interface CreateNewSettingsDbVersionArgs {\r\n /**\r\n * The properties that determine the source [[SettingsDb]] to serve as the basis for the new version.\r\n * This is usually the latest version, but it is possible to create patches to older versions.\r\n */\r\n fromProps?: SettingsDbProps;\r\n /** The type of version increment to apply to the source version. */\r\n versionType: CloudSqlite.SemverIncrement;\r\n /** For prerelease versions, a string that becomes part of the version name. */\r\n identifier?: string;\r\n}\r\n\r\n/** The result of creating a new version of a [[SettingsDb]].\r\n * @beta\r\n */\r\nexport interface SettingsDbVersionResult {\r\n /** The name and version of the source SettingsDb. */\r\n oldDb: WorkspaceDbNameAndVersion;\r\n /** The name and version of the newly-created SettingsDb. */\r\n newDb: WorkspaceDbNameAndVersion;\r\n}\r\n\r\n/** Arguments supplied to [[EditableSettingsCloudContainer.createDb]] to create a new [[SettingsDb]] in a container.\r\n * @beta\r\n */\r\nexport interface CreateSettingsDbArgs {\r\n /** The name of the new SettingsDb. Default: `\"settings-db\"`. */\r\n dbName?: WorkspaceDbName;\r\n /** The initial version of the new SettingsDb. Default: `\"0.0.0\"`. */\r\n version?: WorkspaceDbVersion;\r\n /** The manifest for the new SettingsDb. */\r\n manifest: SettingsDbManifest;\r\n}\r\n\r\n/** Arguments supplied to [[EditableSettingsDb.updateSetting]] to add or update a single [[Setting]].\r\n * @beta\r\n */\r\nexport interface UpdateSettingArgs {\r\n /** The [[SettingName]] of the setting to add or update. */\r\n readonly settingName: SettingName;\r\n /** The new value for the setting. */\r\n readonly value: Setting;\r\n}\r\n\r\n/**\r\n * A [[CloudSqliteContainer]] opened for editing settings by a [[SettingsEditor]].\r\n * You can create new [[SettingsDb]]s or new versions of existing [[SettingsDb]]s inside it.\r\n * Before actually making any changes to the container's contents, you must first obtain an exclusive write lock on it via\r\n * [[acquireWriteLock]]. Only one user can hold the write lock at any given time. When you have finished making changes,\r\n * you can use [[releaseWriteLock]] to publish your changes, or [[abandonChanges]] to discard them.\r\n * @note Settings containers are separate from workspace containers, providing independent write locks.\r\n * Editing settings does not block workspace resource editing, and vice versa.\r\n * @beta\r\n */\r\nexport interface EditableSettingsCloudContainer extends CloudSqliteContainer {\r\n /**\r\n * Create a copy of an existing [[SettingsDb]] in this container with a new [[WorkspaceDbVersion]].\r\n * The copy should be modified with new content before the write lock is released,\r\n * and thereafter may never be modified again.\r\n * @param args - The properties that determine the source SettingsDb and the version increment to apply.\r\n * @returns A promise that resolves to an object containing the old and new SettingsDb names and versions.\r\n */\r\n createNewSettingsDbVersion(args: CreateNewSettingsDbVersionArgs): Promise<SettingsDbVersionResult>;\r\n\r\n /**\r\n * Create a new, empty [[SettingsDb]].\r\n * @param args - The arguments for creating the new SettingsDb.\r\n * @returns A promise that resolves to an EditableSettingsDb.\r\n */\r\n createDb(args: CreateSettingsDbArgs): Promise<EditableSettingsDb>;\r\n\r\n /**\r\n * Get the cloud properties of this container.\r\n */\r\n readonly cloudProps: WorkspaceContainerProps | undefined;\r\n\r\n /**\r\n * Get an editable [[SettingsDb]] to add, delete, or update settings *within a newly created version* of a SettingsDb.\r\n * @param props - The properties of the SettingsDb.\r\n * @returns An EditableSettingsDb for modifying settings.\r\n * @throws if the targeted SettingsDb has already been published and is immutable. Use [[createNewSettingsDbVersion]] first to create an editable version.\r\n */\r\n getEditableDb(props?: SettingsDbProps): EditableSettingsDb;\r\n\r\n /**\r\n * Acquire the write lock on the container. Use [[releaseWriteLock]] to release the lock after publishing your changes, or\r\n * [[abandonChanges]] to release the lock and discard your changes.\r\n * Only one user can hold the write lock at any given time. However, readers can continue to read the published contents of the container while\r\n * a writer holds the write lock. Readers will only see the writer's changes after they are published by [[releaseWriteLock]].\r\n * @param user - The name of the user acquiring the write lock.\r\n * @throws if the write lock is already held by another user.\r\n */\r\n acquireWriteLock(user: string): void;\r\n\r\n /**\r\n * Release the write lock on the container. This should be called after all changes to the container's contents are complete. It\r\n * publishes and uploads the changes made to any [[SettingsDb]]s while the lock was held, after which those dbs become immutable.\r\n */\r\n releaseWriteLock(): void;\r\n\r\n /**\r\n * Abandon any changes made to the container and release the write lock. Any newly created versions of SettingsDbs are discarded.\r\n */\r\n abandonChanges(): void;\r\n}\r\n\r\n/**\r\n * An editable [[SettingsDb]]. This is used only by tools to allow administrators to create and modify SettingsDbs.\r\n * For cloud-based SettingsDbs, the container's write token must be obtained via [[EditableSettingsCloudContainer.acquireWriteLock]] before the methods in this interface may be used.\r\n * Normally, only admins will have write access.\r\n * Only one admin at a time may be editing a settings container.\r\n * @note Unlike [[EditableWorkspaceDb]], this interface only supports settings operations — no blob, file, or string resource methods.\r\n * @beta\r\n */\r\nexport interface EditableSettingsDb extends SettingsDb {\r\n readonly container: EditableSettingsCloudContainer;\r\n\r\n /**\r\n * Update the contents of the manifest in this SettingsDb.\r\n * @note This replaces the stored manifest entirely; omitted fields are lost.\r\n * @param manifest - The updated manifest.\r\n */\r\n updateManifest(manifest: SettingsDbManifest): void;\r\n\r\n /**\r\n * Replace all settings in this SettingsDb with the given container.\r\n * @param settings - The settings object to store.\r\n */\r\n updateSettings(settings: SettingsContainer): void;\r\n\r\n /**\r\n * Add or update a single [[Setting]] by name.\r\n * If a setting with the given name already exists, its value is replaced.\r\n * If it does not exist, it is added. Other settings are preserved.\r\n * @param args - The arguments specifying the setting name and value.\r\n */\r\n updateSetting(args: UpdateSettingArgs): void;\r\n\r\n /**\r\n * Remove a single [[Setting]] by name. Other settings are preserved.\r\n * @param settingName - The name of the setting to remove.\r\n */\r\n removeSetting(settingName: SettingName): void;\r\n}\r\n\r\n/** An object that permits administrators to modify the contents of settings containers.\r\n * Use [[SettingsEditor.construct]] to obtain a SettingsEditor, and [[close]] when finished using it.\r\n * Only one SettingsEditor may be in use at any given time.\r\n * Use [[getContainer]] to edit an existing container, or [[createNewCloudContainer]] to create a new container.\r\n * @beta\r\n */\r\nexport interface SettingsEditor {\r\n /** @internal */\r\n [_implementationProhibited]: unknown;\r\n\r\n /**\r\n * The workspace dedicated to this editor.\r\n * @note This workspace is independent from [[IModelHost.appWorkspace]] and all [[IModelDb.workspace]]s.\r\n */\r\n readonly workspace: Workspace;\r\n\r\n /**\r\n * Retrieves a container for the editor with the specified properties and access token.\r\n */\r\n getContainer(args: GetWorkspaceContainerArgs): EditableSettingsCloudContainer;\r\n\r\n /**\r\n * Asynchronously retrieves a container for the editor with the specified properties.\r\n */\r\n getContainerAsync(props: WorkspaceContainerProps): Promise<EditableSettingsCloudContainer>;\r\n\r\n /**\r\n * Creates a new cloud container for holding SettingsDbs, from the [[BlobContainer]] service.\r\n * The container is automatically assigned `containerType: \"settings\"` in its metadata and\r\n * initialized with a default [[SettingsDb]].\r\n * @param args - The arguments for creating the container, including scope, metadata, and manifest.\r\n * @returns A promise that resolves to the new EditableSettingsCloudContainer.\r\n * @note The current user must have administrator rights for the iTwin for the container.\r\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\r\n */\r\n createNewCloudContainer(args: CreateNewSettingsContainerArgs): Promise<EditableSettingsCloudContainer>;\r\n\r\n /**\r\n * Find and open existing settings containers by querying the [[BlobContainer]] service.\r\n * This is a convenience method that queries for all settings containers matching the given iTwinId\r\n * (and optionally iModelId), requests write access tokens, and opens each matching container.\r\n * @param args - The query arguments including iTwinId and optionally iModelId and label.\r\n * @returns A promise that resolves to an array of opened [[EditableSettingsCloudContainer]]s.\r\n * @note Requires [[IModelHost.authorizationClient]] and [[BlobContainer.service]] to be configured.\r\n */\r\n findContainers(args: SettingsEditor.QuerySettingsContainersArgs): Promise<EditableSettingsCloudContainer[]>;\r\n\r\n /**\r\n * Closes this editor. All settings containers are dropped.\r\n */\r\n close(): void;\r\n}\r\n"]}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* @module Workspace
|
|
3
3
|
*/
|
|
4
4
|
import { AccessToken, BeEvent, ITwinError, Optional } from "@itwin/core-bentley";
|
|
5
|
-
import { LocalDirName, LocalFileName } from "@itwin/core-common";
|
|
5
|
+
import { DbCloudContainerInfo, LocalDirName, LocalFileName } from "@itwin/core-common";
|
|
6
6
|
import { CloudSqlite } from "../CloudSqlite";
|
|
7
7
|
import { SQLiteDb } from "../SQLiteDb";
|
|
8
8
|
import { SettingName, Settings, SettingsDictionary, SettingsPriority } from "./Settings";
|
|
9
|
+
import { GetSettingsDbArgs, SettingsDb } from "./SettingsDb";
|
|
9
10
|
import type { IModelJsNative } from "@bentley/imodeljs-native";
|
|
10
11
|
import { _implementationProhibited } from "../internal/Symbols";
|
|
11
12
|
/** The unique identifier of a [[WorkspaceContainer]]. This becomes the base name for a local file directory holding the container's [[WorkspaceDb]]s.
|
|
@@ -71,7 +72,8 @@ export interface WorkspaceDbProps extends WorkspaceDbNameAndVersion {
|
|
|
71
72
|
/** Properties describing a [[WorkspaceDb]] and the [[WorkspaceContainer]] containing it.
|
|
72
73
|
* @beta
|
|
73
74
|
*/
|
|
74
|
-
export
|
|
75
|
+
export interface WorkspaceDbCloudProps extends WorkspaceDbProps, WorkspaceContainerProps, DbCloudContainerInfo {
|
|
76
|
+
}
|
|
75
77
|
/** A function supplied as [[WorkspaceDbQueryResourcesArgs.callback]] to be invoked to process the requested resources.
|
|
76
78
|
* @beta
|
|
77
79
|
*/
|
|
@@ -141,8 +143,12 @@ export interface WorkspaceDbLoadErrors extends ITwinError {
|
|
|
141
143
|
* @beta
|
|
142
144
|
*/
|
|
143
145
|
export interface WorkspaceDbSettingsProps extends WorkspaceDbCloudProps {
|
|
144
|
-
/** The name of the resource holding the stringified JSON of the [[SettingsDictionary]].
|
|
145
|
-
|
|
146
|
+
/** The name of the resource holding the stringified JSON of the [[SettingsDictionary]].
|
|
147
|
+
* Defaults to `"settings"`, which matches the key used by
|
|
148
|
+
* [[EditableSettingsDb.updateSettings]] to write settings. You should generally omit this
|
|
149
|
+
* field unless you need to load settings stored under a non-standard key.
|
|
150
|
+
*/
|
|
151
|
+
resourceName?: string;
|
|
146
152
|
/** The priority to assign to the [[SettingsDictionary]]. */
|
|
147
153
|
priority: SettingsPriority;
|
|
148
154
|
}
|
|
@@ -318,6 +324,13 @@ export interface Workspace {
|
|
|
318
324
|
problems?: WorkspaceDbLoadError[]): Promise<void>;
|
|
319
325
|
/** Get a single [[WorkspaceDb]]. */
|
|
320
326
|
getWorkspaceDb(props: WorkspaceDbCloudProps): Promise<WorkspaceDb>;
|
|
327
|
+
/** Get a [[SettingsDb]] from a previously-loaded settings container in this workspace.
|
|
328
|
+
* @param args The arguments identifying which SettingsDb to retrieve.
|
|
329
|
+
* @returns The SettingsDb from the matching container.
|
|
330
|
+
* @throws if no container matching [[GetSettingsDbArgs.containerId]] has been loaded into this workspace, or if the container does not hold a SettingsDb.
|
|
331
|
+
* @note The container must already be loaded via [[getContainer]] or [[getContainerAsync]] before calling this method.
|
|
332
|
+
*/
|
|
333
|
+
getSettingsDb(args: GetSettingsDbArgs): SettingsDb;
|
|
321
334
|
/**
|
|
322
335
|
* Resolve the value of all [[Setting]]s from this workspace with the supplied `settingName` into an array of [[WorkspaceDbCloudProps]]
|
|
323
336
|
* that can be used to query or load workspace resources. The settings must each be an array of type [[WorkspaceDbSettingsProps]].
|
|
@@ -347,37 +360,45 @@ export interface Workspace {
|
|
|
347
360
|
}): Promise<WorkspaceDb[]>;
|
|
348
361
|
}
|
|
349
362
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
* similar and versioning follows the same rules as NPM using [Semantic Versioning](https://semver.org/).
|
|
354
|
-
* @note It is possible to store more than one WorkspaceDb in the same WorkspaceContainer, but access rights are administered per WorkspaceContainer.
|
|
355
|
-
* That is, if a user has rights to access a WorkspaceContainer, that right applies to all WorkspaceDbs in the WorkspaceContainer.
|
|
356
|
-
* @note Not every WorkspaceContainer is associated with a [[CloudSqlite.CloudContainer]] - WorkspaceContainers may also be loaded from the local file system.
|
|
363
|
+
* Base interface for containers backed by [[CloudSqlite]] that hold versioned databases (e.g. [[WorkspaceDb]]s or [[SettingsDb]]s).
|
|
364
|
+
* Provides the shared infrastructure for cloud access, local file caching, and semver-based database resolution.
|
|
365
|
+
* @note Not every container is associated with a [[CloudSqlite.CloudContainer]] — containers may also be loaded from the local file system.
|
|
357
366
|
* In this case, [[cloudContainer]] will be `undefined`.
|
|
358
|
-
* @see [[
|
|
367
|
+
* @see [[WorkspaceContainer]] for workspace-specific containers.
|
|
359
368
|
* @beta
|
|
360
369
|
*/
|
|
361
|
-
export interface
|
|
370
|
+
export interface CloudSqliteContainer {
|
|
362
371
|
/** @internal */
|
|
363
372
|
[_implementationProhibited]: unknown;
|
|
364
|
-
/** the local directory where this
|
|
373
|
+
/** the local directory where this container will store temporary files extracted for file-resources.
|
|
365
374
|
* @internal
|
|
366
375
|
*/
|
|
367
376
|
readonly filesDir: LocalDirName;
|
|
368
377
|
/** The workspace into which this container was loaded. */
|
|
369
378
|
readonly workspace: Workspace;
|
|
370
|
-
/** Cloud container for this
|
|
379
|
+
/** Cloud container for this container, or `undefined` if this is a local container. */
|
|
371
380
|
readonly cloudContainer?: CloudSqlite.CloudContainer;
|
|
372
381
|
/** Properties supplied when this container was loaded */
|
|
373
382
|
readonly fromProps: WorkspaceContainerProps;
|
|
374
|
-
/** @internal */
|
|
375
|
-
addWorkspaceDb(toAdd: WorkspaceDb): void;
|
|
376
383
|
/**
|
|
377
|
-
* Find the fully-qualified name of a
|
|
384
|
+
* Find the fully-qualified name of a database satisfying the name and version criteria specified by `props`.
|
|
378
385
|
* @throws Error if no version satisfying the criteria exists.
|
|
379
386
|
*/
|
|
380
387
|
resolveDbFileName(props: WorkspaceDbProps): WorkspaceDbFullName;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* A [[CloudSqliteContainer]] that holds one or more [[WorkspaceDb]]s. Normally a WorkspaceContainer will hold (many versions of) a single WorkspaceDb.
|
|
391
|
+
* Each version of a WorkspaceDb is treated as immutable after it is created and is stored in the WorkspaceContainer indefinitely. That means that
|
|
392
|
+
* older versions of the WorkspaceDb may continue to be used, for example by archived projects. For programmers familiar with [NPM](https://www.npmjs.com/), this is conceptually
|
|
393
|
+
* similar and versioning follows the same rules as NPM using [Semantic Versioning](https://semver.org/).
|
|
394
|
+
* @note It is possible to store more than one WorkspaceDb in the same WorkspaceContainer, but access rights are administered per WorkspaceContainer.
|
|
395
|
+
* That is, if a user has rights to access a WorkspaceContainer, that right applies to all WorkspaceDbs in the WorkspaceContainer.
|
|
396
|
+
* @see [[Workspace.getContainer]] and [[Workspace.getContainerAsync]] to load a container.
|
|
397
|
+
* @beta
|
|
398
|
+
*/
|
|
399
|
+
export interface WorkspaceContainer extends CloudSqliteContainer {
|
|
400
|
+
/** @internal */
|
|
401
|
+
addWorkspaceDb(toAdd: WorkspaceDb): void;
|
|
381
402
|
/** Obtain a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`. */
|
|
382
403
|
getWorkspaceDb(props?: WorkspaceDbProps): WorkspaceDb;
|
|
383
404
|
/** Close and remove a currently opened [[WorkspaceDb]] from this Workspace.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../../src/workspace/Workspace.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAU,QAAQ,EAAoB,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../../src/workspace/Workspace.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAU,QAAQ,EAAoB,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OA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