@fluidframework/driver-definitions 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.217212

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 (39) hide show
  1. package/api-extractor-lint.json +13 -0
  2. package/api-extractor.json +0 -4
  3. package/api-report/driver-definitions.api.md +33 -33
  4. package/dist/driver-definitions-alpha.d.ts +51 -158
  5. package/dist/driver-definitions-beta.d.ts +73 -621
  6. package/dist/driver-definitions-public.d.ts +73 -621
  7. package/dist/driver-definitions-untrimmed.d.ts +71 -0
  8. package/dist/driverError.d.ts +23 -0
  9. package/dist/driverError.d.ts.map +1 -1
  10. package/dist/driverError.js +2 -0
  11. package/dist/driverError.js.map +1 -1
  12. package/dist/storage.d.ts +36 -0
  13. package/dist/storage.d.ts.map +1 -1
  14. package/dist/storage.js +6 -0
  15. package/dist/storage.js.map +1 -1
  16. package/dist/urlResolver.d.ts +12 -0
  17. package/dist/urlResolver.d.ts.map +1 -1
  18. package/dist/urlResolver.js +1 -0
  19. package/dist/urlResolver.js.map +1 -1
  20. package/lib/driver-definitions-alpha.d.ts +51 -158
  21. package/lib/driver-definitions-beta.d.ts +73 -621
  22. package/lib/driver-definitions-public.d.ts +73 -621
  23. package/lib/driver-definitions-untrimmed.d.ts +71 -0
  24. package/lib/driverError.d.ts +23 -0
  25. package/lib/driverError.d.ts.map +1 -1
  26. package/lib/driverError.js +2 -0
  27. package/lib/driverError.js.map +1 -1
  28. package/lib/storage.d.ts +36 -0
  29. package/lib/storage.d.ts.map +1 -1
  30. package/lib/storage.js +6 -0
  31. package/lib/storage.js.map +1 -1
  32. package/lib/urlResolver.d.ts +12 -0
  33. package/lib/urlResolver.d.ts.map +1 -1
  34. package/lib/urlResolver.js +1 -0
  35. package/lib/urlResolver.js.map +1 -1
  36. package/package.json +4 -3
  37. package/src/driverError.ts +23 -0
  38. package/src/storage.ts +36 -0
  39. package/src/urlResolver.ts +12 -0
@@ -1 +1 @@
1
- {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuRH,MAAM,CAAN,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACT,CAAC,EAVW,mBAAmB,KAAnB,mBAAmB,QAU9B;AA2GD,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACpB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDisposable,\n\tIEventProvider,\n\tIErrorEvent,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tConnectionMode,\n\tIClient,\n\tIClientConfiguration,\n\tICreateBlobResponse,\n\tIDocumentMessage,\n\tINack,\n\tISequencedDocumentMessage,\n\tISignalClient,\n\tISignalMessage,\n\tISnapshotTree,\n\tISummaryHandle,\n\tISummaryTree,\n\tITokenClaims,\n\tIVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAnyDriverError } from \"./driverError\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\nexport interface IDeltasFetchResult {\n\t/**\n\t * Sequential set of messages starting from 'from' sequence number.\n\t * May be partial result, i.e. not fulfill original request in full.\n\t */\n\tmessages: ISequencedDocumentMessage[];\n\n\t/**\n\t * If true, storage only partially fulfilled request, but has more ops\n\t * If false, the request was fulfilled. If less ops were returned then\n\t * requested, then storage does not have more ops in this range.\n\t */\n\tpartialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDeltaStorageService {\n\t/**\n\t * Retrieves all the delta operations within the inclusive sequence number range\n\t * @param tenantId - Id of the tenant.\n\t * @param id - document id.\n\t * @param from - first op to retrieve (inclusive)\n\t * @param to - first op not to retrieve (exclusive end)\n\t * @param fetchReason - Reason for fetching the messages, for logging.\n\t * Example, gap between seq number of Op on wire and known seq number.\n\t * It can be logged by spo which could help in debugging sessions if any issue occurs.\n\t */\n\tget(\n\t\ttenantId: string,\n\t\tid: string,\n\t\tfrom: number, // inclusive\n\t\tto: number, // exclusive\n\t\tfetchReason?: string,\n\t): Promise<IDeltasFetchResult>;\n}\n\nexport type IStreamResult<T> = { done: true } | { done: false; value: T };\n\n/**\n * Read interface for the Queue\n */\nexport interface IStream<T> {\n\tread(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDocumentDeltaStorageService {\n\t/**\n\t * Retrieves all the delta operations within the exclusive sequence number range\n\t * @param from - first op to retrieve (inclusive)\n\t * @param to - first op not to retrieve (exclusive end)\n\t * @param abortSignal - signal that aborts operation\n\t * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n\t * @param fetchReason - Reason for fetching the messages, for logging.\n\t * Example, gap between seq number of Op on wire and known seq number.\n\t * It can be logged by spo which could help in debugging sessions if any issue occurs.\n\t */\n\tfetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\tabortSignal?: AbortSignal,\n\t\tcachedOnly?: boolean,\n\t\tfetchReason?: string,\n\t): IStream<ISequencedDocumentMessage[]>;\n}\n\n// DO NOT INCREASE THIS TYPE'S VALUE\n// If a driver started using a larger value,\n// internal assumptions of the Runtime's GC feature will be violated\n// DO NOT INCREASE THIS TYPE'S VALUE\nexport type FiveDaysMs = 432_000_000; /* 5 days in milliseconds */\n\n/**\n * Policies describing attributes or characteristics of the driver's storage service,\n * to direct how other components interact with the driver\n */\nexport interface IDocumentStorageServicePolicies {\n\t/**\n\t * Should the Loader implement any sort of pre-fetching or caching mechanism?\n\t */\n\treadonly caching?: LoaderCachingPolicy;\n\n\t/**\n\t * IMPORTANT: This policy MUST be set to 5 days and PROPERLY ENFORCED for drivers that are used\n\t * in applications where Garbage Collection is enabled. Otherwise data loss may occur.\n\t *\n\t * This policy pertains to requests for the latest snapshot from the service.\n\t * If set, it means that the driver guarantees not to use a cached value that was fetched more than 5 days ago.\n\t * If undefined, the driver makes no guarantees about the age of snapshots used for loading.\n\t */\n\treadonly maximumCacheDurationMs?: FiveDaysMs;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n\trepositoryUrl: string;\n\n\t/**\n\t * Policies implemented/instructed by driver.\n\t */\n\treadonly policies?: IDocumentStorageServicePolicies;\n\n\t/**\n\t * Returns the snapshot tree.\n\t * @param version - Version of the snapshot to be fetched.\n\t * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n\t * in debugging purposes to see why this call was made.\n\t */\n\t// TODO: use `undefined` instead.\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tgetSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n\t/**\n\t * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n\t * @param versionId - Version id of the requested version.\n\t * @param count - Number of the versions to be fetched.\n\t * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n\t * in debugging purposes to see why this call was made.\n\t * @param fetchSource - Callers can specify the source of the response. For ex. Driver may choose to cache\n\t * requests and serve data from cache. That will result in stale info returned. Callers can disable this\n\t * functionality by passing fetchSource = noCache and ensuring that driver will return latest information\n\t * from storage.\n\t */\n\tgetVersions(\n\t\t// TODO: use `undefined` instead.\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]>;\n\n\t/**\n\t * Creates a blob out of the given buffer\n\t */\n\tcreateBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n\t * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n\t * referencing from the previously acked summary.\n\t * Returns the uploaded summary handle.\n\t */\n\tuploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n\t/**\n\t * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n\t * server has deleted it this call may result in a broken promise.\n\t */\n\tdownloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n\t(event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n\t(event: \"disconnect\", listener: (reason: IAnyDriverError) => void);\n\t(event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n\t(event: \"signal\", listener: (message: ISignalMessage | ISignalMessage[]) => void);\n\t(event: \"pong\", listener: (latency: number) => void);\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"error\", listener: (error: any) => void);\n}\n\nexport interface IDocumentDeltaConnection\n\textends IDisposable,\n\t\tIEventProvider<IDocumentDeltaConnectionEvents> {\n\t/**\n\t * ClientID for the connection\n\t */\n\tclientId: string;\n\n\t/**\n\t * Claims for the client\n\t */\n\tclaims: ITokenClaims;\n\n\t/**\n\t * Mode of the client\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * Whether the connection was made to a new or existing document\n\t */\n\texisting: boolean;\n\n\t/**\n\t * Protocol version being used with the service\n\t */\n\tversion: string;\n\n\t/**\n\t * Messages sent during the connection\n\t */\n\tinitialMessages: ISequencedDocumentMessage[];\n\n\t/**\n\t * Signals sent during the connection\n\t */\n\tinitialSignals: ISignalMessage[];\n\n\t/**\n\t * Prior clients already connected.\n\t */\n\tinitialClients: ISignalClient[];\n\n\t/**\n\t * Configuration details provided by the service\n\t */\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection\n\t * It may lap actual last sequence number (quite a bit, if container is very active).\n\t * But it's best information for client to figure out how far it is behind, at least\n\t * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n\t * that is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber?: number;\n\n\t/**\n\t * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n\t * it could contain info like build version, environment, region etc. These properties can be logged by client\n\t * to better understand server environment etc. and use it in case error occurs.\n\t * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n\t */\n\trelayServiceAgent?: string;\n\n\t/**\n\t * Submit a new message to the server\n\t */\n\tsubmit(messages: IDocumentMessage[]): void;\n\n\t/**\n\t * Submits a new signal to the server\n\t */\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\nexport enum LoaderCachingPolicy {\n\t/**\n\t * The loader should not implement any prefetching or caching policy.\n\t */\n\tNoCaching,\n\n\t/**\n\t * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n\t */\n\tPrefetch,\n}\n\nexport interface IDocumentServicePolicies {\n\t/**\n\t * Do not connect to delta stream\n\t */\n\treadonly storageOnly?: boolean;\n\n\t/**\n\t * Summarizer uploads the protocol tree too when summarizing.\n\t */\n\treadonly summarizeProtocolTree?: boolean;\n}\n\nexport interface IDocumentService {\n\tresolvedUrl: IResolvedUrl;\n\n\t/**\n\t * Policies implemented/instructed by driver.\n\t */\n\tpolicies?: IDocumentServicePolicies;\n\n\t/**\n\t * Access to storage associated with the document\n\t */\n\tconnectToStorage(): Promise<IDocumentStorageService>;\n\n\t/**\n\t * Access to delta storage associated with the document\n\t */\n\tconnectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n\t/**\n\t * Subscribes to the document delta stream\n\t */\n\tconnectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n\t/**\n\t * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n\t * Useful for storage to commit any pending state if any (including any local caching).\n\t * Please note that it does not remove the need for caller to close all active delta connections,\n\t * as storage may not be tracking such objects.\n\t * @param error - tells if container (and storage) are closed due to critical error.\n\t * Error might be due to disconnect between client & server knowledge about file, like file being overwritten\n\t * in storage, but client having stale local cache.\n\t * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n\t */\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdispose(error?: any): void;\n}\n\nexport interface IDocumentServiceFactory {\n\t/**\n\t * Creates the document service after extracting different endpoints URLs from a resolved URL.\n\t *\n\t * @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n\t * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n\t * @param clientIsSummarizer - Whether or not the client is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n\t * `undefined` =\\> false\n\t *\n\t * @returns An instance of {@link IDocumentService}.\n\t */\n\tcreateDocumentService(\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService>;\n\n\t/**\n\t * Creates a new document with the provided options. Returns the document service.\n\t *\n\t * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n\t * should be posted later, before connecting to ordering service.\n\t * @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n\t * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n\t * @param clientIsSummarizer - Whether or not the client is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n\t * `undefined` =\\> false\n\t */\n\tcreateContainer(\n\t\tcreateNewSummary: ISummaryTree | undefined,\n\t\tcreateNewResolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n */\nexport interface ISummaryContext {\n\t/**\n\t * Parent summary proposed handle (from summary op)\n\t */\n\treadonly proposalHandle: string | undefined;\n\n\t/**\n\t * Parent summary acked handle (from summary ack)\n\t */\n\treadonly ackHandle: string | undefined;\n\n\treadonly referenceSequenceNumber: number;\n}\n\nexport enum FetchSource {\n\tdefault = \"default\",\n\tnoCache = \"noCache\",\n}\n"]}
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2SH;;GAEG;AACH,MAAM,CAAN,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACT,CAAC,EAVW,mBAAmB,KAAnB,mBAAmB,QAU9B;AAqHD;;GAEG;AACH,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACpB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDisposable,\n\tIEventProvider,\n\tIErrorEvent,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tConnectionMode,\n\tIClient,\n\tIClientConfiguration,\n\tICreateBlobResponse,\n\tIDocumentMessage,\n\tINack,\n\tISequencedDocumentMessage,\n\tISignalClient,\n\tISignalMessage,\n\tISnapshotTree,\n\tISummaryHandle,\n\tISummaryTree,\n\tITokenClaims,\n\tIVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAnyDriverError } from \"./driverError\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\n/**\n * @internal\n */\nexport interface IDeltasFetchResult {\n\t/**\n\t * Sequential set of messages starting from 'from' sequence number.\n\t * May be partial result, i.e. not fulfill original request in full.\n\t */\n\tmessages: ISequencedDocumentMessage[];\n\n\t/**\n\t * If true, storage only partially fulfilled request, but has more ops\n\t * If false, the request was fulfilled. If less ops were returned then\n\t * requested, then storage does not have more ops in this range.\n\t */\n\tpartialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n * @internal\n */\nexport interface IDeltaStorageService {\n\t/**\n\t * Retrieves all the delta operations within the inclusive sequence number range\n\t * @param tenantId - Id of the tenant.\n\t * @param id - document id.\n\t * @param from - first op to retrieve (inclusive)\n\t * @param to - first op not to retrieve (exclusive end)\n\t * @param fetchReason - Reason for fetching the messages, for logging.\n\t * Example, gap between seq number of Op on wire and known seq number.\n\t * It can be logged by spo which could help in debugging sessions if any issue occurs.\n\t */\n\tget(\n\t\ttenantId: string,\n\t\tid: string,\n\t\tfrom: number, // inclusive\n\t\tto: number, // exclusive\n\t\tfetchReason?: string,\n\t): Promise<IDeltasFetchResult>;\n}\n\n/**\n * @alpha\n */\nexport type IStreamResult<T> = { done: true } | { done: false; value: T };\n\n/**\n * Read interface for the Queue\n * @alpha\n */\nexport interface IStream<T> {\n\tread(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n * @alpha\n */\nexport interface IDocumentDeltaStorageService {\n\t/**\n\t * Retrieves all the delta operations within the exclusive sequence number range\n\t * @param from - first op to retrieve (inclusive)\n\t * @param to - first op not to retrieve (exclusive end)\n\t * @param abortSignal - signal that aborts operation\n\t * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n\t * @param fetchReason - Reason for fetching the messages, for logging.\n\t * Example, gap between seq number of Op on wire and known seq number.\n\t * It can be logged by spo which could help in debugging sessions if any issue occurs.\n\t */\n\tfetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\tabortSignal?: AbortSignal,\n\t\tcachedOnly?: boolean,\n\t\tfetchReason?: string,\n\t): IStream<ISequencedDocumentMessage[]>;\n}\n\n// DO NOT INCREASE THIS TYPE'S VALUE\n// If a driver started using a larger value,\n// internal assumptions of the Runtime's GC feature will be violated\n// DO NOT INCREASE THIS TYPE'S VALUE\n/**\n * @alpha\n */\nexport type FiveDaysMs = 432_000_000; /* 5 days in milliseconds */\n\n/**\n * Policies describing attributes or characteristics of the driver's storage service,\n * to direct how other components interact with the driver\n * @alpha\n */\nexport interface IDocumentStorageServicePolicies {\n\t/**\n\t * Should the Loader implement any sort of pre-fetching or caching mechanism?\n\t */\n\treadonly caching?: LoaderCachingPolicy;\n\n\t/**\n\t * IMPORTANT: This policy MUST be set to 5 days and PROPERLY ENFORCED for drivers that are used\n\t * in applications where Garbage Collection is enabled. Otherwise data loss may occur.\n\t *\n\t * This policy pertains to requests for the latest snapshot from the service.\n\t * If set, it means that the driver guarantees not to use a cached value that was fetched more than 5 days ago.\n\t * If undefined, the driver makes no guarantees about the age of snapshots used for loading.\n\t */\n\treadonly maximumCacheDurationMs?: FiveDaysMs;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n * @alpha\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n\trepositoryUrl: string;\n\n\t/**\n\t * Policies implemented/instructed by driver.\n\t */\n\treadonly policies?: IDocumentStorageServicePolicies;\n\n\t/**\n\t * Returns the snapshot tree.\n\t * @param version - Version of the snapshot to be fetched.\n\t * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n\t * in debugging purposes to see why this call was made.\n\t */\n\t// TODO: use `undefined` instead.\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tgetSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n\t/**\n\t * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n\t * @param versionId - Version id of the requested version.\n\t * @param count - Number of the versions to be fetched.\n\t * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n\t * in debugging purposes to see why this call was made.\n\t * @param fetchSource - Callers can specify the source of the response. For ex. Driver may choose to cache\n\t * requests and serve data from cache. That will result in stale info returned. Callers can disable this\n\t * functionality by passing fetchSource = noCache and ensuring that driver will return latest information\n\t * from storage.\n\t */\n\tgetVersions(\n\t\t// TODO: use `undefined` instead.\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]>;\n\n\t/**\n\t * Creates a blob out of the given buffer\n\t */\n\tcreateBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n\t * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n\t * referencing from the previously acked summary.\n\t * Returns the uploaded summary handle.\n\t */\n\tuploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n\t/**\n\t * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n\t * server has deleted it this call may result in a broken promise.\n\t */\n\tdownloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\n/**\n * @alpha\n */\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n\t(event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n\t(event: \"disconnect\", listener: (reason: IAnyDriverError) => void);\n\t(event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n\t(event: \"signal\", listener: (message: ISignalMessage | ISignalMessage[]) => void);\n\t(event: \"pong\", listener: (latency: number) => void);\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"error\", listener: (error: any) => void);\n}\n\n/**\n * @alpha\n */\nexport interface IDocumentDeltaConnection\n\textends IDisposable,\n\t\tIEventProvider<IDocumentDeltaConnectionEvents> {\n\t/**\n\t * ClientID for the connection\n\t */\n\tclientId: string;\n\n\t/**\n\t * Claims for the client\n\t */\n\tclaims: ITokenClaims;\n\n\t/**\n\t * Mode of the client\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * Whether the connection was made to a new or existing document\n\t */\n\texisting: boolean;\n\n\t/**\n\t * Protocol version being used with the service\n\t */\n\tversion: string;\n\n\t/**\n\t * Messages sent during the connection\n\t */\n\tinitialMessages: ISequencedDocumentMessage[];\n\n\t/**\n\t * Signals sent during the connection\n\t */\n\tinitialSignals: ISignalMessage[];\n\n\t/**\n\t * Prior clients already connected.\n\t */\n\tinitialClients: ISignalClient[];\n\n\t/**\n\t * Configuration details provided by the service\n\t */\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection\n\t * It may lap actual last sequence number (quite a bit, if container is very active).\n\t * But it's best information for client to figure out how far it is behind, at least\n\t * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n\t * that is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber?: number;\n\n\t/**\n\t * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n\t * it could contain info like build version, environment, region etc. These properties can be logged by client\n\t * to better understand server environment etc. and use it in case error occurs.\n\t * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n\t */\n\trelayServiceAgent?: string;\n\n\t/**\n\t * Submit a new message to the server\n\t */\n\tsubmit(messages: IDocumentMessage[]): void;\n\n\t/**\n\t * Submits a new signal to the server\n\t */\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * @alpha\n */\nexport enum LoaderCachingPolicy {\n\t/**\n\t * The loader should not implement any prefetching or caching policy.\n\t */\n\tNoCaching,\n\n\t/**\n\t * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n\t */\n\tPrefetch,\n}\n\n/**\n * @alpha\n */\nexport interface IDocumentServicePolicies {\n\t/**\n\t * Do not connect to delta stream\n\t */\n\treadonly storageOnly?: boolean;\n\n\t/**\n\t * Summarizer uploads the protocol tree too when summarizing.\n\t */\n\treadonly summarizeProtocolTree?: boolean;\n}\n\n/**\n * @alpha\n */\nexport interface IDocumentService {\n\tresolvedUrl: IResolvedUrl;\n\n\t/**\n\t * Policies implemented/instructed by driver.\n\t */\n\tpolicies?: IDocumentServicePolicies;\n\n\t/**\n\t * Access to storage associated with the document\n\t */\n\tconnectToStorage(): Promise<IDocumentStorageService>;\n\n\t/**\n\t * Access to delta storage associated with the document\n\t */\n\tconnectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n\t/**\n\t * Subscribes to the document delta stream\n\t */\n\tconnectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n\t/**\n\t * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n\t * Useful for storage to commit any pending state if any (including any local caching).\n\t * Please note that it does not remove the need for caller to close all active delta connections,\n\t * as storage may not be tracking such objects.\n\t * @param error - tells if container (and storage) are closed due to critical error.\n\t * Error might be due to disconnect between client & server knowledge about file, like file being overwritten\n\t * in storage, but client having stale local cache.\n\t * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n\t */\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdispose(error?: any): void;\n}\n\n/**\n * @alpha\n */\nexport interface IDocumentServiceFactory {\n\t/**\n\t * Creates the document service after extracting different endpoints URLs from a resolved URL.\n\t *\n\t * @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n\t * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n\t * @param clientIsSummarizer - Whether or not the client is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n\t * `undefined` =\\> false\n\t *\n\t * @returns An instance of {@link IDocumentService}.\n\t */\n\tcreateDocumentService(\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService>;\n\n\t/**\n\t * Creates a new document with the provided options. Returns the document service.\n\t *\n\t * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n\t * should be posted later, before connecting to ordering service.\n\t * @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n\t * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n\t * @param clientIsSummarizer - Whether or not the client is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n\t * `undefined` =\\> false\n\t */\n\tcreateContainer(\n\t\tcreateNewSummary: ISummaryTree | undefined,\n\t\tcreateNewResolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n * @alpha\n */\nexport interface ISummaryContext {\n\t/**\n\t * Parent summary proposed handle (from summary op)\n\t */\n\treadonly proposalHandle: string | undefined;\n\n\t/**\n\t * Parent summary acked handle (from summary ack)\n\t */\n\treadonly ackHandle: string | undefined;\n\n\treadonly referenceSequenceNumber: number;\n}\n\n/**\n * @alpha\n */\nexport enum FetchSource {\n\tdefault = \"default\",\n\tnoCache = \"noCache\",\n}\n"]}
@@ -3,6 +3,9 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { IRequest } from "@fluidframework/core-interfaces";
6
+ /**
7
+ * @alpha
8
+ */
6
9
  export interface IResolvedUrl {
7
10
  type: "fluid";
8
11
  /**
@@ -19,6 +22,7 @@ export interface IResolvedUrl {
19
22
  }
20
23
  /**
21
24
  * Container package info handed off to resolver.
25
+ * @alpha
22
26
  */
23
27
  export interface IContainerPackageInfo {
24
28
  /**
@@ -26,6 +30,9 @@ export interface IContainerPackageInfo {
26
30
  */
27
31
  name: string;
28
32
  }
33
+ /**
34
+ * @alpha
35
+ */
29
36
  export interface IUrlResolver {
30
37
  resolve(request: IRequest): Promise<IResolvedUrl | undefined>;
31
38
  /**
@@ -40,6 +47,7 @@ export interface IUrlResolver {
40
47
  /**
41
48
  * Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL
42
49
  * for driver compatibility and preload information.
50
+ * @internal
43
51
  */
44
52
  export interface DriverPreCheckInfo {
45
53
  /**
@@ -54,11 +62,15 @@ export interface DriverPreCheckInfo {
54
62
  }
55
63
  /**
56
64
  * Additional key in the loader request header
65
+ * @internal
57
66
  */
58
67
  export declare enum DriverHeader {
59
68
  summarizingClient = "fluid-client-summarizer",
60
69
  createNew = "createNew"
61
70
  }
71
+ /**
72
+ * @internal
73
+ */
62
74
  export interface IDriverHeader {
63
75
  [DriverHeader.summarizingClient]: boolean;
64
76
  [DriverHeader.createNew]: any;
@@ -1 +1 @@
1
- {"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnC,SAAS,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAI5B,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,cAAc,CACb,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,qBAAqB,GACvC,OAAO,CAAC,MAAM,CAAC,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,oBAAY,YAAY;IAEvB,iBAAiB,4BAA4B;IAE7C,SAAS,cAAc;CACvB;AAED,MAAM,WAAW,aAAa;IAC7B,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAG1C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC;CAC9B;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAEhD,UAAiB,cAAe,SAAQ,OAAO,CAAC,aAAa,CAAC;KAAG;CACjE"}
1
+ {"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnC,SAAS,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAI5B,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,cAAc,CACb,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,qBAAqB,GACvC,OAAO,CAAC,MAAM,CAAC,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,oBAAY,YAAY;IAEvB,iBAAiB,4BAA4B;IAE7C,SAAS,cAAc;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAG1C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC;CAC9B;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAEhD,UAAiB,cAAe,SAAQ,OAAO,CAAC,aAAa,CAAC;KAAG;CACjE"}
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Additional key in the loader request header
3
+ * @internal
3
4
  */
4
5
  export var DriverHeader;
5
6
  (function (DriverHeader) {
@@ -1 +1 @@
1
- {"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAgEA;;GAEG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,qDAAqD;IACrD,6DAA6C,CAAA;IAC7C,iDAAiD;IACjD,uCAAuB,CAAA;AACxB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest } from \"@fluidframework/core-interfaces\";\n\nexport interface IResolvedUrl {\n\ttype: \"fluid\";\n\t/**\n\t * The id of the container this resolved url is for.\n\t */\n\tid: string;\n\turl: string;\n\ttokens: { [name: string]: string };\n\tendpoints: { [name: string]: string };\n}\n\n/**\n * Container package info handed off to resolver.\n */\nexport interface IContainerPackageInfo {\n\t/**\n\t * Container package name.\n\t */\n\tname: string;\n}\n\nexport interface IUrlResolver {\n\t// Like DNS should be able to cache resolution requests. Then possibly just have a token provider go and do stuff?\n\t// the expiration of it could be relative to the lifetime of the token? Requests after need to refresh?\n\t// or do we split the token access from this?\n\tresolve(request: IRequest): Promise<IResolvedUrl | undefined>;\n\n\t/**\n\t * Creates a url for the created container with any data store path given in the relative url.\n\t * @param resolvedUrl - resolved url for the container.\n\t * @param relativeUrl - relative url containing data store path; '/' represents root path.\n\t * @param packageInfoSource - optional, represents container package information to be included in url.\n\t * @returns absolute url combining container url with dta store path and optional additional information.\n\t */\n\tgetAbsoluteUrl(\n\t\tresolvedUrl: IResolvedUrl,\n\t\trelativeUrl: string,\n\t\tpackageInfoSource?: IContainerPackageInfo,\n\t): Promise<string>;\n}\n\n/**\n * Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL\n * for driver compatibility and preload information.\n */\nexport interface DriverPreCheckInfo {\n\t/**\n\t * A code details hint that can potentially be used to prefetch container code prior to having a snapshot.\n\t */\n\tcodeDetailsHint?: string;\n\n\t/**\n\t * Domains that will be connected to on the critical boot path. Hosts can choose to preconnect to these for\n\t * improved performance.\n\t */\n\tcriticalBootDomains?: string[];\n}\n\n/**\n * Additional key in the loader request header\n */\nexport enum DriverHeader {\n\t// Key to indicate whether the request for summarizer\n\tsummarizingClient = \"fluid-client-summarizer\",\n\t// createNew information, specific to each driver\n\tcreateNew = \"createNew\",\n}\n\nexport interface IDriverHeader {\n\t[DriverHeader.summarizingClient]: boolean;\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[DriverHeader.createNew]: any;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n\t// eslint-disable-next-line @typescript-eslint/no-empty-interface\n\texport interface IRequestHeader extends Partial<IDriverHeader> {}\n}\n"]}
1
+ {"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAwEA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,qDAAqD;IACrD,6DAA6C,CAAA;IAC7C,iDAAiD;IACjD,uCAAuB,CAAA;AACxB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest } from \"@fluidframework/core-interfaces\";\n\n/**\n * @alpha\n */\nexport interface IResolvedUrl {\n\ttype: \"fluid\";\n\t/**\n\t * The id of the container this resolved url is for.\n\t */\n\tid: string;\n\turl: string;\n\ttokens: { [name: string]: string };\n\tendpoints: { [name: string]: string };\n}\n\n/**\n * Container package info handed off to resolver.\n * @alpha\n */\nexport interface IContainerPackageInfo {\n\t/**\n\t * Container package name.\n\t */\n\tname: string;\n}\n\n/**\n * @alpha\n */\nexport interface IUrlResolver {\n\t// Like DNS should be able to cache resolution requests. Then possibly just have a token provider go and do stuff?\n\t// the expiration of it could be relative to the lifetime of the token? Requests after need to refresh?\n\t// or do we split the token access from this?\n\tresolve(request: IRequest): Promise<IResolvedUrl | undefined>;\n\n\t/**\n\t * Creates a url for the created container with any data store path given in the relative url.\n\t * @param resolvedUrl - resolved url for the container.\n\t * @param relativeUrl - relative url containing data store path; '/' represents root path.\n\t * @param packageInfoSource - optional, represents container package information to be included in url.\n\t * @returns absolute url combining container url with dta store path and optional additional information.\n\t */\n\tgetAbsoluteUrl(\n\t\tresolvedUrl: IResolvedUrl,\n\t\trelativeUrl: string,\n\t\tpackageInfoSource?: IContainerPackageInfo,\n\t): Promise<string>;\n}\n\n/**\n * Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL\n * for driver compatibility and preload information.\n * @internal\n */\nexport interface DriverPreCheckInfo {\n\t/**\n\t * A code details hint that can potentially be used to prefetch container code prior to having a snapshot.\n\t */\n\tcodeDetailsHint?: string;\n\n\t/**\n\t * Domains that will be connected to on the critical boot path. Hosts can choose to preconnect to these for\n\t * improved performance.\n\t */\n\tcriticalBootDomains?: string[];\n}\n\n/**\n * Additional key in the loader request header\n * @internal\n */\nexport enum DriverHeader {\n\t// Key to indicate whether the request for summarizer\n\tsummarizingClient = \"fluid-client-summarizer\",\n\t// createNew information, specific to each driver\n\tcreateNew = \"createNew\",\n}\n\n/**\n * @internal\n */\nexport interface IDriverHeader {\n\t[DriverHeader.summarizingClient]: boolean;\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[DriverHeader.createNew]: any;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n\t// eslint-disable-next-line @typescript-eslint/no-empty-interface\n\texport interface IRequestHeader extends Partial<IDriverHeader> {}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/driver-definitions",
3
- "version": "2.0.0-dev.7.4.0.215930",
3
+ "version": "2.0.0-dev.7.4.0.217212",
4
4
  "description": "Fluid driver definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,7 +15,7 @@
15
15
  "module": "lib/index.js",
16
16
  "types": "dist/index.d.ts",
17
17
  "dependencies": {
18
- "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.215930",
18
+ "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.217212",
19
19
  "@fluidframework/protocol-definitions": "^3.0.0"
20
20
  },
21
21
  "devDependencies": {
@@ -58,6 +58,7 @@
58
58
  "build:compile": "fluid-build . --task compile",
59
59
  "build:docs": "fluid-build . --task api",
60
60
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
61
+ "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
61
62
  "ci:build": "npm run build:compile",
62
63
  "ci:build:docs": "api-extractor run",
63
64
  "ci:test": "echo No test for this package",
@@ -66,7 +67,7 @@
66
67
  "eslint": "eslint --format stylish src",
67
68
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
68
69
  "format": "npm run prettier:fix",
69
- "lint": "npm run prettier && npm run eslint",
70
+ "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
70
71
  "lint:fix": "npm run prettier:fix && npm run eslint:fix",
71
72
  "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
72
73
  "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
@@ -13,6 +13,7 @@ const { dataCorruptionError, dataProcessingError, ...FluidErrorTypesExceptDataTy
13
13
 
14
14
  /**
15
15
  * Different error types the Driver may report out to the Host.
16
+ * @internal
16
17
  */
17
18
  export const DriverErrorTypes = {
18
19
  // Inherit base error types
@@ -104,6 +105,9 @@ export const DriverErrorTypes = {
104
105
  */
105
106
  outOfStorageError: "outOfStorageError",
106
107
  } as const;
108
+ /**
109
+ * @internal
110
+ */
107
111
  export type DriverErrorTypes = (typeof DriverErrorTypes)[keyof typeof DriverErrorTypes];
108
112
 
109
113
  /**
@@ -111,6 +115,7 @@ export type DriverErrorTypes = (typeof DriverErrorTypes)[keyof typeof DriverErro
111
115
  * Lists types that are likely to be used by all drivers
112
116
  *
113
117
  * @deprecated Use {@link (DriverErrorTypes:type)} instead.
118
+ * @alpha
114
119
  */
115
120
  export enum DriverErrorType {
116
121
  /**
@@ -224,6 +229,7 @@ export enum DriverErrorType {
224
229
  * "Any" in the interface name is a nod to the fact that errorType has lost its type constraint.
225
230
  * It will be either DriverErrorType or the specific driver's specialized error type enum,
226
231
  * but we can't reference a specific driver's error type enum in this code.
232
+ * @alpha
227
233
  */
228
234
  export interface IAnyDriverError extends Omit<IDriverErrorBase, "errorType"> {
229
235
  readonly errorType: string;
@@ -231,6 +237,7 @@ export interface IAnyDriverError extends Omit<IDriverErrorBase, "errorType"> {
231
237
 
232
238
  /**
233
239
  * Base interface for all errors and warnings
240
+ * @alpha
234
241
  */
235
242
  export interface IDriverErrorBase {
236
243
  /**
@@ -262,22 +269,34 @@ export interface IDriverErrorBase {
262
269
  endpointReached?: boolean;
263
270
  }
264
271
 
272
+ /**
273
+ * @internal
274
+ */
265
275
  export interface IThrottlingWarning extends IDriverErrorBase {
266
276
  readonly errorType: DriverErrorType.throttlingError;
267
277
  readonly retryAfterSeconds: number;
268
278
  }
269
279
 
280
+ /**
281
+ * @internal
282
+ */
270
283
  export interface IGenericNetworkError extends IDriverErrorBase {
271
284
  readonly errorType: DriverErrorType.genericNetworkError;
272
285
  readonly statusCode?: number;
273
286
  }
274
287
 
288
+ /**
289
+ * @internal
290
+ */
275
291
  export interface IAuthorizationError extends IDriverErrorBase {
276
292
  readonly errorType: DriverErrorType.authorizationError;
277
293
  readonly claims?: string;
278
294
  readonly tenantId?: string;
279
295
  }
280
296
 
297
+ /**
298
+ * @internal
299
+ */
281
300
  export interface ILocationRedirectionError extends IDriverErrorBase {
282
301
  readonly errorType: DriverErrorType.locationRedirection;
283
302
  readonly redirectUrl: IResolvedUrl;
@@ -286,6 +305,7 @@ export interface ILocationRedirectionError extends IDriverErrorBase {
286
305
  /**
287
306
  * Having this uber interface without types that have their own interfaces
288
307
  * allows compiler to differentiate interfaces based on error type
308
+ * @internal
289
309
  */
290
310
  export interface IDriverBasicError extends IDriverErrorBase {
291
311
  readonly errorType:
@@ -305,6 +325,9 @@ export interface IDriverBasicError extends IDriverErrorBase {
305
325
  readonly statusCode?: number;
306
326
  }
307
327
 
328
+ /**
329
+ * @internal
330
+ */
308
331
  export type DriverError =
309
332
  | IThrottlingWarning
310
333
  | IGenericNetworkError
package/src/storage.ts CHANGED
@@ -28,6 +28,9 @@ import {
28
28
  import { IAnyDriverError } from "./driverError";
29
29
  import { IResolvedUrl } from "./urlResolver";
30
30
 
31
+ /**
32
+ * @internal
33
+ */
31
34
  export interface IDeltasFetchResult {
32
35
  /**
33
36
  * Sequential set of messages starting from 'from' sequence number.
@@ -45,6 +48,7 @@ export interface IDeltasFetchResult {
45
48
 
46
49
  /**
47
50
  * Interface to provide access to stored deltas for a shared object
51
+ * @internal
48
52
  */
49
53
  export interface IDeltaStorageService {
50
54
  /**
@@ -66,10 +70,14 @@ export interface IDeltaStorageService {
66
70
  ): Promise<IDeltasFetchResult>;
67
71
  }
68
72
 
73
+ /**
74
+ * @alpha
75
+ */
69
76
  export type IStreamResult<T> = { done: true } | { done: false; value: T };
70
77
 
71
78
  /**
72
79
  * Read interface for the Queue
80
+ * @alpha
73
81
  */
74
82
  export interface IStream<T> {
75
83
  read(): Promise<IStreamResult<T>>;
@@ -77,6 +85,7 @@ export interface IStream<T> {
77
85
 
78
86
  /**
79
87
  * Interface to provide access to stored deltas for a shared object
88
+ * @alpha
80
89
  */
81
90
  export interface IDocumentDeltaStorageService {
82
91
  /**
@@ -102,11 +111,15 @@ export interface IDocumentDeltaStorageService {
102
111
  // If a driver started using a larger value,
103
112
  // internal assumptions of the Runtime's GC feature will be violated
104
113
  // DO NOT INCREASE THIS TYPE'S VALUE
114
+ /**
115
+ * @alpha
116
+ */
105
117
  export type FiveDaysMs = 432_000_000; /* 5 days in milliseconds */
106
118
 
107
119
  /**
108
120
  * Policies describing attributes or characteristics of the driver's storage service,
109
121
  * to direct how other components interact with the driver
122
+ * @alpha
110
123
  */
111
124
  export interface IDocumentStorageServicePolicies {
112
125
  /**
@@ -127,6 +140,7 @@ export interface IDocumentStorageServicePolicies {
127
140
 
128
141
  /**
129
142
  * Interface to provide access to snapshots saved for a shared object
143
+ * @alpha
130
144
  */
131
145
  export interface IDocumentStorageService extends Partial<IDisposable> {
132
146
  repositoryUrl: string;
@@ -191,6 +205,9 @@ export interface IDocumentStorageService extends Partial<IDisposable> {
191
205
  downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
192
206
  }
193
207
 
208
+ /**
209
+ * @alpha
210
+ */
194
211
  export interface IDocumentDeltaConnectionEvents extends IErrorEvent {
195
212
  (event: "nack", listener: (documentId: string, message: INack[]) => void);
196
213
  (event: "disconnect", listener: (reason: IAnyDriverError) => void);
@@ -202,6 +219,9 @@ export interface IDocumentDeltaConnectionEvents extends IErrorEvent {
202
219
  (event: "error", listener: (error: any) => void);
203
220
  }
204
221
 
222
+ /**
223
+ * @alpha
224
+ */
205
225
  export interface IDocumentDeltaConnection
206
226
  extends IDisposable,
207
227
  IEventProvider<IDocumentDeltaConnectionEvents> {
@@ -280,6 +300,9 @@ export interface IDocumentDeltaConnection
280
300
  submitSignal(content: any, targetClientId?: string): void;
281
301
  }
282
302
 
303
+ /**
304
+ * @alpha
305
+ */
283
306
  export enum LoaderCachingPolicy {
284
307
  /**
285
308
  * The loader should not implement any prefetching or caching policy.
@@ -292,6 +315,9 @@ export enum LoaderCachingPolicy {
292
315
  Prefetch,
293
316
  }
294
317
 
318
+ /**
319
+ * @alpha
320
+ */
295
321
  export interface IDocumentServicePolicies {
296
322
  /**
297
323
  * Do not connect to delta stream
@@ -304,6 +330,9 @@ export interface IDocumentServicePolicies {
304
330
  readonly summarizeProtocolTree?: boolean;
305
331
  }
306
332
 
333
+ /**
334
+ * @alpha
335
+ */
307
336
  export interface IDocumentService {
308
337
  resolvedUrl: IResolvedUrl;
309
338
 
@@ -342,6 +371,9 @@ export interface IDocumentService {
342
371
  dispose(error?: any): void;
343
372
  }
344
373
 
374
+ /**
375
+ * @alpha
376
+ */
345
377
  export interface IDocumentServiceFactory {
346
378
  /**
347
379
  * Creates the document service after extracting different endpoints URLs from a resolved URL.
@@ -382,6 +414,7 @@ export interface IDocumentServiceFactory {
382
414
  /**
383
415
  * Context for uploading a summary to storage.
384
416
  * Indicates the previously acked summary.
417
+ * @alpha
385
418
  */
386
419
  export interface ISummaryContext {
387
420
  /**
@@ -397,6 +430,9 @@ export interface ISummaryContext {
397
430
  readonly referenceSequenceNumber: number;
398
431
  }
399
432
 
433
+ /**
434
+ * @alpha
435
+ */
400
436
  export enum FetchSource {
401
437
  default = "default",
402
438
  noCache = "noCache",
@@ -4,6 +4,9 @@
4
4
  */
5
5
  import { IRequest } from "@fluidframework/core-interfaces";
6
6
 
7
+ /**
8
+ * @alpha
9
+ */
7
10
  export interface IResolvedUrl {
8
11
  type: "fluid";
9
12
  /**
@@ -17,6 +20,7 @@ export interface IResolvedUrl {
17
20
 
18
21
  /**
19
22
  * Container package info handed off to resolver.
23
+ * @alpha
20
24
  */
21
25
  export interface IContainerPackageInfo {
22
26
  /**
@@ -25,6 +29,9 @@ export interface IContainerPackageInfo {
25
29
  name: string;
26
30
  }
27
31
 
32
+ /**
33
+ * @alpha
34
+ */
28
35
  export interface IUrlResolver {
29
36
  // Like DNS should be able to cache resolution requests. Then possibly just have a token provider go and do stuff?
30
37
  // the expiration of it could be relative to the lifetime of the token? Requests after need to refresh?
@@ -48,6 +55,7 @@ export interface IUrlResolver {
48
55
  /**
49
56
  * Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL
50
57
  * for driver compatibility and preload information.
58
+ * @internal
51
59
  */
52
60
  export interface DriverPreCheckInfo {
53
61
  /**
@@ -64,6 +72,7 @@ export interface DriverPreCheckInfo {
64
72
 
65
73
  /**
66
74
  * Additional key in the loader request header
75
+ * @internal
67
76
  */
68
77
  export enum DriverHeader {
69
78
  // Key to indicate whether the request for summarizer
@@ -72,6 +81,9 @@ export enum DriverHeader {
72
81
  createNew = "createNew",
73
82
  }
74
83
 
84
+ /**
85
+ * @internal
86
+ */
75
87
  export interface IDriverHeader {
76
88
  [DriverHeader.summarizingClient]: boolean;
77
89
  // TODO: Use something other than `any`.