@fluidframework/driver-definitions 2.0.2 → 2.1.0-276326
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/api-extractor/api-extractor.legacy.json +4 -0
- package/api-report/driver-definitions.beta.api.md +0 -7
- package/api-report/{driver-definitions.alpha.api.md → driver-definitions.legacy.alpha.api.md} +0 -7
- package/api-report/driver-definitions.public.api.md +0 -7
- package/dist/driverError.d.ts +10 -0
- package/dist/driverError.d.ts.map +1 -1
- package/dist/driverError.js +1 -0
- package/dist/driverError.js.map +1 -1
- package/dist/git/resources.d.ts +2 -0
- package/dist/git/resources.d.ts.map +1 -1
- package/dist/git/resources.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/protocol/clients.d.ts +1 -0
- package/dist/protocol/clients.d.ts.map +1 -1
- package/dist/protocol/clients.js.map +1 -1
- package/dist/protocol/config.d.ts +1 -0
- package/dist/protocol/config.d.ts.map +1 -1
- package/dist/protocol/config.js.map +1 -1
- package/dist/protocol/consensus.d.ts +7 -0
- package/dist/protocol/consensus.d.ts.map +1 -1
- package/dist/protocol/consensus.js.map +1 -1
- package/dist/protocol/date.d.ts +1 -0
- package/dist/protocol/date.d.ts.map +1 -1
- package/dist/protocol/date.js.map +1 -1
- package/dist/protocol/protocol.d.ts +15 -0
- package/dist/protocol/protocol.d.ts.map +1 -1
- package/dist/protocol/protocol.js +2 -0
- package/dist/protocol/protocol.js.map +1 -1
- package/dist/protocol/scopes.d.ts +1 -0
- package/dist/protocol/scopes.d.ts.map +1 -1
- package/dist/protocol/scopes.js +1 -0
- package/dist/protocol/scopes.js.map +1 -1
- package/dist/protocol/sockets.d.ts +2 -0
- package/dist/protocol/sockets.d.ts.map +1 -1
- package/dist/protocol/sockets.js.map +1 -1
- package/dist/protocol/storage.d.ts +10 -0
- package/dist/protocol/storage.d.ts.map +1 -1
- package/dist/protocol/storage.js +2 -0
- package/dist/protocol/storage.js.map +1 -1
- package/dist/protocol/summary.d.ts +1 -0
- package/dist/protocol/summary.d.ts.map +1 -1
- package/dist/protocol/summary.js.map +1 -1
- package/dist/protocol/tokens.d.ts +1 -0
- package/dist/protocol/tokens.d.ts.map +1 -1
- package/dist/protocol/tokens.js.map +1 -1
- package/dist/storage.d.ts +17 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +2 -0
- package/dist/storage.js.map +1 -1
- package/dist/urlResolver.d.ts +5 -0
- package/dist/urlResolver.d.ts.map +1 -1
- package/dist/urlResolver.js +1 -0
- package/dist/urlResolver.js.map +1 -1
- package/lib/driverError.d.ts +10 -0
- package/lib/driverError.d.ts.map +1 -1
- package/lib/driverError.js +1 -0
- package/lib/driverError.js.map +1 -1
- package/lib/git/resources.d.ts +2 -0
- package/lib/git/resources.d.ts.map +1 -1
- package/lib/git/resources.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/protocol/clients.d.ts +1 -0
- package/lib/protocol/clients.d.ts.map +1 -1
- package/lib/protocol/clients.js.map +1 -1
- package/lib/protocol/config.d.ts +1 -0
- package/lib/protocol/config.d.ts.map +1 -1
- package/lib/protocol/config.js.map +1 -1
- package/lib/protocol/consensus.d.ts +7 -0
- package/lib/protocol/consensus.d.ts.map +1 -1
- package/lib/protocol/consensus.js.map +1 -1
- package/lib/protocol/date.d.ts +1 -0
- package/lib/protocol/date.d.ts.map +1 -1
- package/lib/protocol/date.js.map +1 -1
- package/lib/protocol/protocol.d.ts +15 -0
- package/lib/protocol/protocol.d.ts.map +1 -1
- package/lib/protocol/protocol.js +2 -0
- package/lib/protocol/protocol.js.map +1 -1
- package/lib/protocol/scopes.d.ts +1 -0
- package/lib/protocol/scopes.d.ts.map +1 -1
- package/lib/protocol/scopes.js +1 -0
- package/lib/protocol/scopes.js.map +1 -1
- package/lib/protocol/sockets.d.ts +2 -0
- package/lib/protocol/sockets.d.ts.map +1 -1
- package/lib/protocol/sockets.js.map +1 -1
- package/lib/protocol/storage.d.ts +10 -0
- package/lib/protocol/storage.d.ts.map +1 -1
- package/lib/protocol/storage.js +2 -0
- package/lib/protocol/storage.js.map +1 -1
- package/lib/protocol/summary.d.ts +1 -0
- package/lib/protocol/summary.d.ts.map +1 -1
- package/lib/protocol/summary.js.map +1 -1
- package/lib/protocol/tokens.d.ts +1 -0
- package/lib/protocol/tokens.d.ts.map +1 -1
- package/lib/protocol/tokens.js.map +1 -1
- package/lib/storage.d.ts +17 -0
- package/lib/storage.d.ts.map +1 -1
- package/lib/storage.js +2 -0
- package/lib/storage.js.map +1 -1
- package/lib/urlResolver.d.ts +5 -0
- package/lib/urlResolver.d.ts.map +1 -1
- package/lib/urlResolver.js +1 -0
- package/lib/urlResolver.js.map +1 -1
- package/package.json +13 -9
- package/src/driverError.ts +10 -0
- package/src/git/resources.ts +2 -0
- package/src/protocol/clients.ts +1 -0
- package/src/protocol/config.ts +1 -0
- package/src/protocol/consensus.ts +7 -0
- package/src/protocol/date.ts +1 -0
- package/src/protocol/protocol.ts +15 -0
- package/src/protocol/scopes.ts +1 -0
- package/src/protocol/sockets.ts +2 -0
- package/src/protocol/storage.ts +10 -0
- package/src/protocol/summary.ts +1 -0
- package/src/protocol/tokens.ts +1 -0
- package/src/storage.ts +17 -0
- package/src/urlResolver.ts +5 -0
package/dist/storage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgUH;;GAEG;AACH,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACT,CAAC,EAVW,mBAAmB,mCAAnB,mBAAmB,QAU9B;AA4HD;;GAEG;AACH,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACpB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDisposable,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\n\nimport type { IAnyDriverError } from \"./driverError.js\";\nimport type {\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 \"./protocol/index.js\";\nimport type { IResolvedUrl } from \"./urlResolver.js\";\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\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 * Returns the snapshot which can contain other artifacts too like blob contents, ops etc. It is different from\n\t * `getSnapshotTree` api in that, that API only returns the snapshot tree from the snapshot.\n\t * @param snapshotFetchOptions - Options specified by the caller to specify and want certain behavior from the\n\t * driver when fetching the snapshot.\n\t */\n\tgetSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;\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 * Events emitted by {@link IDocumentService}.\n * @alpha\n */\nexport interface IDocumentServiceEvents extends IEvent {\n\t/**\n\t * This event is used to communicate any metadata related to the container. We might have received metadata from the service.\n\t * Read more info on this event from here `IContainer.containerMetadata`.\n\t */\n\t(event: \"metadataUpdate\", listener: (metadata: Record<string, string>) => void);\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 * @privateRemarks\n\t * UnknownShouldBe<string> can be string if {@link IDocumentServiceFactory} becomes internal.\n\t */\n\tsubmitSignal: (content: string, 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\t/**\n\t * Whether the driver supports the new getSnapshot api which returns snapshot which\n\t * contains all contents along with the snapshot tree. Enable this by default when the\n\t * driver can fully support the api.\n\t */\n\treadonly supportGetSnapshotApi?: boolean;\n}\n\n/**\n * @alpha\n */\nexport interface IDocumentService extends IEventProvider<IDocumentServiceEvents> {\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\n/**\n * A \"Full\" container Snapshot, including ISnapshotTree, blobs and outstanding ops (and other metadata)\n *\n * @alpha\n */\nexport interface ISnapshot {\n\tsnapshotTree: ISnapshotTree;\n\tblobContents: Map<string, ArrayBuffer>;\n\tops: ISequencedDocumentMessage[];\n\n\t/**\n\t * Sequence number of the snapshot\n\t */\n\tsequenceNumber: number | undefined;\n\n\t/**\n\t * Sequence number for the latest op/snapshot for the file in ODSP\n\t */\n\tlatestSequenceNumber: number | undefined;\n\n\tsnapshotFormatV: 1;\n}\n\n/**\n * Snapshot fetch options which are used to communicate different things to the driver\n * when fetching the snapshot.\n * @alpha\n */\nexport interface ISnapshotFetchOptions {\n\t/**\n\t * Indicates scenario in which the snapshot is fetched. It is a free form string mostly\n\t * used for telemetry purposes.\n\t */\n\tscenarioName?: string;\n\t/**\n\t * Tell driver to cache the fetched snapshot. Driver is supposed to cache the fetched snapshot if this is\n\t * set to true. If undefined, then it is upto the driver, to cache it or not.\n\t */\n\tcacheSnapshot?: boolean;\n\n\t/**\n\t * Version of the snapshot to be fetched. Certain storage services just keep 1 snapshot for the\n\t * container, so specifying version is not necessary for storage services.\n\t */\n\tversionId?: string;\n\n\t/**\n\t * List of loading groupId of datastores for which the snapshot needs to be fetched. If not provided, content with\n\t * default/missing groupIDs will be requested from the service. It is upto the service, to include snapshot for\n\t * content with groupIds or not. Don't provide anything here for fetching content for initial container boot.\n\t */\n\tloadingGroupIds?: string[];\n\n\t/**\n\t * Specify if you want default behavior of the driver to fetch the snapshot like lets say simultaneously fetch from\n\t * network and cache or specify FetchSource.noCache to just fetch from network.\n\t */\n\tfetchSource?: FetchSource;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyUH;;;GAGG;AACH,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACT,CAAC,EAVW,mBAAmB,mCAAnB,mBAAmB,QAU9B;AAgID;;;GAGG;AACH,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACpB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDisposable,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\n\nimport type { IAnyDriverError } from \"./driverError.js\";\nimport type {\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 \"./protocol/index.js\";\nimport type { IResolvedUrl } from \"./urlResolver.js\";\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 * @legacy\n * @alpha\n */\nexport type IStreamResult<T> = { done: true } | { done: false; value: T };\n\n/**\n * Read interface for the Queue\n * @legacy\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 * @legacy\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 * @legacy\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 * @legacy\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 * @legacy\n * @alpha\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\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 * Returns the snapshot which can contain other artifacts too like blob contents, ops etc. It is different from\n\t * `getSnapshotTree` api in that, that API only returns the snapshot tree from the snapshot.\n\t * @param snapshotFetchOptions - Options specified by the caller to specify and want certain behavior from the\n\t * driver when fetching the snapshot.\n\t */\n\tgetSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;\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 * Events emitted by {@link IDocumentService}.\n * @legacy\n * @alpha\n */\nexport interface IDocumentServiceEvents extends IEvent {\n\t/**\n\t * This event is used to communicate any metadata related to the container. We might have received metadata from the service.\n\t * Read more info on this event from here `IContainer.containerMetadata`.\n\t */\n\t(event: \"metadataUpdate\", listener: (metadata: Record<string, string>) => void);\n}\n\n/**\n * @legacy\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 * @legacy\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 * @privateRemarks\n\t * UnknownShouldBe<string> can be string if {@link IDocumentServiceFactory} becomes internal.\n\t */\n\tsubmitSignal: (content: string, targetClientId?: string) => void;\n}\n\n/**\n * @legacy\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 * @legacy\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\t/**\n\t * Whether the driver supports the new getSnapshot api which returns snapshot which\n\t * contains all contents along with the snapshot tree. Enable this by default when the\n\t * driver can fully support the api.\n\t */\n\treadonly supportGetSnapshotApi?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IDocumentService extends IEventProvider<IDocumentServiceEvents> {\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 * @legacy\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 * @legacy\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 * @legacy\n * @alpha\n */\nexport enum FetchSource {\n\tdefault = \"default\",\n\tnoCache = \"noCache\",\n}\n\n/**\n * A \"Full\" container Snapshot, including ISnapshotTree, blobs and outstanding ops (and other metadata)\n *\n * @legacy\n * @alpha\n */\nexport interface ISnapshot {\n\tsnapshotTree: ISnapshotTree;\n\tblobContents: Map<string, ArrayBuffer>;\n\tops: ISequencedDocumentMessage[];\n\n\t/**\n\t * Sequence number of the snapshot\n\t */\n\tsequenceNumber: number | undefined;\n\n\t/**\n\t * Sequence number for the latest op/snapshot for the file in ODSP\n\t */\n\tlatestSequenceNumber: number | undefined;\n\n\tsnapshotFormatV: 1;\n}\n\n/**\n * Snapshot fetch options which are used to communicate different things to the driver\n * when fetching the snapshot.\n * @legacy\n * @alpha\n */\nexport interface ISnapshotFetchOptions {\n\t/**\n\t * Indicates scenario in which the snapshot is fetched. It is a free form string mostly\n\t * used for telemetry purposes.\n\t */\n\tscenarioName?: string;\n\t/**\n\t * Tell driver to cache the fetched snapshot. Driver is supposed to cache the fetched snapshot if this is\n\t * set to true. If undefined, then it is upto the driver, to cache it or not.\n\t */\n\tcacheSnapshot?: boolean;\n\n\t/**\n\t * Version of the snapshot to be fetched. Certain storage services just keep 1 snapshot for the\n\t * container, so specifying version is not necessary for storage services.\n\t */\n\tversionId?: string;\n\n\t/**\n\t * List of loading groupId of datastores for which the snapshot needs to be fetched. If not provided, content with\n\t * default/missing groupIDs will be requested from the service. It is upto the service, to include snapshot for\n\t * content with groupIds or not. Don't provide anything here for fetching content for initial container boot.\n\t */\n\tloadingGroupIds?: string[];\n\n\t/**\n\t * Specify if you want default behavior of the driver to fetch the snapshot like lets say simultaneously fetch from\n\t * network and cache or specify FetchSource.noCache to just fetch from network.\n\t */\n\tfetchSource?: FetchSource;\n}\n"]}
|
package/dist/urlResolver.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IRequest } from "@fluidframework/core-interfaces";
|
|
6
6
|
/**
|
|
7
|
+
* @legacy
|
|
7
8
|
* @alpha
|
|
8
9
|
*/
|
|
9
10
|
export interface IResolvedUrl {
|
|
@@ -22,6 +23,7 @@ export interface IResolvedUrl {
|
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Container package info handed off to resolver.
|
|
26
|
+
* @legacy
|
|
25
27
|
* @alpha
|
|
26
28
|
*/
|
|
27
29
|
export interface IContainerPackageInfo {
|
|
@@ -31,6 +33,7 @@ export interface IContainerPackageInfo {
|
|
|
31
33
|
name: string;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
36
|
+
* @legacy
|
|
34
37
|
* @alpha
|
|
35
38
|
*/
|
|
36
39
|
export interface IUrlResolver {
|
|
@@ -47,6 +50,7 @@ export interface IUrlResolver {
|
|
|
47
50
|
/**
|
|
48
51
|
* Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL
|
|
49
52
|
* for driver compatibility and preload information.
|
|
53
|
+
* @legacy
|
|
50
54
|
* @alpha
|
|
51
55
|
*/
|
|
52
56
|
export interface DriverPreCheckInfo {
|
|
@@ -62,6 +66,7 @@ export interface DriverPreCheckInfo {
|
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* Additional key in the loader request header
|
|
69
|
+
* @legacy
|
|
65
70
|
* @alpha
|
|
66
71
|
*/
|
|
67
72
|
export declare enum DriverHeader {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE;;;GAGG;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;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;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;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;GAIG;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;IAChD;;;;OAIG;IAEH,UAAiB,cAAe,SAAQ,OAAO,CAAC,aAAa,CAAC;KAAG;CACjE"}
|
package/dist/urlResolver.js
CHANGED
package/dist/urlResolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0EH;;;;GAIG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,qDAAqD;IACrD,6DAA6C,CAAA;IAC7C,iDAAiD;IACjD,uCAAuB,CAAA;AACxB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IRequest } from \"@fluidframework/core-interfaces\";\n\n/**\n * @legacy\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 * @legacy\n * @alpha\n */\nexport interface IContainerPackageInfo {\n\t/**\n\t * Container package name.\n\t */\n\tname: string;\n}\n\n/**\n * @legacy\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 * @legacy\n * @alpha\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 * @legacy\n * @alpha\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/**\n\t * Interface to represent headers to include in the container or data store load request.\n\t * For example, caller can use this to pass on various loader options in the container\n\t * load request.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-empty-interface\n\texport interface IRequestHeader extends Partial<IDriverHeader> {}\n}\n"]}
|
package/lib/driverError.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { IResolvedUrl } from "./urlResolver.js";
|
|
6
6
|
/**
|
|
7
7
|
* Different error types the Driver may report out to the Host.
|
|
8
|
+
* @legacy
|
|
8
9
|
* @alpha
|
|
9
10
|
*/
|
|
10
11
|
export declare const DriverErrorTypes: {
|
|
@@ -82,6 +83,7 @@ export declare const DriverErrorTypes: {
|
|
|
82
83
|
};
|
|
83
84
|
/**
|
|
84
85
|
* {@inheritDoc (DriverErrorTypes:variable)}
|
|
86
|
+
* @legacy
|
|
85
87
|
* @alpha
|
|
86
88
|
*/
|
|
87
89
|
export type DriverErrorTypes = (typeof DriverErrorTypes)[keyof typeof DriverErrorTypes];
|
|
@@ -95,6 +97,7 @@ export type DriverErrorTypes = (typeof DriverErrorTypes)[keyof typeof DriverErro
|
|
|
95
97
|
* "Any" in the interface name is a nod to the fact that errorType has lost its type constraint.
|
|
96
98
|
* It will be either {@link @fluidframework/driver-definitions#(DriverErrorTypes:variable)} or the specific driver's specialized error type enum,
|
|
97
99
|
* but we can't reference a specific driver's error type enum in this code.
|
|
100
|
+
* @legacy
|
|
98
101
|
* @alpha
|
|
99
102
|
*/
|
|
100
103
|
export interface IAnyDriverError extends Omit<IDriverErrorBase, "errorType"> {
|
|
@@ -107,6 +110,7 @@ export interface IAnyDriverError extends Omit<IDriverErrorBase, "errorType"> {
|
|
|
107
110
|
}
|
|
108
111
|
/**
|
|
109
112
|
* Base interface for all errors and warnings
|
|
113
|
+
* @legacy
|
|
110
114
|
* @alpha
|
|
111
115
|
*/
|
|
112
116
|
export interface IDriverErrorBase {
|
|
@@ -135,6 +139,7 @@ export interface IDriverErrorBase {
|
|
|
135
139
|
endpointReached?: boolean;
|
|
136
140
|
}
|
|
137
141
|
/**
|
|
142
|
+
* @legacy
|
|
138
143
|
* @alpha
|
|
139
144
|
*/
|
|
140
145
|
export interface IThrottlingWarning extends IDriverErrorBase {
|
|
@@ -142,6 +147,7 @@ export interface IThrottlingWarning extends IDriverErrorBase {
|
|
|
142
147
|
readonly retryAfterSeconds: number;
|
|
143
148
|
}
|
|
144
149
|
/**
|
|
150
|
+
* @legacy
|
|
145
151
|
* @alpha
|
|
146
152
|
*/
|
|
147
153
|
export interface IGenericNetworkError extends IDriverErrorBase {
|
|
@@ -149,6 +155,7 @@ export interface IGenericNetworkError extends IDriverErrorBase {
|
|
|
149
155
|
readonly statusCode?: number;
|
|
150
156
|
}
|
|
151
157
|
/**
|
|
158
|
+
* @legacy
|
|
152
159
|
* @alpha
|
|
153
160
|
*/
|
|
154
161
|
export interface IAuthorizationError extends IDriverErrorBase {
|
|
@@ -157,6 +164,7 @@ export interface IAuthorizationError extends IDriverErrorBase {
|
|
|
157
164
|
readonly tenantId?: string;
|
|
158
165
|
}
|
|
159
166
|
/**
|
|
167
|
+
* @legacy
|
|
160
168
|
* @alpha
|
|
161
169
|
*/
|
|
162
170
|
export interface ILocationRedirectionError extends IDriverErrorBase {
|
|
@@ -166,6 +174,7 @@ export interface ILocationRedirectionError extends IDriverErrorBase {
|
|
|
166
174
|
/**
|
|
167
175
|
* Having this uber interface without types that have their own interfaces
|
|
168
176
|
* allows compiler to differentiate interfaces based on error type
|
|
177
|
+
* @legacy
|
|
169
178
|
* @alpha
|
|
170
179
|
*/
|
|
171
180
|
export interface IDriverBasicError extends IDriverErrorBase {
|
|
@@ -173,6 +182,7 @@ export interface IDriverBasicError extends IDriverErrorBase {
|
|
|
173
182
|
readonly statusCode?: number;
|
|
174
183
|
}
|
|
175
184
|
/**
|
|
185
|
+
* @legacy
|
|
176
186
|
* @alpha
|
|
177
187
|
*/
|
|
178
188
|
export type DriverError = IThrottlingWarning | IGenericNetworkError | IAuthorizationError | ILocationRedirectionError | IDriverBasicError;
|
package/lib/driverError.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverError.d.ts","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMrD
|
|
1
|
+
{"version":3,"file":"driverError.d.ts","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAG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framework/core-interfaces/internal";
|
|
|
7
7
|
const { dataCorruptionError, dataProcessingError, ...FluidErrorTypesExceptDataTypes } = FluidErrorTypes;
|
|
8
8
|
/**
|
|
9
9
|
* Different error types the Driver may report out to the Host.
|
|
10
|
+
* @legacy
|
|
10
11
|
* @alpha
|
|
11
12
|
*/
|
|
12
13
|
export const DriverErrorTypes = {
|
package/lib/driverError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverError.js","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAI3E,8GAA8G;AAC9G,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,GAAG,8BAA8B,EAAE,GACpF,eAAe,CAAC;AAEjB
|
|
1
|
+
{"version":3,"file":"driverError.js","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAI3E,8GAA8G;AAC9G,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,GAAG,8BAA8B,EAAE,GACpF,eAAe,CAAC;AAEjB;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,2BAA2B;IAC3B,GAAG,8BAA8B;IAEjC;;;OAGG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,kBAAkB,EAAE,oBAAoB;IAExC;;OAEG;IACH,+BAA+B,EAAE,iCAAiC;IAElE;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,gCAAgC,EAAE,kCAAkC;IAEpE;;;OAGG;IACH,UAAU,EAAE,YAAY;IAExB;;;;;OAKG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,uBAAuB,EAAE,yBAAyB;IAElD;;;;;OAKG;IACH,wBAAwB,EAAE,0BAA0B;IAEpD;;OAEG;IACH,8BAA8B,EAAE,gCAAgC;IAEhE;;;OAGG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;;;OAIG;IACH,kBAAkB,EAAE,oBAAoB;IAExC;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;CAC7B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidErrorTypes } from \"@fluidframework/core-interfaces/internal\";\n\nimport type { IResolvedUrl } from \"./urlResolver.js\";\n\n// Omit `dataCorruptionError` and `dataProcessingError` from the list of values inherited from FluidErrorTypes\nconst { dataCorruptionError, dataProcessingError, ...FluidErrorTypesExceptDataTypes } =\n\tFluidErrorTypes;\n\n/**\n * Different error types the Driver may report out to the Host.\n * @legacy\n * @alpha\n */\nexport const DriverErrorTypes = {\n\t// Inherit base error types\n\t...FluidErrorTypesExceptDataTypes,\n\n\t/**\n\t * Some non-categorized (below) networking error\n\t * Include errors like fatal server error (usually 500).\n\t */\n\tgenericNetworkError: \"genericNetworkError\",\n\n\t/**\n\t * Access denied - user does not have enough privileges to open a file, or continue to operate on a file\n\t */\n\tauthorizationError: \"authorizationError\",\n\n\t/**\n\t * File not found, or file deleted during session\n\t */\n\tfileNotFoundOrAccessDeniedError: \"fileNotFoundOrAccessDeniedError\",\n\n\t/**\n\t * We can not reach server due to computer being offline.\n\t */\n\tofflineError: \"offlineError\",\n\n\t/*\n\t * Unsupported client protocol\n\t */\n\tunsupportedClientProtocolVersion: \"unsupportedClientProtocolVersion\",\n\n\t/**\n\t * User does not have write permissions to a file, but is changing content of a file.\n\t * That might be indication of some data store error - data stores should not generate ops in readonly mode.\n\t */\n\twriteError: \"writeError\",\n\n\t/**\n\t * A generic fetch failure that indicates we were not able to get a response from the server.\n\t * This may be due to the client being offline (though, if we are able to detect offline state it will be\n\t * logged as an offlineError instead). Other possibilities could be DNS errors, malformed fetch request,\n\t * CSP violation, etc.\n\t */\n\tfetchFailure: \"fetchFailure\",\n\n\t/**\n\t * This error occurs when token provider fails to fetch orderer token\n\t */\n\tfetchTokenError: \"fetchTokenError\",\n\n\t/**\n\t * Unexpected response from server. Either JSON is malformed, or some required properties are missing\n\t */\n\tincorrectServerResponse: \"incorrectServerResponse\",\n\n\t/**\n\t * This error occurs when the file is modified externally (not through Fluid protocol) in storage.\n\t * It will occur in cases where client has some state or cache that is based on old content (identity) of a file,\n\t * and storage / driver / loader detects such mismatch.\n\t * When it's hit, client needs to forget all the knowledge about this file and start over.\n\t */\n\tfileOverwrittenInStorage: \"fileOverwrittenInStorage\",\n\n\t/**\n\t * The document is read-only and delta stream connection is forbidden.\n\t */\n\tdeltaStreamConnectionForbidden: \"deltaStreamConnectionForbidden\",\n\n\t/**\n\t * The location of file/container can change on server. So if the file location moves and we try to access the old\n\t * location, then this error is thrown to let the client know about the new location info.\n\t */\n\tlocationRedirection: \"locationRedirection\",\n\n\t/**\n\t * When a file is not a Fluid file, but has Fluid extension such as \".note\",\n\t * server won't be able to open it and will return this error. The innerMostErrorCode will be\n\t * \"fluidInvalidSchema\"\n\t */\n\tfluidInvalidSchema: \"fluidInvalidSchema\",\n\n\t/**\n\t * File is locked for read/write by storage, e.g. whole collection is locked and access denied.\n\t */\n\tfileIsLocked: \"fileIsLocked\",\n\n\t/**\n\t * Storage is out of space\n\t */\n\toutOfStorageError: \"outOfStorageError\",\n} as const;\n/**\n * {@inheritDoc (DriverErrorTypes:variable)}\n * @legacy\n * @alpha\n */\nexport type DriverErrorTypes = (typeof DriverErrorTypes)[keyof typeof DriverErrorTypes];\n\n/**\n * Interface describing errors and warnings raised by any driver code.\n *\n * @remarks\n * Not expected to be implemented by a class or an object literal, but rather used in place of\n * any or unknown in various function signatures that pass errors around.\n *\n * \"Any\" in the interface name is a nod to the fact that errorType has lost its type constraint.\n * It will be either {@link @fluidframework/driver-definitions#(DriverErrorTypes:variable)} or the specific driver's specialized error type enum,\n * but we can't reference a specific driver's error type enum in this code.\n * @legacy\n * @alpha\n */\nexport interface IAnyDriverError extends Omit<IDriverErrorBase, \"errorType\"> {\n\treadonly errorType: string;\n\t/**\n\t * This property is used predominantly for socket io errors. It captures the underlying socket event name which resulted in the error.\n\t * i.e. connect_error, connect_document_error etc.\n\t */\n\tscenarioName?: string;\n}\n\n/**\n * Base interface for all errors and warnings\n * @legacy\n * @alpha\n */\nexport interface IDriverErrorBase {\n\t/**\n\t * Classification of what type of error this is, used programmatically by consumers to interpret the error.\n\t *\n\t * @privateRemarks TODO: use {@link DriverErrorTypes} instead (breaking change).\n\t */\n\treadonly errorType: DriverErrorTypes;\n\n\t/**\n\t * Free-form error message\n\t */\n\treadonly message: string;\n\n\t/**\n\t * True indicates the caller may retry the failed action. False indicates it's a fatal error\n\t */\n\tcanRetry: boolean;\n\n\t/**\n\t * Best guess as to network conditions (online/offline) when the error arose.\n\t * See OnlineStatus enum in driver-utils package for expected values.\n\t */\n\tonline?: string;\n\n\t/**\n\t * Whether service was reachable and we got some response from service.\n\t */\n\tendpointReached?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IThrottlingWarning extends IDriverErrorBase {\n\treadonly errorType: typeof DriverErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IGenericNetworkError extends IDriverErrorBase {\n\treadonly errorType: typeof DriverErrorTypes.genericNetworkError;\n\treadonly statusCode?: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IAuthorizationError extends IDriverErrorBase {\n\treadonly errorType: typeof DriverErrorTypes.authorizationError;\n\treadonly claims?: string;\n\treadonly tenantId?: string;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ILocationRedirectionError extends IDriverErrorBase {\n\treadonly errorType: typeof DriverErrorTypes.locationRedirection;\n\treadonly redirectUrl: IResolvedUrl;\n}\n\n/**\n * Having this uber interface without types that have their own interfaces\n * allows compiler to differentiate interfaces based on error type\n * @legacy\n * @alpha\n */\nexport interface IDriverBasicError extends IDriverErrorBase {\n\treadonly errorType:\n\t\t| typeof DriverErrorTypes.genericError\n\t\t| typeof DriverErrorTypes.fileNotFoundOrAccessDeniedError\n\t\t| typeof DriverErrorTypes.offlineError\n\t\t| typeof DriverErrorTypes.unsupportedClientProtocolVersion\n\t\t| typeof DriverErrorTypes.writeError\n\t\t| typeof DriverErrorTypes.fetchFailure\n\t\t| typeof DriverErrorTypes.fetchTokenError\n\t\t| typeof DriverErrorTypes.incorrectServerResponse\n\t\t| typeof DriverErrorTypes.fileOverwrittenInStorage\n\t\t| typeof DriverErrorTypes.fluidInvalidSchema\n\t\t| typeof DriverErrorTypes.usageError\n\t\t| typeof DriverErrorTypes.fileIsLocked\n\t\t| typeof DriverErrorTypes.outOfStorageError;\n\treadonly statusCode?: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type DriverError =\n\t| IThrottlingWarning\n\t| IGenericNetworkError\n\t| IAuthorizationError\n\t| ILocationRedirectionError\n\t| IDriverBasicError;\n"]}
|
package/lib/git/resources.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ export interface IRef {
|
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* Required params to create ref
|
|
119
|
+
* @legacy
|
|
119
120
|
* @alpha
|
|
120
121
|
*/
|
|
121
122
|
export interface ICreateRefParams {
|
|
@@ -124,6 +125,7 @@ export interface ICreateRefParams {
|
|
|
124
125
|
}
|
|
125
126
|
/**
|
|
126
127
|
* Required params to patch ref
|
|
128
|
+
* @legacy
|
|
127
129
|
* @alpha
|
|
128
130
|
*/
|
|
129
131
|
export interface IPatchRefParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/git/resources.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;;GAGG;AACH,MAAM,WAAW,OAAO;IACvB,IAAI,EAAE,M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;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACZ,CAAC;CACF"}
|
package/lib/git/resources.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/git/resources.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// The types defined in this directory provide strong typing for the deserialized\n// REST payloads when communicating with the Git service.\n//\n// These should not be changed unless Git itself is changed, and should be aligned\n// with the service side definitions contained here:\n//\n// server/routerlicious/packages/gitresources/src/resources.ts\n\n/**\n * Details about the author of the commit\n * @internal\n */\nexport interface IAuthor {\n\tname: string;\n\temail: string;\n\t// ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ\n\tdate: string;\n}\n\n/**\n * Details about the committer of the commit\n * @internal\n */\nexport interface ICommitter {\n\tname: string;\n\temail: string;\n\t// ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ\n\tdate: string;\n}\n\n/**\n * Details of the commit\n * @internal\n */\nexport interface ICommitHash {\n\tsha: string;\n\turl: string;\n}\n\n/**\n * Required params to create commit\n * @internal\n */\nexport interface ICreateCommitParams {\n\tmessage: string;\n\ttree: string;\n\tparents: string[];\n\t// GitHub has signature verification on the author\n\tauthor: IAuthor;\n}\n\n/**\n * Commit content\n * @internal\n */\nexport interface ICommit {\n\tsha: string;\n\turl: string;\n\tauthor: IAuthor;\n\tcommitter: ICommitter;\n\tmessage: string;\n\ttree: ICommitHash;\n\tparents: ICommitHash[];\n}\n\n/**\n * Details of a commit\n *\n * GitHub differentiates the commit resource returned from its git and repos routes. The repos\n * route returns more site specific information (like links to the developer's account) while the git\n * route is what is actually stored in the Git repo\n *\n * https://developer.github.com/v3/git/commits/\n * https://developer.github.com/v3/repos/commits/\n * @internal\n */\nexport interface ICommitDetails {\n\turl: string;\n\tsha: string;\n\tcommit: {\n\t\turl: string;\n\t\tauthor: IAuthor;\n\t\tcommitter: ICommitter;\n\t\tmessage: string;\n\t\ttree: ICommitHash;\n\t};\n\tparents: ICommitHash[];\n}\n\n/**\n * Blob content\n * @internal\n */\nexport interface IBlob {\n\tcontent: string;\n\tencoding: string;\n\turl: string;\n\tsha: string;\n\tsize: number;\n}\n\n/**\n * Required params to create blob\n * @internal\n */\nexport interface ICreateBlobParams {\n\t// The encoded content\n\tcontent: string;\n\n\t// The encoding of the content.\n\t// eslint-disable-next-line unicorn/text-encoding-identifier-case\n\tencoding: \"utf-8\" | \"base64\";\n}\n\n/**\n * Response to create blob request\n * @internal\n */\nexport interface ICreateBlobResponse {\n\tsha: string;\n\turl: string;\n}\n\n/**\n * Ref content\n * @internal\n */\nexport interface IRef {\n\tref: string;\n\turl: string;\n\tobject: {\n\t\ttype: string;\n\t\tsha: string;\n\t\turl: string;\n\t};\n}\n\n/**\n * Required params to create ref\n * @alpha\n */\nexport interface ICreateRefParams {\n\tref: string;\n\tsha: string;\n}\n\n/**\n * Required params to patch ref\n * @alpha\n */\nexport interface IPatchRefParams {\n\tsha: string;\n\tforce: boolean;\n}\n\n/**\n * Required params to create repo\n * @param name - name of the repository\n * @internal\n */\nexport interface ICreateRepoParams {\n\tname: string;\n}\n\n/**\n * Required details to create tree entry\n * @internal\n */\nexport interface ICreateTreeEntry {\n\tpath: string;\n\tmode: string;\n\ttype: string;\n\tsha: string;\n}\n\n/**\n * Required params to create tree\n * @internal\n */\nexport interface ICreateTreeParams {\n\tbase_tree?: string;\n\ttree: ICreateTreeEntry[];\n}\n\n/**\n * Tree Entry Content\n * @internal\n */\nexport interface ITreeEntry {\n\tpath: string;\n\tmode: string;\n\ttype: string;\n\tsize: number;\n\tsha: string;\n\turl: string;\n}\n\n/**\n * Tree content\n * @internal\n */\nexport interface ITree {\n\tsha: string;\n\turl: string;\n\ttree: ITreeEntry[];\n}\n\n/**\n * Tagger content\n * @internal\n */\nexport interface ITagger {\n\tname: string;\n\temail: string;\n\t// ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ\n\tdate: string;\n}\n\n/**\n * Required params to create tag\n * @internal\n */\nexport interface ICreateTagParams {\n\ttag: string;\n\tmessage: string;\n\tobject: string;\n\ttype: string;\n\ttagger: ITagger;\n}\n\n/**\n * Tag content\n * @internal\n */\nexport interface ITag {\n\ttag: string;\n\tsha: string;\n\turl: string;\n\tmessage: string;\n\ttagger: ITagger;\n\tobject: {\n\t\ttype: string;\n\t\tsha: string;\n\t\turl: string;\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/git/resources.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// The types defined in this directory provide strong typing for the deserialized\n// REST payloads when communicating with the Git service.\n//\n// These should not be changed unless Git itself is changed, and should be aligned\n// with the service side definitions contained here:\n//\n// server/routerlicious/packages/gitresources/src/resources.ts\n\n/**\n * Details about the author of the commit\n * @internal\n */\nexport interface IAuthor {\n\tname: string;\n\temail: string;\n\t// ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ\n\tdate: string;\n}\n\n/**\n * Details about the committer of the commit\n * @internal\n */\nexport interface ICommitter {\n\tname: string;\n\temail: string;\n\t// ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ\n\tdate: string;\n}\n\n/**\n * Details of the commit\n * @internal\n */\nexport interface ICommitHash {\n\tsha: string;\n\turl: string;\n}\n\n/**\n * Required params to create commit\n * @internal\n */\nexport interface ICreateCommitParams {\n\tmessage: string;\n\ttree: string;\n\tparents: string[];\n\t// GitHub has signature verification on the author\n\tauthor: IAuthor;\n}\n\n/**\n * Commit content\n * @internal\n */\nexport interface ICommit {\n\tsha: string;\n\turl: string;\n\tauthor: IAuthor;\n\tcommitter: ICommitter;\n\tmessage: string;\n\ttree: ICommitHash;\n\tparents: ICommitHash[];\n}\n\n/**\n * Details of a commit\n *\n * GitHub differentiates the commit resource returned from its git and repos routes. The repos\n * route returns more site specific information (like links to the developer's account) while the git\n * route is what is actually stored in the Git repo\n *\n * https://developer.github.com/v3/git/commits/\n * https://developer.github.com/v3/repos/commits/\n * @internal\n */\nexport interface ICommitDetails {\n\turl: string;\n\tsha: string;\n\tcommit: {\n\t\turl: string;\n\t\tauthor: IAuthor;\n\t\tcommitter: ICommitter;\n\t\tmessage: string;\n\t\ttree: ICommitHash;\n\t};\n\tparents: ICommitHash[];\n}\n\n/**\n * Blob content\n * @internal\n */\nexport interface IBlob {\n\tcontent: string;\n\tencoding: string;\n\turl: string;\n\tsha: string;\n\tsize: number;\n}\n\n/**\n * Required params to create blob\n * @internal\n */\nexport interface ICreateBlobParams {\n\t// The encoded content\n\tcontent: string;\n\n\t// The encoding of the content.\n\t// eslint-disable-next-line unicorn/text-encoding-identifier-case\n\tencoding: \"utf-8\" | \"base64\";\n}\n\n/**\n * Response to create blob request\n * @internal\n */\nexport interface ICreateBlobResponse {\n\tsha: string;\n\turl: string;\n}\n\n/**\n * Ref content\n * @internal\n */\nexport interface IRef {\n\tref: string;\n\turl: string;\n\tobject: {\n\t\ttype: string;\n\t\tsha: string;\n\t\turl: string;\n\t};\n}\n\n/**\n * Required params to create ref\n * @legacy\n * @alpha\n */\nexport interface ICreateRefParams {\n\tref: string;\n\tsha: string;\n}\n\n/**\n * Required params to patch ref\n * @legacy\n * @alpha\n */\nexport interface IPatchRefParams {\n\tsha: string;\n\tforce: boolean;\n}\n\n/**\n * Required params to create repo\n * @param name - name of the repository\n * @internal\n */\nexport interface ICreateRepoParams {\n\tname: string;\n}\n\n/**\n * Required details to create tree entry\n * @internal\n */\nexport interface ICreateTreeEntry {\n\tpath: string;\n\tmode: string;\n\ttype: string;\n\tsha: string;\n}\n\n/**\n * Required params to create tree\n * @internal\n */\nexport interface ICreateTreeParams {\n\tbase_tree?: string;\n\ttree: ICreateTreeEntry[];\n}\n\n/**\n * Tree Entry Content\n * @internal\n */\nexport interface ITreeEntry {\n\tpath: string;\n\tmode: string;\n\ttype: string;\n\tsize: number;\n\tsha: string;\n\turl: string;\n}\n\n/**\n * Tree content\n * @internal\n */\nexport interface ITree {\n\tsha: string;\n\turl: string;\n\ttree: ITreeEntry[];\n}\n\n/**\n * Tagger content\n * @internal\n */\nexport interface ITagger {\n\tname: string;\n\temail: string;\n\t// ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ\n\tdate: string;\n}\n\n/**\n * Required params to create tag\n * @internal\n */\nexport interface ICreateTagParams {\n\ttag: string;\n\tmessage: string;\n\tobject: string;\n\ttype: string;\n\ttagger: ITagger;\n}\n\n/**\n * Tag content\n * @internal\n */\nexport interface ITag {\n\ttag: string;\n\tsha: string;\n\turl: string;\n\tmessage: string;\n\ttagger: ITagger;\n\tobject: {\n\t\ttype: string;\n\t\tsha: string;\n\t\turl: string;\n\t};\n}\n"]}
|
package/lib/legacy.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../src/protocol/clients.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;;;;;OAQG;IACH,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,YAAY,EAAE,aAAa,CAAC;IAE5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,E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E,MAAM,EAAE,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../src/protocol/clients.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 type { IUser } from \"./users.js\";\n\n/**\n * A client's connection mode - either view-only (\"read\") or allowing edits (\"write\").\n *\n * @remarks\n *\n * Note: a user's connection mode is dependent on their permissions.\n * E.g. a user with read-only permissions will not be allowed a \"write\" connection mode.\n * @public\n */\nexport type ConnectionMode = \"write\" | \"read\";\n\n/**\n * Capabilities of a Client.\n * In particular, whether or not the client is {@link ICapabilities.interactive}.\n * @public\n */\nexport interface ICapabilities {\n\t/**\n\t * Indicates if the client represents a potentially interactive session with a user (if 'true') or if it's\n\t * a \"system entity\" (if 'false').\n\t *\n\t * @remarks\n\t *\n\t * The only \"system entity\" scenario at the moment is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer client}.\n\t */\n\tinteractive: boolean;\n}\n\n/**\n * {@link IClient} connection / environment metadata.\n * @public\n */\nexport interface IClientDetails {\n\t/**\n\t * {@inheritDoc ICapabilities}\n\t */\n\tcapabilities: ICapabilities;\n\n\t/**\n\t * The kind of client being described.\n\t *\n\t * `undefined` indicates that the kind could not be determined.\n\t */\n\ttype?: string;\n\n\t/**\n\t * @remarks\n\t *\n\t * If the environment needs to specify multiple properties which gives info about the environment, then\n\t * it should be in particular format like: \"prop1:val1;prop2:val2;prop3:val3\"\n\t */\n\tenvironment?: string;\n\tdevice?: string;\n}\n\n/**\n * Represents a client connected to a Fluid service, including associated user details, permissions, and connection mode.\n * @public\n */\nexport interface IClient {\n\t/**\n\t * {@inheritDoc ConnectionMode}\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * {@inheritDoc IClientDetails}\n\t */\n\tdetails: IClientDetails;\n\n\tpermission: string[];\n\n\t/**\n\t * The user information associated with this client connection.\n\t */\n\tuser: IUser;\n\n\t/**\n\t * Enumerates actions allowed for the client connection.\n\t */\n\tscopes: string[];\n\n\t/**\n\t * The time the client connected to the service.\n\t */\n\ttimestamp?: number;\n}\n\n/**\n * A {@link IClient} that has been acknowledged by the sequencer.\n * @public\n */\nexport interface ISequencedClient {\n\t/**\n\t * The underlying client details.\n\t */\n\tclient: IClient;\n\n\t/**\n\t * The sequence number of the \"join\" message sent when the client joined the session.\n\t */\n\tsequenceNumber: number;\n}\n\n/**\n * @alpha\n */\nexport interface ISignalClient {\n\t/**\n\t * The {@link ISignalClient.client}'s unique ID.\n\t */\n\tclientId: string;\n\n\t/**\n\t * The underlying client details.\n\t */\n\tclient: IClient;\n\n\t/**\n\t * Counts the number of signals sent by the client.\n\t */\n\tclientConnectionNumber?: number;\n\n\t/**\n\t * Sequence number that indicates when the signal was created in relation to the delta stream.\n\t */\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * Contents sent with a `ClientJoin` message.\n * @internal\n */\nexport interface IClientJoin {\n\t/**\n\t * The ID of the joining client.\n\t */\n\tclientId: string;\n\n\t/**\n\t * The underlying client details.\n\t */\n\tdetail: IClient;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../src/protocol/clients.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 type { IUser } from \"./users.js\";\n\n/**\n * A client's connection mode - either view-only (\"read\") or allowing edits (\"write\").\n *\n * @remarks\n *\n * Note: a user's connection mode is dependent on their permissions.\n * E.g. a user with read-only permissions will not be allowed a \"write\" connection mode.\n * @public\n */\nexport type ConnectionMode = \"write\" | \"read\";\n\n/**\n * Capabilities of a Client.\n * In particular, whether or not the client is {@link ICapabilities.interactive}.\n * @public\n */\nexport interface ICapabilities {\n\t/**\n\t * Indicates if the client represents a potentially interactive session with a user (if 'true') or if it's\n\t * a \"system entity\" (if 'false').\n\t *\n\t * @remarks\n\t *\n\t * The only \"system entity\" scenario at the moment is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer client}.\n\t */\n\tinteractive: boolean;\n}\n\n/**\n * {@link IClient} connection / environment metadata.\n * @public\n */\nexport interface IClientDetails {\n\t/**\n\t * {@inheritDoc ICapabilities}\n\t */\n\tcapabilities: ICapabilities;\n\n\t/**\n\t * The kind of client being described.\n\t *\n\t * `undefined` indicates that the kind could not be determined.\n\t */\n\ttype?: string;\n\n\t/**\n\t * @remarks\n\t *\n\t * If the environment needs to specify multiple properties which gives info about the environment, then\n\t * it should be in particular format like: \"prop1:val1;prop2:val2;prop3:val3\"\n\t */\n\tenvironment?: string;\n\tdevice?: string;\n}\n\n/**\n * Represents a client connected to a Fluid service, including associated user details, permissions, and connection mode.\n * @public\n */\nexport interface IClient {\n\t/**\n\t * {@inheritDoc ConnectionMode}\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * {@inheritDoc IClientDetails}\n\t */\n\tdetails: IClientDetails;\n\n\tpermission: string[];\n\n\t/**\n\t * The user information associated with this client connection.\n\t */\n\tuser: IUser;\n\n\t/**\n\t * Enumerates actions allowed for the client connection.\n\t */\n\tscopes: string[];\n\n\t/**\n\t * The time the client connected to the service.\n\t */\n\ttimestamp?: number;\n}\n\n/**\n * A {@link IClient} that has been acknowledged by the sequencer.\n * @public\n */\nexport interface ISequencedClient {\n\t/**\n\t * The underlying client details.\n\t */\n\tclient: IClient;\n\n\t/**\n\t * The sequence number of the \"join\" message sent when the client joined the session.\n\t */\n\tsequenceNumber: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISignalClient {\n\t/**\n\t * The {@link ISignalClient.client}'s unique ID.\n\t */\n\tclientId: string;\n\n\t/**\n\t * The underlying client details.\n\t */\n\tclient: IClient;\n\n\t/**\n\t * Counts the number of signals sent by the client.\n\t */\n\tclientConnectionNumber?: number;\n\n\t/**\n\t * Sequence number that indicates when the signal was created in relation to the delta stream.\n\t */\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * Contents sent with a `ClientJoin` message.\n * @internal\n */\nexport interface IClientJoin {\n\t/**\n\t * The ID of the joining client.\n\t */\n\tclientId: string;\n\n\t/**\n\t * The underlying client details.\n\t */\n\tdetail: IClient;\n}\n"]}
|
package/lib/protocol/config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/protocol/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/protocol/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/protocol/config.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Key value store of service configuration properties provided to the client as part of connection.\n * @alpha\n */\nexport interface IClientConfiguration {\n\t/**\n\t * Max message size the server will accept before requiring chunking.\n\t */\n\tmaxMessageSize: number;\n\n\t/**\n\t * Server-defined ideal block size for storing snapshots.\n\t */\n\tblockSize: number;\n\n\t/**\n\t * noopTimeFrequency & noopCountFrequency control how often a client with \"write\" connection needs to send\n\t * noop messages in case no other ops are being sent. Any op (including noops) result in client\n\t * communicating its reference sequence number to the relay service, which can recalculate MSN based on new info.\n\t * Clients send noops when either noopTimeFrequency ms elapsed from receiving the last op or when receiving\n\t * noopCountFrequency ops and only if the client did not have a chance to communicate its reference sequence\n\t * number via regular ops.\n\t * 'Infinity' will disable this feature and if no value is provided, the client choses some reasonable value.\n\t */\n\tnoopTimeFrequency?: number;\n\n\t/**\n\t * Set min op frequency with which noops would be sent in case of an active connection which is not sending any op.\n\t * See {@link IClientConfiguration.noopTimeFrequency} for more details.\n\t * 'Infinity' will disable this feature and if no value is provided, the client choses some reasonable value.\n\t */\n\tnoopCountFrequency?: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/protocol/config.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Key value store of service configuration properties provided to the client as part of connection.\n * @legacy\n * @alpha\n */\nexport interface IClientConfiguration {\n\t/**\n\t * Max message size the server will accept before requiring chunking.\n\t */\n\tmaxMessageSize: number;\n\n\t/**\n\t * Server-defined ideal block size for storing snapshots.\n\t */\n\tblockSize: number;\n\n\t/**\n\t * noopTimeFrequency & noopCountFrequency control how often a client with \"write\" connection needs to send\n\t * noop messages in case no other ops are being sent. Any op (including noops) result in client\n\t * communicating its reference sequence number to the relay service, which can recalculate MSN based on new info.\n\t * Clients send noops when either noopTimeFrequency ms elapsed from receiving the last op or when receiving\n\t * noopCountFrequency ops and only if the client did not have a chance to communicate its reference sequence\n\t * number via regular ops.\n\t * 'Infinity' will disable this feature and if no value is provided, the client choses some reasonable value.\n\t */\n\tnoopTimeFrequency?: number;\n\n\t/**\n\t * Set min op frequency with which noops would be sent in case of an active connection which is not sending any op.\n\t * See {@link IClientConfiguration.noopTimeFrequency} for more details.\n\t * 'Infinity' will disable this feature and if no value is provided, the client choses some reasonable value.\n\t */\n\tnoopCountFrequency?: number;\n}\n"]}
|
|
@@ -10,6 +10,7 @@ import type { ISequencedClient } from "./clients.js";
|
|
|
10
10
|
* Consensus on the proposal is achieved if the MSN is \>= the sequence number
|
|
11
11
|
* at which the proposal is made and no client within the collaboration window rejects
|
|
12
12
|
* the proposal.
|
|
13
|
+
* @legacy
|
|
13
14
|
* @alpha
|
|
14
15
|
*/
|
|
15
16
|
export interface IProposal {
|
|
@@ -24,6 +25,7 @@ export interface IProposal {
|
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* Similar to {@link IProposal} except it also includes the sequence number when it was made.
|
|
28
|
+
* @legacy
|
|
27
29
|
* @alpha
|
|
28
30
|
*/
|
|
29
31
|
export type ISequencedProposal = {
|
|
@@ -31,6 +33,7 @@ export type ISequencedProposal = {
|
|
|
31
33
|
} & IProposal;
|
|
32
34
|
/**
|
|
33
35
|
* Adds the sequence number at which the message was approved to an {@link ISequencedProposal}.
|
|
36
|
+
* @legacy
|
|
34
37
|
* @alpha
|
|
35
38
|
*/
|
|
36
39
|
export type IApprovedProposal = {
|
|
@@ -38,6 +41,7 @@ export type IApprovedProposal = {
|
|
|
38
41
|
} & ISequencedProposal;
|
|
39
42
|
/**
|
|
40
43
|
* Adds the sequence number at which the message was committed to an {@link IApprovedProposal}.
|
|
44
|
+
* @legacy
|
|
41
45
|
* @alpha
|
|
42
46
|
*/
|
|
43
47
|
export type ICommittedProposal = {
|
|
@@ -85,6 +89,7 @@ export interface IQuorumClients {
|
|
|
85
89
|
}
|
|
86
90
|
/**
|
|
87
91
|
* Interface for tracking proposals in the Quorum.
|
|
92
|
+
* @legacy
|
|
88
93
|
* @alpha
|
|
89
94
|
*/
|
|
90
95
|
export interface IQuorumProposals {
|
|
@@ -99,6 +104,7 @@ export interface IQuorumProposals {
|
|
|
99
104
|
}
|
|
100
105
|
/**
|
|
101
106
|
* Interface combining tracking of clients as well as proposals in the Quorum.
|
|
107
|
+
* @legacy
|
|
102
108
|
* @alpha
|
|
103
109
|
*/
|
|
104
110
|
export interface IQuorum extends Omit<IQuorumClients, "on" | "once" | "off">, Omit<IQuorumProposals, "on" | "once" | "off"> {
|
|
@@ -117,6 +123,7 @@ export interface IProtocolState {
|
|
|
117
123
|
values: [string, ICommittedProposal][];
|
|
118
124
|
}
|
|
119
125
|
/**
|
|
126
|
+
* @legacy
|
|
120
127
|
* @alpha
|
|
121
128
|
*/
|
|
122
129
|
export interface IProcessMessageResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consensus.d.ts","sourceRoot":"","sources":["../../src/protocol/consensus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"consensus.d.ts","sourceRoot":"","sources":["../../src/protocol/consensus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG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AM,WAAW,OAChB,SAAQ,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC,EAClD,IAAI,CAAC,gBAAgB,EAAE,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;IAC9C,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,OAAO,EAAE,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAAE,CAAC;IACtC,SAAS,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACpD,MAAM,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consensus.js","sourceRoot":"","sources":["../../src/protocol/consensus.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 type { ISequencedClient } from \"./clients.js\";\n\n/**\n * Proposal to set the given key/value pair.\n *\n * @remarks\n * Consensus on the proposal is achieved if the MSN is \\>= the sequence number\n * at which the proposal is made and no client within the collaboration window rejects\n * the proposal.\n * @alpha\n */\nexport interface IProposal {\n\t/**\n\t * The key for the proposal.\n\t */\n\tkey: string;\n\n\t/**\n\t * The value of the proposal.\n\t */\n\tvalue: unknown;\n}\n\n/**\n * Similar to {@link IProposal} except it also includes the sequence number when it was made.\n * @alpha\n */\nexport type ISequencedProposal = { sequenceNumber: number } & IProposal;\n\n/**\n * Adds the sequence number at which the message was approved to an {@link ISequencedProposal}.\n * @alpha\n */\nexport type IApprovedProposal = { approvalSequenceNumber: number } & ISequencedProposal;\n\n/**\n * Adds the sequence number at which the message was committed to an {@link IApprovedProposal}.\n * @alpha\n */\nexport type ICommittedProposal = { commitSequenceNumber: number } & IApprovedProposal;\n\n/**\n * @deprecated This type is now unused and will be removed\n * Events fired by a Quorum in response to client tracking.\n * @internal\n *\n */\nexport interface IQuorumClientsEvents {\n\t(event: \"addMember\", listener: (clientId: string, details: ISequencedClient) => void);\n\t(event: \"removeMember\", listener: (clientId: string) => void);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"error\", listener: (message: any) => void);\n}\n\n/**\n * Events fired by a Quorum in response to proposal tracking.\n * @internal\n * @deprecated This type is now unused and will be removed\n */\nexport interface IQuorumProposalsEvents {\n\t(event: \"addProposal\", listener: (proposal: ISequencedProposal) => void);\n\t(\n\t\tevent: \"approveProposal\",\n\t\tlistener: (\n\t\t\tsequenceNumber: number,\n\t\t\tkey: string,\n\t\t\tvalue: unknown,\n\t\t\tapprovalSequenceNumber: number,\n\t\t) => void,\n\t);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"error\", listener: (message: any) => void): void;\n}\n\n/**\n * All events fired by {@link IQuorum}, both client tracking and proposal tracking.\n * @internal\n * @deprecated This type is now unused and will be removed\n */\nexport type IQuorumEvents = IQuorumClientsEvents & IQuorumProposalsEvents;\n\n/**\n * Interface for tracking clients in the Quorum.\n * @public\n */\nexport interface IQuorumClients {\n\tgetMembers(): Map<string, ISequencedClient>;\n\tgetMember(clientId: string): ISequencedClient | undefined;\n\ton(event: \"addMember\", listener: (clientId: string, details: ISequencedClient) => void);\n\ton(event: \"removeMember\", listener: (clientId: string) => void);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\ton(event: \"error\", listener: (message: any) => void);\n\tonce: IQuorumClients[\"on\"];\n\toff: IQuorumClients[\"on\"];\n}\n\n/**\n * Interface for tracking proposals in the Quorum.\n * @alpha\n */\nexport interface IQuorumProposals {\n\tpropose(key: string, value: unknown): Promise<void>;\n\n\thas(key: string): boolean;\n\n\tget(key: string): unknown;\n\n\ton(event: \"addProposal\", listener: (proposal: ISequencedProposal) => void);\n\ton(\n\t\tevent: \"approveProposal\",\n\t\tlistener: (\n\t\t\tsequenceNumber: number,\n\t\t\tkey: string,\n\t\t\tvalue: unknown,\n\t\t\tapprovalSequenceNumber: number,\n\t\t) => void,\n\t);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\ton(event: \"error\", listener: (message: any) => void): void;\n\tonce: IQuorumProposals[\"on\"];\n\toff: IQuorumProposals[\"on\"];\n}\n\n/**\n * Interface combining tracking of clients as well as proposals in the Quorum.\n * @alpha\n */\nexport interface IQuorum\n\textends Omit<IQuorumClients, \"on\" | \"once\" | \"off\">,\n\t\tOmit<IQuorumProposals, \"on\" | \"once\" | \"off\"> {\n\ton: IQuorumClients[\"on\"] & IQuorumProposals[\"on\"];\n\tonce: IQuorum[\"on\"];\n\toff: IQuorum[\"on\"];\n}\n\n/**\n * @internal\n */\nexport interface IProtocolState {\n\tsequenceNumber: number;\n\tminimumSequenceNumber: number;\n\tmembers: [string, ISequencedClient][];\n\tproposals: [number, ISequencedProposal, string[]][];\n\tvalues: [string, ICommittedProposal][];\n}\n\n/**\n * @alpha\n */\nexport interface IProcessMessageResult {\n\timmediateNoOp?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"consensus.js","sourceRoot":"","sources":["../../src/protocol/consensus.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 type { ISequencedClient } from \"./clients.js\";\n\n/**\n * Proposal to set the given key/value pair.\n *\n * @remarks\n * Consensus on the proposal is achieved if the MSN is \\>= the sequence number\n * at which the proposal is made and no client within the collaboration window rejects\n * the proposal.\n * @legacy\n * @alpha\n */\nexport interface IProposal {\n\t/**\n\t * The key for the proposal.\n\t */\n\tkey: string;\n\n\t/**\n\t * The value of the proposal.\n\t */\n\tvalue: unknown;\n}\n\n/**\n * Similar to {@link IProposal} except it also includes the sequence number when it was made.\n * @legacy\n * @alpha\n */\nexport type ISequencedProposal = { sequenceNumber: number } & IProposal;\n\n/**\n * Adds the sequence number at which the message was approved to an {@link ISequencedProposal}.\n * @legacy\n * @alpha\n */\nexport type IApprovedProposal = { approvalSequenceNumber: number } & ISequencedProposal;\n\n/**\n * Adds the sequence number at which the message was committed to an {@link IApprovedProposal}.\n * @legacy\n * @alpha\n */\nexport type ICommittedProposal = { commitSequenceNumber: number } & IApprovedProposal;\n\n/**\n * @deprecated This type is now unused and will be removed\n * Events fired by a Quorum in response to client tracking.\n * @internal\n *\n */\nexport interface IQuorumClientsEvents {\n\t(event: \"addMember\", listener: (clientId: string, details: ISequencedClient) => void);\n\t(event: \"removeMember\", listener: (clientId: string) => void);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"error\", listener: (message: any) => void);\n}\n\n/**\n * Events fired by a Quorum in response to proposal tracking.\n * @internal\n * @deprecated This type is now unused and will be removed\n */\nexport interface IQuorumProposalsEvents {\n\t(event: \"addProposal\", listener: (proposal: ISequencedProposal) => void);\n\t(\n\t\tevent: \"approveProposal\",\n\t\tlistener: (\n\t\t\tsequenceNumber: number,\n\t\t\tkey: string,\n\t\t\tvalue: unknown,\n\t\t\tapprovalSequenceNumber: number,\n\t\t) => void,\n\t);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"error\", listener: (message: any) => void): void;\n}\n\n/**\n * All events fired by {@link IQuorum}, both client tracking and proposal tracking.\n * @internal\n * @deprecated This type is now unused and will be removed\n */\nexport type IQuorumEvents = IQuorumClientsEvents & IQuorumProposalsEvents;\n\n/**\n * Interface for tracking clients in the Quorum.\n * @public\n */\nexport interface IQuorumClients {\n\tgetMembers(): Map<string, ISequencedClient>;\n\tgetMember(clientId: string): ISequencedClient | undefined;\n\ton(event: \"addMember\", listener: (clientId: string, details: ISequencedClient) => void);\n\ton(event: \"removeMember\", listener: (clientId: string) => void);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\ton(event: \"error\", listener: (message: any) => void);\n\tonce: IQuorumClients[\"on\"];\n\toff: IQuorumClients[\"on\"];\n}\n\n/**\n * Interface for tracking proposals in the Quorum.\n * @legacy\n * @alpha\n */\nexport interface IQuorumProposals {\n\tpropose(key: string, value: unknown): Promise<void>;\n\n\thas(key: string): boolean;\n\n\tget(key: string): unknown;\n\n\ton(event: \"addProposal\", listener: (proposal: ISequencedProposal) => void);\n\ton(\n\t\tevent: \"approveProposal\",\n\t\tlistener: (\n\t\t\tsequenceNumber: number,\n\t\t\tkey: string,\n\t\t\tvalue: unknown,\n\t\t\tapprovalSequenceNumber: number,\n\t\t) => void,\n\t);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\ton(event: \"error\", listener: (message: any) => void): void;\n\tonce: IQuorumProposals[\"on\"];\n\toff: IQuorumProposals[\"on\"];\n}\n\n/**\n * Interface combining tracking of clients as well as proposals in the Quorum.\n * @legacy\n * @alpha\n */\nexport interface IQuorum\n\textends Omit<IQuorumClients, \"on\" | \"once\" | \"off\">,\n\t\tOmit<IQuorumProposals, \"on\" | \"once\" | \"off\"> {\n\ton: IQuorumClients[\"on\"] & IQuorumProposals[\"on\"];\n\tonce: IQuorum[\"on\"];\n\toff: IQuorum[\"on\"];\n}\n\n/**\n * @internal\n */\nexport interface IProtocolState {\n\tsequenceNumber: number;\n\tminimumSequenceNumber: number;\n\tmembers: [string, ISequencedClient][];\n\tproposals: [number, ISequencedProposal, string[]][];\n\tvalues: [string, ICommittedProposal][];\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProcessMessageResult {\n\timmediateNoOp?: boolean;\n}\n"]}
|
package/lib/protocol/date.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/protocol/date.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/protocol/date.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC"}
|
package/lib/protocol/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/protocol/date.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601 format} date: `YYYY-MM-DDTHH:MM:SSZ`.\n * @alpha\n */\nexport type IsoDate = string;\n"]}
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/protocol/date.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601 format} date: `YYYY-MM-DDTHH:MM:SSZ`.\n * @legacy\n * @alpha\n */\nexport type IsoDate = string;\n"]}
|