@fluidframework/azure-client 2.0.0-dev.7.4.0.217884 → 2.0.0-dev.7.4.0.221926

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/.attw.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "ignoreRules": ["false-cjs"]
3
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @fluidframework/azure-client
2
2
 
3
+ ## 2.0.0-internal.7.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - azure-client: Deprecated FluidStatic Classes ([#18402](https://github.com/microsoft/FluidFramework/issues/18402)) [589ec39de5](https://github.com/microsoft/FluidFramework/commits/589ec39de52116c7f782319e6f6aa61bc5aa9964)
8
+
9
+ Several FluidStatic classes were unnecessarily exposed. They have been replaced with creation functions. This helps us
10
+ keep implementations decoupled from usage which is easier to maintain and extend. It has very minimal impact on the
11
+ public surface area of downstream packages. The deprecated classes are as follows:
12
+
13
+ - `AzureAudience` (use `IAzureAudience` instead)
14
+ - `TinyliciousAudience` (use `ITinyliciousAudience` instead)
15
+ - `DOProviderContainerRuntimeFactory`
16
+ - `FluidContainer`
17
+ - `ServiceAudience`
18
+
3
19
  ## 2.0.0-internal.7.3.0
4
20
 
5
21
  Dependency updates only.
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
3
  "extends": "../../../common/build/build-common/api-extractor-base.json",
4
- "dtsRollup": {
5
- "enabled": true
6
- },
7
4
  "messages": {
8
5
  "extractorMessageReporting": {
9
6
  // TODO: Add missing documentation and remove this rule override
@@ -25,7 +25,7 @@ export class AzureAudience extends ServiceAudience<AzureMember> implements IAzur
25
25
  protected createServiceMember(audienceMember: IClient): AzureMember;
26
26
  }
27
27
 
28
- // @internal
28
+ // @alpha
29
29
  export class AzureClient {
30
30
  constructor(properties: AzureClientProps);
31
31
  copyContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version?: AzureContainerVersion): Promise<{
@@ -43,7 +43,7 @@ export class AzureClient {
43
43
  getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
44
44
  }
45
45
 
46
- // @internal
46
+ // @alpha
47
47
  export interface AzureClientProps {
48
48
  readonly configProvider?: IConfigProviderBase;
49
49
  readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
@@ -52,22 +52,22 @@ export interface AzureClientProps {
52
52
  readonly summaryCompression?: boolean | ICompressionStorageConfig;
53
53
  }
54
54
 
55
- // @internal
55
+ // @alpha
56
56
  export interface AzureConnectionConfig {
57
57
  endpoint: string;
58
58
  tokenProvider: ITokenProvider;
59
59
  type: AzureConnectionConfigType;
60
60
  }
61
61
 
62
- // @internal
62
+ // @alpha
63
63
  export type AzureConnectionConfigType = "local" | "remote";
64
64
 
65
- // @internal
65
+ // @alpha
66
66
  export interface AzureContainerServices {
67
67
  audience: IAzureAudience;
68
68
  }
69
69
 
70
- // @internal
70
+ // @alpha
71
71
  export interface AzureContainerVersion {
72
72
  date?: string;
73
73
  id: string;
@@ -82,23 +82,23 @@ export class AzureFunctionTokenProvider implements ITokenProvider {
82
82
  fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
83
83
  }
84
84
 
85
- // @internal
85
+ // @alpha
86
86
  export interface AzureGetVersionsOptions {
87
87
  maxCount: number;
88
88
  }
89
89
 
90
- // @internal
90
+ // @alpha
91
91
  export interface AzureLocalConnectionConfig extends AzureConnectionConfig {
92
92
  type: "local";
93
93
  }
94
94
 
95
- // @internal
95
+ // @alpha
96
96
  export interface AzureMember<T = any> extends IMember {
97
97
  additionalDetails?: T;
98
98
  userName: string;
99
99
  }
100
100
 
101
- // @internal
101
+ // @alpha
102
102
  export interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
103
103
  tenantId: string;
104
104
  type: "remote";
@@ -110,7 +110,7 @@ export interface AzureUser<T = any> extends IUser {
110
110
  name: string;
111
111
  }
112
112
 
113
- // @internal
113
+ // @alpha
114
114
  export type IAzureAudience = IServiceAudience<AzureMember>;
115
115
 
116
116
  export { ITelemetryBaseEvent }
Binary file
@@ -28,7 +28,7 @@ const MAX_VERSION_COUNT = 5;
28
28
  /**
29
29
  * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
30
30
  * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
31
- * @internal
31
+ * @alpha
32
32
  */
33
33
  class AzureClient {
34
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.cjs","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,iFAI+C;AAC/C,uEAA0D;AAK1D,+DAAuE;AACvE,+DAOsC;AACtC,+EAAiF;AACjF,+EAA2F;AAG3F,2DAAoD;AACpD,uDAA4D;AAC5D,6DAAmF;AAQnF,uCAAwD;AAExD;;GAEG;AACH,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,WAAW,GAAG,CAAC,oBAA2C,EAAU,EAAE;IAC3E,OAAO,IAAA,qCAA6B,EAAC,oBAAoB,CAAC;QACzD,CAAC,CAAC,oBAAoB,CAAC,QAAQ;QAC/B,CAAC,CAAC,oBAAoB,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B;;;;GAIG;AACH,MAAa,WAAW;IAKvB;;;OAGG;IACH,YAAoC,UAA4B;QAA5B,eAAU,GAAV,UAAU,CAAkB;QAC/D,wCAAwC;QACxC,UAAU,CAAC,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnF,IAAI,CAAC,WAAW,GAAG,IAAI,mCAAgB,EAAE,CAAC;QAC1C,8EAA8E;QAC9E,6FAA6F;QAC7F,MAAM,kBAAkB,GAAG,IAAA,qCAA6B,E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CAAC;YACzC,IAAI,SAAS,CAAC,WAAW,KAAK,SAAS,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;aACpE;YACD,OAAO,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,CAAC,CAAC;QACF,MAAM,cAAc,GAAG,IAAA,mCAAoB,EAAmB;YAC7D,SAAS;YACT,cAAc;SACd,CAAC,CAAC;QACH,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;QAC/B,OAAO,cAAc,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,sBAAsB,CAAC,SAAqB;QACzD,MAAM,cAAc,GACnB,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACjC,IAAA,mBAAM,EAAC,cAAc,KAAK,SAAS,EAAE,uBAAuB,CAAC,CAAC;QAC9D,uHAAuH;QACvH,IAAI,cAAc,CAAC,eAAe,KAAK,SAAS,EAAE;YACjD,OAAO,cAAiC,CAAC;SACzC;QACD,OAAO,cAAc,CAAC,eAAe,CAAC;IACvC,CAAC;CAED;AArQD,kCAqQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tAttachState,\n\ttype IContainer,\n\ttype IFluidModuleWithDetails,\n} from \"@fluidframework/container-definitions\";\nimport { Loader } from \"@fluidframework/container-loader\";\nimport {\n\ttype IDocumentServiceFactory,\n\ttype IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { applyStorageCompression } from \"@fluidframework/driver-utils\";\nimport {\n\ttype ContainerSchema,\n\tcreateDOProviderContainerRuntimeFactory,\n\tcreateFluidContainer,\n\ttype IFluidContainer,\n\ttype IRootDataObject,\n\tcreateServiceAudience,\n} from \"@fluidframework/fluid-static\";\nimport { type IClient, SummaryType } from \"@fluidframework/protocol-definitions\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver\";\n\nimport { type IConfigProviderBase, type FluidObject } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport { createAzureAudienceMember } from \"./AzureAudience\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } from \"./AzureUrlResolver\";\nimport {\n\ttype AzureClientProps,\n\ttype AzureConnectionConfig,\n\ttype AzureContainerServices,\n\ttype AzureContainerVersion,\n\ttype AzureGetVersionsOptions,\n} from \"./interfaces\";\nimport { isAzureRemoteConnectionConfig } from \"./utils\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nconst LOCAL_MODE_TENANT_ID = \"local\";\nconst getTenantId = (connectionProperties: AzureConnectionConfig): string => {\n\treturn isAzureRemoteConnectionConfig(connectionProperties)\n\t\t? connectionProperties.tenantId\n\t\t: LOCAL_MODE_TENANT_ID;\n};\n\nconst MAX_VERSION_COUNT = 5;\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,\n * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.\n * @internal\n */\nexport class AzureClient {\n\tprivate readonly documentServiceFactory: IDocumentServiceFactory;\n\tprivate readonly urlResolver: IUrlResolver;\n\tprivate readonly configProvider: IConfigProviderBase | undefined;\n\n\t/**\n\t * Creates a new client instance using configuration parameters.\n\t * @param properties - Properties for initializing a new AzureClient instance\n\t */\n\tpublic constructor(private readonly properties: AzureClientProps) {\n\t\t// remove trailing slash from URL if any\n\t\tproperties.connection.endpoint = properties.connection.endpoint.replace(/\\/$/, \"\");\n\t\tthis.urlResolver = new AzureUrlResolver();\n\t\t// The local service implementation differs from the Azure Fluid Relay in blob\n\t\t// storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n\t\tconst isRemoteConnection = isAzureRemoteConnectionConfig(this.properties.connection);\n\t\tconst origDocumentServiceFactory: IDocumentServiceFactory =\n\t\t\tnew RouterliciousDocumentServiceFactory(this.properties.connection.tokenProvider, {\n\t\t\t\tenableWholeSummaryUpload: isRemoteConnection,\n\t\t\t\tenableDiscovery: isRemoteConnection,\n\t\t\t});\n\n\t\tthis.documentServiceFactory = applyStorageCompression(\n\t\t\torigDocumentServiceFactory,\n\t\t\tproperties.summaryCompression,\n\t\t);\n\t\tthis.configProvider = properties.configProvider;\n\t}\n\n\t/**\n\t * Creates a new detached container instance in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param containerSchema - Container schema for the new container.\n\t * @returns New detached container instance along with associated services.\n\t */\n\tpublic async createContainer<TContainerSchema extends ContainerSchema>(\n\t\tcontainerSchema: TContainerSchema,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema);\n\n\t\tconst container = await loader.createDetachedContainer({\n\t\t\tpackage: \"no-dynamic-package\",\n\t\t\tconfig: {},\n\t\t});\n\n\t\tconst fluidContainer = await this.createFluidContainer<TContainerSchema>(\n\t\t\tcontainer,\n\t\t\tthis.properties.connection,\n\t\t);\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Creates new detached container out of specific version of another container.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @param version - Unique version of the source container in Azure Fluid Relay.\n\t * It defaults to latest version if parameter not provided.\n\t * @returns New detached container instance along with associated services.\n\t */\n\tpublic async copyContainer<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t\tversion?: AzureContainerVersion,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema);\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.properties.connection.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst sourceContainer = await loader.resolve({ url: url.href });\n\n\t\tif (sourceContainer.resolvedUrl === undefined) {\n\t\t\tthrow new Error(\"Source container cannot resolve URL.\");\n\t\t}\n\n\t\tconst documentService = await this.documentServiceFactory.createDocumentService(\n\t\t\tsourceContainer.resolvedUrl,\n\t\t);\n\t\tconst storage = await documentService.connectToStorage();\n\t\tconst handle = {\n\t\t\ttype: SummaryType.Handle,\n\t\t\thandleType: SummaryType.Tree,\n\t\t\thandle: version?.id ?? \"latest\",\n\t\t};\n\t\tconst tree = await storage.downloadSummary(handle);\n\n\t\tconst container = await loader.rehydrateDetachedContainerFromSnapshot(JSON.stringify(tree));\n\n\t\tconst fluidContainer = await this.createFluidContainer<TContainerSchema>(\n\t\t\tcontainer,\n\t\t\tthis.properties.connection,\n\t\t);\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @returns Existing container instance along with associated services.\n\t */\n\tpublic async getContainer<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema);\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.properties.connection.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst container = await loader.resolve({ url: url.href });\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Get the list of versions for specific container.\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param options - \"Get\" options. If options are not provided, API\n\t * will assume maxCount of versions to retreive to be 5.\n\t * @returns Array of available container versions.\n\t */\n\tpublic async getContainerVersions(\n\t\tid: string,\n\t\toptions?: AzureGetVersionsOptions,\n\t): Promise<AzureContainerVersion[]> {\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.properties.connection.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\n\t\tconst resolvedUrl = await this.urlResolver.resolve({ url: url.href });\n\t\tif (!resolvedUrl) {\n\t\t\tthrow new Error(\"Unable to resolved URL\");\n\t\t}\n\t\tconst documentService =\n\t\t\tawait this.documentServiceFactory.createDocumentService(resolvedUrl);\n\t\tconst storage = await documentService.connectToStorage();\n\n\t\t// External API uses null\n\t\t// eslint-disable-next-line unicorn/no-null\n\t\tconst versions = await storage.getVersions(null, options?.maxCount ?? MAX_VERSION_COUNT);\n\n\t\treturn versions.map((item) => {\n\t\t\treturn { id: item.id, date: item.date };\n\t\t});\n\t}\n\n\tprivate getContainerServices(container: IContainer): AzureContainerServices {\n\t\treturn {\n\t\t\taudience: createServiceAudience({\n\t\t\t\tcontainer,\n\t\t\t\tcreateServiceMember: createAzureAudienceMember,\n\t\t\t}),\n\t\t};\n\t}\n\n\tprivate createLoader(schema: ContainerSchema): Loader {\n\t\tconst runtimeFactory = createDOProviderContainerRuntimeFactory({ schema });\n\t\tconst load = async (): Promise<IFluidModuleWithDetails> => {\n\t\t\treturn {\n\t\t\t\tmodule: { fluidExport: runtimeFactory },\n\t\t\t\tdetails: { package: \"no-dynamic-package\", config: {} },\n\t\t\t};\n\t\t};\n\n\t\tconst codeLoader = { load };\n\t\tconst client: IClient = {\n\t\t\tdetails: {\n\t\t\t\tcapabilities: { interactive: true },\n\t\t\t},\n\t\t\tpermission: [],\n\t\t\tscopes: [],\n\t\t\tuser: { id: \"\" },\n\t\t\tmode: \"write\",\n\t\t};\n\n\t\treturn new Loader({\n\t\t\turlResolver: this.urlResolver,\n\t\t\tdocumentServiceFactory: this.documentServiceFactory,\n\t\t\tcodeLoader,\n\t\t\tlogger: this.properties.logger,\n\t\t\toptions: { client },\n\t\t\tconfigProvider: this.configProvider,\n\t\t});\n\t}\n\n\tprivate async createFluidContainer<TContainerSchema extends ContainerSchema>(\n\t\tcontainer: IContainer,\n\t\tconnection: AzureConnectionConfig,\n\t): Promise<IFluidContainer<TContainerSchema>> {\n\t\tconst createNewRequest = createAzureCreateNewRequest(\n\t\t\tconnection.endpoint,\n\t\t\tgetTenantId(connection),\n\t\t);\n\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\n\t\t/**\n\t\t * See {@link FluidContainer.attach}\n\t\t */\n\t\tconst attach = async (): Promise<string> => {\n\t\t\tif (container.attachState !== AttachState.Detached) {\n\t\t\t\tthrow new Error(\"Cannot attach container. Container is not in detached state\");\n\t\t\t}\n\t\t\tawait container.attach(createNewRequest);\n\t\t\tif (container.resolvedUrl === undefined) {\n\t\t\t\tthrow new Error(\"Resolved Url not available on attached container\");\n\t\t\t}\n\t\t\treturn container.resolvedUrl.id;\n\t\t};\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tfluidContainer.attach = attach;\n\t\treturn fluidContainer;\n\t}\n\n\tprivate async getContainerEntryPoint(container: IContainer): Promise<IRootDataObject> {\n\t\tconst rootDataObject: FluidObject<IRootDataObject> | undefined =\n\t\t\tawait container.getEntryPoint();\n\t\tassert(rootDataObject !== undefined, \"entryPoint must exist\");\n\t\t// ! This \"if\" is needed for back-compat (older instances of IRootDataObject may not have the IRootDataObject property)\n\t\tif (rootDataObject.IRootDataObject === undefined) {\n\t\t\treturn rootDataObject as IRootDataObject;\n\t\t}\n\t\treturn rootDataObject.IRootDataObject;\n\t}\n\t// #endregion\n}\n"]}
1
+ {"version":3,"file":"AzureClient.cjs","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,iFAI+C;AAC/C,uEAA0D;AAK1D,+DAAuE;AACvE,+DAOsC;AACtC,+EAAiF;AACjF,+EAA2F;AAG3F,2DAAoD;AACpD,uDAA4D;AAC5D,6DAAmF;AAQnF,uCAAwD;AAExD;;GAEG;AACH,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,WAAW,GAAG,CAAC,oBAA2C,EAAU,EAAE;IAC3E,OAAO,IAAA,qCAA6B,EAAC,oBAAoB,CAAC;QACzD,CAAC,CAAC,oBAAoB,CAAC,QAAQ;QAC/B,CAAC,CAAC,oBAAoB,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B;;;;GAIG;AACH,MAAa,WAAW;IAKvB;;;OAGG;IACH,YAAoC,UAA4B;QAA5B,eAAU,GAAV,UAAU,CAAkB;QAC/D,wCAAwC;QACxC,UAAU,CAAC,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnF,IAAI,CAAC,WAAW,GAAG,IAAI,mCAAgB,EAAE,CAAC;QAC1C,8EAA8E;QAC9E,6FAA6F;QAC7F,MAAM,kBAA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AAM,CAAC,gBAAgB,CAAC,CAAC;YACzC,IAAI,SAAS,CAAC,WAAW,KAAK,SAAS,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;aACpE;YACD,OAAO,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,CAAC,CAAC;QACF,MAAM,cAAc,GAAG,IAAA,mCAAoB,EAAmB;YAC7D,SAAS;YACT,cAAc;SACd,CAAC,CAAC;QACH,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;QAC/B,OAAO,cAAc,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,sBAAsB,CAAC,SAAqB;QACzD,MAAM,cAAc,GACnB,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACjC,IAAA,mBAAM,EAAC,cAAc,KAAK,SAAS,EAAE,uBAAuB,CAAC,CAAC;QAC9D,uHAAuH;QACvH,IAAI,cAAc,CAAC,eAAe,KAAK,SAAS,EAAE;YACjD,OAAO,cAAiC,CAAC;SACzC;QACD,OAAO,cAAc,CAAC,eAAe,CAAC;IACvC,CAAC;CAED;AArQD,kCAqQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tAttachState,\n\ttype IContainer,\n\ttype IFluidModuleWithDetails,\n} from \"@fluidframework/container-definitions\";\nimport { Loader } from \"@fluidframework/container-loader\";\nimport {\n\ttype IDocumentServiceFactory,\n\ttype IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { applyStorageCompression } from \"@fluidframework/driver-utils\";\nimport {\n\ttype ContainerSchema,\n\tcreateDOProviderContainerRuntimeFactory,\n\tcreateFluidContainer,\n\ttype IFluidContainer,\n\ttype IRootDataObject,\n\tcreateServiceAudience,\n} from \"@fluidframework/fluid-static\";\nimport { type IClient, SummaryType } from \"@fluidframework/protocol-definitions\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver\";\n\nimport { type IConfigProviderBase, type FluidObject } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport { createAzureAudienceMember } from \"./AzureAudience\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } from \"./AzureUrlResolver\";\nimport {\n\ttype AzureClientProps,\n\ttype AzureConnectionConfig,\n\ttype AzureContainerServices,\n\ttype AzureContainerVersion,\n\ttype AzureGetVersionsOptions,\n} from \"./interfaces\";\nimport { isAzureRemoteConnectionConfig } from \"./utils\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nconst LOCAL_MODE_TENANT_ID = \"local\";\nconst getTenantId = (connectionProperties: AzureConnectionConfig): string => {\n\treturn isAzureRemoteConnectionConfig(connectionProperties)\n\t\t? connectionProperties.tenantId\n\t\t: LOCAL_MODE_TENANT_ID;\n};\n\nconst MAX_VERSION_COUNT = 5;\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,\n * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.\n * @alpha\n */\nexport class AzureClient {\n\tprivate readonly documentServiceFactory: IDocumentServiceFactory;\n\tprivate readonly urlResolver: IUrlResolver;\n\tprivate readonly configProvider: IConfigProviderBase | undefined;\n\n\t/**\n\t * Creates a new client instance using configuration parameters.\n\t * @param properties - Properties for initializing a new AzureClient instance\n\t */\n\tpublic constructor(private readonly properties: AzureClientProps) {\n\t\t// remove trailing slash from URL if any\n\t\tproperties.connection.endpoint = properties.connection.endpoint.replace(/\\/$/, \"\");\n\t\tthis.urlResolver = new AzureUrlResolver();\n\t\t// The local service implementation differs from the Azure Fluid Relay in blob\n\t\t// storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n\t\tconst isRemoteConnection = isAzureRemoteConnectionConfig(this.properties.connection);\n\t\tconst origDocumentServiceFactory: IDocumentServiceFactory =\n\t\t\tnew RouterliciousDocumentServiceFactory(this.properties.connection.tokenProvider, {\n\t\t\t\tenableWholeSummaryUpload: isRemoteConnection,\n\t\t\t\tenableDiscovery: isRemoteConnection,\n\t\t\t});\n\n\t\tthis.documentServiceFactory = applyStorageCompression(\n\t\t\torigDocumentServiceFactory,\n\t\t\tproperties.summaryCompression,\n\t\t);\n\t\tthis.configProvider = properties.configProvider;\n\t}\n\n\t/**\n\t * Creates a new detached container instance in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param containerSchema - Container schema for the new container.\n\t * @returns New detached container instance along with associated services.\n\t */\n\tpublic async createContainer<TContainerSchema extends ContainerSchema>(\n\t\tcontainerSchema: TContainerSchema,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema);\n\n\t\tconst container = await loader.createDetachedContainer({\n\t\t\tpackage: \"no-dynamic-package\",\n\t\t\tconfig: {},\n\t\t});\n\n\t\tconst fluidContainer = await this.createFluidContainer<TContainerSchema>(\n\t\t\tcontainer,\n\t\t\tthis.properties.connection,\n\t\t);\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Creates new detached container out of specific version of another container.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @param version - Unique version of the source container in Azure Fluid Relay.\n\t * It defaults to latest version if parameter not provided.\n\t * @returns New detached container instance along with associated services.\n\t */\n\tpublic async copyContainer<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t\tversion?: AzureContainerVersion,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema);\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.properties.connection.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst sourceContainer = await loader.resolve({ url: url.href });\n\n\t\tif (sourceContainer.resolvedUrl === undefined) {\n\t\t\tthrow new Error(\"Source container cannot resolve URL.\");\n\t\t}\n\n\t\tconst documentService = await this.documentServiceFactory.createDocumentService(\n\t\t\tsourceContainer.resolvedUrl,\n\t\t);\n\t\tconst storage = await documentService.connectToStorage();\n\t\tconst handle = {\n\t\t\ttype: SummaryType.Handle,\n\t\t\thandleType: SummaryType.Tree,\n\t\t\thandle: version?.id ?? \"latest\",\n\t\t};\n\t\tconst tree = await storage.downloadSummary(handle);\n\n\t\tconst container = await loader.rehydrateDetachedContainerFromSnapshot(JSON.stringify(tree));\n\n\t\tconst fluidContainer = await this.createFluidContainer<TContainerSchema>(\n\t\t\tcontainer,\n\t\t\tthis.properties.connection,\n\t\t);\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @returns Existing container instance along with associated services.\n\t */\n\tpublic async getContainer<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema);\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.properties.connection.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst container = await loader.resolve({ url: url.href });\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Get the list of versions for specific container.\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param options - \"Get\" options. If options are not provided, API\n\t * will assume maxCount of versions to retreive to be 5.\n\t * @returns Array of available container versions.\n\t */\n\tpublic async getContainerVersions(\n\t\tid: string,\n\t\toptions?: AzureGetVersionsOptions,\n\t): Promise<AzureContainerVersion[]> {\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.properties.connection.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\n\t\tconst resolvedUrl = await this.urlResolver.resolve({ url: url.href });\n\t\tif (!resolvedUrl) {\n\t\t\tthrow new Error(\"Unable to resolved URL\");\n\t\t}\n\t\tconst documentService =\n\t\t\tawait this.documentServiceFactory.createDocumentService(resolvedUrl);\n\t\tconst storage = await documentService.connectToStorage();\n\n\t\t// External API uses null\n\t\t// eslint-disable-next-line unicorn/no-null\n\t\tconst versions = await storage.getVersions(null, options?.maxCount ?? MAX_VERSION_COUNT);\n\n\t\treturn versions.map((item) => {\n\t\t\treturn { id: item.id, date: item.date };\n\t\t});\n\t}\n\n\tprivate getContainerServices(container: IContainer): AzureContainerServices {\n\t\treturn {\n\t\t\taudience: createServiceAudience({\n\t\t\t\tcontainer,\n\t\t\t\tcreateServiceMember: createAzureAudienceMember,\n\t\t\t}),\n\t\t};\n\t}\n\n\tprivate createLoader(schema: ContainerSchema): Loader {\n\t\tconst runtimeFactory = createDOProviderContainerRuntimeFactory({ schema });\n\t\tconst load = async (): Promise<IFluidModuleWithDetails> => {\n\t\t\treturn {\n\t\t\t\tmodule: { fluidExport: runtimeFactory },\n\t\t\t\tdetails: { package: \"no-dynamic-package\", config: {} },\n\t\t\t};\n\t\t};\n\n\t\tconst codeLoader = { load };\n\t\tconst client: IClient = {\n\t\t\tdetails: {\n\t\t\t\tcapabilities: { interactive: true },\n\t\t\t},\n\t\t\tpermission: [],\n\t\t\tscopes: [],\n\t\t\tuser: { id: \"\" },\n\t\t\tmode: \"write\",\n\t\t};\n\n\t\treturn new Loader({\n\t\t\turlResolver: this.urlResolver,\n\t\t\tdocumentServiceFactory: this.documentServiceFactory,\n\t\t\tcodeLoader,\n\t\t\tlogger: this.properties.logger,\n\t\t\toptions: { client },\n\t\t\tconfigProvider: this.configProvider,\n\t\t});\n\t}\n\n\tprivate async createFluidContainer<TContainerSchema extends ContainerSchema>(\n\t\tcontainer: IContainer,\n\t\tconnection: AzureConnectionConfig,\n\t): Promise<IFluidContainer<TContainerSchema>> {\n\t\tconst createNewRequest = createAzureCreateNewRequest(\n\t\t\tconnection.endpoint,\n\t\t\tgetTenantId(connection),\n\t\t);\n\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\n\t\t/**\n\t\t * See {@link FluidContainer.attach}\n\t\t */\n\t\tconst attach = async (): Promise<string> => {\n\t\t\tif (container.attachState !== AttachState.Detached) {\n\t\t\t\tthrow new Error(\"Cannot attach container. Container is not in detached state\");\n\t\t\t}\n\t\t\tawait container.attach(createNewRequest);\n\t\t\tif (container.resolvedUrl === undefined) {\n\t\t\t\tthrow new Error(\"Resolved Url not available on attached container\");\n\t\t\t}\n\t\t\treturn container.resolvedUrl.id;\n\t\t};\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tfluidContainer.attach = attach;\n\t\treturn fluidContainer;\n\t}\n\n\tprivate async getContainerEntryPoint(container: IContainer): Promise<IRootDataObject> {\n\t\tconst rootDataObject: FluidObject<IRootDataObject> | undefined =\n\t\t\tawait container.getEntryPoint();\n\t\tassert(rootDataObject !== undefined, \"entryPoint must exist\");\n\t\t// ! This \"if\" is needed for back-compat (older instances of IRootDataObject may not have the IRootDataObject property)\n\t\tif (rootDataObject.IRootDataObject === undefined) {\n\t\t\treturn rootDataObject as IRootDataObject;\n\t\t}\n\t\treturn rootDataObject.IRootDataObject;\n\t}\n\t// #endregion\n}\n"]}
@@ -3,7 +3,7 @@ import { type AzureClientProps, type AzureContainerServices, type AzureContainer
3
3
  /**
4
4
  * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
5
5
  * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
6
- * @internal
6
+ * @alpha
7
7
  */
8
8
  export declare class AzureClient {
9
9
  private readonly properties;
@@ -4,60 +4,253 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
 
7
+ import { ContainerSchema } from '@fluidframework/fluid-static';
7
8
  import { IClient } from '@fluidframework/protocol-definitions';
9
+ import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
8
10
  import { IConfigProviderBase } from '@fluidframework/core-interfaces';
11
+ import { IFluidContainer } from '@fluidframework/fluid-static';
12
+ import { IMember } from '@fluidframework/fluid-static';
13
+ import { IServiceAudience } from '@fluidframework/fluid-static';
9
14
  import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
10
15
  import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
11
16
  import { ITokenClaims } from '@fluidframework/protocol-definitions';
17
+ import { ITokenProvider } from '@fluidframework/routerlicious-driver';
18
+ import { ITokenResponse } from '@fluidframework/routerlicious-driver';
12
19
  import { IUser } from '@fluidframework/protocol-definitions';
13
20
  import { ScopeType } from '@fluidframework/protocol-definitions';
21
+ import { ServiceAudience } from '@fluidframework/fluid-static';
14
22
 
15
23
  /* Excluded from this release type: AzureAudience */
16
24
 
17
- /* Excluded from this release type: AzureClient */
25
+ /**
26
+ * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
27
+ * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
28
+ * @alpha
29
+ */
30
+ export declare class AzureClient {
31
+ private readonly properties;
32
+ private readonly documentServiceFactory;
33
+ private readonly urlResolver;
34
+ private readonly configProvider;
35
+ /**
36
+ * Creates a new client instance using configuration parameters.
37
+ * @param properties - Properties for initializing a new AzureClient instance
38
+ */
39
+ constructor(properties: AzureClientProps);
40
+ /**
41
+ * Creates a new detached container instance in the Azure Fluid Relay.
42
+ * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
43
+ * (normally not explicitly specified.)
44
+ * @param containerSchema - Container schema for the new container.
45
+ * @returns New detached container instance along with associated services.
46
+ */
47
+ createContainer<TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema): Promise<{
48
+ container: IFluidContainer<TContainerSchema>;
49
+ services: AzureContainerServices;
50
+ }>;
51
+ /**
52
+ * Creates new detached container out of specific version of another container.
53
+ * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
54
+ * (normally not explicitly specified.)
55
+ * @param id - Unique ID of the source container in Azure Fluid Relay.
56
+ * @param containerSchema - Container schema used to access data objects in the container.
57
+ * @param version - Unique version of the source container in Azure Fluid Relay.
58
+ * It defaults to latest version if parameter not provided.
59
+ * @returns New detached container instance along with associated services.
60
+ */
61
+ copyContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version?: AzureContainerVersion): Promise<{
62
+ container: IFluidContainer<TContainerSchema>;
63
+ services: AzureContainerServices;
64
+ }>;
65
+ /**
66
+ * Accesses the existing container given its unique ID in the Azure Fluid Relay.
67
+ * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
68
+ * (normally not explicitly specified.)
69
+ * @param id - Unique ID of the container in Azure Fluid Relay.
70
+ * @param containerSchema - Container schema used to access data objects in the container.
71
+ * @returns Existing container instance along with associated services.
72
+ */
73
+ getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema): Promise<{
74
+ container: IFluidContainer<TContainerSchema>;
75
+ services: AzureContainerServices;
76
+ }>;
77
+ /**
78
+ * Get the list of versions for specific container.
79
+ * @param id - Unique ID of the source container in Azure Fluid Relay.
80
+ * @param options - "Get" options. If options are not provided, API
81
+ * will assume maxCount of versions to retreive to be 5.
82
+ * @returns Array of available container versions.
83
+ */
84
+ getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
85
+ private getContainerServices;
86
+ private createLoader;
87
+ private createFluidContainer;
88
+ private getContainerEntryPoint;
89
+ }
18
90
 
19
- /* Excluded from this release type: AzureClientProps */
91
+ /**
92
+ * Props for initializing a new AzureClient instance
93
+ * @alpha
94
+ */
95
+ export declare interface AzureClientProps {
96
+ /**
97
+ * Configuration for establishing a connection with the Azure Fluid Relay.
98
+ */
99
+ readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
100
+ /**
101
+ * Optional. A logger instance to receive diagnostic messages.
102
+ */
103
+ readonly logger?: ITelemetryBaseLogger;
104
+ /**
105
+ * Base interface for providing configurations to control experimental features. If unsure, leave this undefined.
106
+ */
107
+ readonly configProvider?: IConfigProviderBase;
108
+ readonly summaryCompression?: boolean | ICompressionStorageConfig;
109
+ }
20
110
 
21
- /* Excluded from this release type: AzureConnectionConfig */
111
+ /**
112
+ * Parameters for establishing a connection with the Azure Fluid Relay.
113
+ * @alpha
114
+ */
115
+ export declare interface AzureConnectionConfig {
116
+ /**
117
+ * The type of connection. Whether we're connecting to a remote Fluid relay server or a local instance.
118
+ */
119
+ type: AzureConnectionConfigType;
120
+ /**
121
+ * URI to the Azure Fluid Relay service discovery endpoint.
122
+ */
123
+ endpoint: string;
124
+ /**
125
+ * Instance that provides Azure Fluid Relay endpoint tokens.
126
+ */
127
+ tokenProvider: ITokenProvider;
128
+ }
22
129
 
23
- /* Excluded from this release type: AzureConnectionConfigType */
130
+ /**
131
+ * The type of connection.
132
+ *
133
+ * - "local" for local connections to a Fluid relay instance running on the localhost
134
+ *
135
+ * - "remote" for client connections to the Azure Fluid Relay service
136
+ * @alpha
137
+ */
138
+ export declare type AzureConnectionConfigType = "local" | "remote";
24
139
 
25
- /* Excluded from this release type: AzureContainerServices */
140
+ /**
141
+ * Holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
142
+ * the FluidContainer is persisted in the backend and consumed by users.
143
+ *
144
+ * @remarks
145
+ *
146
+ * Returned by the {@link AzureClient} alongside a {@link @fluidframework/fluid-static#FluidContainer}.
147
+ *
148
+ * Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
149
+ * or DDSes to use, will not be included here but rather on the FluidContainer class itself.
150
+ * @alpha
151
+ */
152
+ export declare interface AzureContainerServices {
153
+ /**
154
+ * Provides an object that can be used to get the users that are present in this Fluid session and
155
+ * listeners for when the roster has any changes from users joining/leaving the session
156
+ */
157
+ audience: IAzureAudience;
158
+ }
26
159
 
27
- /* Excluded from this release type: AzureContainerVersion */
160
+ /**
161
+ * Container version metadata.
162
+ * @alpha
163
+ */
164
+ export declare interface AzureContainerVersion {
165
+ /**
166
+ * Version ID
167
+ */
168
+ id: string;
169
+ /**
170
+ * Time when version was generated.
171
+ * ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
172
+ */
173
+ date?: string;
174
+ }
28
175
 
29
176
  /* Excluded from this release type: AzureFunctionTokenProvider */
30
177
 
31
- /* Excluded from this release type: AzureGetVersionsOptions */
178
+ /**
179
+ * Options for "Get Container Versions" API.
180
+ * @alpha
181
+ */
182
+ export declare interface AzureGetVersionsOptions {
183
+ /**
184
+ * Max number of versions
185
+ */
186
+ maxCount: number;
187
+ }
32
188
 
33
- /* Excluded from this release type: AzureLocalConnectionConfig */
189
+ /**
190
+ * Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
191
+ * @alpha
192
+ */
193
+ export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
194
+ /**
195
+ * The type of connection. Set to a remote connection.
196
+ */
197
+ type: "local";
198
+ }
34
199
 
35
- /* Excluded from this release type: AzureMember */
200
+ /**
201
+ * Since Azure provides user names for all of its members, we extend the
202
+ * {@link @fluidframework/protocol-definitions#IMember} interface to include this service-specific value.
203
+ * It will be returned for all audience members connected to Azure.
204
+ *
205
+ * @typeParam T - See {@link AzureMember.additionalDetails}.
206
+ * Note: must be JSON-serializable.
207
+ * Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
208
+ * @alpha
209
+ */
210
+ export declare interface AzureMember<T = any> extends IMember {
211
+ /**
212
+ * {@inheritDoc AzureUser.name}
213
+ */
214
+ userName: string;
215
+ /**
216
+ * {@inheritDoc AzureUser.additionalDetails}
217
+ */
218
+ additionalDetails?: T;
219
+ }
36
220
 
37
- /* Excluded from this release type: AzureRemoteConnectionConfig */
221
+ /**
222
+ * Parameters for establishing a remote connection with the Azure Fluid Relay.
223
+ * @alpha
224
+ */
225
+ export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
226
+ /**
227
+ * The type of connection. Set to a remote connection.
228
+ */
229
+ type: "remote";
230
+ /**
231
+ * Unique tenant identifier.
232
+ */
233
+ tenantId: string;
234
+ }
38
235
 
39
236
  /* Excluded from this release type: AzureUser */
40
237
 
41
- /* Excluded from this release type: ContainerSchema */
42
-
43
- /* Excluded from this release type: IAzureAudience */
44
-
45
- /* Excluded from this release type: ICompressionStorageConfig */
46
-
47
- /* Excluded from this release type: IFluidContainer */
48
-
49
- /* Excluded from this release type: IMember */
238
+ /**
239
+ * Audience object for Azure Fluid Relay containers
240
+ * @alpha
241
+ */
242
+ export declare type IAzureAudience = IServiceAudience<AzureMember>;
50
243
 
51
- /* Excluded from this release type: IServiceAudience */
52
244
  export { ITelemetryBaseEvent }
53
245
 
54
246
  export { ITelemetryBaseLogger }
55
247
 
56
248
  export { ITokenClaims }
57
249
 
58
- /* Excluded from this release type: ITokenProvider */
250
+ export { ITokenProvider }
251
+
252
+ export { ITokenResponse }
59
253
 
60
- /* Excluded from this release type: ITokenResponse */
61
254
  export { IUser }
62
255
 
63
256
  export { ScopeType }
@@ -4,10 +4,21 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
 
7
+ import { ContainerSchema } from '@fluidframework/fluid-static';
7
8
  import { IClient } from '@fluidframework/protocol-definitions';
9
+ import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
10
+ import { IConfigProviderBase } from '@fluidframework/core-interfaces';
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';
8
16
  import { ITokenClaims } from '@fluidframework/protocol-definitions';
17
+ import { ITokenProvider } from '@fluidframework/routerlicious-driver';
18
+ import { ITokenResponse } from '@fluidframework/routerlicious-driver';
9
19
  import { IUser } from '@fluidframework/protocol-definitions';
10
20
  import { ScopeType } from '@fluidframework/protocol-definitions';
21
+ import { ServiceAudience } from '@fluidframework/fluid-static';
11
22
 
12
23
  /* Excluded from this release type: AzureAudience */
13
24
 
@@ -4,10 +4,21 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
 
7
+ import { ContainerSchema } from '@fluidframework/fluid-static';
7
8
  import { IClient } from '@fluidframework/protocol-definitions';
9
+ import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
10
+ import { IConfigProviderBase } from '@fluidframework/core-interfaces';
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';
8
16
  import { ITokenClaims } from '@fluidframework/protocol-definitions';
17
+ import { ITokenProvider } from '@fluidframework/routerlicious-driver';
18
+ import { ITokenResponse } from '@fluidframework/routerlicious-driver';
9
19
  import { IUser } from '@fluidframework/protocol-definitions';
10
20
  import { ScopeType } from '@fluidframework/protocol-definitions';
21
+ import { ServiceAudience } from '@fluidframework/fluid-static';
11
22
 
12
23
  /* Excluded from this release type: AzureAudience */
13
24
 
@@ -41,7 +41,7 @@ export declare class AzureAudience extends ServiceAudience<AzureMember> implemen
41
41
  /**
42
42
  * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
43
43
  * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
44
- * @internal
44
+ * @alpha
45
45
  */
46
46
  export declare class AzureClient {
47
47
  private readonly properties;
@@ -106,7 +106,7 @@ export declare class AzureClient {
106
106
 
107
107
  /**
108
108
  * Props for initializing a new AzureClient instance
109
- * @internal
109
+ * @alpha
110
110
  */
111
111
  export declare interface AzureClientProps {
112
112
  /**
@@ -126,7 +126,7 @@ export declare interface AzureClientProps {
126
126
 
127
127
  /**
128
128
  * Parameters for establishing a connection with the Azure Fluid Relay.
129
- * @internal
129
+ * @alpha
130
130
  */
131
131
  export declare interface AzureConnectionConfig {
132
132
  /**
@@ -149,7 +149,7 @@ export declare interface AzureConnectionConfig {
149
149
  * - "local" for local connections to a Fluid relay instance running on the localhost
150
150
  *
151
151
  * - "remote" for client connections to the Azure Fluid Relay service
152
- * @internal
152
+ * @alpha
153
153
  */
154
154
  export declare type AzureConnectionConfigType = "local" | "remote";
155
155
 
@@ -163,7 +163,7 @@ export declare type AzureConnectionConfigType = "local" | "remote";
163
163
  *
164
164
  * Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects
165
165
  * or DDSes to use, will not be included here but rather on the FluidContainer class itself.
166
- * @internal
166
+ * @alpha
167
167
  */
168
168
  export declare interface AzureContainerServices {
169
169
  /**
@@ -175,7 +175,7 @@ export declare interface AzureContainerServices {
175
175
 
176
176
  /**
177
177
  * Container version metadata.
178
- * @internal
178
+ * @alpha
179
179
  */
180
180
  export declare interface AzureContainerVersion {
181
181
  /**
@@ -214,7 +214,7 @@ export declare class AzureFunctionTokenProvider implements ITokenProvider {
214
214
 
215
215
  /**
216
216
  * Options for "Get Container Versions" API.
217
- * @internal
217
+ * @alpha
218
218
  */
219
219
  export declare interface AzureGetVersionsOptions {
220
220
  /**
@@ -225,7 +225,7 @@ export declare interface AzureGetVersionsOptions {
225
225
 
226
226
  /**
227
227
  * Parameters for establishing a local connection with a local instance of the Azure Fluid Relay.
228
- * @internal
228
+ * @alpha
229
229
  */
230
230
  export declare interface AzureLocalConnectionConfig extends AzureConnectionConfig {
231
231
  /**
@@ -242,7 +242,7 @@ export declare interface AzureLocalConnectionConfig extends AzureConnectionConfi
242
242
  * @typeParam T - See {@link AzureMember.additionalDetails}.
243
243
  * Note: must be JSON-serializable.
244
244
  * Passing a non-serializable object (e.g. a `class`) will result in undefined behavior.
245
- * @internal
245
+ * @alpha
246
246
  */
247
247
  export declare interface AzureMember<T = any> extends IMember {
248
248
  /**
@@ -257,7 +257,7 @@ export declare interface AzureMember<T = any> extends IMember {
257
257
 
258
258
  /**
259
259
  * Parameters for establishing a remote connection with the Azure Fluid Relay.
260
- * @internal
260
+ * @alpha
261
261
  */
262
262
  export declare interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
263
263
  /**
@@ -292,7 +292,7 @@ export declare interface AzureUser<T = any> extends IUser {
292
292
 
293
293
  /**
294
294
  * Audience object for Azure Fluid Relay containers
295
- * @internal
295
+ * @alpha
296
296
  */
297
297
  export declare type IAzureAudience = IServiceAudience<AzureMember>;
298
298