@fluidframework/odsp-driver-definitions 2.0.0-dev-rc.1.0.0.232845 → 2.0.0-dev-rc.2.0.0.246488
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +4 -1
- package/CHANGELOG.md +24 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor.json +1 -1
- package/api-report/odsp-driver-definitions.api.md +5 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +2 -2
- package/dist/errors.js.map +1 -1
- package/dist/factory.d.ts +4 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/odsp-driver-definitions-alpha.d.ts +7 -0
- package/dist/odsp-driver-definitions-beta.d.ts +5 -0
- package/dist/odsp-driver-definitions-public.d.ts +5 -0
- package/dist/odsp-driver-definitions-untrimmed.d.ts +15 -0
- package/dist/odspCache.d.ts +10 -1
- package/dist/odspCache.d.ts.map +1 -1
- package/dist/odspCache.js +10 -1
- package/dist/odspCache.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/{errors.d.mts → errors.d.ts} +5 -1
- package/lib/errors.d.ts.map +1 -0
- package/lib/{errors.mjs → errors.js} +5 -1
- package/lib/errors.js.map +1 -0
- package/lib/{factory.d.mts → factory.d.ts} +5 -1
- package/lib/factory.d.ts.map +1 -0
- package/lib/{factory.mjs → factory.js} +1 -1
- package/lib/factory.js.map +1 -0
- package/lib/{index.d.mts → index.d.ts} +7 -7
- package/lib/index.d.ts.map +1 -0
- package/lib/{index.mjs → index.js} +5 -5
- package/lib/index.js.map +1 -0
- package/lib/{odsp-driver-definitions-alpha.d.mts → odsp-driver-definitions-alpha.d.ts} +7 -0
- package/lib/{odsp-driver-definitions-beta.d.mts → odsp-driver-definitions-beta.d.ts} +5 -0
- package/lib/{odsp-driver-definitions-public.d.mts → odsp-driver-definitions-public.d.ts} +5 -0
- package/lib/{odsp-driver-definitions-untrimmed.d.mts → odsp-driver-definitions-untrimmed.d.ts} +15 -0
- package/lib/{odspCache.d.mts → odspCache.d.ts} +11 -2
- package/lib/odspCache.d.ts.map +1 -0
- package/lib/{odspCache.mjs → odspCache.js} +10 -1
- package/lib/odspCache.js.map +1 -0
- package/lib/{resolvedUrl.d.mts → resolvedUrl.d.ts} +1 -1
- package/lib/resolvedUrl.d.ts.map +1 -0
- package/lib/{resolvedUrl.mjs → resolvedUrl.js} +1 -1
- package/lib/resolvedUrl.js.map +1 -0
- package/lib/{sessionProvider.d.mts → sessionProvider.d.ts} +1 -1
- package/lib/sessionProvider.d.ts.map +1 -0
- package/lib/{sessionProvider.mjs → sessionProvider.js} +1 -1
- package/lib/sessionProvider.js.map +1 -0
- package/lib/{tokenFetch.d.mts → tokenFetch.d.ts} +1 -1
- package/lib/tokenFetch.d.ts.map +1 -0
- package/lib/{tokenFetch.mjs → tokenFetch.js} +1 -1
- package/lib/tokenFetch.js.map +1 -0
- package/package.json +32 -31
- package/src/errors.ts +1 -0
- package/src/factory.ts +5 -0
- package/src/index.ts +7 -6
- package/src/odspCache.ts +11 -1
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/lib/errors.d.mts.map +0 -1
- package/lib/errors.mjs.map +0 -1
- package/lib/factory.d.mts.map +0 -1
- package/lib/factory.mjs.map +0 -1
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs.map +0 -1
- package/lib/odspCache.d.mts.map +0 -1
- package/lib/odspCache.mjs.map +0 -1
- package/lib/resolvedUrl.d.mts.map +0 -1
- package/lib/resolvedUrl.mjs.map +0 -1
- package/lib/sessionProvider.d.mts.map +0 -1
- package/lib/sessionProvider.mjs.map +0 -1
- package/lib/tokenFetch.d.mts.map +0 -1
- package/lib/tokenFetch.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionProvider.mjs","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\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?: 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 * @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"]}
|
package/lib/tokenFetch.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;;;OAGG;IACH,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"}
|
package/lib/tokenFetch.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokenFetch.mjs","sourceRoot":"","sources":["../src/tokenFetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmEH;;;;;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/**\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 * @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"]}
|