@fluidframework/azure-client 2.0.0-dev.7.2.0.203917 → 2.0.0-dev.7.2.0.205722
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/package.json +21 -21
- package/dist/azure-client-alpha.d.ts +0 -312
- package/dist/azure-client-beta.d.ts +0 -312
- package/dist/azure-client-public.d.ts +0 -312
- package/dist/azure-client-untrimmed.d.ts +0 -321
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/azure-client",
|
|
3
|
-
"version": "2.0.0-dev.7.2.0.
|
|
3
|
+
"version": "2.0.0-dev.7.2.0.205722",
|
|
4
4
|
"description": "A tool to enable creation and loading of Fluid containers using the Azure Fluid Relay service",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -27,32 +27,32 @@
|
|
|
27
27
|
"module": "lib/index.js",
|
|
28
28
|
"types": "dist/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fluidframework/container-definitions": "2.0.0-dev.7.2.0.
|
|
31
|
-
"@fluidframework/container-loader": "2.0.0-dev.7.2.0.
|
|
32
|
-
"@fluidframework/core-interfaces": "2.0.0-dev.7.2.0.
|
|
33
|
-
"@fluidframework/core-utils": "2.0.0-dev.7.2.0.
|
|
34
|
-
"@fluidframework/driver-definitions": "2.0.0-dev.7.2.0.
|
|
35
|
-
"@fluidframework/driver-utils": "2.0.0-dev.7.2.0.
|
|
36
|
-
"@fluidframework/fluid-static": "2.0.0-dev.7.2.0.
|
|
37
|
-
"@fluidframework/map": "2.0.0-dev.7.2.0.
|
|
30
|
+
"@fluidframework/container-definitions": "2.0.0-dev.7.2.0.205722",
|
|
31
|
+
"@fluidframework/container-loader": "2.0.0-dev.7.2.0.205722",
|
|
32
|
+
"@fluidframework/core-interfaces": "2.0.0-dev.7.2.0.205722",
|
|
33
|
+
"@fluidframework/core-utils": "2.0.0-dev.7.2.0.205722",
|
|
34
|
+
"@fluidframework/driver-definitions": "2.0.0-dev.7.2.0.205722",
|
|
35
|
+
"@fluidframework/driver-utils": "2.0.0-dev.7.2.0.205722",
|
|
36
|
+
"@fluidframework/fluid-static": "2.0.0-dev.7.2.0.205722",
|
|
37
|
+
"@fluidframework/map": "2.0.0-dev.7.2.0.205722",
|
|
38
38
|
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
39
|
-
"@fluidframework/routerlicious-driver": "2.0.0-dev.7.2.0.
|
|
40
|
-
"@fluidframework/runtime-utils": "2.0.0-dev.7.2.0.
|
|
39
|
+
"@fluidframework/routerlicious-driver": "2.0.0-dev.7.2.0.205722",
|
|
40
|
+
"@fluidframework/runtime-utils": "2.0.0-dev.7.2.0.205722",
|
|
41
41
|
"@fluidframework/server-services-client": "^2.0.1",
|
|
42
|
-
"@fluidframework/telemetry-utils": "2.0.0-dev.7.2.0.
|
|
42
|
+
"@fluidframework/telemetry-utils": "2.0.0-dev.7.2.0.205722",
|
|
43
43
|
"axios": "^0.26.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@fluid-tools/build-cli": "0.26.
|
|
47
|
-
"@fluidframework/aqueduct": "2.0.0-dev.7.2.0.
|
|
46
|
+
"@fluid-tools/build-cli": "^0.26.1",
|
|
47
|
+
"@fluidframework/aqueduct": "2.0.0-dev.7.2.0.205722",
|
|
48
48
|
"@fluidframework/azure-client-previous": "npm:@fluidframework/azure-client@2.0.0-internal.7.1.0",
|
|
49
|
-
"@fluidframework/azure-local-service": "2.0.0-dev.7.2.0.
|
|
50
|
-
"@fluidframework/build-common": "^2.0.
|
|
51
|
-
"@fluidframework/build-tools": "0.26.
|
|
52
|
-
"@fluidframework/counter": "2.0.0-dev.7.2.0.
|
|
49
|
+
"@fluidframework/azure-local-service": "2.0.0-dev.7.2.0.205722",
|
|
50
|
+
"@fluidframework/build-common": "^2.0.3",
|
|
51
|
+
"@fluidframework/build-tools": "^0.26.1",
|
|
52
|
+
"@fluidframework/counter": "2.0.0-dev.7.2.0.205722",
|
|
53
53
|
"@fluidframework/eslint-config-fluid": "^3.0.0",
|
|
54
|
-
"@fluidframework/test-runtime-utils": "2.0.0-dev.7.2.0.
|
|
55
|
-
"@fluidframework/test-utils": "2.0.0-dev.7.2.0.
|
|
54
|
+
"@fluidframework/test-runtime-utils": "2.0.0-dev.7.2.0.205722",
|
|
55
|
+
"@fluidframework/test-utils": "2.0.0-dev.7.2.0.205722",
|
|
56
56
|
"@microsoft/api-extractor": "^7.37.0",
|
|
57
57
|
"@types/mocha": "^9.1.1",
|
|
58
58
|
"@types/node": "^16.18.38",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
79
79
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
80
80
|
"ci:build:docs": "api-extractor run",
|
|
81
|
-
"clean": "rimraf --glob
|
|
81
|
+
"clean": "rimraf --glob dist lib \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp nyc",
|
|
82
82
|
"eslint": "eslint --format stylish src",
|
|
83
83
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
84
84
|
"format": "npm run prettier:fix",
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { ContainerSchema } from '@fluidframework/fluid-static';
|
|
8
|
-
import { IClient } from '@fluidframework/protocol-definitions';
|
|
9
|
-
import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
|
|
10
|
-
import { IConfigProviderBase } from '@fluidframework/telemetry-utils';
|
|
11
|
-
import { IFluidContainer } from '@fluidframework/fluid-static';
|
|
12
|
-
import { IMember } from '@fluidframework/fluid-static';
|
|
13
|
-
import { IServiceAudience } from '@fluidframework/fluid-static';
|
|
14
|
-
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
15
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
16
|
-
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
17
|
-
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
18
|
-
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
19
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
20
|
-
import { ScopeType } from '@fluidframework/protocol-definitions';
|
|
21
|
-
import { ServiceAudience } from '@fluidframework/fluid-static';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Azure-specific {@link @fluidframework/fluid-static#ServiceAudience} implementation.
|
|
25
|
-
*
|
|
26
|
-
* @remarks Operates in terms of {@link AzureMember}s.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare class AzureAudience extends ServiceAudience<AzureMember> implements IAzureAudience {
|
|
31
|
-
/* Excluded from this release type: createServiceMember */
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
|
|
36
|
-
* when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
export declare class AzureClient {
|
|
41
|
-
private readonly properties;
|
|
42
|
-
private readonly documentServiceFactory;
|
|
43
|
-
private readonly urlResolver;
|
|
44
|
-
private readonly configProvider;
|
|
45
|
-
/**
|
|
46
|
-
* Creates a new client instance using configuration parameters.
|
|
47
|
-
* @param properties - Properties for initializing a new AzureClient instance
|
|
48
|
-
*/
|
|
49
|
-
constructor(properties: AzureClientProps);
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new detached container instance in the Azure Fluid Relay.
|
|
52
|
-
* @param containerSchema - Container schema for the new container.
|
|
53
|
-
* @returns New detached container instance along with associated services.
|
|
54
|
-
*/
|
|
55
|
-
createContainer(containerSchema: ContainerSchema): Promise<{
|
|
56
|
-
container: IFluidContainer;
|
|
57
|
-
services: AzureContainerServices;
|
|
58
|
-
}>;
|
|
59
|
-
/**
|
|
60
|
-
* Creates new detached container out of specific version of another container.
|
|
61
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
62
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
63
|
-
* @param version - Unique version of the source container in Azure Fluid Relay.
|
|
64
|
-
* It defaults to latest version if parameter not provided.
|
|
65
|
-
* @returns New detached container instance along with associated services.
|
|
66
|
-
*/
|
|
67
|
-
copyContainer(id: string, containerSchema: ContainerSchema, version?: AzureContainerVersion): Promise<{
|
|
68
|
-
container: IFluidContainer;
|
|
69
|
-
services: AzureContainerServices;
|
|
70
|
-
}>;
|
|
71
|
-
/**
|
|
72
|
-
* Accesses the existing container given its unique ID in the Azure Fluid Relay.
|
|
73
|
-
* @param id - Unique ID of the container in Azure Fluid Relay.
|
|
74
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
75
|
-
* @returns Existing container instance along with associated services.
|
|
76
|
-
*/
|
|
77
|
-
getContainer(id: string, containerSchema: ContainerSchema): Promise<{
|
|
78
|
-
container: IFluidContainer;
|
|
79
|
-
services: AzureContainerServices;
|
|
80
|
-
}>;
|
|
81
|
-
/**
|
|
82
|
-
* Get the list of versions for specific container.
|
|
83
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
84
|
-
* @param options - "Get" options. If options are not provided, API
|
|
85
|
-
* will assume maxCount of versions to retreive to be 5.
|
|
86
|
-
* @returns Array of available container versions.
|
|
87
|
-
*/
|
|
88
|
-
getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
|
|
89
|
-
private getContainerServices;
|
|
90
|
-
private createLoader;
|
|
91
|
-
private createFluidContainer;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Props for initializing a new AzureClient instance
|
|
96
|
-
*
|
|
97
|
-
* @public
|
|
98
|
-
*/
|
|
99
|
-
export declare interface AzureClientProps {
|
|
100
|
-
/**
|
|
101
|
-
* Configuration for establishing a connection with the Azure Fluid Relay.
|
|
102
|
-
*/
|
|
103
|
-
readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
|
|
104
|
-
/**
|
|
105
|
-
* Optional. A logger instance to receive diagnostic messages.
|
|
106
|
-
*/
|
|
107
|
-
readonly logger?: ITelemetryBaseLogger;
|
|
108
|
-
/**
|
|
109
|
-
* Base interface for providing configurations to control experimental features. If unsure, leave this undefined.
|
|
110
|
-
*/
|
|
111
|
-
readonly configProvider?: IConfigProviderBase;
|
|
112
|
-
readonly summaryCompression?: boolean | ICompressionStorageConfig;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Parameters for establishing a connection with the Azure Fluid Relay.
|
|
117
|
-
*
|
|
118
|
-
* @public
|
|
119
|
-
*/
|
|
120
|
-
export declare interface AzureConnectionConfig {
|
|
121
|
-
/**
|
|
122
|
-
* The type of connection. Whether we're connecting to a remote Fluid relay server or a local instance.
|
|
123
|
-
*/
|
|
124
|
-
type: AzureConnectionConfigType;
|
|
125
|
-
/**
|
|
126
|
-
* URI to the Azure Fluid Relay service discovery endpoint.
|
|
127
|
-
*/
|
|
128
|
-
endpoint: string;
|
|
129
|
-
/**
|
|
130
|
-
* Instance that provides Azure Fluid Relay endpoint tokens.
|
|
131
|
-
*/
|
|
132
|
-
tokenProvider: ITokenProvider;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* The type of connection.
|
|
137
|
-
*
|
|
138
|
-
* - "local" for local connections to a Fluid relay instance running on the localhost
|
|
139
|
-
*
|
|
140
|
-
* - "remote" for client connections to the Azure Fluid Relay service
|
|
141
|
-
*
|
|
142
|
-
* @public
|
|
143
|
-
*/
|
|
144
|
-
export declare type AzureConnectionConfigType = "local" | "remote";
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
|
|
148
|
-
* the FluidContainer is persisted in the backend and consumed by users.
|
|
149
|
-
*
|
|
150
|
-
* @remarks
|
|
151
|
-
*
|
|
152
|
-
* Returned by the {@link AzureClient} alongside a {@link @fluidframework/fluid-static#FluidContainer}.
|
|
153
|
-
*
|
|
154
|
-
* Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
|
|
155
|
-
* or DDSes to use, will not be included here but rather on the FluidContainer class itself.
|
|
156
|
-
*
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
159
|
-
export declare interface AzureContainerServices {
|
|
160
|
-
/**
|
|
161
|
-
* Provides an object that can be used to get the users that are present in this Fluid session and
|
|
162
|
-
* listeners for when the roster has any changes from users joining/leaving the session
|
|
163
|
-
*/
|
|
164
|
-
audience: IAzureAudience;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Container version metadata.
|
|
169
|
-
*
|
|
170
|
-
* @public
|
|
171
|
-
*/
|
|
172
|
-
export declare interface AzureContainerVersion {
|
|
173
|
-
/**
|
|
174
|
-
* Version ID
|
|
175
|
-
*/
|
|
176
|
-
id: string;
|
|
177
|
-
/**
|
|
178
|
-
* Time when version was generated.
|
|
179
|
-
* ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
|
|
180
|
-
*/
|
|
181
|
-
date?: string;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Token Provider implementation for connecting to an Azure Function endpoint for
|
|
186
|
-
* Azure Fluid Relay token resolution.
|
|
187
|
-
*
|
|
188
|
-
* @deprecated 1.2.0, This API will be removed in 2.0.0
|
|
189
|
-
* No replacement since it is not expected anyone will use this token provider as is
|
|
190
|
-
* See https://github.com/microsoft/FluidFramework/issues/13693 for context
|
|
191
|
-
*
|
|
192
|
-
* @public
|
|
193
|
-
*/
|
|
194
|
-
export declare class AzureFunctionTokenProvider implements ITokenProvider {
|
|
195
|
-
private readonly azFunctionUrl;
|
|
196
|
-
private readonly user?;
|
|
197
|
-
/**
|
|
198
|
-
* Creates a new instance using configuration parameters.
|
|
199
|
-
* @param azFunctionUrl - URL to Azure Function endpoint
|
|
200
|
-
* @param user - User object
|
|
201
|
-
*/
|
|
202
|
-
constructor(azFunctionUrl: string, user?: Pick<AzureMember<any>, "userId" | "userName" | "additionalDetails"> | undefined);
|
|
203
|
-
fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse>;
|
|
204
|
-
fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
|
|
205
|
-
private getToken;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Options for "Get Container Versions" API.
|
|
210
|
-
*
|
|
211
|
-
* @public
|
|
212
|
-
*/
|
|
213
|
-
export declare interface AzureGetVersionsOptions {
|
|
214
|
-
/**
|
|
215
|
-
* Max number of versions
|
|
216
|
-
*/
|
|
217
|
-
maxCount: number;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
|
|
222
|
-
*
|
|
223
|
-
* @public
|
|
224
|
-
*/
|
|
225
|
-
export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
|
|
226
|
-
/**
|
|
227
|
-
* The type of connection. Set to a remote connection.
|
|
228
|
-
*/
|
|
229
|
-
type: "local";
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
234
|
-
* {@link @fluidframework/protocol-definitions#IMember} interface to include this service-specific value.
|
|
235
|
-
* It will be returned for all audience members connected to Azure.
|
|
236
|
-
*
|
|
237
|
-
* @typeParam T - See {@link AzureMember.additionalDetails}.
|
|
238
|
-
* Note: must be JSON-serializable.
|
|
239
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
240
|
-
*
|
|
241
|
-
* @public
|
|
242
|
-
*/
|
|
243
|
-
export declare interface AzureMember<T = any> extends IMember {
|
|
244
|
-
/**
|
|
245
|
-
* {@inheritDoc AzureUser.name}
|
|
246
|
-
*/
|
|
247
|
-
userName: string;
|
|
248
|
-
/**
|
|
249
|
-
* {@inheritDoc AzureUser.additionalDetails}
|
|
250
|
-
*/
|
|
251
|
-
additionalDetails?: T;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Parameters for establishing a remote connection with the Azure Fluid Relay.
|
|
256
|
-
*
|
|
257
|
-
* @public
|
|
258
|
-
*/
|
|
259
|
-
export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
|
|
260
|
-
/**
|
|
261
|
-
* The type of connection. Set to a remote connection.
|
|
262
|
-
*/
|
|
263
|
-
type: "remote";
|
|
264
|
-
/**
|
|
265
|
-
* Unique tenant identifier.
|
|
266
|
-
*/
|
|
267
|
-
tenantId: string;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
272
|
-
* {@link @fluidframework/protocol-definitions#IUser} interface to include this service-specific value.
|
|
273
|
-
*
|
|
274
|
-
* @typeParam T - See {@link AzureUser.additionalDetails}.
|
|
275
|
-
* Note: must be JSON-serializable.
|
|
276
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
277
|
-
*
|
|
278
|
-
* @public
|
|
279
|
-
*/
|
|
280
|
-
export declare interface AzureUser<T = any> extends IUser {
|
|
281
|
-
/**
|
|
282
|
-
* The user's name
|
|
283
|
-
*/
|
|
284
|
-
name: string;
|
|
285
|
-
/**
|
|
286
|
-
* Custom, app-specific user information
|
|
287
|
-
*/
|
|
288
|
-
additionalDetails?: T;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Audience object for Azure Fluid Relay containers
|
|
293
|
-
*
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
export declare type IAzureAudience = IServiceAudience<AzureMember>;
|
|
297
|
-
|
|
298
|
-
export { ITelemetryBaseEvent }
|
|
299
|
-
|
|
300
|
-
export { ITelemetryBaseLogger }
|
|
301
|
-
|
|
302
|
-
export { ITokenClaims }
|
|
303
|
-
|
|
304
|
-
export { ITokenProvider }
|
|
305
|
-
|
|
306
|
-
export { ITokenResponse }
|
|
307
|
-
|
|
308
|
-
export { IUser }
|
|
309
|
-
|
|
310
|
-
export { ScopeType }
|
|
311
|
-
|
|
312
|
-
export { }
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { ContainerSchema } from '@fluidframework/fluid-static';
|
|
8
|
-
import { IClient } from '@fluidframework/protocol-definitions';
|
|
9
|
-
import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
|
|
10
|
-
import { IConfigProviderBase } from '@fluidframework/telemetry-utils';
|
|
11
|
-
import { IFluidContainer } from '@fluidframework/fluid-static';
|
|
12
|
-
import { IMember } from '@fluidframework/fluid-static';
|
|
13
|
-
import { IServiceAudience } from '@fluidframework/fluid-static';
|
|
14
|
-
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
15
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
16
|
-
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
17
|
-
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
18
|
-
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
19
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
20
|
-
import { ScopeType } from '@fluidframework/protocol-definitions';
|
|
21
|
-
import { ServiceAudience } from '@fluidframework/fluid-static';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Azure-specific {@link @fluidframework/fluid-static#ServiceAudience} implementation.
|
|
25
|
-
*
|
|
26
|
-
* @remarks Operates in terms of {@link AzureMember}s.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare class AzureAudience extends ServiceAudience<AzureMember> implements IAzureAudience {
|
|
31
|
-
/* Excluded from this release type: createServiceMember */
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
|
|
36
|
-
* when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
export declare class AzureClient {
|
|
41
|
-
private readonly properties;
|
|
42
|
-
private readonly documentServiceFactory;
|
|
43
|
-
private readonly urlResolver;
|
|
44
|
-
private readonly configProvider;
|
|
45
|
-
/**
|
|
46
|
-
* Creates a new client instance using configuration parameters.
|
|
47
|
-
* @param properties - Properties for initializing a new AzureClient instance
|
|
48
|
-
*/
|
|
49
|
-
constructor(properties: AzureClientProps);
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new detached container instance in the Azure Fluid Relay.
|
|
52
|
-
* @param containerSchema - Container schema for the new container.
|
|
53
|
-
* @returns New detached container instance along with associated services.
|
|
54
|
-
*/
|
|
55
|
-
createContainer(containerSchema: ContainerSchema): Promise<{
|
|
56
|
-
container: IFluidContainer;
|
|
57
|
-
services: AzureContainerServices;
|
|
58
|
-
}>;
|
|
59
|
-
/**
|
|
60
|
-
* Creates new detached container out of specific version of another container.
|
|
61
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
62
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
63
|
-
* @param version - Unique version of the source container in Azure Fluid Relay.
|
|
64
|
-
* It defaults to latest version if parameter not provided.
|
|
65
|
-
* @returns New detached container instance along with associated services.
|
|
66
|
-
*/
|
|
67
|
-
copyContainer(id: string, containerSchema: ContainerSchema, version?: AzureContainerVersion): Promise<{
|
|
68
|
-
container: IFluidContainer;
|
|
69
|
-
services: AzureContainerServices;
|
|
70
|
-
}>;
|
|
71
|
-
/**
|
|
72
|
-
* Accesses the existing container given its unique ID in the Azure Fluid Relay.
|
|
73
|
-
* @param id - Unique ID of the container in Azure Fluid Relay.
|
|
74
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
75
|
-
* @returns Existing container instance along with associated services.
|
|
76
|
-
*/
|
|
77
|
-
getContainer(id: string, containerSchema: ContainerSchema): Promise<{
|
|
78
|
-
container: IFluidContainer;
|
|
79
|
-
services: AzureContainerServices;
|
|
80
|
-
}>;
|
|
81
|
-
/**
|
|
82
|
-
* Get the list of versions for specific container.
|
|
83
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
84
|
-
* @param options - "Get" options. If options are not provided, API
|
|
85
|
-
* will assume maxCount of versions to retreive to be 5.
|
|
86
|
-
* @returns Array of available container versions.
|
|
87
|
-
*/
|
|
88
|
-
getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
|
|
89
|
-
private getContainerServices;
|
|
90
|
-
private createLoader;
|
|
91
|
-
private createFluidContainer;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Props for initializing a new AzureClient instance
|
|
96
|
-
*
|
|
97
|
-
* @public
|
|
98
|
-
*/
|
|
99
|
-
export declare interface AzureClientProps {
|
|
100
|
-
/**
|
|
101
|
-
* Configuration for establishing a connection with the Azure Fluid Relay.
|
|
102
|
-
*/
|
|
103
|
-
readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
|
|
104
|
-
/**
|
|
105
|
-
* Optional. A logger instance to receive diagnostic messages.
|
|
106
|
-
*/
|
|
107
|
-
readonly logger?: ITelemetryBaseLogger;
|
|
108
|
-
/**
|
|
109
|
-
* Base interface for providing configurations to control experimental features. If unsure, leave this undefined.
|
|
110
|
-
*/
|
|
111
|
-
readonly configProvider?: IConfigProviderBase;
|
|
112
|
-
readonly summaryCompression?: boolean | ICompressionStorageConfig;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Parameters for establishing a connection with the Azure Fluid Relay.
|
|
117
|
-
*
|
|
118
|
-
* @public
|
|
119
|
-
*/
|
|
120
|
-
export declare interface AzureConnectionConfig {
|
|
121
|
-
/**
|
|
122
|
-
* The type of connection. Whether we're connecting to a remote Fluid relay server or a local instance.
|
|
123
|
-
*/
|
|
124
|
-
type: AzureConnectionConfigType;
|
|
125
|
-
/**
|
|
126
|
-
* URI to the Azure Fluid Relay service discovery endpoint.
|
|
127
|
-
*/
|
|
128
|
-
endpoint: string;
|
|
129
|
-
/**
|
|
130
|
-
* Instance that provides Azure Fluid Relay endpoint tokens.
|
|
131
|
-
*/
|
|
132
|
-
tokenProvider: ITokenProvider;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* The type of connection.
|
|
137
|
-
*
|
|
138
|
-
* - "local" for local connections to a Fluid relay instance running on the localhost
|
|
139
|
-
*
|
|
140
|
-
* - "remote" for client connections to the Azure Fluid Relay service
|
|
141
|
-
*
|
|
142
|
-
* @public
|
|
143
|
-
*/
|
|
144
|
-
export declare type AzureConnectionConfigType = "local" | "remote";
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
|
|
148
|
-
* the FluidContainer is persisted in the backend and consumed by users.
|
|
149
|
-
*
|
|
150
|
-
* @remarks
|
|
151
|
-
*
|
|
152
|
-
* Returned by the {@link AzureClient} alongside a {@link @fluidframework/fluid-static#FluidContainer}.
|
|
153
|
-
*
|
|
154
|
-
* Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
|
|
155
|
-
* or DDSes to use, will not be included here but rather on the FluidContainer class itself.
|
|
156
|
-
*
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
159
|
-
export declare interface AzureContainerServices {
|
|
160
|
-
/**
|
|
161
|
-
* Provides an object that can be used to get the users that are present in this Fluid session and
|
|
162
|
-
* listeners for when the roster has any changes from users joining/leaving the session
|
|
163
|
-
*/
|
|
164
|
-
audience: IAzureAudience;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Container version metadata.
|
|
169
|
-
*
|
|
170
|
-
* @public
|
|
171
|
-
*/
|
|
172
|
-
export declare interface AzureContainerVersion {
|
|
173
|
-
/**
|
|
174
|
-
* Version ID
|
|
175
|
-
*/
|
|
176
|
-
id: string;
|
|
177
|
-
/**
|
|
178
|
-
* Time when version was generated.
|
|
179
|
-
* ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
|
|
180
|
-
*/
|
|
181
|
-
date?: string;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Token Provider implementation for connecting to an Azure Function endpoint for
|
|
186
|
-
* Azure Fluid Relay token resolution.
|
|
187
|
-
*
|
|
188
|
-
* @deprecated 1.2.0, This API will be removed in 2.0.0
|
|
189
|
-
* No replacement since it is not expected anyone will use this token provider as is
|
|
190
|
-
* See https://github.com/microsoft/FluidFramework/issues/13693 for context
|
|
191
|
-
*
|
|
192
|
-
* @public
|
|
193
|
-
*/
|
|
194
|
-
export declare class AzureFunctionTokenProvider implements ITokenProvider {
|
|
195
|
-
private readonly azFunctionUrl;
|
|
196
|
-
private readonly user?;
|
|
197
|
-
/**
|
|
198
|
-
* Creates a new instance using configuration parameters.
|
|
199
|
-
* @param azFunctionUrl - URL to Azure Function endpoint
|
|
200
|
-
* @param user - User object
|
|
201
|
-
*/
|
|
202
|
-
constructor(azFunctionUrl: string, user?: Pick<AzureMember<any>, "userId" | "userName" | "additionalDetails"> | undefined);
|
|
203
|
-
fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse>;
|
|
204
|
-
fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
|
|
205
|
-
private getToken;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Options for "Get Container Versions" API.
|
|
210
|
-
*
|
|
211
|
-
* @public
|
|
212
|
-
*/
|
|
213
|
-
export declare interface AzureGetVersionsOptions {
|
|
214
|
-
/**
|
|
215
|
-
* Max number of versions
|
|
216
|
-
*/
|
|
217
|
-
maxCount: number;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
|
|
222
|
-
*
|
|
223
|
-
* @public
|
|
224
|
-
*/
|
|
225
|
-
export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
|
|
226
|
-
/**
|
|
227
|
-
* The type of connection. Set to a remote connection.
|
|
228
|
-
*/
|
|
229
|
-
type: "local";
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
234
|
-
* {@link @fluidframework/protocol-definitions#IMember} interface to include this service-specific value.
|
|
235
|
-
* It will be returned for all audience members connected to Azure.
|
|
236
|
-
*
|
|
237
|
-
* @typeParam T - See {@link AzureMember.additionalDetails}.
|
|
238
|
-
* Note: must be JSON-serializable.
|
|
239
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
240
|
-
*
|
|
241
|
-
* @public
|
|
242
|
-
*/
|
|
243
|
-
export declare interface AzureMember<T = any> extends IMember {
|
|
244
|
-
/**
|
|
245
|
-
* {@inheritDoc AzureUser.name}
|
|
246
|
-
*/
|
|
247
|
-
userName: string;
|
|
248
|
-
/**
|
|
249
|
-
* {@inheritDoc AzureUser.additionalDetails}
|
|
250
|
-
*/
|
|
251
|
-
additionalDetails?: T;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Parameters for establishing a remote connection with the Azure Fluid Relay.
|
|
256
|
-
*
|
|
257
|
-
* @public
|
|
258
|
-
*/
|
|
259
|
-
export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
|
|
260
|
-
/**
|
|
261
|
-
* The type of connection. Set to a remote connection.
|
|
262
|
-
*/
|
|
263
|
-
type: "remote";
|
|
264
|
-
/**
|
|
265
|
-
* Unique tenant identifier.
|
|
266
|
-
*/
|
|
267
|
-
tenantId: string;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
272
|
-
* {@link @fluidframework/protocol-definitions#IUser} interface to include this service-specific value.
|
|
273
|
-
*
|
|
274
|
-
* @typeParam T - See {@link AzureUser.additionalDetails}.
|
|
275
|
-
* Note: must be JSON-serializable.
|
|
276
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
277
|
-
*
|
|
278
|
-
* @public
|
|
279
|
-
*/
|
|
280
|
-
export declare interface AzureUser<T = any> extends IUser {
|
|
281
|
-
/**
|
|
282
|
-
* The user's name
|
|
283
|
-
*/
|
|
284
|
-
name: string;
|
|
285
|
-
/**
|
|
286
|
-
* Custom, app-specific user information
|
|
287
|
-
*/
|
|
288
|
-
additionalDetails?: T;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Audience object for Azure Fluid Relay containers
|
|
293
|
-
*
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
export declare type IAzureAudience = IServiceAudience<AzureMember>;
|
|
297
|
-
|
|
298
|
-
export { ITelemetryBaseEvent }
|
|
299
|
-
|
|
300
|
-
export { ITelemetryBaseLogger }
|
|
301
|
-
|
|
302
|
-
export { ITokenClaims }
|
|
303
|
-
|
|
304
|
-
export { ITokenProvider }
|
|
305
|
-
|
|
306
|
-
export { ITokenResponse }
|
|
307
|
-
|
|
308
|
-
export { IUser }
|
|
309
|
-
|
|
310
|
-
export { ScopeType }
|
|
311
|
-
|
|
312
|
-
export { }
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { ContainerSchema } from '@fluidframework/fluid-static';
|
|
8
|
-
import { IClient } from '@fluidframework/protocol-definitions';
|
|
9
|
-
import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
|
|
10
|
-
import { IConfigProviderBase } from '@fluidframework/telemetry-utils';
|
|
11
|
-
import { IFluidContainer } from '@fluidframework/fluid-static';
|
|
12
|
-
import { IMember } from '@fluidframework/fluid-static';
|
|
13
|
-
import { IServiceAudience } from '@fluidframework/fluid-static';
|
|
14
|
-
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
15
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
16
|
-
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
17
|
-
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
18
|
-
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
19
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
20
|
-
import { ScopeType } from '@fluidframework/protocol-definitions';
|
|
21
|
-
import { ServiceAudience } from '@fluidframework/fluid-static';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Azure-specific {@link @fluidframework/fluid-static#ServiceAudience} implementation.
|
|
25
|
-
*
|
|
26
|
-
* @remarks Operates in terms of {@link AzureMember}s.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare class AzureAudience extends ServiceAudience<AzureMember> implements IAzureAudience {
|
|
31
|
-
/* Excluded from this release type: createServiceMember */
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
|
|
36
|
-
* when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
export declare class AzureClient {
|
|
41
|
-
private readonly properties;
|
|
42
|
-
private readonly documentServiceFactory;
|
|
43
|
-
private readonly urlResolver;
|
|
44
|
-
private readonly configProvider;
|
|
45
|
-
/**
|
|
46
|
-
* Creates a new client instance using configuration parameters.
|
|
47
|
-
* @param properties - Properties for initializing a new AzureClient instance
|
|
48
|
-
*/
|
|
49
|
-
constructor(properties: AzureClientProps);
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new detached container instance in the Azure Fluid Relay.
|
|
52
|
-
* @param containerSchema - Container schema for the new container.
|
|
53
|
-
* @returns New detached container instance along with associated services.
|
|
54
|
-
*/
|
|
55
|
-
createContainer(containerSchema: ContainerSchema): Promise<{
|
|
56
|
-
container: IFluidContainer;
|
|
57
|
-
services: AzureContainerServices;
|
|
58
|
-
}>;
|
|
59
|
-
/**
|
|
60
|
-
* Creates new detached container out of specific version of another container.
|
|
61
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
62
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
63
|
-
* @param version - Unique version of the source container in Azure Fluid Relay.
|
|
64
|
-
* It defaults to latest version if parameter not provided.
|
|
65
|
-
* @returns New detached container instance along with associated services.
|
|
66
|
-
*/
|
|
67
|
-
copyContainer(id: string, containerSchema: ContainerSchema, version?: AzureContainerVersion): Promise<{
|
|
68
|
-
container: IFluidContainer;
|
|
69
|
-
services: AzureContainerServices;
|
|
70
|
-
}>;
|
|
71
|
-
/**
|
|
72
|
-
* Accesses the existing container given its unique ID in the Azure Fluid Relay.
|
|
73
|
-
* @param id - Unique ID of the container in Azure Fluid Relay.
|
|
74
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
75
|
-
* @returns Existing container instance along with associated services.
|
|
76
|
-
*/
|
|
77
|
-
getContainer(id: string, containerSchema: ContainerSchema): Promise<{
|
|
78
|
-
container: IFluidContainer;
|
|
79
|
-
services: AzureContainerServices;
|
|
80
|
-
}>;
|
|
81
|
-
/**
|
|
82
|
-
* Get the list of versions for specific container.
|
|
83
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
84
|
-
* @param options - "Get" options. If options are not provided, API
|
|
85
|
-
* will assume maxCount of versions to retreive to be 5.
|
|
86
|
-
* @returns Array of available container versions.
|
|
87
|
-
*/
|
|
88
|
-
getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
|
|
89
|
-
private getContainerServices;
|
|
90
|
-
private createLoader;
|
|
91
|
-
private createFluidContainer;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Props for initializing a new AzureClient instance
|
|
96
|
-
*
|
|
97
|
-
* @public
|
|
98
|
-
*/
|
|
99
|
-
export declare interface AzureClientProps {
|
|
100
|
-
/**
|
|
101
|
-
* Configuration for establishing a connection with the Azure Fluid Relay.
|
|
102
|
-
*/
|
|
103
|
-
readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
|
|
104
|
-
/**
|
|
105
|
-
* Optional. A logger instance to receive diagnostic messages.
|
|
106
|
-
*/
|
|
107
|
-
readonly logger?: ITelemetryBaseLogger;
|
|
108
|
-
/**
|
|
109
|
-
* Base interface for providing configurations to control experimental features. If unsure, leave this undefined.
|
|
110
|
-
*/
|
|
111
|
-
readonly configProvider?: IConfigProviderBase;
|
|
112
|
-
readonly summaryCompression?: boolean | ICompressionStorageConfig;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Parameters for establishing a connection with the Azure Fluid Relay.
|
|
117
|
-
*
|
|
118
|
-
* @public
|
|
119
|
-
*/
|
|
120
|
-
export declare interface AzureConnectionConfig {
|
|
121
|
-
/**
|
|
122
|
-
* The type of connection. Whether we're connecting to a remote Fluid relay server or a local instance.
|
|
123
|
-
*/
|
|
124
|
-
type: AzureConnectionConfigType;
|
|
125
|
-
/**
|
|
126
|
-
* URI to the Azure Fluid Relay service discovery endpoint.
|
|
127
|
-
*/
|
|
128
|
-
endpoint: string;
|
|
129
|
-
/**
|
|
130
|
-
* Instance that provides Azure Fluid Relay endpoint tokens.
|
|
131
|
-
*/
|
|
132
|
-
tokenProvider: ITokenProvider;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* The type of connection.
|
|
137
|
-
*
|
|
138
|
-
* - "local" for local connections to a Fluid relay instance running on the localhost
|
|
139
|
-
*
|
|
140
|
-
* - "remote" for client connections to the Azure Fluid Relay service
|
|
141
|
-
*
|
|
142
|
-
* @public
|
|
143
|
-
*/
|
|
144
|
-
export declare type AzureConnectionConfigType = "local" | "remote";
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
|
|
148
|
-
* the FluidContainer is persisted in the backend and consumed by users.
|
|
149
|
-
*
|
|
150
|
-
* @remarks
|
|
151
|
-
*
|
|
152
|
-
* Returned by the {@link AzureClient} alongside a {@link @fluidframework/fluid-static#FluidContainer}.
|
|
153
|
-
*
|
|
154
|
-
* Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
|
|
155
|
-
* or DDSes to use, will not be included here but rather on the FluidContainer class itself.
|
|
156
|
-
*
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
159
|
-
export declare interface AzureContainerServices {
|
|
160
|
-
/**
|
|
161
|
-
* Provides an object that can be used to get the users that are present in this Fluid session and
|
|
162
|
-
* listeners for when the roster has any changes from users joining/leaving the session
|
|
163
|
-
*/
|
|
164
|
-
audience: IAzureAudience;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Container version metadata.
|
|
169
|
-
*
|
|
170
|
-
* @public
|
|
171
|
-
*/
|
|
172
|
-
export declare interface AzureContainerVersion {
|
|
173
|
-
/**
|
|
174
|
-
* Version ID
|
|
175
|
-
*/
|
|
176
|
-
id: string;
|
|
177
|
-
/**
|
|
178
|
-
* Time when version was generated.
|
|
179
|
-
* ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
|
|
180
|
-
*/
|
|
181
|
-
date?: string;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Token Provider implementation for connecting to an Azure Function endpoint for
|
|
186
|
-
* Azure Fluid Relay token resolution.
|
|
187
|
-
*
|
|
188
|
-
* @deprecated 1.2.0, This API will be removed in 2.0.0
|
|
189
|
-
* No replacement since it is not expected anyone will use this token provider as is
|
|
190
|
-
* See https://github.com/microsoft/FluidFramework/issues/13693 for context
|
|
191
|
-
*
|
|
192
|
-
* @public
|
|
193
|
-
*/
|
|
194
|
-
export declare class AzureFunctionTokenProvider implements ITokenProvider {
|
|
195
|
-
private readonly azFunctionUrl;
|
|
196
|
-
private readonly user?;
|
|
197
|
-
/**
|
|
198
|
-
* Creates a new instance using configuration parameters.
|
|
199
|
-
* @param azFunctionUrl - URL to Azure Function endpoint
|
|
200
|
-
* @param user - User object
|
|
201
|
-
*/
|
|
202
|
-
constructor(azFunctionUrl: string, user?: Pick<AzureMember<any>, "userId" | "userName" | "additionalDetails"> | undefined);
|
|
203
|
-
fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse>;
|
|
204
|
-
fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
|
|
205
|
-
private getToken;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Options for "Get Container Versions" API.
|
|
210
|
-
*
|
|
211
|
-
* @public
|
|
212
|
-
*/
|
|
213
|
-
export declare interface AzureGetVersionsOptions {
|
|
214
|
-
/**
|
|
215
|
-
* Max number of versions
|
|
216
|
-
*/
|
|
217
|
-
maxCount: number;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
|
|
222
|
-
*
|
|
223
|
-
* @public
|
|
224
|
-
*/
|
|
225
|
-
export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
|
|
226
|
-
/**
|
|
227
|
-
* The type of connection. Set to a remote connection.
|
|
228
|
-
*/
|
|
229
|
-
type: "local";
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
234
|
-
* {@link @fluidframework/protocol-definitions#IMember} interface to include this service-specific value.
|
|
235
|
-
* It will be returned for all audience members connected to Azure.
|
|
236
|
-
*
|
|
237
|
-
* @typeParam T - See {@link AzureMember.additionalDetails}.
|
|
238
|
-
* Note: must be JSON-serializable.
|
|
239
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
240
|
-
*
|
|
241
|
-
* @public
|
|
242
|
-
*/
|
|
243
|
-
export declare interface AzureMember<T = any> extends IMember {
|
|
244
|
-
/**
|
|
245
|
-
* {@inheritDoc AzureUser.name}
|
|
246
|
-
*/
|
|
247
|
-
userName: string;
|
|
248
|
-
/**
|
|
249
|
-
* {@inheritDoc AzureUser.additionalDetails}
|
|
250
|
-
*/
|
|
251
|
-
additionalDetails?: T;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Parameters for establishing a remote connection with the Azure Fluid Relay.
|
|
256
|
-
*
|
|
257
|
-
* @public
|
|
258
|
-
*/
|
|
259
|
-
export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
|
|
260
|
-
/**
|
|
261
|
-
* The type of connection. Set to a remote connection.
|
|
262
|
-
*/
|
|
263
|
-
type: "remote";
|
|
264
|
-
/**
|
|
265
|
-
* Unique tenant identifier.
|
|
266
|
-
*/
|
|
267
|
-
tenantId: string;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
272
|
-
* {@link @fluidframework/protocol-definitions#IUser} interface to include this service-specific value.
|
|
273
|
-
*
|
|
274
|
-
* @typeParam T - See {@link AzureUser.additionalDetails}.
|
|
275
|
-
* Note: must be JSON-serializable.
|
|
276
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
277
|
-
*
|
|
278
|
-
* @public
|
|
279
|
-
*/
|
|
280
|
-
export declare interface AzureUser<T = any> extends IUser {
|
|
281
|
-
/**
|
|
282
|
-
* The user's name
|
|
283
|
-
*/
|
|
284
|
-
name: string;
|
|
285
|
-
/**
|
|
286
|
-
* Custom, app-specific user information
|
|
287
|
-
*/
|
|
288
|
-
additionalDetails?: T;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Audience object for Azure Fluid Relay containers
|
|
293
|
-
*
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
export declare type IAzureAudience = IServiceAudience<AzureMember>;
|
|
297
|
-
|
|
298
|
-
export { ITelemetryBaseEvent }
|
|
299
|
-
|
|
300
|
-
export { ITelemetryBaseLogger }
|
|
301
|
-
|
|
302
|
-
export { ITokenClaims }
|
|
303
|
-
|
|
304
|
-
export { ITokenProvider }
|
|
305
|
-
|
|
306
|
-
export { ITokenResponse }
|
|
307
|
-
|
|
308
|
-
export { IUser }
|
|
309
|
-
|
|
310
|
-
export { ScopeType }
|
|
311
|
-
|
|
312
|
-
export { }
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { ContainerSchema } from '@fluidframework/fluid-static';
|
|
8
|
-
import { IClient } from '@fluidframework/protocol-definitions';
|
|
9
|
-
import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
|
|
10
|
-
import { IConfigProviderBase } from '@fluidframework/telemetry-utils';
|
|
11
|
-
import { IFluidContainer } from '@fluidframework/fluid-static';
|
|
12
|
-
import { IMember } from '@fluidframework/fluid-static';
|
|
13
|
-
import { IServiceAudience } from '@fluidframework/fluid-static';
|
|
14
|
-
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
15
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
16
|
-
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
17
|
-
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
18
|
-
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
19
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
20
|
-
import { ScopeType } from '@fluidframework/protocol-definitions';
|
|
21
|
-
import { ServiceAudience } from '@fluidframework/fluid-static';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Azure-specific {@link @fluidframework/fluid-static#ServiceAudience} implementation.
|
|
25
|
-
*
|
|
26
|
-
* @remarks Operates in terms of {@link AzureMember}s.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare class AzureAudience extends ServiceAudience<AzureMember> implements IAzureAudience {
|
|
31
|
-
/**
|
|
32
|
-
* Creates a {@link @fluidframework/fluid-static#ServiceAudience} from the provided
|
|
33
|
-
* {@link @fluidframework/protocol-definitions#IClient | audience member}.
|
|
34
|
-
*
|
|
35
|
-
* @param audienceMember - Audience member for which the `ServiceAudience` will be generated.
|
|
36
|
-
* Note: its {@link @fluidframework/protocol-definitions#IClient.user} is required to be an {@link AzureUser}.
|
|
37
|
-
*
|
|
38
|
-
* @internal
|
|
39
|
-
*/
|
|
40
|
-
protected createServiceMember(audienceMember: IClient): AzureMember;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
|
|
45
|
-
* when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
export declare class AzureClient {
|
|
50
|
-
private readonly properties;
|
|
51
|
-
private readonly documentServiceFactory;
|
|
52
|
-
private readonly urlResolver;
|
|
53
|
-
private readonly configProvider;
|
|
54
|
-
/**
|
|
55
|
-
* Creates a new client instance using configuration parameters.
|
|
56
|
-
* @param properties - Properties for initializing a new AzureClient instance
|
|
57
|
-
*/
|
|
58
|
-
constructor(properties: AzureClientProps);
|
|
59
|
-
/**
|
|
60
|
-
* Creates a new detached container instance in the Azure Fluid Relay.
|
|
61
|
-
* @param containerSchema - Container schema for the new container.
|
|
62
|
-
* @returns New detached container instance along with associated services.
|
|
63
|
-
*/
|
|
64
|
-
createContainer(containerSchema: ContainerSchema): Promise<{
|
|
65
|
-
container: IFluidContainer;
|
|
66
|
-
services: AzureContainerServices;
|
|
67
|
-
}>;
|
|
68
|
-
/**
|
|
69
|
-
* Creates new detached container out of specific version of another container.
|
|
70
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
71
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
72
|
-
* @param version - Unique version of the source container in Azure Fluid Relay.
|
|
73
|
-
* It defaults to latest version if parameter not provided.
|
|
74
|
-
* @returns New detached container instance along with associated services.
|
|
75
|
-
*/
|
|
76
|
-
copyContainer(id: string, containerSchema: ContainerSchema, version?: AzureContainerVersion): Promise<{
|
|
77
|
-
container: IFluidContainer;
|
|
78
|
-
services: AzureContainerServices;
|
|
79
|
-
}>;
|
|
80
|
-
/**
|
|
81
|
-
* Accesses the existing container given its unique ID in the Azure Fluid Relay.
|
|
82
|
-
* @param id - Unique ID of the container in Azure Fluid Relay.
|
|
83
|
-
* @param containerSchema - Container schema used to access data objects in the container.
|
|
84
|
-
* @returns Existing container instance along with associated services.
|
|
85
|
-
*/
|
|
86
|
-
getContainer(id: string, containerSchema: ContainerSchema): Promise<{
|
|
87
|
-
container: IFluidContainer;
|
|
88
|
-
services: AzureContainerServices;
|
|
89
|
-
}>;
|
|
90
|
-
/**
|
|
91
|
-
* Get the list of versions for specific container.
|
|
92
|
-
* @param id - Unique ID of the source container in Azure Fluid Relay.
|
|
93
|
-
* @param options - "Get" options. If options are not provided, API
|
|
94
|
-
* will assume maxCount of versions to retreive to be 5.
|
|
95
|
-
* @returns Array of available container versions.
|
|
96
|
-
*/
|
|
97
|
-
getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
|
|
98
|
-
private getContainerServices;
|
|
99
|
-
private createLoader;
|
|
100
|
-
private createFluidContainer;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Props for initializing a new AzureClient instance
|
|
105
|
-
*
|
|
106
|
-
* @public
|
|
107
|
-
*/
|
|
108
|
-
export declare interface AzureClientProps {
|
|
109
|
-
/**
|
|
110
|
-
* Configuration for establishing a connection with the Azure Fluid Relay.
|
|
111
|
-
*/
|
|
112
|
-
readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
|
|
113
|
-
/**
|
|
114
|
-
* Optional. A logger instance to receive diagnostic messages.
|
|
115
|
-
*/
|
|
116
|
-
readonly logger?: ITelemetryBaseLogger;
|
|
117
|
-
/**
|
|
118
|
-
* Base interface for providing configurations to control experimental features. If unsure, leave this undefined.
|
|
119
|
-
*/
|
|
120
|
-
readonly configProvider?: IConfigProviderBase;
|
|
121
|
-
readonly summaryCompression?: boolean | ICompressionStorageConfig;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Parameters for establishing a connection with the Azure Fluid Relay.
|
|
126
|
-
*
|
|
127
|
-
* @public
|
|
128
|
-
*/
|
|
129
|
-
export declare interface AzureConnectionConfig {
|
|
130
|
-
/**
|
|
131
|
-
* The type of connection. Whether we're connecting to a remote Fluid relay server or a local instance.
|
|
132
|
-
*/
|
|
133
|
-
type: AzureConnectionConfigType;
|
|
134
|
-
/**
|
|
135
|
-
* URI to the Azure Fluid Relay service discovery endpoint.
|
|
136
|
-
*/
|
|
137
|
-
endpoint: string;
|
|
138
|
-
/**
|
|
139
|
-
* Instance that provides Azure Fluid Relay endpoint tokens.
|
|
140
|
-
*/
|
|
141
|
-
tokenProvider: ITokenProvider;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* The type of connection.
|
|
146
|
-
*
|
|
147
|
-
* - "local" for local connections to a Fluid relay instance running on the localhost
|
|
148
|
-
*
|
|
149
|
-
* - "remote" for client connections to the Azure Fluid Relay service
|
|
150
|
-
*
|
|
151
|
-
* @public
|
|
152
|
-
*/
|
|
153
|
-
export declare type AzureConnectionConfigType = "local" | "remote";
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
|
|
157
|
-
* the FluidContainer is persisted in the backend and consumed by users.
|
|
158
|
-
*
|
|
159
|
-
* @remarks
|
|
160
|
-
*
|
|
161
|
-
* Returned by the {@link AzureClient} alongside a {@link @fluidframework/fluid-static#FluidContainer}.
|
|
162
|
-
*
|
|
163
|
-
* Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
|
|
164
|
-
* or DDSes to use, will not be included here but rather on the FluidContainer class itself.
|
|
165
|
-
*
|
|
166
|
-
* @public
|
|
167
|
-
*/
|
|
168
|
-
export declare interface AzureContainerServices {
|
|
169
|
-
/**
|
|
170
|
-
* Provides an object that can be used to get the users that are present in this Fluid session and
|
|
171
|
-
* listeners for when the roster has any changes from users joining/leaving the session
|
|
172
|
-
*/
|
|
173
|
-
audience: IAzureAudience;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Container version metadata.
|
|
178
|
-
*
|
|
179
|
-
* @public
|
|
180
|
-
*/
|
|
181
|
-
export declare interface AzureContainerVersion {
|
|
182
|
-
/**
|
|
183
|
-
* Version ID
|
|
184
|
-
*/
|
|
185
|
-
id: string;
|
|
186
|
-
/**
|
|
187
|
-
* Time when version was generated.
|
|
188
|
-
* ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
|
|
189
|
-
*/
|
|
190
|
-
date?: string;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Token Provider implementation for connecting to an Azure Function endpoint for
|
|
195
|
-
* Azure Fluid Relay token resolution.
|
|
196
|
-
*
|
|
197
|
-
* @deprecated 1.2.0, This API will be removed in 2.0.0
|
|
198
|
-
* No replacement since it is not expected anyone will use this token provider as is
|
|
199
|
-
* See https://github.com/microsoft/FluidFramework/issues/13693 for context
|
|
200
|
-
*
|
|
201
|
-
* @public
|
|
202
|
-
*/
|
|
203
|
-
export declare class AzureFunctionTokenProvider implements ITokenProvider {
|
|
204
|
-
private readonly azFunctionUrl;
|
|
205
|
-
private readonly user?;
|
|
206
|
-
/**
|
|
207
|
-
* Creates a new instance using configuration parameters.
|
|
208
|
-
* @param azFunctionUrl - URL to Azure Function endpoint
|
|
209
|
-
* @param user - User object
|
|
210
|
-
*/
|
|
211
|
-
constructor(azFunctionUrl: string, user?: Pick<AzureMember<any>, "userId" | "userName" | "additionalDetails"> | undefined);
|
|
212
|
-
fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse>;
|
|
213
|
-
fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
|
|
214
|
-
private getToken;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Options for "Get Container Versions" API.
|
|
219
|
-
*
|
|
220
|
-
* @public
|
|
221
|
-
*/
|
|
222
|
-
export declare interface AzureGetVersionsOptions {
|
|
223
|
-
/**
|
|
224
|
-
* Max number of versions
|
|
225
|
-
*/
|
|
226
|
-
maxCount: number;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
|
|
231
|
-
*
|
|
232
|
-
* @public
|
|
233
|
-
*/
|
|
234
|
-
export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
|
|
235
|
-
/**
|
|
236
|
-
* The type of connection. Set to a remote connection.
|
|
237
|
-
*/
|
|
238
|
-
type: "local";
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
243
|
-
* {@link @fluidframework/protocol-definitions#IMember} interface to include this service-specific value.
|
|
244
|
-
* It will be returned for all audience members connected to Azure.
|
|
245
|
-
*
|
|
246
|
-
* @typeParam T - See {@link AzureMember.additionalDetails}.
|
|
247
|
-
* Note: must be JSON-serializable.
|
|
248
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
249
|
-
*
|
|
250
|
-
* @public
|
|
251
|
-
*/
|
|
252
|
-
export declare interface AzureMember<T = any> extends IMember {
|
|
253
|
-
/**
|
|
254
|
-
* {@inheritDoc AzureUser.name}
|
|
255
|
-
*/
|
|
256
|
-
userName: string;
|
|
257
|
-
/**
|
|
258
|
-
* {@inheritDoc AzureUser.additionalDetails}
|
|
259
|
-
*/
|
|
260
|
-
additionalDetails?: T;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Parameters for establishing a remote connection with the Azure Fluid Relay.
|
|
265
|
-
*
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
|
|
269
|
-
/**
|
|
270
|
-
* The type of connection. Set to a remote connection.
|
|
271
|
-
*/
|
|
272
|
-
type: "remote";
|
|
273
|
-
/**
|
|
274
|
-
* Unique tenant identifier.
|
|
275
|
-
*/
|
|
276
|
-
tenantId: string;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Since Azure provides user names for all of its members, we extend the
|
|
281
|
-
* {@link @fluidframework/protocol-definitions#IUser} interface to include this service-specific value.
|
|
282
|
-
*
|
|
283
|
-
* @typeParam T - See {@link AzureUser.additionalDetails}.
|
|
284
|
-
* Note: must be JSON-serializable.
|
|
285
|
-
* Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
|
|
286
|
-
*
|
|
287
|
-
* @public
|
|
288
|
-
*/
|
|
289
|
-
export declare interface AzureUser<T = any> extends IUser {
|
|
290
|
-
/**
|
|
291
|
-
* The user's name
|
|
292
|
-
*/
|
|
293
|
-
name: string;
|
|
294
|
-
/**
|
|
295
|
-
* Custom, app-specific user information
|
|
296
|
-
*/
|
|
297
|
-
additionalDetails?: T;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Audience object for Azure Fluid Relay containers
|
|
302
|
-
*
|
|
303
|
-
* @public
|
|
304
|
-
*/
|
|
305
|
-
export declare type IAzureAudience = IServiceAudience<AzureMember>;
|
|
306
|
-
|
|
307
|
-
export { ITelemetryBaseEvent }
|
|
308
|
-
|
|
309
|
-
export { ITelemetryBaseLogger }
|
|
310
|
-
|
|
311
|
-
export { ITokenClaims }
|
|
312
|
-
|
|
313
|
-
export { ITokenProvider }
|
|
314
|
-
|
|
315
|
-
export { ITokenResponse }
|
|
316
|
-
|
|
317
|
-
export { IUser }
|
|
318
|
-
|
|
319
|
-
export { ScopeType }
|
|
320
|
-
|
|
321
|
-
export { }
|