@fluidframework/odsp-driver-definitions 2.53.1 → 2.61.0-355054

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 (48) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-report/{odsp-driver-definitions.legacy.alpha.api.md → odsp-driver-definitions.legacy.beta.api.md} +32 -32
  3. package/dist/errors.d.ts +5 -9
  4. package/dist/errors.d.ts.map +1 -1
  5. package/dist/errors.js +1 -1
  6. package/dist/errors.js.map +1 -1
  7. package/dist/factory.d.ts +4 -4
  8. package/dist/factory.js.map +1 -1
  9. package/dist/legacy.d.ts +2 -1
  10. package/dist/odspCache.d.ts +5 -10
  11. package/dist/odspCache.d.ts.map +1 -1
  12. package/dist/odspCache.js.map +1 -1
  13. package/dist/resolvedUrl.d.ts +7 -7
  14. package/dist/resolvedUrl.js +2 -2
  15. package/dist/resolvedUrl.js.map +1 -1
  16. package/dist/sessionProvider.d.ts +5 -10
  17. package/dist/sessionProvider.d.ts.map +1 -1
  18. package/dist/sessionProvider.js.map +1 -1
  19. package/dist/tokenFetch.d.ts +5 -5
  20. package/dist/tokenFetch.js.map +1 -1
  21. package/internal.d.ts +1 -1
  22. package/legacy.d.ts +1 -1
  23. package/lib/errors.d.ts +5 -9
  24. package/lib/errors.d.ts.map +1 -1
  25. package/lib/errors.js +1 -1
  26. package/lib/errors.js.map +1 -1
  27. package/lib/factory.d.ts +4 -4
  28. package/lib/factory.js.map +1 -1
  29. package/lib/legacy.d.ts +2 -1
  30. package/lib/odspCache.d.ts +5 -10
  31. package/lib/odspCache.d.ts.map +1 -1
  32. package/lib/odspCache.js.map +1 -1
  33. package/lib/resolvedUrl.d.ts +7 -7
  34. package/lib/resolvedUrl.js +2 -2
  35. package/lib/resolvedUrl.js.map +1 -1
  36. package/lib/sessionProvider.d.ts +5 -10
  37. package/lib/sessionProvider.d.ts.map +1 -1
  38. package/lib/sessionProvider.js.map +1 -1
  39. package/lib/tokenFetch.d.ts +5 -5
  40. package/lib/tokenFetch.js.map +1 -1
  41. package/lib/tsdoc-metadata.json +1 -1
  42. package/package.json +9 -9
  43. package/src/errors.ts +5 -5
  44. package/src/factory.ts +4 -4
  45. package/src/odspCache.ts +5 -10
  46. package/src/resolvedUrl.ts +7 -7
  47. package/src/sessionProvider.ts +5 -10
  48. package/src/tokenFetch.ts +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"sessionProvider.d.ts","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IAEvC,EAAE,EAAE,MAAM,CAAC;IAIX,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IAEjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAC;IAEvC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,kDAAkD;IAClD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,kBAAkB,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,iCAA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,CAAC;CAC1E;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAAgC,SAAQ,iCAAiC;IACzF,0BAA0B,CACzB,WAAW,EAAE,YAAY,GACvB,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC;CAChD"}
@@ -1 +1 @@
1
- {"version":3,"file":"sessionProvider.js","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Socket storage discovery api response\n * @legacy\n * @alpha\n */\nexport interface ISocketStorageDiscovery {\n\t// The id of the web socket\n\tid: string;\n\n\t// SPO gives us runtimeTenantId, we remap it to tenantId\n\t// See getSocketStorageDiscovery\n\truntimeTenantId?: string;\n\ttenantId: string;\n\n\tsnapshotStorageUrl: string;\n\tdeltaStorageUrl: string;\n\n\t/**\n\t * PUSH URL\n\t */\n\tdeltaStreamSocketUrl: string;\n\n\t/**\n\t * The access token for PushChannel. Optionally returned, depending on implementation.\n\t * OneDrive for Consumer implementation returns it and OneDrive for Business implementation\n\t * does not return it and instead expects token to be returned via `getWebsocketToken` callback\n\t * passed as a parameter to `OdspDocumentService.create()` factory.\n\t */\n\tsocketToken?: string;\n\n\t/**\n\t * This is the time within which client has to refresh the session on (ODSP) relay service.\n\t */\n\trefreshSessionDurationSeconds?: number;\n\n\t/**\n\t * Represent the sensitivity labels info for the file. Keeping it optional for back-compat. The\n\t * response will contain empty labels when the file has no labels, so this field will be there\n\t * even if file has no labels when the service will implement this contract.\n\t */\n\tsensitivityLabelsInfo?: ISensitivityLabelsInfo;\n}\n\n/**\n * Sensitivity labels information for a file, part of the socket storage discovery response.\n * @legacy\n * @alpha\n */\nexport interface ISensitivityLabelsInfo {\n\t/** ISO format timestamp when the label info snapshot was generated. */\n\ttimestamp: string;\n\t/** List of applied sensitivity labels. Empty if none. */\n\tlabels: ISensitivityLabel[];\n}\n\n/**\n * A single sensitivity label applied to a document, part of the socket storage discovery response.\n * @legacy\n * @alpha\n */\nexport interface ISensitivityLabel {\n\t/** Unique identifier of the sensitivity label. */\n\tsensitivityLabelId: string;\n\t/** Tenant under which the label is defined. */\n\ttenantId: string;\n\t/** How the label was assigned, for example \"standard\". */\n\tassignmentMethod: string;\n\t/** Email of the user who applied the label. */\n\tappliedByUserEmail: string;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to interrogate itself\n * to find out if it is session aware.\n * @legacy\n * @alpha\n */\nexport interface IProvideSessionAwareDriverFactory {\n\treadonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`\n * function if it session aware.\n * @legacy\n * @alpha\n */\nexport interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {\n\tgetRelayServiceSessionInfo(\n\t\tresolvedUrl: IResolvedUrl,\n\t): Promise<ISocketStorageDiscovery | undefined>;\n}\n"]}
1
+ {"version":3,"file":"sessionProvider.js","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Socket storage discovery api response\n * @legacy @beta\n */\nexport interface ISocketStorageDiscovery {\n\t// The id of the web socket\n\tid: string;\n\n\t// SPO gives us runtimeTenantId, we remap it to tenantId\n\t// See getSocketStorageDiscovery\n\truntimeTenantId?: string;\n\ttenantId: string;\n\n\tsnapshotStorageUrl: string;\n\tdeltaStorageUrl: string;\n\n\t/**\n\t * PUSH URL\n\t */\n\tdeltaStreamSocketUrl: string;\n\n\t/**\n\t * The access token for PushChannel. Optionally returned, depending on implementation.\n\t * OneDrive for Consumer implementation returns it and OneDrive for Business implementation\n\t * does not return it and instead expects token to be returned via `getWebsocketToken` callback\n\t * passed as a parameter to `OdspDocumentService.create()` factory.\n\t */\n\tsocketToken?: string;\n\n\t/**\n\t * This is the time within which client has to refresh the session on (ODSP) relay service.\n\t */\n\trefreshSessionDurationSeconds?: number;\n\n\t/**\n\t * Represent the sensitivity labels info for the file. Keeping it optional for back-compat. The\n\t * response will contain empty labels when the file has no labels, so this field will be there\n\t * even if file has no labels when the service will implement this contract.\n\t */\n\tsensitivityLabelsInfo?: ISensitivityLabelsInfo;\n}\n\n/**\n * Sensitivity labels information for a file, part of the socket storage discovery response.\n * @legacy @beta\n */\nexport interface ISensitivityLabelsInfo {\n\t/** ISO format timestamp when the label info snapshot was generated. */\n\ttimestamp: string;\n\t/** List of applied sensitivity labels. Empty if none. */\n\tlabels: ISensitivityLabel[];\n}\n\n/**\n * A single sensitivity label applied to a document, part of the socket storage discovery response.\n * @legacy @beta\n */\nexport interface ISensitivityLabel {\n\t/** Unique identifier of the sensitivity label. */\n\tsensitivityLabelId: string;\n\t/** Tenant under which the label is defined. */\n\ttenantId: string;\n\t/** How the label was assigned, for example \"standard\". */\n\tassignmentMethod: string;\n\t/** Email of the user who applied the label. */\n\tappliedByUserEmail: string;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to interrogate itself\n * to find out if it is session aware.\n * @legacy @beta\n */\nexport interface IProvideSessionAwareDriverFactory {\n\treadonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`\n * function if it session aware.\n * @legacy @beta\n */\nexport interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {\n\tgetRelayServiceSessionInfo(\n\t\tresolvedUrl: IResolvedUrl,\n\t): Promise<ISocketStorageDiscovery | undefined>;\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Represents token response
7
7
  * @legacy
8
- * @alpha
8
+ * @beta
9
9
  */
10
10
  export interface TokenResponse {
11
11
  /** Token value */
@@ -25,7 +25,7 @@ export interface TokenResponse {
25
25
  /**
26
26
  * Represents access token fetch options
27
27
  * @legacy
28
- * @alpha
28
+ * @beta
29
29
  */
30
30
  export interface TokenFetchOptions {
31
31
  /**
@@ -58,7 +58,7 @@ export interface TokenFetchOptions {
58
58
  /**
59
59
  * Represents access token fetch options for ODSP resource
60
60
  * @legacy
61
- * @alpha
61
+ * @beta
62
62
  */
63
63
  export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
64
64
  /** Site url representing ODSP resource location */
@@ -75,7 +75,7 @@ export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
75
75
  * whether token came from cache. Legacy implementation may return a string for token value;
76
76
  * in this case it should be assumes that fromCache signal is undefined. Null is returned in case of failure.
77
77
  * @legacy
78
- * @alpha
78
+ * @beta
79
79
  */
80
80
  export type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;
81
81
  /**
@@ -105,7 +105,7 @@ export declare const isTokenFromCache: (tokenResponse: string | TokenResponse |
105
105
  * `Consumer` represents user authenticated with Microsoft Account (MSA).
106
106
  * `Enterprise` represents user authenticated with M365 tenant account.
107
107
  * @legacy
108
- * @alpha
108
+ * @beta
109
109
  */
110
110
  export type IdentityType = "Consumer" | "Enterprise";
111
111
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tokenFetch.js","sourceRoot":"","sources":["../src/tokenFetch.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAsFH;;;;;GAKG;AACI,MAAM,iBAAiB,GAAG,CAChC,aAAwD,EACxC,EAAE,CAClB,aAAa,KAAK,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ;IAC1D,CAAC,CAAC,aAAa;IACf,CAAC,CAAC,aAAa,KAAK,SAAS;QAC5B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;AAPZ,QAAA,iBAAiB,qBAOL;AAEzB;;;;;GAKG;AACI,MAAM,2BAA2B,GAAG,CAC1C,aAAwD,EACxC,EAAE;IAClB,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,EAAE,mBAAmB,KAAK,SAAS,EAAE,CAAC;QAC3F,OAAO,aAAa,CAAC,mBAAmB,CAAC;IAC1C,CAAC;IACD,MAAM,KAAK,GAAG,IAAA,yBAAiB,EAAC,aAAa,CAAC,CAAC;IAC/C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,UAAU,KAAK,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAXW,QAAA,2BAA2B,+BAWtC;AAEF;;;;;;GAMG;AACI,MAAM,gBAAgB,GAAG,CAC/B,aAA4C,EACtB,EAAE,CACxB,aAAa,KAAK,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ;IAC1D,CAAC,CAAC,SAAS;IACX,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC;AALf,QAAA,gBAAgB,oBAKD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Represents token response\n * @legacy\n * @alpha\n */\nexport interface TokenResponse {\n\t/** Token value */\n\ttoken: string;\n\n\t/**\n\t * Authorization header value will be used verbatim when making network call that requires the token.\n\t * If not provided, the token value will be assumed to be a Bearer token and will be used to generate the\n\t * Authorization header value in the following format: `Bearer ${token}`.\n\t */\n\treadonly authorizationHeader?: string;\n\n\t/**\n\t * Whether or not the token was obtained from local cache.\n\t * @remarks `undefined` indicates that it could not be determined whether or not the token was obtained this way.\n\t */\n\tfromCache?: boolean;\n}\n\n/**\n * Represents access token fetch options\n * @legacy\n * @alpha\n */\nexport interface TokenFetchOptions {\n\t/**\n\t * Value indicating whether fresh token has to be returned.\n\t * If false then it is okay to return cached unexpired token if available.\n\t */\n\trefresh: boolean;\n\n\t/**\n\t * Claims that have to be passed with token fetch request.\n\t * These can be used to specify additional information that must be passed to token authority.\n\t */\n\tclaims?: string;\n\n\t/**\n\t * Tenant id of authority that must be handling token fetch.\n\t * If it is not specified then it is up to token fetching logic to determine which tenant authority\n\t * to use to issue access token.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * Request that will be made using the fetched token.\n\t * - url: full request url, including query params\n\t * - method: method type\n\t * Request info may be encoded into the returned token that the receiver can use to validate that caller is allowed to make specific call.\n\t */\n\treadonly request?: { url: string; method: \"GET\" | \"POST\" | \"PATCH\" | \"DELETE\" | \"PUT\" };\n}\n\n/**\n * Represents access token fetch options for ODSP resource\n * @legacy\n * @alpha\n */\nexport interface OdspResourceTokenFetchOptions extends TokenFetchOptions {\n\t/** Site url representing ODSP resource location */\n\tsiteUrl: string;\n\n\t/** ODSP drive id where resource resides. Optional, used only when fetching token to access ODSP file */\n\tdriveId?: string;\n\n\t/** ODSP item id representing resource. Optional, used only when fetching token to access ODSP file */\n\titemId?: string;\n}\n\n/**\n * Method signature for callback method used to fetch access token\n * @param options - token fetch options\n * @returns If successful, TokenResponse object representing token value along with flag indicating\n * whether token came from cache. Legacy implementation may return a string for token value;\n * in this case it should be assumes that fromCache signal is undefined. Null is returned in case of failure.\n * @legacy\n * @alpha\n */\nexport type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;\n\n/**\n * Helper method which transforms return value for TokenFetcher method to token string\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Token value\n * @internal\n */\nexport const tokenFromResponse = (\n\ttokenResponse: string | TokenResponse | null | undefined,\n): string | null =>\n\ttokenResponse === null || typeof tokenResponse === \"string\"\n\t\t? tokenResponse\n\t\t: tokenResponse === undefined\n\t\t\t? null\n\t\t\t: tokenResponse.token;\n\n/**\n * Helper method which transforms return value for TokenFetcher method to Authorization header value\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Authorization header value\n * @internal\n */\nexport const authHeaderFromTokenResponse = (\n\ttokenResponse: string | TokenResponse | null | undefined,\n): string | null => {\n\tif (typeof tokenResponse === \"object\" && tokenResponse?.authorizationHeader !== undefined) {\n\t\treturn tokenResponse.authorizationHeader;\n\t}\n\tconst token = tokenFromResponse(tokenResponse);\n\tif (token !== null) {\n\t\treturn `Bearer ${token}`;\n\t}\n\treturn null;\n};\n\n/**\n * Helper method which returns flag indicating whether token response comes from local cache\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Value indicating whether response came from cache.\n * Undefined is returned when we could not determine the source of token.\n * @internal\n */\nexport const isTokenFromCache = (\n\ttokenResponse: string | TokenResponse | null,\n): boolean | undefined =>\n\ttokenResponse === null || typeof tokenResponse === \"string\"\n\t\t? undefined\n\t\t: tokenResponse.fromCache;\n\n/**\n * Identity types supported by ODSP driver.\n * `Consumer` represents user authenticated with Microsoft Account (MSA).\n * `Enterprise` represents user authenticated with M365 tenant account.\n * @legacy\n * @alpha\n */\nexport type IdentityType = \"Consumer\" | \"Enterprise\";\n\n/**\n * @returns Authorization header value\n * @internal\n */\nexport type InstrumentedStorageTokenFetcher = (\n\toptions: TokenFetchOptions,\n\tname: string,\n\talwaysRecordTokenFetchTelemetry?: boolean,\n) => Promise<string>;\n\n/**\n * @internal\n */\nexport type InstrumentedTokenFetcher = (\n\toptions: TokenFetchOptions,\n\tname: string,\n\talwaysRecordTokenFetchTelemetry?: boolean,\n) => Promise<string | null>;\n"]}
1
+ {"version":3,"file":"tokenFetch.js","sourceRoot":"","sources":["../src/tokenFetch.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAsFH;;;;;GAKG;AACI,MAAM,iBAAiB,GAAG,CAChC,aAAwD,EACxC,EAAE,CAClB,aAAa,KAAK,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ;IAC1D,CAAC,CAAC,aAAa;IACf,CAAC,CAAC,aAAa,KAAK,SAAS;QAC5B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;AAPZ,QAAA,iBAAiB,qBAOL;AAEzB;;;;;GAKG;AACI,MAAM,2BAA2B,GAAG,CAC1C,aAAwD,EACxC,EAAE;IAClB,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,EAAE,mBAAmB,KAAK,SAAS,EAAE,CAAC;QAC3F,OAAO,aAAa,CAAC,mBAAmB,CAAC;IAC1C,CAAC;IACD,MAAM,KAAK,GAAG,IAAA,yBAAiB,EAAC,aAAa,CAAC,CAAC;IAC/C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,UAAU,KAAK,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAXW,QAAA,2BAA2B,+BAWtC;AAEF;;;;;;GAMG;AACI,MAAM,gBAAgB,GAAG,CAC/B,aAA4C,EACtB,EAAE,CACxB,aAAa,KAAK,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ;IAC1D,CAAC,CAAC,SAAS;IACX,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC;AALf,QAAA,gBAAgB,oBAKD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Represents token response\n * @legacy\n * @beta\n */\nexport interface TokenResponse {\n\t/** Token value */\n\ttoken: string;\n\n\t/**\n\t * Authorization header value will be used verbatim when making network call that requires the token.\n\t * If not provided, the token value will be assumed to be a Bearer token and will be used to generate the\n\t * Authorization header value in the following format: `Bearer ${token}`.\n\t */\n\treadonly authorizationHeader?: string;\n\n\t/**\n\t * Whether or not the token was obtained from local cache.\n\t * @remarks `undefined` indicates that it could not be determined whether or not the token was obtained this way.\n\t */\n\tfromCache?: boolean;\n}\n\n/**\n * Represents access token fetch options\n * @legacy\n * @beta\n */\nexport interface TokenFetchOptions {\n\t/**\n\t * Value indicating whether fresh token has to be returned.\n\t * If false then it is okay to return cached unexpired token if available.\n\t */\n\trefresh: boolean;\n\n\t/**\n\t * Claims that have to be passed with token fetch request.\n\t * These can be used to specify additional information that must be passed to token authority.\n\t */\n\tclaims?: string;\n\n\t/**\n\t * Tenant id of authority that must be handling token fetch.\n\t * If it is not specified then it is up to token fetching logic to determine which tenant authority\n\t * to use to issue access token.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * Request that will be made using the fetched token.\n\t * - url: full request url, including query params\n\t * - method: method type\n\t * Request info may be encoded into the returned token that the receiver can use to validate that caller is allowed to make specific call.\n\t */\n\treadonly request?: { url: string; method: \"GET\" | \"POST\" | \"PATCH\" | \"DELETE\" | \"PUT\" };\n}\n\n/**\n * Represents access token fetch options for ODSP resource\n * @legacy\n * @beta\n */\nexport interface OdspResourceTokenFetchOptions extends TokenFetchOptions {\n\t/** Site url representing ODSP resource location */\n\tsiteUrl: string;\n\n\t/** ODSP drive id where resource resides. Optional, used only when fetching token to access ODSP file */\n\tdriveId?: string;\n\n\t/** ODSP item id representing resource. Optional, used only when fetching token to access ODSP file */\n\titemId?: string;\n}\n\n/**\n * Method signature for callback method used to fetch access token\n * @param options - token fetch options\n * @returns If successful, TokenResponse object representing token value along with flag indicating\n * whether token came from cache. Legacy implementation may return a string for token value;\n * in this case it should be assumes that fromCache signal is undefined. Null is returned in case of failure.\n * @legacy\n * @beta\n */\nexport type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;\n\n/**\n * Helper method which transforms return value for TokenFetcher method to token string\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Token value\n * @internal\n */\nexport const tokenFromResponse = (\n\ttokenResponse: string | TokenResponse | null | undefined,\n): string | null =>\n\ttokenResponse === null || typeof tokenResponse === \"string\"\n\t\t? tokenResponse\n\t\t: tokenResponse === undefined\n\t\t\t? null\n\t\t\t: tokenResponse.token;\n\n/**\n * Helper method which transforms return value for TokenFetcher method to Authorization header value\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Authorization header value\n * @internal\n */\nexport const authHeaderFromTokenResponse = (\n\ttokenResponse: string | TokenResponse | null | undefined,\n): string | null => {\n\tif (typeof tokenResponse === \"object\" && tokenResponse?.authorizationHeader !== undefined) {\n\t\treturn tokenResponse.authorizationHeader;\n\t}\n\tconst token = tokenFromResponse(tokenResponse);\n\tif (token !== null) {\n\t\treturn `Bearer ${token}`;\n\t}\n\treturn null;\n};\n\n/**\n * Helper method which returns flag indicating whether token response comes from local cache\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Value indicating whether response came from cache.\n * Undefined is returned when we could not determine the source of token.\n * @internal\n */\nexport const isTokenFromCache = (\n\ttokenResponse: string | TokenResponse | null,\n): boolean | undefined =>\n\ttokenResponse === null || typeof tokenResponse === \"string\"\n\t\t? undefined\n\t\t: tokenResponse.fromCache;\n\n/**\n * Identity types supported by ODSP driver.\n * `Consumer` represents user authenticated with Microsoft Account (MSA).\n * `Enterprise` represents user authenticated with M365 tenant account.\n * @legacy\n * @beta\n */\nexport type IdentityType = \"Consumer\" | \"Enterprise\";\n\n/**\n * @returns Authorization header value\n * @internal\n */\nexport type InstrumentedStorageTokenFetcher = (\n\toptions: TokenFetchOptions,\n\tname: string,\n\talwaysRecordTokenFetchTelemetry?: boolean,\n) => Promise<string>;\n\n/**\n * @internal\n */\nexport type InstrumentedTokenFetcher = (\n\toptions: TokenFetchOptions,\n\tname: string,\n\talwaysRecordTokenFetchTelemetry?: boolean,\n) => Promise<string | null>;\n"]}
package/internal.d.ts CHANGED
@@ -8,4 +8,4 @@
8
8
  * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
9
  */
10
10
 
11
- export * from "./lib/index.js";
11
+ export * from "lib/index.js";
package/legacy.d.ts CHANGED
@@ -8,4 +8,4 @@
8
8
  * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
9
  */
10
10
 
11
- export * from "./lib/legacy.js";
11
+ export * from "lib/legacy.js";
package/lib/errors.d.ts CHANGED
@@ -7,7 +7,7 @@ import { IDriverErrorBase, DriverError } from "@fluidframework/driver-definition
7
7
  * ODSP Error types.
8
8
  * Different error types that may be thrown by the ODSP driver.
9
9
  * @legacy
10
- * @alpha
10
+ * @beta
11
11
  */
12
12
  export declare const OdspErrorTypes: {
13
13
  /**
@@ -56,10 +56,6 @@ export declare const OdspErrorTypes: {
56
56
  readonly fetchFailure: "fetchFailure";
57
57
  readonly fetchTokenError: "fetchTokenError";
58
58
  readonly incorrectServerResponse: "incorrectServerResponse";
59
- /**
60
- * @legacy
61
- * @alpha
62
- */
63
59
  readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
64
60
  readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
65
61
  readonly locationRedirection: "locationRedirection";
@@ -72,12 +68,12 @@ export declare const OdspErrorTypes: {
72
68
  };
73
69
  /**
74
70
  * @legacy
75
- * @alpha
71
+ * @beta
76
72
  */
77
73
  export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
78
74
  /**
79
75
  * @legacy
80
- * @alpha
76
+ * @beta
81
77
  */
82
78
  export interface IOdspErrorAugmentations {
83
79
  /**
@@ -99,14 +95,14 @@ export interface IOdspErrorAugmentations {
99
95
  * Base interface for all errors and warnings
100
96
  * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
101
97
  * @legacy
102
- * @alpha
98
+ * @beta
103
99
  */
104
100
  export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
105
101
  readonly errorType: OdspErrorTypes;
106
102
  }
107
103
  /**
108
104
  * @legacy
109
- * @alpha
105
+ * @beta
110
106
  */
111
107
  export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
112
108
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,gBAAgB,EAChB,WAAW,EACX,MAAM,6CAA6C,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,cAAc;IAI1B;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;OAEG;;;;;;;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;;;;;GAKG;AACH,MAAM,WAAW,UAChB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAC1C,uBAAuB;IACxB,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,CAAC,WAAW,GAAG,uBAAuB,CAAC,CAAC"}
package/lib/errors.js CHANGED
@@ -7,7 +7,7 @@ import { DriverErrorTypes, } from "@fluidframework/driver-definitions/internal";
7
7
  * ODSP Error types.
8
8
  * Different error types that may be thrown by the ODSP driver.
9
9
  * @legacy
10
- * @alpha
10
+ * @beta
11
11
  */
12
12
  export const OdspErrorTypes = {
13
13
  // Inherit base driver error types
package/lib/errors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,GAGhB,MAAM,6CAA6C,CAAC;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,kCAAkC;IAClC,GAAG,gBAAgB;IAEnB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;OAIG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;;;;;OAMG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tDriverErrorTypes,\n\tIDriverErrorBase,\n\tDriverError,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n * @legacy\n * @alpha\n */\nexport const OdspErrorTypes = {\n\t// Inherit base driver error types\n\t...DriverErrorTypes,\n\n\t/**\n\t * Invalid file name (at creation of the file)\n\t */\n\tinvalidFileNameError: \"invalidFileNameError\",\n\n\t/**\n\t * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n\t * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tsnapshotTooBig: \"snapshotTooBig\",\n\n\t/**\n\t * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n\t * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tfetchTimeout: \"fetchTimeout\",\n\n\t/**\n\t * SPO admin toggle: fluid service is not enabled.\n\t */\n\tfluidNotEnabled: \"fluidNotEnabled\",\n\n\t/**\n\t * This error will be raised when client is too behind with no way to catch up.\n\t * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n\t * by storage, and thus removing an ability for client to catch up.\n\t * This condition will result in any local changes being lost (i.e. only way to save state is by user\n\t * copying it over manually)\n\t */\n\tcannotCatchUp: \"cannotCatchUp\",\n\n\t/**\n\t * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n\t * So to preserve integrity of the data, the data becomes readonly.\n\t */\n\tserviceReadOnly: \"serviceReadOnly\",\n\n\t/**\n\t * Due to organizational policies, you can't access server resources from the current network location.\n\t */\n\tblockedIPAddress: \"blockedIPAddress\",\n} as const;\n/**\n * @legacy\n * @alpha\n */\nexport type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IOdspErrorAugmentations {\n\t/**\n\t * Server epoch indicates when the file was last modified.\n\t * Used to detect modifications outside Fluid's services\n\t */\n\tserverEpoch?: string;\n\n\t/**\n\t * It is the redirection url at which the network call should have been made. It is due to change\n\t * in site domain of the file on server.\n\t */\n\tredirectLocation?: string;\n\n\t/**\n\t * It is array of error codes included in error response from server.\n\t */\n\tfacetCodes?: string[];\n}\n\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties\n * @legacy\n * @alpha\n */\nexport interface IOdspError\n\textends Omit<IDriverErrorBase, \"errorType\">,\n\t\tIOdspErrorAugmentations {\n\treadonly errorType: OdspErrorTypes;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,GAGhB,MAAM,6CAA6C,CAAC;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,kCAAkC;IAClC,GAAG,gBAAgB;IAEnB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;OAIG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;;;;;OAMG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tDriverErrorTypes,\n\tIDriverErrorBase,\n\tDriverError,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n * @legacy\n * @beta\n */\nexport const OdspErrorTypes = {\n\t// Inherit base driver error types\n\t...DriverErrorTypes,\n\n\t/**\n\t * Invalid file name (at creation of the file)\n\t */\n\tinvalidFileNameError: \"invalidFileNameError\",\n\n\t/**\n\t * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n\t * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tsnapshotTooBig: \"snapshotTooBig\",\n\n\t/**\n\t * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n\t * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tfetchTimeout: \"fetchTimeout\",\n\n\t/**\n\t * SPO admin toggle: fluid service is not enabled.\n\t */\n\tfluidNotEnabled: \"fluidNotEnabled\",\n\n\t/**\n\t * This error will be raised when client is too behind with no way to catch up.\n\t * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n\t * by storage, and thus removing an ability for client to catch up.\n\t * This condition will result in any local changes being lost (i.e. only way to save state is by user\n\t * copying it over manually)\n\t */\n\tcannotCatchUp: \"cannotCatchUp\",\n\n\t/**\n\t * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n\t * So to preserve integrity of the data, the data becomes readonly.\n\t */\n\tserviceReadOnly: \"serviceReadOnly\",\n\n\t/**\n\t * Due to organizational policies, you can't access server resources from the current network location.\n\t */\n\tblockedIPAddress: \"blockedIPAddress\",\n} as const;\n/**\n * @legacy\n * @beta\n */\nexport type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];\n\n/**\n * @legacy\n * @beta\n */\nexport interface IOdspErrorAugmentations {\n\t/**\n\t * Server epoch indicates when the file was last modified.\n\t * Used to detect modifications outside Fluid's services\n\t */\n\tserverEpoch?: string;\n\n\t/**\n\t * It is the redirection url at which the network call should have been made. It is due to change\n\t * in site domain of the file on server.\n\t */\n\tredirectLocation?: string;\n\n\t/**\n\t * It is array of error codes included in error response from server.\n\t */\n\tfacetCodes?: string[];\n}\n\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties\n * @legacy\n * @beta\n */\nexport interface IOdspError\n\textends Omit<IDriverErrorBase, \"errorType\">,\n\t\tIOdspErrorAugmentations {\n\treadonly errorType: OdspErrorTypes;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
package/lib/factory.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  /**
6
6
  * @legacy
7
- * @alpha
7
+ * @beta
8
8
  */
9
9
  export interface ISnapshotOptions {
10
10
  blobs?: number;
@@ -22,7 +22,7 @@ export interface ISnapshotOptions {
22
22
  }
23
23
  /**
24
24
  * @legacy
25
- * @alpha
25
+ * @beta
26
26
  */
27
27
  export interface IOpsCachingPolicy {
28
28
  /**
@@ -51,7 +51,7 @@ export interface IOpsCachingPolicy {
51
51
  }
52
52
  /**
53
53
  * @legacy
54
- * @alpha
54
+ * @beta
55
55
  */
56
56
  export interface ICollabSessionOptions {
57
57
  /**
@@ -81,7 +81,7 @@ export interface ICollabSessionOptions {
81
81
  }
82
82
  /**
83
83
  * @legacy
84
- * @alpha
84
+ * @beta
85
85
  */
86
86
  export interface HostStoragePolicy {
87
87
  snapshotOptions?: ISnapshotOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\n\t/**\n\t * Maximum Data size (in bytes)\n\t *\n\t * @remarks\n\t * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})\n\t * if snapshot is bigger in size than specified limit.\n\t */\n\tmds?: number;\n\n\t/*\n\t * Maximum time limit to fetch snapshot (in seconds)\n\t * If specified, client will timeout the fetch request if it exceeds the time limit and\n\t * will try to fetch the snapshot without blobs.\n\t */\n\ttimeout?: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IOpsCachingPolicy {\n\t/**\n\t * Batch size. Controls how many ops are grouped together as single cache entry\n\t * The bigger the number, the more efficient it is (less reads & writes)\n\t * At the same time, big number means we wait for so many ops to accumulate, which\n\t * increases chances and number of trailing ops that would not be flushed to cache\n\t * when user closes tab\n\t * Use any number below 1 to disable caching\n\t * Default: 100\n\t */\n\tbatchSize?: number;\n\n\t/**\n\t * To reduce the problem of losing trailing ops when using big batch sizes, host\n\t * could specify how often driver should flush ops it has not flushed yet.\n\t * -1 means do not use timer.\n\t * Measured in ms.\n\t * Default: 5000\n\t */\n\ttimerGranularity?: number;\n\n\t/**\n\t * Total number of ops to cache. When we reach that number, ops caching stops\n\t * Default: 5000\n\t */\n\ttotalOpsToCache?: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ICollabSessionOptions {\n\t/**\n\t * Value indicating the display name for session that admits unauthenticated user.\n\t * This name will be used in attribution associated with edits made by such user.\n\t * @deprecated starting in 2.0-RC3. No longer needed.\n\t */\n\tunauthenticatedUserDisplayName?: string;\n\t/**\n\t * Value indicating session preference to always pass access token via Authorization header.\n\t * Default behavior is to pass access token via query parameter unless overall href string\n\t * length exceeds 2048 characters. Using query param is performance optimization which results\n\t * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n\t * validate CORS. However, not all ODSP implementations understand this optimization.\n\t * For instance, auth layer on Converged stack will fail request with access token passed via\n\t * query param.\n\t * @deprecated Due to security reasons we will be passing the token via Authorization header only.\n\t */\n\tforceAccessTokenViaAuthorizationHeader?: boolean;\n\t/**\n\t * Value indicating the client display name for current session.\n\t * This name will be used in attribution associated with edits made during session.\n\t * This is optional and used only when collab session is being joined by client acting in app-only mode (i.e. without user context).\n\t * If not specified client display name is extracted from the access token that is used to join session.\n\t */\n\tdisplayName?: string;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface HostStoragePolicy {\n\tsnapshotOptions?: ISnapshotOptions;\n\n\t/**\n\t * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n\t * Container loads from whatever comes first in such case.\n\t * Snapshot fetched from storage is pushed to cache in either case.\n\t * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n\t * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n\t * it will load from cache and not reach out to storage.\n\t * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n\t */\n\tconcurrentSnapshotFetch?: boolean;\n\n\t// Options overwriting default ops fetching from storage.\n\topsBatchSize?: number;\n\tconcurrentOpsBatches?: number;\n\n\t/**\n\t * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n\t */\n\topsCaching?: IOpsCachingPolicy;\n\n\t/**\n\t * Policy controlling how collaboration session is established\n\t */\n\tsessionOptions?: ICollabSessionOptions;\n\n\t/**\n\t * @deprecated This field will be always set to true after removal.\n\t * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n\t * During fallback it will first redeem the sharing link and then make the Trees latest call.\n\t */\n\tenableRedeemFallback?: boolean;\n\n\t/**\n\t * Policy controlling if we will cache initial summary when we create a document\n\t */\n\tcacheCreateNewSummary?: boolean;\n\n\t/**\n\t * @deprecated This will be replaced with feature gate snapshotFormatFetchType.\n\t * Policy controlling if we want to fetch binary format snapshot.\n\t */\n\tfetchBinarySnapshotFormat?: boolean;\n\n\t/**\n\t * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n\t */\n\tisolateSocketCache?: boolean;\n\n\t/**\n\t * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n\t * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n\t * It enables the creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n\t * requests where 'createLinkScope' is requested.)\n\t */\n\tenableShareLinkWithCreate?: boolean;\n\n\t/**\n\t * Enable creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n\t * where 'createLinkType' was requested.)\n\t */\n\tenableSingleRequestForShareLinkWithCreate?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated\n\t * as false. This is if the host wants to do some A/B testing.\n\t */\n\tavoidPrefetchSnapshotCache?: boolean;\n}\n"]}
1
+ {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @beta\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\n\t/**\n\t * Maximum Data size (in bytes)\n\t *\n\t * @remarks\n\t * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})\n\t * if snapshot is bigger in size than specified limit.\n\t */\n\tmds?: number;\n\n\t/*\n\t * Maximum time limit to fetch snapshot (in seconds)\n\t * If specified, client will timeout the fetch request if it exceeds the time limit and\n\t * will try to fetch the snapshot without blobs.\n\t */\n\ttimeout?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface IOpsCachingPolicy {\n\t/**\n\t * Batch size. Controls how many ops are grouped together as single cache entry\n\t * The bigger the number, the more efficient it is (less reads & writes)\n\t * At the same time, big number means we wait for so many ops to accumulate, which\n\t * increases chances and number of trailing ops that would not be flushed to cache\n\t * when user closes tab\n\t * Use any number below 1 to disable caching\n\t * Default: 100\n\t */\n\tbatchSize?: number;\n\n\t/**\n\t * To reduce the problem of losing trailing ops when using big batch sizes, host\n\t * could specify how often driver should flush ops it has not flushed yet.\n\t * -1 means do not use timer.\n\t * Measured in ms.\n\t * Default: 5000\n\t */\n\ttimerGranularity?: number;\n\n\t/**\n\t * Total number of ops to cache. When we reach that number, ops caching stops\n\t * Default: 5000\n\t */\n\ttotalOpsToCache?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface ICollabSessionOptions {\n\t/**\n\t * Value indicating the display name for session that admits unauthenticated user.\n\t * This name will be used in attribution associated with edits made by such user.\n\t * @deprecated starting in 2.0-RC3. No longer needed.\n\t */\n\tunauthenticatedUserDisplayName?: string;\n\t/**\n\t * Value indicating session preference to always pass access token via Authorization header.\n\t * Default behavior is to pass access token via query parameter unless overall href string\n\t * length exceeds 2048 characters. Using query param is performance optimization which results\n\t * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n\t * validate CORS. However, not all ODSP implementations understand this optimization.\n\t * For instance, auth layer on Converged stack will fail request with access token passed via\n\t * query param.\n\t * @deprecated Due to security reasons we will be passing the token via Authorization header only.\n\t */\n\tforceAccessTokenViaAuthorizationHeader?: boolean;\n\t/**\n\t * Value indicating the client display name for current session.\n\t * This name will be used in attribution associated with edits made during session.\n\t * This is optional and used only when collab session is being joined by client acting in app-only mode (i.e. without user context).\n\t * If not specified client display name is extracted from the access token that is used to join session.\n\t */\n\tdisplayName?: string;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface HostStoragePolicy {\n\tsnapshotOptions?: ISnapshotOptions;\n\n\t/**\n\t * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n\t * Container loads from whatever comes first in such case.\n\t * Snapshot fetched from storage is pushed to cache in either case.\n\t * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n\t * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n\t * it will load from cache and not reach out to storage.\n\t * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n\t */\n\tconcurrentSnapshotFetch?: boolean;\n\n\t// Options overwriting default ops fetching from storage.\n\topsBatchSize?: number;\n\tconcurrentOpsBatches?: number;\n\n\t/**\n\t * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n\t */\n\topsCaching?: IOpsCachingPolicy;\n\n\t/**\n\t * Policy controlling how collaboration session is established\n\t */\n\tsessionOptions?: ICollabSessionOptions;\n\n\t/**\n\t * @deprecated This field will be always set to true after removal.\n\t * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n\t * During fallback it will first redeem the sharing link and then make the Trees latest call.\n\t */\n\tenableRedeemFallback?: boolean;\n\n\t/**\n\t * Policy controlling if we will cache initial summary when we create a document\n\t */\n\tcacheCreateNewSummary?: boolean;\n\n\t/**\n\t * @deprecated This will be replaced with feature gate snapshotFormatFetchType.\n\t * Policy controlling if we want to fetch binary format snapshot.\n\t */\n\tfetchBinarySnapshotFormat?: boolean;\n\n\t/**\n\t * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n\t */\n\tisolateSocketCache?: boolean;\n\n\t/**\n\t * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n\t * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n\t * It enables the creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n\t * requests where 'createLinkScope' is requested.)\n\t */\n\tenableShareLinkWithCreate?: boolean;\n\n\t/**\n\t * Enable creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n\t * where 'createLinkType' was requested.)\n\t */\n\tenableSingleRequestForShareLinkWithCreate?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated\n\t * as false. This is if the host wants to do some A/B testing.\n\t */\n\tavoidPrefetchSnapshotCache?: boolean;\n}\n"]}
package/lib/legacy.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  export {
12
- // @legacy APIs
12
+ // #region @legacyBeta APIs
13
13
  CacheContentType,
14
14
  HostStoragePolicy,
15
15
  ICacheEntry,
@@ -40,4 +40,5 @@ export {
40
40
  TokenFetchOptions,
41
41
  TokenFetcher,
42
42
  TokenResponse
43
+ // #endregion
43
44
  } from "./index.js";
@@ -23,13 +23,11 @@ export declare const snapshotKey = "snapshot";
23
23
  */
24
24
  export declare const snapshotWithLoadingGroupIdKey = "snapshotWithLoadingGroupId";
25
25
  /**
26
- * @legacy
27
- * @alpha
26
+ * @legacy @beta
28
27
  */
29
28
  export type CacheContentType = "snapshot" | "ops" | "snapshotWithLoadingGroupId";
30
29
  /**
31
- * @legacy
32
- * @alpha
30
+ * @legacy @beta
33
31
  */
34
32
  export interface IFileEntry {
35
33
  /**
@@ -47,8 +45,7 @@ export interface IFileEntry {
47
45
  }
48
46
  /**
49
47
  * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
50
- * @legacy
51
- * @alpha
48
+ * @legacy @beta
52
49
  */
53
50
  export interface IEntry {
54
51
  /**
@@ -69,8 +66,7 @@ export interface IEntry {
69
66
  }
70
67
  /**
71
68
  * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
72
- * @legacy
73
- * @alpha
69
+ * @legacy @beta
74
70
  */
75
71
  export interface ICacheEntry extends IEntry {
76
72
  /**
@@ -84,8 +80,7 @@ export interface ICacheEntry extends IEntry {
84
80
  * cache implementation that does not survive across sessions. Snapshot entires stored in the
85
81
  * IPersistedCache will be considered stale and removed after 2 days. Read the README for more
86
82
  * information.
87
- * @legacy
88
- * @alpha
83
+ * @legacy @beta
89
84
  */
90
85
  export interface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"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAe,WAAW,CAAC,CAAC,eAAe;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;AAoG1E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAkB;IACrD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;AACzD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type FiveDaysMs, IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.\n * That policy is the outward expression and this value is the implementation - using a larger value\n * would violate that statement of the driver's behavior.\n * Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.\n *\n * @internal\n */\nexport const maximumCacheDurationMs: FiveDaysMs = 432_000_000; // 5 days in ms\n\n/**\n * Describes what kind of content is stored in cache entry.\n * @internal\n */\nexport const snapshotKey = \"snapshot\";\n\n/**\n * Describes key for partial snapshot with loading GroupId in cache entry.\n * @internal\n */\nexport const snapshotWithLoadingGroupIdKey = \"snapshotWithLoadingGroupId\";\n\n/**\n * @legacy\n * @alpha\n */\nexport type CacheContentType = \"snapshot\" | \"ops\" | \"snapshotWithLoadingGroupId\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\n/**\n * @legacy\n * @alpha\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy\n * @alpha\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: CacheContentType;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy\n * @alpha\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy\n * @alpha\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<any>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: any): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parametres.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n}\n\n/**\n * Api to generate a cache key from cache entry.\n * @param entry - cache entry from which a cache key is generated\n * @returns The key for cache.\n * @internal\n */\nexport function getKeyForCacheEntry(entry: ICacheEntry): string {\n\treturn `${entry.file.docId}_${entry.type}_${entry.key}`;\n}\n"]}
1
+ {"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAe,WAAW,CAAC,CAAC,eAAe;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;AA+F1E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAkB;IACrD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;AACzD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type FiveDaysMs, IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.\n * That policy is the outward expression and this value is the implementation - using a larger value\n * would violate that statement of the driver's behavior.\n * Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.\n *\n * @internal\n */\nexport const maximumCacheDurationMs: FiveDaysMs = 432_000_000; // 5 days in ms\n\n/**\n * Describes what kind of content is stored in cache entry.\n * @internal\n */\nexport const snapshotKey = \"snapshot\";\n\n/**\n * Describes key for partial snapshot with loading GroupId in cache entry.\n * @internal\n */\nexport const snapshotWithLoadingGroupIdKey = \"snapshotWithLoadingGroupId\";\n\n/**\n * @legacy @beta\n */\nexport type CacheContentType = \"snapshot\" | \"ops\" | \"snapshotWithLoadingGroupId\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\n/**\n * @legacy @beta\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: CacheContentType;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy @beta\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<any>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: any): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parametres.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n}\n\n/**\n * Api to generate a cache key from cache entry.\n * @param entry - cache entry from which a cache key is generated\n * @returns The key for cache.\n * @internal\n */\nexport function getKeyForCacheEntry(entry: ICacheEntry): string {\n\treturn `${entry.file.docId}_${entry.type}_${entry.key}`;\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  import { IResolvedUrl } from "@fluidframework/driver-definitions/internal";
6
6
  /**
7
7
  * @legacy
8
- * @alpha
8
+ * @beta
9
9
  */
10
10
  export interface IOdspUrlParts {
11
11
  siteUrl: string;
@@ -15,7 +15,7 @@ export interface IOdspUrlParts {
15
15
  /**
16
16
  * Sharing scope of the share links created for a file.
17
17
  * @legacy
18
- * @alpha
18
+ * @beta
19
19
  */
20
20
  export declare enum SharingLinkScope {
21
21
  organization = "organization",
@@ -26,7 +26,7 @@ export declare enum SharingLinkScope {
26
26
  /**
27
27
  * View/edit permission role for a sharing link.
28
28
  * @legacy
29
- * @alpha
29
+ * @beta
30
30
  */
31
31
  export declare enum SharingLinkRole {
32
32
  view = "view",
@@ -36,7 +36,7 @@ export declare enum SharingLinkRole {
36
36
  * Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.
37
37
  * Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.
38
38
  * @legacy
39
- * @alpha
39
+ * @beta
40
40
  */
41
41
  export interface ISharingLinkKind {
42
42
  scope: SharingLinkScope;
@@ -45,7 +45,7 @@ export interface ISharingLinkKind {
45
45
  /**
46
46
  * Sharing link data received from the /snapshot api response.
47
47
  * @legacy
48
- * @alpha
48
+ * @beta
49
49
  */
50
50
  export interface ISharingLink extends ISharingLinkKind {
51
51
  webUrl: string;
@@ -55,7 +55,7 @@ export interface ISharingLink extends ISharingLinkKind {
55
55
  * Contains information about either sharing link created while creating a new file or
56
56
  * a redeemable share link created when loading an existing file
57
57
  * @legacy
58
- * @alpha
58
+ * @beta
59
59
  */
60
60
  export interface ShareLinkInfoType {
61
61
  /**
@@ -91,7 +91,7 @@ export interface ShareLinkInfoType {
91
91
  }
92
92
  /**
93
93
  * @legacy
94
- * @alpha
94
+ * @beta
95
95
  */
96
96
  export interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {
97
97
  type: "fluid";
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Sharing scope of the share links created for a file.
7
7
  * @legacy
8
- * @alpha
8
+ * @beta
9
9
  */
10
10
  export var SharingLinkScope;
11
11
  (function (SharingLinkScope) {
@@ -17,7 +17,7 @@ export var SharingLinkScope;
17
17
  /**
18
18
  * View/edit permission role for a sharing link.
19
19
  * @legacy
20
- * @alpha
20
+ * @beta
21
21
  */
22
22
  export var SharingLinkRole;
23
23
  (function (SharingLinkRole) {
@@ -1 +1 @@
1
- {"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;AACpB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,gCAAa,CAAA;IACb,gCAAa,CAAA;AACd,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IOdspUrlParts {\n\tsiteUrl: string;\n\tdriveId: string;\n\titemId: string;\n}\n\n/**\n * Sharing scope of the share links created for a file.\n * @legacy\n * @alpha\n */\nexport enum SharingLinkScope {\n\torganization = \"organization\",\n\tusers = \"users\",\n\tanonymous = \"anonymous\",\n\tdefault = \"default\",\n}\n\n/**\n * View/edit permission role for a sharing link.\n * @legacy\n * @alpha\n */\nexport enum SharingLinkRole {\n\tview = \"view\",\n\tedit = \"edit\",\n}\n\n/**\n * Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.\n * Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.\n * @legacy\n * @alpha\n */\nexport interface ISharingLinkKind {\n\tscope: SharingLinkScope;\n\t/*\n\t * If this parameter is not provided, the API will default to \"edit\" links (provided\n\t * a valid createLinkScope setting is given).\n\t */\n\trole?: SharingLinkRole;\n}\n\n/**\n * Sharing link data received from the /snapshot api response.\n * @legacy\n * @alpha\n */\nexport interface ISharingLink extends ISharingLinkKind {\n\twebUrl: string;\n}\n\n/**\n * Sharing link data created for the ODSP item.\n * Contains information about either sharing link created while creating a new file or\n * a redeemable share link created when loading an existing file\n * @legacy\n * @alpha\n */\nexport interface ShareLinkInfoType {\n\t/**\n\t * We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to\n\t * create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature\n\t * where we can create a share link along with creating a file by passing a query parameter called\n\t * createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information\n\t * from the /snapshot api response.\n\t */\n\tcreateLink?: {\n\t\t/**\n\t\t * Share link created when the file is created for the first time with /snapshot api call.\n\t\t */\n\t\tlink?: ISharingLink;\n\n\t\t/**\n\t\t * Error message if creation of sharing link fails with /snapshot api call\n\t\t */\n\t\terror?: any;\n\n\t\tshareId?: string;\n\t};\n\n\t/**\n\t * This is used to save the network calls while doing trees/latest call as if the client does not have\n\t * permission then this link can be redeemed for the permissions in the same network call.\n\t */\n\tsharingLinkToRedeem?: string;\n\n\t/**\n\t * When a sharingLinkToRedeem is used, this parameter can be set to make the request with\n\t * the redemption expire after a certain time period.\n\t * The duration of the redemption is not set by Fluid.\n\t * @defaultValue false\n\t */\n\tisRedemptionNonDurable?: boolean;\n}\n/**\n * @legacy\n * @alpha\n */\nexport interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {\n\ttype: \"fluid\";\n\todspResolvedUrl: true;\n\n\t// URL to send to fluid, contains the documentId and the path\n\turl: string;\n\n\t// A hashed identifier that is unique to this document\n\thashedDocumentId: string;\n\n\tendpoints: {\n\t\tsnapshotStorageUrl: string;\n\t\tattachmentPOSTStorageUrl: string;\n\t\tattachmentGETStorageUrl: string;\n\t\tdeltaStorageUrl: string;\n\t};\n\n\t// Tokens are not obtained by the ODSP driver using the resolve flow, the app must provide them.\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\ttokens: {};\n\n\tfileName: string;\n\t/**\n\t * Used to track when a file was created with a temporary name. In that case this value will\n\t * be the desired name, which the file is eventually renamed too.\n\t */\n\tpendingRename?: string;\n\n\tsummarizer: boolean;\n\n\tcodeHint?: {\n\t\t// containerPackageName is used for adding the package name to the request headers.\n\t\t// This may be used for preloading the container package when loading Fluid content.\n\t\tcontainerPackageName?: string;\n\t};\n\n\tfileVersion: string | undefined;\n\n\tdataStorePath?: string;\n\n\t/**\n\t * Sharing link data created for the ODSP item.\n\t * Contains information about either sharing link created while creating a new file or\n\t * a redeemable share link created when loading an existing file\n\t */\n\tshareLinkInfo?: ShareLinkInfoType;\n\n\tisClpCompliantApp?: boolean;\n\n\t/**\n\t * Context for given resolved URL. The context of a resolved URL is a string that contains\n\t * the resolved URL and the data store path of the resolved URL.\n\t */\n\tcontext?: string;\n\n\t/**\n\t * Name of the application that owns the URL. This hint is used by link handling logic which determines which\n\t * app to redirect to when user navigates directly to the link.\n\t * Can be ommited in case it is not necessary for the link handling logic.\n\t */\n\tappName?: string;\n\n\t/**\n\t * File metadata such as eTag.\n\t */\n\tfileMetadata?: {\n\t\t/**\n\t\t * ETag (entity tag) identifier for a specific version of the file.\n\t\t */\n\t\teTag?: string;\n\t};\n}\n"]}
1
+ {"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;AACpB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,gCAAa,CAAA;IACb,gCAAa,CAAA;AACd,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * @legacy\n * @beta\n */\nexport interface IOdspUrlParts {\n\tsiteUrl: string;\n\tdriveId: string;\n\titemId: string;\n}\n\n/**\n * Sharing scope of the share links created for a file.\n * @legacy\n * @beta\n */\nexport enum SharingLinkScope {\n\torganization = \"organization\",\n\tusers = \"users\",\n\tanonymous = \"anonymous\",\n\tdefault = \"default\",\n}\n\n/**\n * View/edit permission role for a sharing link.\n * @legacy\n * @beta\n */\nexport enum SharingLinkRole {\n\tview = \"view\",\n\tedit = \"edit\",\n}\n\n/**\n * Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.\n * Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.\n * @legacy\n * @beta\n */\nexport interface ISharingLinkKind {\n\tscope: SharingLinkScope;\n\t/*\n\t * If this parameter is not provided, the API will default to \"edit\" links (provided\n\t * a valid createLinkScope setting is given).\n\t */\n\trole?: SharingLinkRole;\n}\n\n/**\n * Sharing link data received from the /snapshot api response.\n * @legacy\n * @beta\n */\nexport interface ISharingLink extends ISharingLinkKind {\n\twebUrl: string;\n}\n\n/**\n * Sharing link data created for the ODSP item.\n * Contains information about either sharing link created while creating a new file or\n * a redeemable share link created when loading an existing file\n * @legacy\n * @beta\n */\nexport interface ShareLinkInfoType {\n\t/**\n\t * We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to\n\t * create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature\n\t * where we can create a share link along with creating a file by passing a query parameter called\n\t * createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information\n\t * from the /snapshot api response.\n\t */\n\tcreateLink?: {\n\t\t/**\n\t\t * Share link created when the file is created for the first time with /snapshot api call.\n\t\t */\n\t\tlink?: ISharingLink;\n\n\t\t/**\n\t\t * Error message if creation of sharing link fails with /snapshot api call\n\t\t */\n\t\terror?: any;\n\n\t\tshareId?: string;\n\t};\n\n\t/**\n\t * This is used to save the network calls while doing trees/latest call as if the client does not have\n\t * permission then this link can be redeemed for the permissions in the same network call.\n\t */\n\tsharingLinkToRedeem?: string;\n\n\t/**\n\t * When a sharingLinkToRedeem is used, this parameter can be set to make the request with\n\t * the redemption expire after a certain time period.\n\t * The duration of the redemption is not set by Fluid.\n\t * @defaultValue false\n\t */\n\tisRedemptionNonDurable?: boolean;\n}\n/**\n * @legacy\n * @beta\n */\nexport interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {\n\ttype: \"fluid\";\n\todspResolvedUrl: true;\n\n\t// URL to send to fluid, contains the documentId and the path\n\turl: string;\n\n\t// A hashed identifier that is unique to this document\n\thashedDocumentId: string;\n\n\tendpoints: {\n\t\tsnapshotStorageUrl: string;\n\t\tattachmentPOSTStorageUrl: string;\n\t\tattachmentGETStorageUrl: string;\n\t\tdeltaStorageUrl: string;\n\t};\n\n\t// Tokens are not obtained by the ODSP driver using the resolve flow, the app must provide them.\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\ttokens: {};\n\n\tfileName: string;\n\t/**\n\t * Used to track when a file was created with a temporary name. In that case this value will\n\t * be the desired name, which the file is eventually renamed too.\n\t */\n\tpendingRename?: string;\n\n\tsummarizer: boolean;\n\n\tcodeHint?: {\n\t\t// containerPackageName is used for adding the package name to the request headers.\n\t\t// This may be used for preloading the container package when loading Fluid content.\n\t\tcontainerPackageName?: string;\n\t};\n\n\tfileVersion: string | undefined;\n\n\tdataStorePath?: string;\n\n\t/**\n\t * Sharing link data created for the ODSP item.\n\t * Contains information about either sharing link created while creating a new file or\n\t * a redeemable share link created when loading an existing file\n\t */\n\tshareLinkInfo?: ShareLinkInfoType;\n\n\tisClpCompliantApp?: boolean;\n\n\t/**\n\t * Context for given resolved URL. The context of a resolved URL is a string that contains\n\t * the resolved URL and the data store path of the resolved URL.\n\t */\n\tcontext?: string;\n\n\t/**\n\t * Name of the application that owns the URL. This hint is used by link handling logic which determines which\n\t * app to redirect to when user navigates directly to the link.\n\t * Can be ommited in case it is not necessary for the link handling logic.\n\t */\n\tappName?: string;\n\n\t/**\n\t * File metadata such as eTag.\n\t */\n\tfileMetadata?: {\n\t\t/**\n\t\t * ETag (entity tag) identifier for a specific version of the file.\n\t\t */\n\t\teTag?: string;\n\t};\n}\n"]}
@@ -5,8 +5,7 @@
5
5
  import { IResolvedUrl } from "@fluidframework/driver-definitions/internal";
6
6
  /**
7
7
  * Socket storage discovery api response
8
- * @legacy
9
- * @alpha
8
+ * @legacy @beta
10
9
  */
11
10
  export interface ISocketStorageDiscovery {
12
11
  id: string;
@@ -38,8 +37,7 @@ export interface ISocketStorageDiscovery {
38
37
  }
39
38
  /**
40
39
  * Sensitivity labels information for a file, part of the socket storage discovery response.
41
- * @legacy
42
- * @alpha
40
+ * @legacy @beta
43
41
  */
44
42
  export interface ISensitivityLabelsInfo {
45
43
  /** ISO format timestamp when the label info snapshot was generated. */
@@ -49,8 +47,7 @@ export interface ISensitivityLabelsInfo {
49
47
  }
50
48
  /**
51
49
  * A single sensitivity label applied to a document, part of the socket storage discovery response.
52
- * @legacy
53
- * @alpha
50
+ * @legacy @beta
54
51
  */
55
52
  export interface ISensitivityLabel {
56
53
  /** Unique identifier of the sensitivity label. */
@@ -65,8 +62,7 @@ export interface ISensitivityLabel {
65
62
  /**
66
63
  * An interface that allows a concrete instance of a driver factory to interrogate itself
67
64
  * to find out if it is session aware.
68
- * @legacy
69
- * @alpha
65
+ * @legacy @beta
70
66
  */
71
67
  export interface IProvideSessionAwareDriverFactory {
72
68
  readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
@@ -74,8 +70,7 @@ export interface IProvideSessionAwareDriverFactory {
74
70
  /**
75
71
  * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`
76
72
  * function if it session aware.
77
- * @legacy
78
- * @alpha
73
+ * @legacy @beta
79
74
  */
80
75
  export interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
81
76
  getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"sessionProvider.d.ts","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IAEvC,EAAE,EAAE,MAAM,CAAC;IAIX,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IAEjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAC;IAEvC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;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5B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IACjC,kDAAkD;IAClD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,kBAAkB,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD,QAAQ,CAAC,+BAA+B,EAAE,+BAA+B,CAAC;CAC1E;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAAgC,SAAQ,iCAAiC;IACzF,0BAA0B,CACzB,WAAW,EAAE,YAAY,GACvB,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC;CAChD"}
@@ -1 +1 @@
1
- {"version":3,"file":"sessionProvider.js","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Socket storage discovery api response\n * @legacy\n * @alpha\n */\nexport interface ISocketStorageDiscovery {\n\t// The id of the web socket\n\tid: string;\n\n\t// SPO gives us runtimeTenantId, we remap it to tenantId\n\t// See getSocketStorageDiscovery\n\truntimeTenantId?: string;\n\ttenantId: string;\n\n\tsnapshotStorageUrl: string;\n\tdeltaStorageUrl: string;\n\n\t/**\n\t * PUSH URL\n\t */\n\tdeltaStreamSocketUrl: string;\n\n\t/**\n\t * The access token for PushChannel. Optionally returned, depending on implementation.\n\t * OneDrive for Consumer implementation returns it and OneDrive for Business implementation\n\t * does not return it and instead expects token to be returned via `getWebsocketToken` callback\n\t * passed as a parameter to `OdspDocumentService.create()` factory.\n\t */\n\tsocketToken?: string;\n\n\t/**\n\t * This is the time within which client has to refresh the session on (ODSP) relay service.\n\t */\n\trefreshSessionDurationSeconds?: number;\n\n\t/**\n\t * Represent the sensitivity labels info for the file. Keeping it optional for back-compat. The\n\t * response will contain empty labels when the file has no labels, so this field will be there\n\t * even if file has no labels when the service will implement this contract.\n\t */\n\tsensitivityLabelsInfo?: ISensitivityLabelsInfo;\n}\n\n/**\n * Sensitivity labels information for a file, part of the socket storage discovery response.\n * @legacy\n * @alpha\n */\nexport interface ISensitivityLabelsInfo {\n\t/** ISO format timestamp when the label info snapshot was generated. */\n\ttimestamp: string;\n\t/** List of applied sensitivity labels. Empty if none. */\n\tlabels: ISensitivityLabel[];\n}\n\n/**\n * A single sensitivity label applied to a document, part of the socket storage discovery response.\n * @legacy\n * @alpha\n */\nexport interface ISensitivityLabel {\n\t/** Unique identifier of the sensitivity label. */\n\tsensitivityLabelId: string;\n\t/** Tenant under which the label is defined. */\n\ttenantId: string;\n\t/** How the label was assigned, for example \"standard\". */\n\tassignmentMethod: string;\n\t/** Email of the user who applied the label. */\n\tappliedByUserEmail: string;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to interrogate itself\n * to find out if it is session aware.\n * @legacy\n * @alpha\n */\nexport interface IProvideSessionAwareDriverFactory {\n\treadonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`\n * function if it session aware.\n * @legacy\n * @alpha\n */\nexport interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {\n\tgetRelayServiceSessionInfo(\n\t\tresolvedUrl: IResolvedUrl,\n\t): Promise<ISocketStorageDiscovery | undefined>;\n}\n"]}
1
+ {"version":3,"file":"sessionProvider.js","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Socket storage discovery api response\n * @legacy @beta\n */\nexport interface ISocketStorageDiscovery {\n\t// The id of the web socket\n\tid: string;\n\n\t// SPO gives us runtimeTenantId, we remap it to tenantId\n\t// See getSocketStorageDiscovery\n\truntimeTenantId?: string;\n\ttenantId: string;\n\n\tsnapshotStorageUrl: string;\n\tdeltaStorageUrl: string;\n\n\t/**\n\t * PUSH URL\n\t */\n\tdeltaStreamSocketUrl: string;\n\n\t/**\n\t * The access token for PushChannel. Optionally returned, depending on implementation.\n\t * OneDrive for Consumer implementation returns it and OneDrive for Business implementation\n\t * does not return it and instead expects token to be returned via `getWebsocketToken` callback\n\t * passed as a parameter to `OdspDocumentService.create()` factory.\n\t */\n\tsocketToken?: string;\n\n\t/**\n\t * This is the time within which client has to refresh the session on (ODSP) relay service.\n\t */\n\trefreshSessionDurationSeconds?: number;\n\n\t/**\n\t * Represent the sensitivity labels info for the file. Keeping it optional for back-compat. The\n\t * response will contain empty labels when the file has no labels, so this field will be there\n\t * even if file has no labels when the service will implement this contract.\n\t */\n\tsensitivityLabelsInfo?: ISensitivityLabelsInfo;\n}\n\n/**\n * Sensitivity labels information for a file, part of the socket storage discovery response.\n * @legacy @beta\n */\nexport interface ISensitivityLabelsInfo {\n\t/** ISO format timestamp when the label info snapshot was generated. */\n\ttimestamp: string;\n\t/** List of applied sensitivity labels. Empty if none. */\n\tlabels: ISensitivityLabel[];\n}\n\n/**\n * A single sensitivity label applied to a document, part of the socket storage discovery response.\n * @legacy @beta\n */\nexport interface ISensitivityLabel {\n\t/** Unique identifier of the sensitivity label. */\n\tsensitivityLabelId: string;\n\t/** Tenant under which the label is defined. */\n\ttenantId: string;\n\t/** How the label was assigned, for example \"standard\". */\n\tassignmentMethod: string;\n\t/** Email of the user who applied the label. */\n\tappliedByUserEmail: string;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to interrogate itself\n * to find out if it is session aware.\n * @legacy @beta\n */\nexport interface IProvideSessionAwareDriverFactory {\n\treadonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`\n * function if it session aware.\n * @legacy @beta\n */\nexport interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {\n\tgetRelayServiceSessionInfo(\n\t\tresolvedUrl: IResolvedUrl,\n\t): Promise<ISocketStorageDiscovery | undefined>;\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Represents token response
7
7
  * @legacy
8
- * @alpha
8
+ * @beta
9
9
  */
10
10
  export interface TokenResponse {
11
11
  /** Token value */
@@ -25,7 +25,7 @@ export interface TokenResponse {
25
25
  /**
26
26
  * Represents access token fetch options
27
27
  * @legacy
28
- * @alpha
28
+ * @beta
29
29
  */
30
30
  export interface TokenFetchOptions {
31
31
  /**
@@ -58,7 +58,7 @@ export interface TokenFetchOptions {
58
58
  /**
59
59
  * Represents access token fetch options for ODSP resource
60
60
  * @legacy
61
- * @alpha
61
+ * @beta
62
62
  */
63
63
  export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
64
64
  /** Site url representing ODSP resource location */
@@ -75,7 +75,7 @@ export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
75
75
  * whether token came from cache. Legacy implementation may return a string for token value;
76
76
  * in this case it should be assumes that fromCache signal is undefined. Null is returned in case of failure.
77
77
  * @legacy
78
- * @alpha
78
+ * @beta
79
79
  */
80
80
  export type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;
81
81
  /**
@@ -105,7 +105,7 @@ export declare const isTokenFromCache: (tokenResponse: string | TokenResponse |
105
105
  * `Consumer` represents user authenticated with Microsoft Account (MSA).
106
106
  * `Enterprise` represents user authenticated with M365 tenant account.
107
107
  * @legacy
108
- * @alpha
108
+ * @beta
109
109
  */
110
110
  export type IdentityType = "Consumer" | "Enterprise";
111
111
  /**