@fluidframework/local-driver 2.0.0-dev.2.3.0.115467 → 2.0.0-dev.4.1.0.148229

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.
Files changed (91) hide show
  1. package/.eslintrc.js +19 -22
  2. package/.mocharc.js +2 -2
  3. package/api-extractor.json +4 -0
  4. package/dist/auth.d.ts.map +1 -1
  5. package/dist/auth.js +2 -2
  6. package/dist/auth.js.map +1 -1
  7. package/dist/localCreateDocument.d.ts +8 -0
  8. package/dist/localCreateDocument.d.ts.map +1 -0
  9. package/dist/localCreateDocument.js +29 -0
  10. package/dist/localCreateDocument.js.map +1 -0
  11. package/dist/localDeltaStorageService.d.ts.map +1 -1
  12. package/dist/localDeltaStorageService.js.map +1 -1
  13. package/dist/localDocumentDeltaConnection.d.ts.map +1 -1
  14. package/dist/localDocumentDeltaConnection.js.map +1 -1
  15. package/dist/localDocumentService.d.ts.map +1 -1
  16. package/dist/localDocumentService.js +4 -1
  17. package/dist/localDocumentService.js.map +1 -1
  18. package/dist/localDocumentServiceFactory.d.ts +0 -1
  19. package/dist/localDocumentServiceFactory.d.ts.map +1 -1
  20. package/dist/localDocumentServiceFactory.js +4 -20
  21. package/dist/localDocumentServiceFactory.js.map +1 -1
  22. package/dist/localDocumentStorageService.d.ts +5 -2
  23. package/dist/localDocumentStorageService.d.ts.map +1 -1
  24. package/dist/localDocumentStorageService.js +18 -4
  25. package/dist/localDocumentStorageService.js.map +1 -1
  26. package/dist/localResolver.d.ts.map +1 -1
  27. package/dist/localResolver.js.map +1 -1
  28. package/dist/localSessionStorageDb.d.ts.map +1 -1
  29. package/dist/localSessionStorageDb.js +3 -2
  30. package/dist/localSessionStorageDb.js.map +1 -1
  31. package/dist/packageVersion.d.ts +1 -1
  32. package/dist/packageVersion.js +1 -1
  33. package/dist/packageVersion.js.map +1 -1
  34. package/lib/auth.d.ts +12 -0
  35. package/lib/auth.d.ts.map +1 -0
  36. package/lib/auth.js +38 -0
  37. package/lib/auth.js.map +1 -0
  38. package/lib/index.d.ts +12 -0
  39. package/lib/index.d.ts.map +1 -0
  40. package/lib/index.js +12 -0
  41. package/lib/index.js.map +1 -0
  42. package/lib/localCreateDocument.d.ts +8 -0
  43. package/lib/localCreateDocument.d.ts.map +1 -0
  44. package/lib/localCreateDocument.js +25 -0
  45. package/lib/localCreateDocument.js.map +1 -0
  46. package/lib/localDeltaStorageService.d.ts +19 -0
  47. package/lib/localDeltaStorageService.d.ts.map +1 -0
  48. package/lib/localDeltaStorageService.js +31 -0
  49. package/lib/localDeltaStorageService.js.map +1 -0
  50. package/lib/localDocumentDeltaConnection.d.ts +47 -0
  51. package/lib/localDocumentDeltaConnection.d.ts.map +1 -0
  52. package/lib/localDocumentDeltaConnection.js +88 -0
  53. package/lib/localDocumentDeltaConnection.js.map +1 -0
  54. package/lib/localDocumentService.d.ts +52 -0
  55. package/lib/localDocumentService.d.ts.map +1 -0
  56. package/lib/localDocumentService.js +80 -0
  57. package/lib/localDocumentService.js.map +1 -0
  58. package/lib/localDocumentServiceFactory.d.ts +43 -0
  59. package/lib/localDocumentServiceFactory.d.ts.map +1 -0
  60. package/lib/localDocumentServiceFactory.js +81 -0
  61. package/lib/localDocumentServiceFactory.js.map +1 -0
  62. package/lib/localDocumentStorageService.d.ts +27 -0
  63. package/lib/localDocumentStorageService.d.ts.map +1 -0
  64. package/lib/localDocumentStorageService.js +85 -0
  65. package/lib/localDocumentStorageService.js.map +1 -0
  66. package/lib/localResolver.d.ts +26 -0
  67. package/lib/localResolver.d.ts.map +1 -0
  68. package/lib/localResolver.js +70 -0
  69. package/lib/localResolver.js.map +1 -0
  70. package/lib/localSessionStorageDb.d.ts +10 -0
  71. package/lib/localSessionStorageDb.d.ts.map +1 -0
  72. package/lib/localSessionStorageDb.js +295 -0
  73. package/lib/localSessionStorageDb.js.map +1 -0
  74. package/lib/packageVersion.d.ts +9 -0
  75. package/lib/packageVersion.d.ts.map +1 -0
  76. package/lib/packageVersion.js +9 -0
  77. package/lib/packageVersion.js.map +1 -0
  78. package/package.json +59 -49
  79. package/prettier.config.cjs +1 -1
  80. package/src/auth.ts +35 -29
  81. package/src/localCreateDocument.ts +48 -0
  82. package/src/localDeltaStorageService.ts +26 -29
  83. package/src/localDocumentDeltaConnection.ts +89 -85
  84. package/src/localDocumentService.ts +108 -95
  85. package/src/localDocumentServiceFactory.ts +94 -122
  86. package/src/localDocumentStorageService.ts +35 -11
  87. package/src/localResolver.ts +55 -55
  88. package/src/localSessionStorageDb.ts +270 -263
  89. package/src/packageVersion.ts +1 -1
  90. package/tsconfig.esnext.json +7 -0
  91. package/tsconfig.json +9 -13
@@ -3,10 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import {
7
- IDocumentDeltaStorageService,
8
- IStream,
9
- } from "@fluidframework/driver-definitions";
6
+ import { IDocumentDeltaStorageService, IStream } from "@fluidframework/driver-definitions";
10
7
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
11
8
  import { IDatabaseManager } from "@fluidframework/server-services-core";
12
9
  import { streamFromMessages } from "@fluidframework/driver-utils";
@@ -15,33 +12,33 @@ import { streamFromMessages } from "@fluidframework/driver-utils";
15
12
  * Provides access to the underlying delta storage on the server for local driver.
16
13
  */
17
14
  export class LocalDeltaStorageService implements IDocumentDeltaStorageService {
18
- constructor(
19
- private readonly tenantId: string,
20
- private readonly id: string,
21
- private readonly databaseManager: IDatabaseManager) {
22
- }
15
+ constructor(
16
+ private readonly tenantId: string,
17
+ private readonly id: string,
18
+ private readonly databaseManager: IDatabaseManager,
19
+ ) {}
23
20
 
24
- public fetchMessages(
25
- from: number,
26
- to: number | undefined,
27
- abortSignal?: AbortSignal,
28
- cachedOnly?: boolean,
29
- ): IStream<ISequencedDocumentMessage[]> {
30
- return streamFromMessages(this.getCore(from, to));
31
- }
21
+ public fetchMessages(
22
+ from: number,
23
+ to: number | undefined,
24
+ abortSignal?: AbortSignal,
25
+ cachedOnly?: boolean,
26
+ ): IStream<ISequencedDocumentMessage[]> {
27
+ return streamFromMessages(this.getCore(from, to));
28
+ }
32
29
 
33
- private async getCore(from: number, to?: number) {
34
- const query = { documentId: this.id, tenantId: this.tenantId };
35
- query["operation.sequenceNumber"] = {};
36
- query["operation.sequenceNumber"].$gt = from - 1; // from is inclusive
30
+ private async getCore(from: number, to?: number) {
31
+ const query = { documentId: this.id, tenantId: this.tenantId };
32
+ query["operation.sequenceNumber"] = {};
33
+ query["operation.sequenceNumber"].$gt = from - 1; // from is inclusive
37
34
 
38
- // This looks like a bug. It used to work without setting $lt key. Now it does not
39
- // Need follow up
40
- query["operation.sequenceNumber"].$lt = to ?? Number.MAX_SAFE_INTEGER;
35
+ // This looks like a bug. It used to work without setting $lt key. Now it does not
36
+ // Need follow up
37
+ query["operation.sequenceNumber"].$lt = to ?? Number.MAX_SAFE_INTEGER;
41
38
 
42
- const allDeltas = await this.databaseManager.getDeltaCollection(this.tenantId, this.id);
43
- const dbDeltas = await allDeltas.find(query, { "operation.sequenceNumber": 1 });
44
- const messages = dbDeltas.map((delta) => delta.operation);
45
- return messages;
46
- }
39
+ const allDeltas = await this.databaseManager.getDeltaCollection(this.tenantId, this.id);
40
+ const dbDeltas = await allDeltas.find(query, { "operation.sequenceNumber": 1 });
41
+ const messages = dbDeltas.map((delta) => delta.operation);
42
+ return messages;
43
+ }
47
44
  }
@@ -5,10 +5,10 @@
5
5
 
6
6
  import { DocumentDeltaConnection } from "@fluidframework/driver-base";
7
7
  import {
8
- IClient,
9
- IConnect,
10
- IDocumentMessage,
11
- NackErrorType,
8
+ IClient,
9
+ IConnect,
10
+ IDocumentMessage,
11
+ NackErrorType,
12
12
  } from "@fluidframework/protocol-definitions";
13
13
  import { TelemetryNullLogger } from "@fluidframework/telemetry-utils";
14
14
  import { LocalWebSocketServer } from "@fluidframework/server-local-server";
@@ -21,94 +21,98 @@ const testProtocolVersions = ["^0.3.0", "^0.2.0", "^0.1.0"];
21
21
  * Represents a connection to a stream of delta updates
22
22
  */
23
23
  export class LocalDocumentDeltaConnection extends DocumentDeltaConnection {
24
- /**
25
- * Create a LocalDocumentDeltaConnection
26
- * Handle initial messages, contents or signals if they were in queue
27
- *
28
- * @param tenantId - the ID of the tenant
29
- * @param id - document ID
30
- * @param token - authorization token for storage service
31
- * @param client - information about the client
32
- * @param webSocketServer - web socket server to create connection
33
- */
34
- public static async create(
35
- tenantId: string,
36
- id: string,
37
- token: string,
38
- client: IClient,
39
- webSocketServer: IWebSocketServer,
40
- timeoutMs = 60000,
41
- ): Promise<LocalDocumentDeltaConnection> {
42
- const socket = (webSocketServer as LocalWebSocketServer).createConnection();
24
+ /**
25
+ * Create a LocalDocumentDeltaConnection
26
+ * Handle initial messages, contents or signals if they were in queue
27
+ *
28
+ * @param tenantId - the ID of the tenant
29
+ * @param id - document ID
30
+ * @param token - authorization token for storage service
31
+ * @param client - information about the client
32
+ * @param webSocketServer - web socket server to create connection
33
+ */
34
+ public static async create(
35
+ tenantId: string,
36
+ id: string,
37
+ token: string,
38
+ client: IClient,
39
+ webSocketServer: IWebSocketServer,
40
+ timeoutMs = 60000,
41
+ ): Promise<LocalDocumentDeltaConnection> {
42
+ const socket = (webSocketServer as LocalWebSocketServer).createConnection();
43
43
 
44
- // Cast LocalWebSocket to SocketIOClient.Socket which is the socket that the base class needs. This is hacky
45
- // but should be fine because this delta connection is for local use only.
46
- const socketWithListener = socket as unknown as Socket;
44
+ // Cast LocalWebSocket to SocketIOClient.Socket which is the socket that the base class needs. This is hacky
45
+ // but should be fine because this delta connection is for local use only.
46
+ const socketWithListener = socket as unknown as Socket;
47
47
 
48
- const deltaConnection = new LocalDocumentDeltaConnection(socketWithListener, id);
48
+ const deltaConnection = new LocalDocumentDeltaConnection(socketWithListener, id);
49
49
 
50
- const connectMessage: IConnect = {
51
- client,
52
- id,
53
- mode: client.mode,
54
- tenantId,
55
- token, // Token is going to indicate tenant level information, etc...
56
- versions: testProtocolVersions,
57
- };
58
- await deltaConnection.initialize(connectMessage, timeoutMs);
59
- return deltaConnection;
60
- }
50
+ const connectMessage: IConnect = {
51
+ client,
52
+ id,
53
+ mode: client.mode,
54
+ tenantId,
55
+ token, // Token is going to indicate tenant level information, etc...
56
+ versions: testProtocolVersions,
57
+ };
58
+ await deltaConnection.initialize(connectMessage, timeoutMs);
59
+ return deltaConnection;
60
+ }
61
61
 
62
- constructor(socket: Socket, documentId: string) {
63
- super(socket, documentId, new TelemetryNullLogger());
64
- }
62
+ constructor(socket: Socket, documentId: string) {
63
+ super(socket, documentId, new TelemetryNullLogger());
64
+ }
65
65
 
66
- protected submitCore(type: string, messages: IDocumentMessage[]) {
67
- this.emitMessages(type, [messages]);
68
- }
66
+ protected submitCore(type: string, messages: IDocumentMessage[]) {
67
+ this.emitMessages(type, [messages]);
68
+ }
69
69
 
70
- /**
71
- * Submits a new delta operation to the server
72
- */
73
- public submit(messages: IDocumentMessage[]): void {
74
- // We use a promise resolve to force a turn break given message processing is sync
75
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
76
- Promise.resolve().then(() => {
77
- this.submitCore("submitOp", messages);
78
- });
79
- }
70
+ /**
71
+ * Submits a new delta operation to the server
72
+ */
73
+ public submit(messages: IDocumentMessage[]): void {
74
+ // We use a promise resolve to force a turn break given message processing is sync
75
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
76
+ Promise.resolve().then(() => {
77
+ this.submitCore("submitOp", messages);
78
+ });
79
+ }
80
80
 
81
- /**
82
- * Submits a new signal to the server
83
- */
84
- public submitSignal(message: any): void {
85
- this.submitCore("submitSignal", [message]);
86
- }
81
+ /**
82
+ * Submits a new signal to the server
83
+ */
84
+ public submitSignal(message: any): void {
85
+ this.submitCore("submitSignal", [message]);
86
+ }
87
87
 
88
- /**
89
- * Send a "disconnect" message on the socket.
90
- * @param disconnectReason - The reason of the disconnection.
91
- */
92
- public disconnectClient(disconnectReason: string) {
93
- this.socket.emit("disconnect", disconnectReason);
94
- }
88
+ /**
89
+ * Send a "disconnect" message on the socket.
90
+ * @param disconnectReason - The reason of the disconnection.
91
+ */
92
+ public disconnectClient(disconnectReason: string) {
93
+ this.socket.emit("disconnect", disconnectReason);
94
+ }
95
95
 
96
- /**
97
- * * Sends a "nack" message on the socket.
98
- * @param code - An error code number that represents the error. It will be a valid HTTP error code.
99
- * @param type - Type of the Nack.
100
- * @param message - A message about the nack for debugging/logging/telemetry purposes.
101
- */
102
- public nackClient(code: number = 400, type: NackErrorType = NackErrorType.ThrottlingError, message: any) {
103
- const nackMessage = {
104
- operation: undefined,
105
- sequenceNumber: -1,
106
- content: {
107
- code,
108
- type,
109
- message,
110
- },
111
- };
112
- this.socket.emit("nack", "", [nackMessage]);
113
- }
96
+ /**
97
+ * * Sends a "nack" message on the socket.
98
+ * @param code - An error code number that represents the error. It will be a valid HTTP error code.
99
+ * @param type - Type of the Nack.
100
+ * @param message - A message about the nack for debugging/logging/telemetry purposes.
101
+ */
102
+ public nackClient(
103
+ code: number = 400,
104
+ type: NackErrorType = NackErrorType.ThrottlingError,
105
+ message: any,
106
+ ) {
107
+ const nackMessage = {
108
+ operation: undefined,
109
+ sequenceNumber: -1,
110
+ content: {
111
+ code,
112
+ type,
113
+ message,
114
+ },
115
+ };
116
+ this.socket.emit("nack", "", [nackMessage]);
117
+ }
114
118
  }
@@ -4,100 +4,112 @@
4
4
  */
5
5
 
6
6
  import {
7
- IDocumentDeltaConnection,
8
- IDocumentDeltaStorageService,
9
- IDocumentService,
10
- IDocumentServicePolicies,
11
- IDocumentStorageService,
12
- IResolvedUrl,
7
+ IDocumentDeltaConnection,
8
+ IDocumentDeltaStorageService,
9
+ IDocumentService,
10
+ IDocumentServicePolicies,
11
+ IDocumentStorageService,
12
+ IResolvedUrl,
13
13
  } from "@fluidframework/driver-definitions";
14
14
  import { IClient } from "@fluidframework/protocol-definitions";
15
15
  import { ITokenProvider } from "@fluidframework/routerlicious-driver";
16
16
  import { GitManager } from "@fluidframework/server-services-client";
17
17
  import { TestHistorian } from "@fluidframework/server-test-utils";
18
18
  import { ILocalDeltaConnectionServer } from "@fluidframework/server-local-server";
19
- import { LocalDeltaStorageService, LocalDocumentDeltaConnection, LocalDocumentStorageService } from ".";
19
+ import {
20
+ LocalDeltaStorageService,
21
+ LocalDocumentDeltaConnection,
22
+ LocalDocumentStorageService,
23
+ } from ".";
20
24
  /**
21
25
  * Basic implementation of a document service for local use.
22
26
  */
23
27
  export class LocalDocumentService implements IDocumentService {
24
- /**
25
- * @param localDeltaConnectionServer - delta connection server for ops
26
- * @param tokenProvider - token provider
27
- * @param tenantId - ID of tenant
28
- * @param documentId - ID of document
29
- */
30
- constructor(
31
- public readonly resolvedUrl: IResolvedUrl,
32
- private readonly localDeltaConnectionServer: ILocalDeltaConnectionServer,
33
- private readonly tokenProvider: ITokenProvider,
34
- private readonly tenantId: string,
35
- private readonly documentId: string,
36
- private readonly documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,
37
- public readonly policies: IDocumentServicePolicies = {},
38
- private readonly innerDocumentService?: IDocumentService,
39
- ) { }
28
+ /**
29
+ * @param localDeltaConnectionServer - delta connection server for ops
30
+ * @param tokenProvider - token provider
31
+ * @param tenantId - ID of tenant
32
+ * @param documentId - ID of document
33
+ */
34
+ constructor(
35
+ public readonly resolvedUrl: IResolvedUrl,
36
+ private readonly localDeltaConnectionServer: ILocalDeltaConnectionServer,
37
+ private readonly tokenProvider: ITokenProvider,
38
+ private readonly tenantId: string,
39
+ private readonly documentId: string,
40
+ private readonly documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,
41
+ public readonly policies: IDocumentServicePolicies = {},
42
+ private readonly innerDocumentService?: IDocumentService,
43
+ ) {}
40
44
 
41
- public dispose() { }
45
+ public dispose() {}
42
46
 
43
- /**
44
- * Creates and returns a document storage service for local use.
45
- */
46
- public async connectToStorage(): Promise<IDocumentStorageService> {
47
- return new LocalDocumentStorageService(
48
- this.documentId,
49
- new GitManager(new TestHistorian(this.localDeltaConnectionServer.testDbFactory.testDatabase)),
50
- { minBlobSize: 2048 }, // Test blob aggregation.
51
- );
52
- }
47
+ /**
48
+ * Creates and returns a document storage service for local use.
49
+ */
50
+ public async connectToStorage(): Promise<IDocumentStorageService> {
51
+ return new LocalDocumentStorageService(
52
+ this.documentId,
53
+ new GitManager(
54
+ new TestHistorian(this.localDeltaConnectionServer.testDbFactory.testDatabase),
55
+ ),
56
+ {
57
+ minBlobSize: 2048, // Test blob aggregation
58
+ maximumCacheDurationMs: 432_000_000, // 5 days in ms. Not actually enforced but shouldn't matter for any local driver scenario
59
+ },
60
+ this.localDeltaConnectionServer,
61
+ this.resolvedUrl,
62
+ );
63
+ }
53
64
 
54
- /**
55
- * Creates and returns a delta storage service for local use.
56
- */
57
- public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {
58
- if (this.innerDocumentService) {
59
- return this.innerDocumentService.connectToDeltaStorage();
60
- }
61
- return new LocalDeltaStorageService(
62
- this.tenantId,
63
- this.documentId,
64
- this.localDeltaConnectionServer.databaseManager);
65
- }
65
+ /**
66
+ * Creates and returns a delta storage service for local use.
67
+ */
68
+ public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {
69
+ if (this.innerDocumentService) {
70
+ return this.innerDocumentService.connectToDeltaStorage();
71
+ }
72
+ return new LocalDeltaStorageService(
73
+ this.tenantId,
74
+ this.documentId,
75
+ this.localDeltaConnectionServer.databaseManager,
76
+ );
77
+ }
66
78
 
67
- /**
68
- * Creates and returns a delta stream for local use.
69
- * @param client - client data
70
- */
71
- public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {
72
- if (this.policies.storageOnly === true) {
73
- throw new Error("can't connect to delta stream in storage-only mode");
74
- }
75
- if (this.innerDocumentService) {
76
- return this.innerDocumentService.connectToDeltaStream(client);
77
- }
78
- const ordererToken = await this.tokenProvider.fetchOrdererToken(
79
- this.tenantId,
80
- this.documentId,
81
- );
82
- const documentDeltaConnection = await LocalDocumentDeltaConnection.create(
83
- this.tenantId,
84
- this.documentId,
85
- ordererToken.jwt,
86
- client,
87
- this.localDeltaConnectionServer.webSocketServer,
88
- );
89
- const clientId = documentDeltaConnection.clientId;
79
+ /**
80
+ * Creates and returns a delta stream for local use.
81
+ * @param client - client data
82
+ */
83
+ public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {
84
+ if (this.policies.storageOnly === true) {
85
+ throw new Error("can't connect to delta stream in storage-only mode");
86
+ }
87
+ if (this.innerDocumentService) {
88
+ return this.innerDocumentService.connectToDeltaStream(client);
89
+ }
90
+ const ordererToken = await this.tokenProvider.fetchOrdererToken(
91
+ this.tenantId,
92
+ this.documentId,
93
+ );
94
+ const documentDeltaConnection = await LocalDocumentDeltaConnection.create(
95
+ this.tenantId,
96
+ this.documentId,
97
+ ordererToken.jwt,
98
+ client,
99
+ this.localDeltaConnectionServer.webSocketServer,
100
+ );
101
+ const clientId = documentDeltaConnection.clientId;
90
102
 
91
- // Add this document service for the clientId in the document service factory.
92
- this.documentDeltaConnectionsMap.set(clientId, documentDeltaConnection);
103
+ // Add this document service for the clientId in the document service factory.
104
+ this.documentDeltaConnectionsMap.set(clientId, documentDeltaConnection);
93
105
 
94
- // Add a listener to remove this document service when the client is disconnected.
95
- documentDeltaConnection.on("disconnect", () => {
96
- this.documentDeltaConnectionsMap.delete(clientId);
97
- });
106
+ // Add a listener to remove this document service when the client is disconnected.
107
+ documentDeltaConnection.on("disconnect", () => {
108
+ this.documentDeltaConnectionsMap.delete(clientId);
109
+ });
98
110
 
99
- return documentDeltaConnection;
100
- }
111
+ return documentDeltaConnection;
112
+ }
101
113
  }
102
114
 
103
115
  /**
@@ -108,22 +120,23 @@ export class LocalDocumentService implements IDocumentService {
108
120
  * @param documentId - ID of document
109
121
  */
110
122
  export function createLocalDocumentService(
111
- resolvedUrl: IResolvedUrl,
112
- localDeltaConnectionServer: ILocalDeltaConnectionServer,
113
- tokenProvider: ITokenProvider,
114
- tenantId: string,
115
- documentId: string,
116
- documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,
117
- policies?: IDocumentServicePolicies,
118
- innerDocumentService?: IDocumentService): IDocumentService {
119
- return new LocalDocumentService(
120
- resolvedUrl,
121
- localDeltaConnectionServer,
122
- tokenProvider,
123
- tenantId,
124
- documentId,
125
- documentDeltaConnectionsMap,
126
- policies,
127
- innerDocumentService,
128
- );
123
+ resolvedUrl: IResolvedUrl,
124
+ localDeltaConnectionServer: ILocalDeltaConnectionServer,
125
+ tokenProvider: ITokenProvider,
126
+ tenantId: string,
127
+ documentId: string,
128
+ documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,
129
+ policies?: IDocumentServicePolicies,
130
+ innerDocumentService?: IDocumentService,
131
+ ): IDocumentService {
132
+ return new LocalDocumentService(
133
+ resolvedUrl,
134
+ localDeltaConnectionServer,
135
+ tokenProvider,
136
+ tenantId,
137
+ documentId,
138
+ documentDeltaConnectionsMap,
139
+ policies,
140
+ innerDocumentService,
141
+ );
129
142
  }