@fluidframework/azure-client 2.0.0-dev-rc.3.0.0.254274 → 2.0.0-dev-rc.3.0.0.254674

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.
@@ -1,254 +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 { ICompressionStorageConfig } from '@fluidframework/driver-utils';
9
- import { IConfigProviderBase } from '@fluidframework/core-interfaces';
10
- import { IFluidContainer } from '@fluidframework/fluid-static';
11
- import { IMember } from '@fluidframework/fluid-static';
12
- import { IServiceAudience } from '@fluidframework/fluid-static';
13
- import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
14
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import { ITokenProvider } from '@fluidframework/routerlicious-driver';
17
- import { ITokenResponse } from '@fluidframework/routerlicious-driver';
18
- import { IUser } from '@fluidframework/protocol-definitions';
19
- import { ScopeType } from '@fluidframework/protocol-definitions';
20
-
21
- /**
22
- * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
23
- * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
24
- * @public
25
- */
26
- export declare class AzureClient {
27
- private readonly properties;
28
- private readonly documentServiceFactory;
29
- private readonly urlResolver;
30
- private readonly configProvider;
31
- /**
32
- * Creates a new client instance using configuration parameters.
33
- * @param properties - Properties for initializing a new AzureClient instance
34
- */
35
- constructor(properties: AzureClientProps);
36
- /**
37
- * Creates a new detached container instance in the Azure Fluid Relay.
38
- * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
39
- * (normally not explicitly specified.)
40
- * @param containerSchema - Container schema for the new container.
41
- * @returns New detached container instance along with associated services.
42
- */
43
- createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema): Promise<{
44
- container: IFluidContainer<TContainerSchema>;
45
- services: AzureContainerServices;
46
- }>;
47
- /**
48
- * Creates new detached container out of specific version of another container.
49
- * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
50
- * (normally not explicitly specified.)
51
- * @param id - Unique ID of the source container in Azure Fluid Relay.
52
- * @param containerSchema - Container schema used to access data objects in the container.
53
- * @param version - Unique version of the source container in Azure Fluid Relay.
54
- * It defaults to latest version if parameter not provided.
55
- * @returns New detached container instance along with associated services.
56
- */
57
- copyContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version?: AzureContainerVersion): Promise<{
58
- container: IFluidContainer<TContainerSchema>;
59
- services: AzureContainerServices;
60
- }>;
61
- /**
62
- * Accesses the existing container given its unique ID in the Azure Fluid Relay.
63
- * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
64
- * (normally not explicitly specified.)
65
- * @param id - Unique ID of the container in Azure Fluid Relay.
66
- * @param containerSchema - Container schema used to access data objects in the container.
67
- * @returns Existing container instance along with associated services.
68
- */
69
- getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema): Promise<{
70
- container: IFluidContainer<TContainerSchema>;
71
- services: AzureContainerServices;
72
- }>;
73
- /**
74
- * Get the list of versions for specific container.
75
- * @param id - Unique ID of the source container in Azure Fluid Relay.
76
- * @param options - "Get" options. If options are not provided, API
77
- * will assume maxCount of versions to retrieve to be 5.
78
- * @returns Array of available container versions.
79
- */
80
- getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
81
- private getContainerServices;
82
- private createLoader;
83
- private createFluidContainer;
84
- private getContainerEntryPoint;
85
- }
86
-
87
- /**
88
- * Props for initializing a new AzureClient instance
89
- * @public
90
- */
91
- export declare interface AzureClientProps {
92
- /**
93
- * Configuration for establishing a connection with the Azure Fluid Relay.
94
- */
95
- readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
96
- /**
97
- * Optional. A logger instance to receive diagnostic messages.
98
- */
99
- readonly logger?: ITelemetryBaseLogger;
100
- /**
101
- * Base interface for providing configurations to control experimental features. If unsure, leave this undefined.
102
- */
103
- readonly configProvider?: IConfigProviderBase;
104
- readonly summaryCompression?: boolean | ICompressionStorageConfig;
105
- }
106
-
107
- /**
108
- * Parameters for establishing a connection with the Azure Fluid Relay.
109
- * @public
110
- */
111
- export declare interface AzureConnectionConfig {
112
- /**
113
- * The type of connection. Whether we're connecting to a remote Fluid relay server or a local instance.
114
- */
115
- type: AzureConnectionConfigType;
116
- /**
117
- * URI to the Azure Fluid Relay service discovery endpoint.
118
- */
119
- endpoint: string;
120
- /**
121
- * Instance that provides Azure Fluid Relay endpoint tokens.
122
- */
123
- tokenProvider: ITokenProvider;
124
- }
125
-
126
- /**
127
- * The type of connection.
128
- *
129
- * - "local" for local connections to a Fluid relay instance running on the localhost
130
- *
131
- * - "remote" for client connections to the Azure Fluid Relay service
132
- * @public
133
- */
134
- export declare type AzureConnectionConfigType = "local" | "remote";
135
-
136
- /**
137
- * Holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
138
- * the FluidContainer is persisted in the backend and consumed by users.
139
- *
140
- * @remarks
141
- *
142
- * Returned by the {@link AzureClient} alongside a {@link @fluidframework/fluid-static#FluidContainer}.
143
- *
144
- * Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
145
- * or DDSes to use, will not be included here but rather on the FluidContainer class itself.
146
- * @public
147
- */
148
- export declare interface AzureContainerServices {
149
- /**
150
- * Provides an object that can be used to get the users that are present in this Fluid session and
151
- * listeners for when the roster has any changes from users joining/leaving the session
152
- */
153
- audience: IAzureAudience;
154
- }
155
-
156
- /**
157
- * Container version metadata.
158
- * @public
159
- */
160
- export declare interface AzureContainerVersion {
161
- /**
162
- * Version ID
163
- */
164
- id: string;
165
- /**
166
- * Time when version was generated.
167
- * ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
168
- */
169
- date?: string;
170
- }
171
-
172
- /* Excluded from this release type: AzureFunctionTokenProvider */
173
-
174
- /**
175
- * Options for "Get Container Versions" API.
176
- * @public
177
- */
178
- export declare interface AzureGetVersionsOptions {
179
- /**
180
- * Max number of versions
181
- */
182
- maxCount: number;
183
- }
184
-
185
- /**
186
- * Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
187
- * @public
188
- */
189
- export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
190
- /**
191
- * The type of connection. Set to a remote connection.
192
- */
193
- type: "local";
194
- }
195
-
196
- /**
197
- * Since Azure provides user names for all of its members, we extend the
198
- * {@link @fluidframework/fluid-static#IMember} interface to include this service-specific value.
199
- * It will be returned for all audience members connected to Azure.
200
- *
201
- * @typeParam T - See {@link AzureMember.additionalDetails}.
202
- * Note: must be JSON-serializable.
203
- * Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
204
- * @public
205
- */
206
- export declare interface AzureMember<T = any> extends IMember {
207
- /**
208
- * {@inheritDoc AzureUser.name}
209
- */
210
- userName: string;
211
- /**
212
- * {@inheritDoc AzureUser.additionalDetails}
213
- */
214
- additionalDetails?: T;
215
- }
216
-
217
- /**
218
- * Parameters for establishing a remote connection with the Azure Fluid Relay.
219
- * @public
220
- */
221
- export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
222
- /**
223
- * The type of connection. Set to a remote connection.
224
- */
225
- type: "remote";
226
- /**
227
- * Unique tenant identifier.
228
- */
229
- tenantId: string;
230
- }
231
-
232
- /* Excluded from this release type: AzureUser */
233
-
234
- /**
235
- * Audience object for Azure Fluid Relay containers
236
- * @public
237
- */
238
- export declare type IAzureAudience = IServiceAudience<AzureMember>;
239
-
240
- export { ITelemetryBaseEvent }
241
-
242
- export { ITelemetryBaseLogger }
243
-
244
- export { ITokenClaims }
245
-
246
- export { ITokenProvider }
247
-
248
- export { ITokenResponse }
249
-
250
- export { IUser }
251
-
252
- export { ScopeType }
253
-
254
- export { }
@@ -1,254 +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 { ICompressionStorageConfig } from '@fluidframework/driver-utils';
9
- import { IConfigProviderBase } from '@fluidframework/core-interfaces';
10
- import { IFluidContainer } from '@fluidframework/fluid-static';
11
- import { IMember } from '@fluidframework/fluid-static';
12
- import { IServiceAudience } from '@fluidframework/fluid-static';
13
- import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
14
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import { ITokenProvider } from '@fluidframework/routerlicious-driver';
17
- import { ITokenResponse } from '@fluidframework/routerlicious-driver';
18
- import { IUser } from '@fluidframework/protocol-definitions';
19
- import { ScopeType } from '@fluidframework/protocol-definitions';
20
-
21
- /**
22
- * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
23
- * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
24
- * @public
25
- */
26
- export declare class AzureClient {
27
- private readonly properties;
28
- private readonly documentServiceFactory;
29
- private readonly urlResolver;
30
- private readonly configProvider;
31
- /**
32
- * Creates a new client instance using configuration parameters.
33
- * @param properties - Properties for initializing a new AzureClient instance
34
- */
35
- constructor(properties: AzureClientProps);
36
- /**
37
- * Creates a new detached container instance in the Azure Fluid Relay.
38
- * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
39
- * (normally not explicitly specified.)
40
- * @param containerSchema - Container schema for the new container.
41
- * @returns New detached container instance along with associated services.
42
- */
43
- createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema): Promise<{
44
- container: IFluidContainer<TContainerSchema>;
45
- services: AzureContainerServices;
46
- }>;
47
- /**
48
- * Creates new detached container out of specific version of another container.
49
- * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
50
- * (normally not explicitly specified.)
51
- * @param id - Unique ID of the source container in Azure Fluid Relay.
52
- * @param containerSchema - Container schema used to access data objects in the container.
53
- * @param version - Unique version of the source container in Azure Fluid Relay.
54
- * It defaults to latest version if parameter not provided.
55
- * @returns New detached container instance along with associated services.
56
- */
57
- copyContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version?: AzureContainerVersion): Promise<{
58
- container: IFluidContainer<TContainerSchema>;
59
- services: AzureContainerServices;
60
- }>;
61
- /**
62
- * Accesses the existing container given its unique ID in the Azure Fluid Relay.
63
- * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
64
- * (normally not explicitly specified.)
65
- * @param id - Unique ID of the container in Azure Fluid Relay.
66
- * @param containerSchema - Container schema used to access data objects in the container.
67
- * @returns Existing container instance along with associated services.
68
- */
69
- getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema): Promise<{
70
- container: IFluidContainer<TContainerSchema>;
71
- services: AzureContainerServices;
72
- }>;
73
- /**
74
- * Get the list of versions for specific container.
75
- * @param id - Unique ID of the source container in Azure Fluid Relay.
76
- * @param options - "Get" options. If options are not provided, API
77
- * will assume maxCount of versions to retrieve to be 5.
78
- * @returns Array of available container versions.
79
- */
80
- getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
81
- private getContainerServices;
82
- private createLoader;
83
- private createFluidContainer;
84
- private getContainerEntryPoint;
85
- }
86
-
87
- /**
88
- * Props for initializing a new AzureClient instance
89
- * @public
90
- */
91
- export declare interface AzureClientProps {
92
- /**
93
- * Configuration for establishing a connection with the Azure Fluid Relay.
94
- */
95
- readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
96
- /**
97
- * Optional. A logger instance to receive diagnostic messages.
98
- */
99
- readonly logger?: ITelemetryBaseLogger;
100
- /**
101
- * Base interface for providing configurations to control experimental features. If unsure, leave this undefined.
102
- */
103
- readonly configProvider?: IConfigProviderBase;
104
- readonly summaryCompression?: boolean | ICompressionStorageConfig;
105
- }
106
-
107
- /**
108
- * Parameters for establishing a connection with the Azure Fluid Relay.
109
- * @public
110
- */
111
- export declare interface AzureConnectionConfig {
112
- /**
113
- * The type of connection. Whether we're connecting to a remote Fluid relay server or a local instance.
114
- */
115
- type: AzureConnectionConfigType;
116
- /**
117
- * URI to the Azure Fluid Relay service discovery endpoint.
118
- */
119
- endpoint: string;
120
- /**
121
- * Instance that provides Azure Fluid Relay endpoint tokens.
122
- */
123
- tokenProvider: ITokenProvider;
124
- }
125
-
126
- /**
127
- * The type of connection.
128
- *
129
- * - "local" for local connections to a Fluid relay instance running on the localhost
130
- *
131
- * - "remote" for client connections to the Azure Fluid Relay service
132
- * @public
133
- */
134
- export declare type AzureConnectionConfigType = "local" | "remote";
135
-
136
- /**
137
- * Holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
138
- * the FluidContainer is persisted in the backend and consumed by users.
139
- *
140
- * @remarks
141
- *
142
- * Returned by the {@link AzureClient} alongside a {@link @fluidframework/fluid-static#FluidContainer}.
143
- *
144
- * Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
145
- * or DDSes to use, will not be included here but rather on the FluidContainer class itself.
146
- * @public
147
- */
148
- export declare interface AzureContainerServices {
149
- /**
150
- * Provides an object that can be used to get the users that are present in this Fluid session and
151
- * listeners for when the roster has any changes from users joining/leaving the session
152
- */
153
- audience: IAzureAudience;
154
- }
155
-
156
- /**
157
- * Container version metadata.
158
- * @public
159
- */
160
- export declare interface AzureContainerVersion {
161
- /**
162
- * Version ID
163
- */
164
- id: string;
165
- /**
166
- * Time when version was generated.
167
- * ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
168
- */
169
- date?: string;
170
- }
171
-
172
- /* Excluded from this release type: AzureFunctionTokenProvider */
173
-
174
- /**
175
- * Options for "Get Container Versions" API.
176
- * @public
177
- */
178
- export declare interface AzureGetVersionsOptions {
179
- /**
180
- * Max number of versions
181
- */
182
- maxCount: number;
183
- }
184
-
185
- /**
186
- * Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
187
- * @public
188
- */
189
- export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
190
- /**
191
- * The type of connection. Set to a remote connection.
192
- */
193
- type: "local";
194
- }
195
-
196
- /**
197
- * Since Azure provides user names for all of its members, we extend the
198
- * {@link @fluidframework/fluid-static#IMember} interface to include this service-specific value.
199
- * It will be returned for all audience members connected to Azure.
200
- *
201
- * @typeParam T - See {@link AzureMember.additionalDetails}.
202
- * Note: must be JSON-serializable.
203
- * Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
204
- * @public
205
- */
206
- export declare interface AzureMember<T = any> extends IMember {
207
- /**
208
- * {@inheritDoc AzureUser.name}
209
- */
210
- userName: string;
211
- /**
212
- * {@inheritDoc AzureUser.additionalDetails}
213
- */
214
- additionalDetails?: T;
215
- }
216
-
217
- /**
218
- * Parameters for establishing a remote connection with the Azure Fluid Relay.
219
- * @public
220
- */
221
- export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
222
- /**
223
- * The type of connection. Set to a remote connection.
224
- */
225
- type: "remote";
226
- /**
227
- * Unique tenant identifier.
228
- */
229
- tenantId: string;
230
- }
231
-
232
- /* Excluded from this release type: AzureUser */
233
-
234
- /**
235
- * Audience object for Azure Fluid Relay containers
236
- * @public
237
- */
238
- export declare type IAzureAudience = IServiceAudience<AzureMember>;
239
-
240
- export { ITelemetryBaseEvent }
241
-
242
- export { ITelemetryBaseLogger }
243
-
244
- export { ITokenClaims }
245
-
246
- export { ITokenProvider }
247
-
248
- export { ITokenResponse }
249
-
250
- export { IUser }
251
-
252
- export { ScopeType }
253
-
254
- export { }