@fluidframework/odsp-driver-definitions 2.0.0-internal.8.0.1 → 2.0.0-rc.1.0.1

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 (65) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +0 -6
  3. package/api-extractor-esm.json +4 -0
  4. package/api-extractor-lint.json +1 -10
  5. package/api-extractor.json +1 -9
  6. package/api-report/odsp-driver-definitions.api.md +8 -8
  7. package/dist/errors.d.ts +6 -6
  8. package/dist/{errors.cjs → errors.js} +3 -3
  9. package/dist/errors.js.map +1 -0
  10. package/dist/{factory.cjs → factory.js} +1 -1
  11. package/dist/factory.js.map +1 -0
  12. package/dist/{index.cjs → index.js} +5 -5
  13. package/dist/index.js.map +1 -0
  14. package/dist/odsp-driver-definitions-alpha.d.ts +160 -9
  15. package/dist/odsp-driver-definitions-beta.d.ts +10 -3
  16. package/dist/odsp-driver-definitions-public.d.ts +0 -2
  17. package/dist/odsp-driver-definitions-untrimmed.d.ts +8 -8
  18. package/dist/{odspCache.cjs → odspCache.js} +1 -1
  19. package/dist/odspCache.js.map +1 -0
  20. package/dist/{resolvedUrl.cjs → resolvedUrl.js} +1 -1
  21. package/dist/resolvedUrl.js.map +1 -0
  22. package/dist/{sessionProvider.cjs → sessionProvider.js} +1 -1
  23. package/dist/sessionProvider.js.map +1 -0
  24. package/dist/tokenFetch.d.ts +2 -2
  25. package/dist/{tokenFetch.cjs → tokenFetch.js} +1 -1
  26. package/dist/tokenFetch.js.map +1 -0
  27. package/lib/{errors.d.ts → errors.d.mts} +7 -7
  28. package/lib/errors.d.mts.map +1 -0
  29. package/lib/errors.mjs +2 -2
  30. package/lib/errors.mjs.map +1 -1
  31. package/lib/{factory.d.ts → factory.d.mts} +1 -1
  32. package/lib/factory.d.mts.map +1 -0
  33. package/lib/{index.d.ts → index.d.mts} +1 -1
  34. package/lib/index.d.mts.map +1 -0
  35. package/lib/{odsp-driver-definitions-alpha.d.ts → odsp-driver-definitions-alpha.d.mts} +160 -9
  36. package/lib/{odsp-driver-definitions-public.d.ts → odsp-driver-definitions-beta.d.mts} +10 -3
  37. package/lib/{odsp-driver-definitions-beta.d.ts → odsp-driver-definitions-public.d.mts} +0 -2
  38. package/lib/{odsp-driver-definitions-untrimmed.d.ts → odsp-driver-definitions-untrimmed.d.mts} +8 -8
  39. package/lib/{odspCache.d.ts → odspCache.d.mts} +1 -1
  40. package/lib/odspCache.d.mts.map +1 -0
  41. package/lib/{resolvedUrl.d.ts → resolvedUrl.d.mts} +1 -1
  42. package/lib/resolvedUrl.d.mts.map +1 -0
  43. package/lib/{sessionProvider.d.ts → sessionProvider.d.mts} +1 -1
  44. package/lib/sessionProvider.d.mts.map +1 -0
  45. package/lib/{tokenFetch.d.ts → tokenFetch.d.mts} +3 -3
  46. package/lib/tokenFetch.d.mts.map +1 -0
  47. package/lib/tokenFetch.mjs.map +1 -1
  48. package/package.json +64 -12
  49. package/src/errors.ts +6 -6
  50. package/src/tokenFetch.ts +2 -2
  51. package/dist/errors.cjs.map +0 -1
  52. package/dist/factory.cjs.map +0 -1
  53. package/dist/index.cjs.map +0 -1
  54. package/dist/odspCache.cjs.map +0 -1
  55. package/dist/resolvedUrl.cjs.map +0 -1
  56. package/dist/sessionProvider.cjs.map +0 -1
  57. package/dist/tokenFetch.cjs.map +0 -1
  58. package/lib/errors.d.ts.map +0 -1
  59. package/lib/factory.d.ts.map +0 -1
  60. package/lib/index.d.ts.map +0 -1
  61. package/lib/odspCache.d.ts.map +0 -1
  62. package/lib/resolvedUrl.d.ts.map +0 -1
  63. package/lib/sessionProvider.d.ts.map +0 -1
  64. package/lib/tokenFetch.d.ts.map +0 -1
  65. package/tsc-multi.test.json +0 -4
@@ -4,4 +4,4 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=sessionProvider.cjs.map
7
+ //# sourceMappingURL=sessionProvider.js.map
@@ -0,0 +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\";\n\n/**\n * Socket storage discovery api response\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\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 * @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 * @alpha\n */\nexport interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {\n\tgetRelayServiceSessionInfo(\n\t\tresolvedUrl: IResolvedUrl,\n\t): Promise<ISocketStorageDiscovery | undefined>;\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  /**
6
6
  * Represents token response
7
- * @alpha
7
+ * @beta
8
8
  */
9
9
  export interface TokenResponse {
10
10
  /** Token value */
@@ -74,7 +74,7 @@ export declare const isTokenFromCache: (tokenResponse: string | TokenResponse |
74
74
  * Identity types supported by ODSP driver.
75
75
  * `Consumer` represents user authenticated with Microsoft Account (MSA).
76
76
  * `Enterprise` represents user authenticated with M365 tenant account.
77
- * @internal
77
+ * @alpha
78
78
  */
79
79
  export type IdentityType = "Consumer" | "Enterprise";
80
80
  /**
@@ -28,4 +28,4 @@ const isTokenFromCache = (tokenResponse) => tokenResponse === null || typeof tok
28
28
  ? undefined
29
29
  : tokenResponse.fromCache;
30
30
  exports.isTokenFromCache = isTokenFromCache;
31
- //# sourceMappingURL=tokenFetch.cjs.map
31
+ //# sourceMappingURL=tokenFetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenFetch.js","sourceRoot":"","sources":["../src/tokenFetch.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgEH;;;;;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;QAC7B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;AAPX,QAAA,iBAAiB,qBAON;AAExB;;;;;;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 * @beta\n */\nexport interface TokenResponse {\n\t/** Token value */\n\ttoken: string;\n\n\t/** Flag indicating whether token was obtained from local cache */\n\tfromCache?: boolean;\n}\n\n/**\n * Represents access token fetch options\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\n/**\n * Represents access token fetch options for ODSP resource\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 * @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? null\n\t\t: tokenResponse.token;\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 * @alpha\n */\nexport type IdentityType = \"Consumer\" | \"Enterprise\";\n\n/**\n * @internal\n */\nexport type InstrumentedStorageTokenFetcher = (\n\toptions: TokenFetchOptions,\n\tname: string,\n\talwaysRecordTokenFetchTelemetry?: boolean,\n) => Promise<string | null>;\n"]}
@@ -2,7 +2,7 @@ import { DriverError, IDriverErrorBase } from "@fluidframework/driver-definition
2
2
  /**
3
3
  * ODSP Error types.
4
4
  * Different error types that may be thrown by the ODSP driver.
5
- * @internal
5
+ * @alpha
6
6
  */
7
7
  export declare const OdspErrorTypes: {
8
8
  /**
@@ -62,7 +62,7 @@ export declare const OdspErrorTypes: {
62
62
  readonly usageError: "usageError";
63
63
  };
64
64
  /**
65
- * @internal
65
+ * @alpha
66
66
  */
67
67
  export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
68
68
  /**
@@ -70,7 +70,7 @@ export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes
70
70
  * Different error types that may be thrown by the ODSP driver.
71
71
  *
72
72
  * @deprecated Use {@link (OdspErrorTypes:variable)} instead.
73
- * @internal
73
+ * @alpha
74
74
  */
75
75
  export declare enum OdspErrorType {
76
76
  /**
@@ -120,7 +120,7 @@ export declare enum OdspErrorType {
120
120
  blockedIPAddress = "blockedIPAddress"
121
121
  }
122
122
  /**
123
- * @internal
123
+ * @alpha
124
124
  */
125
125
  export interface IOdspErrorAugmentations {
126
126
  /**
@@ -141,13 +141,13 @@ export interface IOdspErrorAugmentations {
141
141
  /**
142
142
  * Base interface for all errors and warnings
143
143
  * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
144
- * @internal
144
+ * @alpha
145
145
  */
146
146
  export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
147
147
  readonly errorType: OdspErrorType;
148
148
  }
149
149
  /**
150
- * @internal
150
+ * @alpha
151
151
  */
152
152
  export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
153
- //# sourceMappingURL=errors.d.ts.map
153
+ //# sourceMappingURL=errors.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"OAIO,EACN,WAAW,EACX,gBAAgB,EAEhB,MAAM,oCAAoC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAI1B;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;CAEM,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF;;;;;;GAMG;AACH,oBAAY,aAAa;IACxB;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;;;OAIG;IACH,cAAc,mBAAmB;IAEjC;;;;OAIG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;;;;;OAMG;IACH,aAAa,kBAAkB;IAE/B;;;OAGG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,gBAAgB,qBAAqB;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,uBAAuB;IAC/F,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,CAAC,WAAW,GAAG,uBAAuB,CAAC,CAAC"}
package/lib/errors.mjs CHANGED
@@ -2,7 +2,7 @@ import { DriverErrorTypes, } from "@fluidframework/driver-definitions";
2
2
  /**
3
3
  * ODSP Error types.
4
4
  * Different error types that may be thrown by the ODSP driver.
5
- * @internal
5
+ * @alpha
6
6
  */
7
7
  export const OdspErrorTypes = {
8
8
  // Inherit base driver error types
@@ -50,7 +50,7 @@ export const OdspErrorTypes = {
50
50
  * Different error types that may be thrown by the ODSP driver.
51
51
  *
52
52
  * @deprecated Use {@link (OdspErrorTypes:variable)} instead.
53
- * @internal
53
+ * @alpha
54
54
  */
55
55
  export var OdspErrorType;
56
56
  (function (OdspErrorType) {
@@ -1 +1 @@
1
- {"version":3,"file":"errors.mjs","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"OAIO,EAGN,gBAAgB,GAChB,MAAM,oCAAoC;AAE3C;;;;GAIG;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;AAMX;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,aAsDX;AAtDD,WAAY,aAAa;IACxB;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,8DAA6C,CAAA;IAE7C;;;;OAIG;IACH,kDAAiC,CAAA;IAEjC;;;;OAIG;IACH,8CAA6B,CAAA;IAE7B;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;;;;;OAMG;IACH,gDAA+B,CAAA;IAE/B;;;OAGG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,sDAAqC,CAAA;AACtC,CAAC,EAtDW,aAAa,KAAb,aAAa,QAsDxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tDriverError,\n\tIDriverErrorBase,\n\tDriverErrorTypes,\n} from \"@fluidframework/driver-definitions\";\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n * @internal\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 * @internal\n */\nexport type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n *\n * @deprecated Use {@link (OdspErrorTypes:variable)} instead.\n * @internal\n */\nexport enum OdspErrorType {\n\t/**\n\t * Storage is out of space\n\t */\n\toutOfStorageError = \"outOfStorageError\",\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 * {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}\n\t */\n\tfetchTokenError = \"fetchTokenError\",\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}\n\n/**\n * @internal\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 * @internal\n */\nexport interface IOdspError extends Omit<IDriverErrorBase, \"errorType\">, IOdspErrorAugmentations {\n\treadonly errorType: OdspErrorType;\n}\n\n/**\n * @internal\n */\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
1
+ {"version":3,"file":"errors.mjs","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"OAIO,EAGN,gBAAgB,GAChB,MAAM,oCAAoC;AAE3C;;;;GAIG;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;AAMX;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,aAsDX;AAtDD,WAAY,aAAa;IACxB;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,8DAA6C,CAAA;IAE7C;;;;OAIG;IACH,kDAAiC,CAAA;IAEjC;;;;OAIG;IACH,8CAA6B,CAAA;IAE7B;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;;;;;OAMG;IACH,gDAA+B,CAAA;IAE/B;;;OAGG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,sDAAqC,CAAA;AACtC,CAAC,EAtDW,aAAa,KAAb,aAAa,QAsDxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tDriverError,\n\tIDriverErrorBase,\n\tDriverErrorTypes,\n} from \"@fluidframework/driver-definitions\";\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\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 * @alpha\n */\nexport type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n *\n * @deprecated Use {@link (OdspErrorTypes:variable)} instead.\n * @alpha\n */\nexport enum OdspErrorType {\n\t/**\n\t * Storage is out of space\n\t */\n\toutOfStorageError = \"outOfStorageError\",\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 * {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}\n\t */\n\tfetchTokenError = \"fetchTokenError\",\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}\n\n/**\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 * @alpha\n */\nexport interface IOdspError extends Omit<IDriverErrorBase, \"errorType\">, IOdspErrorAugmentations {\n\treadonly errorType: OdspErrorType;\n}\n\n/**\n * @alpha\n */\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
@@ -131,4 +131,4 @@ export interface HostStoragePolicy {
131
131
  */
132
132
  avoidPrefetchSnapshotCache?: boolean;
133
133
  }
134
- //# sourceMappingURL=factory.d.ts.map
134
+ //# sourceMappingURL=factory.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.mts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;;;;;;OASG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,eAAe,CAAC,EAAE,gBAAgB,CAAC;IAEnC;;;;;;;;OAQG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAGlC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;OAOG;IACH,yCAAyC,CAAC,EAAE,OAAO,CAAC;IAEpD;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACrC"}
@@ -8,4 +8,4 @@ export { CacheContentType, getKeyForCacheEntry, ICacheEntry, IEntry, IFileEntry,
8
8
  export { IOdspResolvedUrl, IOdspUrlParts, ISharingLink, ISharingLinkKind, ShareLinkInfoType, ShareLinkTypes, SharingLinkRole, SharingLinkScope, } from "./resolvedUrl.mjs";
9
9
  export { IdentityType, InstrumentedStorageTokenFetcher, isTokenFromCache, OdspResourceTokenFetchOptions, TokenFetcher, TokenFetchOptions, tokenFromResponse, TokenResponse, } from "./tokenFetch.mjs";
10
10
  export { IProvideSessionAwareDriverFactory, IRelaySessionAwareDriverFactory, ISocketStorageDiscovery, } from "./sessionProvider.mjs";
11
- //# sourceMappingURL=index.d.ts.map
11
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,UAAU,EACV,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,cAAc,GACd;OACM,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB;OACM,EACN,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,GACX;OACM,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB;OACM,EACN,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACb;OACM,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,uBAAuB,GACvB"}
@@ -7,8 +7,6 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
7
7
  */
8
8
  export declare type CacheContentType = "snapshot" | "ops";
9
9
 
10
- /* Excluded from this release type: DriverError */
11
-
12
10
  /* Excluded from this release type: getKeyForCacheEntry */
13
11
 
14
12
  /**
@@ -115,7 +113,13 @@ export declare interface ICollabSessionOptions {
115
113
  forceAccessTokenViaAuthorizationHeader?: boolean;
116
114
  }
117
115
 
118
- /* Excluded from this release type: IdentityType */
116
+ /**
117
+ * Identity types supported by ODSP driver.
118
+ * `Consumer` represents user authenticated with Microsoft Account (MSA).
119
+ * `Enterprise` represents user authenticated with M365 tenant account.
120
+ * @alpha
121
+ */
122
+ export declare type IdentityType = "Consumer" | "Enterprise";
119
123
 
120
124
  /**
121
125
  * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
@@ -159,9 +163,34 @@ export declare interface IFileEntry {
159
163
 
160
164
  /* Excluded from this release type: InstrumentedStorageTokenFetcher */
161
165
 
162
- /* Excluded from this release type: IOdspError */
166
+ /**
167
+ * Base interface for all errors and warnings
168
+ * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
169
+ * @alpha
170
+ */
171
+ export declare interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
172
+ readonly errorType: OdspErrorType;
173
+ }
163
174
 
164
- /* Excluded from this release type: IOdspErrorAugmentations */
175
+ /**
176
+ * @alpha
177
+ */
178
+ export declare interface IOdspErrorAugmentations {
179
+ /**
180
+ * Server epoch indicates when the file was last modified.
181
+ * Used to detect modifications outside Fluid's services
182
+ */
183
+ serverEpoch?: string;
184
+ /**
185
+ * It is the redirection url at which the network call should have been made. It is due to change
186
+ * in site domain of the file on server.
187
+ */
188
+ redirectLocation?: string;
189
+ /**
190
+ * It is array of error codes included in error response from server.
191
+ */
192
+ facetCodes?: string[];
193
+ }
165
194
 
166
195
  /**
167
196
  * @alpha
@@ -337,11 +366,133 @@ export declare interface ISocketStorageDiscovery {
337
366
 
338
367
  /* Excluded from this release type: isTokenFromCache */
339
368
 
340
- /* Excluded from this release type: OdspError */
369
+ /**
370
+ * @alpha
371
+ */
372
+ export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
341
373
 
342
- /* Excluded from this release type: OdspErrorType */
374
+ /**
375
+ * ODSP Error types.
376
+ * Different error types that may be thrown by the ODSP driver.
377
+ *
378
+ * @deprecated Use {@link (OdspErrorTypes:variable)} instead.
379
+ * @alpha
380
+ */
381
+ export declare enum OdspErrorType {
382
+ /**
383
+ * Storage is out of space
384
+ */
385
+ outOfStorageError = "outOfStorageError",
386
+ /**
387
+ * Invalid file name (at creation of the file)
388
+ */
389
+ invalidFileNameError = "invalidFileNameError",
390
+ /**
391
+ * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger
392
+ * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for
393
+ * such case.
394
+ */
395
+ snapshotTooBig = "snapshotTooBig",
396
+ /**
397
+ * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when
398
+ * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for
399
+ * such case.
400
+ */
401
+ fetchTimeout = "fetchTimeout",
402
+ /**
403
+ * SPO admin toggle: fluid service is not enabled.
404
+ */
405
+ fluidNotEnabled = "fluidNotEnabled",
406
+ /**
407
+ * {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}
408
+ */
409
+ fetchTokenError = "fetchTokenError",
410
+ /**
411
+ * This error will be raised when client is too behind with no way to catch up.
412
+ * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted
413
+ * by storage, and thus removing an ability for client to catch up.
414
+ * This condition will result in any local changes being lost (i.e. only way to save state is by user
415
+ * copying it over manually)
416
+ */
417
+ cannotCatchUp = "cannotCatchUp",
418
+ /**
419
+ * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
420
+ * So to preserve integrity of the data, the data becomes readonly.
421
+ */
422
+ serviceReadOnly = "serviceReadOnly",
423
+ /**
424
+ * Due to organizational policies, you can't access server resources from the current network location.
425
+ */
426
+ blockedIPAddress = "blockedIPAddress"
427
+ }
428
+
429
+ /**
430
+ * ODSP Error types.
431
+ * Different error types that may be thrown by the ODSP driver.
432
+ * @alpha
433
+ */
434
+ export declare const OdspErrorTypes: {
435
+ /**
436
+ * Invalid file name (at creation of the file)
437
+ */
438
+ readonly invalidFileNameError: "invalidFileNameError";
439
+ /**
440
+ * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger
441
+ * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for
442
+ * such case.
443
+ */
444
+ readonly snapshotTooBig: "snapshotTooBig";
445
+ /**
446
+ * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when
447
+ * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for
448
+ * such case.
449
+ */
450
+ readonly fetchTimeout: "fetchTimeout";
451
+ /**
452
+ * SPO admin toggle: fluid service is not enabled.
453
+ */
454
+ readonly fluidNotEnabled: "fluidNotEnabled";
455
+ /**
456
+ * This error will be raised when client is too behind with no way to catch up.
457
+ * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted
458
+ * by storage, and thus removing an ability for client to catch up.
459
+ * This condition will result in any local changes being lost (i.e. only way to save state is by user
460
+ * copying it over manually)
461
+ */
462
+ readonly cannotCatchUp: "cannotCatchUp";
463
+ /**
464
+ * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
465
+ * So to preserve integrity of the data, the data becomes readonly.
466
+ */
467
+ readonly serviceReadOnly: "serviceReadOnly";
468
+ /**
469
+ * Due to organizational policies, you can't access server resources from the current network location.
470
+ */
471
+ readonly blockedIPAddress: "blockedIPAddress";
472
+ readonly genericNetworkError: "genericNetworkError";
473
+ readonly authorizationError: "authorizationError";
474
+ readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
475
+ readonly offlineError: "offlineError";
476
+ readonly unsupportedClientProtocolVersion: "unsupportedClientProtocolVersion";
477
+ readonly writeError: "writeError";
478
+ readonly fetchFailure: "fetchFailure";
479
+ readonly fetchTokenError: "fetchTokenError";
480
+ readonly incorrectServerResponse: "incorrectServerResponse";
481
+ readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
482
+ readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
483
+ readonly locationRedirection: "locationRedirection";
484
+ readonly fluidInvalidSchema: "fluidInvalidSchema";
485
+ readonly fileIsLocked: "fileIsLocked";
486
+ readonly outOfStorageError: "outOfStorageError";
487
+ readonly genericError: "genericError";
488
+ readonly throttlingError: "throttlingError";
489
+ readonly usageError: "usageError";
490
+ };
343
491
 
344
- /* Excluded from this release type: OdspErrorTypes */
492
+ /**
493
+ * @alpha
494
+ */
495
+ export declare type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
345
496
 
346
497
  /**
347
498
  * Represents access token fetch options for ODSP resource
@@ -463,7 +614,7 @@ export declare interface TokenFetchOptions {
463
614
 
464
615
  /**
465
616
  * Represents token response
466
- * @alpha
617
+ * @beta
467
618
  */
468
619
  export declare interface TokenResponse {
469
620
  /** Token value */
@@ -16,8 +16,6 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
16
16
 
17
17
  /* Excluded from this release type: IdentityType */
18
18
 
19
- /* Excluded from this release type: IDriverErrorBase */
20
-
21
19
  /* Excluded from this release type: IEntry */
22
20
 
23
21
  /* Excluded from this release type: IFileEntry */
@@ -76,6 +74,15 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
76
74
 
77
75
  /* Excluded from this release type: tokenFromResponse */
78
76
 
79
- /* Excluded from this release type: TokenResponse */
77
+ /**
78
+ * Represents token response
79
+ * @beta
80
+ */
81
+ export declare interface TokenResponse {
82
+ /** Token value */
83
+ token: string;
84
+ /** Flag indicating whether token was obtained from local cache */
85
+ fromCache?: boolean;
86
+ }
80
87
 
81
88
  export { }
@@ -16,8 +16,6 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
16
16
 
17
17
  /* Excluded from this release type: IdentityType */
18
18
 
19
- /* Excluded from this release type: IDriverErrorBase */
20
-
21
19
  /* Excluded from this release type: IEntry */
22
20
 
23
21
  /* Excluded from this release type: IFileEntry */
@@ -123,7 +123,7 @@ export declare interface ICollabSessionOptions {
123
123
  * Identity types supported by ODSP driver.
124
124
  * `Consumer` represents user authenticated with Microsoft Account (MSA).
125
125
  * `Enterprise` represents user authenticated with M365 tenant account.
126
- * @internal
126
+ * @alpha
127
127
  */
128
128
  export declare type IdentityType = "Consumer" | "Enterprise";
129
129
 
@@ -175,14 +175,14 @@ export declare type InstrumentedStorageTokenFetcher = (options: TokenFetchOption
175
175
  /**
176
176
  * Base interface for all errors and warnings
177
177
  * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
178
- * @internal
178
+ * @alpha
179
179
  */
180
180
  export declare interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
181
181
  readonly errorType: OdspErrorType;
182
182
  }
183
183
 
184
184
  /**
185
- * @internal
185
+ * @alpha
186
186
  */
187
187
  export declare interface IOdspErrorAugmentations {
188
188
  /**
@@ -383,7 +383,7 @@ export declare interface ISocketStorageDiscovery {
383
383
  export declare const isTokenFromCache: (tokenResponse: string | TokenResponse | null) => boolean | undefined;
384
384
 
385
385
  /**
386
- * @internal
386
+ * @alpha
387
387
  */
388
388
  export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
389
389
 
@@ -392,7 +392,7 @@ export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentati
392
392
  * Different error types that may be thrown by the ODSP driver.
393
393
  *
394
394
  * @deprecated Use {@link (OdspErrorTypes:variable)} instead.
395
- * @internal
395
+ * @alpha
396
396
  */
397
397
  export declare enum OdspErrorType {
398
398
  /**
@@ -445,7 +445,7 @@ export declare enum OdspErrorType {
445
445
  /**
446
446
  * ODSP Error types.
447
447
  * Different error types that may be thrown by the ODSP driver.
448
- * @internal
448
+ * @alpha
449
449
  */
450
450
  export declare const OdspErrorTypes: {
451
451
  /**
@@ -506,7 +506,7 @@ export declare const OdspErrorTypes: {
506
506
  };
507
507
 
508
508
  /**
509
- * @internal
509
+ * @alpha
510
510
  */
511
511
  export declare type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
512
512
 
@@ -640,7 +640,7 @@ export declare const tokenFromResponse: (tokenResponse: string | TokenResponse |
640
640
 
641
641
  /**
642
642
  * Represents token response
643
- * @alpha
643
+ * @beta
644
644
  */
645
645
  export declare interface TokenResponse {
646
646
  /** Token value */
@@ -95,4 +95,4 @@ export interface IPersistedCache {
95
95
  * @internal
96
96
  */
97
97
  export declare function getKeyForCacheEntry(entry: ICacheEntry): string;
98
- //# sourceMappingURL=odspCache.d.ts.map
98
+ //# sourceMappingURL=odspCache.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odspCache.d.mts","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,YAAY,EAAE,MAAM,oCAAoC;AAEjE;;;GAGG;AACH,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,KAAK,CAAC;AAOlD;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,YAAY,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,IAAI,EAAE,gBAAgB,CAAC;IAEvB;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IAC1C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAE9D"}
@@ -121,4 +121,4 @@ export interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {
121
121
  shareLinkInfo?: ShareLinkInfoType;
122
122
  isClpCompliantApp?: boolean;
123
123
  }
124
- //# sourceMappingURL=resolvedUrl.d.ts.map
124
+ //# sourceMappingURL=resolvedUrl.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolvedUrl.d.mts","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,YAAY,EAAE,MAAM,oCAAoC;AAEjE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,oBAAY,cAAc;IACzB,GAAG,QAAQ;CACX;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,OAAO,YAAY;CACnB;AAED;;;GAGG;AACH,oBAAY,eAAe;IAC1B,IAAI,SAAS;IACb,IAAI,SAAS;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,gBAAgB,CAAC;IAKxB,IAAI,CAAC,EAAE,eAAe,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACrD,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE;QACZ;;;;;WAKG;QACH,IAAI,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAAC;QAEzC;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;QAE7B;;WAEG;QACH,KAAK,CAAC,EAAE,GAAG,CAAC;QAEZ,OAAO,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AACD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,YAAY,EAAE,aAAa;IACpE,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,IAAI,CAAC;IAGtB,GAAG,EAAE,MAAM,CAAC;IAGZ,gBAAgB,EAAE,MAAM,CAAC;IAEzB,SAAS,EAAE;QACV,kBAAkB,EAAE,MAAM,CAAC;QAC3B,wBAAwB,EAAE,MAAM,CAAC;QACjC,uBAAuB,EAAE,MAAM,CAAC;QAChC,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;IAIF,MAAM,EAAE,EAAE,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,OAAO,CAAC;IAEpB,QAAQ,CAAC,EAAE;QAGV,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IAEF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
@@ -45,4 +45,4 @@ export interface IProvideSessionAwareDriverFactory {
45
45
  export interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
46
46
  getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
47
47
  }
48
- //# sourceMappingURL=sessionProvider.d.ts.map
48
+ //# sourceMappingURL=sessionProvider.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessionProvider.d.mts","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,YAAY,EAAE,MAAM,oCAAoC;AAEjE;;;GAGG;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;CACvC;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"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  /**
6
6
  * Represents token response
7
- * @alpha
7
+ * @beta
8
8
  */
9
9
  export interface TokenResponse {
10
10
  /** Token value */
@@ -74,11 +74,11 @@ export declare const isTokenFromCache: (tokenResponse: string | TokenResponse |
74
74
  * Identity types supported by ODSP driver.
75
75
  * `Consumer` represents user authenticated with Microsoft Account (MSA).
76
76
  * `Enterprise` represents user authenticated with M365 tenant account.
77
- * @internal
77
+ * @alpha
78
78
  */
79
79
  export type IdentityType = "Consumer" | "Enterprise";
80
80
  /**
81
81
  * @internal
82
82
  */
83
83
  export type InstrumentedStorageTokenFetcher = (options: TokenFetchOptions, name: string, alwaysRecordTokenFetchTelemetry?: boolean) => Promise<string | null>;
84
- //# sourceMappingURL=tokenFetch.d.ts.map
84
+ //# sourceMappingURL=tokenFetch.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenFetch.d.mts","sourceRoot":"","sources":["../src/tokenFetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IAEd,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACvE,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAEhB,wGAAwG;IACxG,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sGAAsG;IACtG,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,aAAa,GAAG,IAAI,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,kBACd,MAAM,GAAG,aAAa,GAAG,IAAI,GAAG,SAAS,KACtD,MAAM,GAAG,IAKW,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,kBACb,MAAM,GAAG,aAAa,GAAG,IAAI,KAC1C,OAAO,GAAG,SAGc,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,YAAY,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAC7C,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,EACZ,+BAA+B,CAAC,EAAE,OAAO,KACrC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokenFetch.mjs","sourceRoot":"","sources":["../src/tokenFetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgEH;;;;;GAKG;AACH,MAAM,CAAC,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;QAC7B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,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","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 * @alpha\n */\nexport interface TokenResponse {\n\t/** Token value */\n\ttoken: string;\n\n\t/** Flag indicating whether token was obtained from local cache */\n\tfromCache?: boolean;\n}\n\n/**\n * Represents access token fetch options\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\n/**\n * Represents access token fetch options for ODSP resource\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 * @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? null\n\t\t: tokenResponse.token;\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 * @internal\n */\nexport type IdentityType = \"Consumer\" | \"Enterprise\";\n\n/**\n * @internal\n */\nexport type InstrumentedStorageTokenFetcher = (\n\toptions: TokenFetchOptions,\n\tname: string,\n\talwaysRecordTokenFetchTelemetry?: boolean,\n) => Promise<string | null>;\n"]}
1
+ {"version":3,"file":"tokenFetch.mjs","sourceRoot":"","sources":["../src/tokenFetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgEH;;;;;GAKG;AACH,MAAM,CAAC,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;QAC7B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,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","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 * @beta\n */\nexport interface TokenResponse {\n\t/** Token value */\n\ttoken: string;\n\n\t/** Flag indicating whether token was obtained from local cache */\n\tfromCache?: boolean;\n}\n\n/**\n * Represents access token fetch options\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\n/**\n * Represents access token fetch options for ODSP resource\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 * @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? null\n\t\t: tokenResponse.token;\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 * @alpha\n */\nexport type IdentityType = \"Consumer\" | \"Enterprise\";\n\n/**\n * @internal\n */\nexport type InstrumentedStorageTokenFetcher = (\n\toptions: TokenFetchOptions,\n\tname: string,\n\talwaysRecordTokenFetchTelemetry?: boolean,\n) => Promise<string | null>;\n"]}