/
var
/
www
/
qr4y.kz
/
server
/
delivery
/
node_modules
/
@google-cloud
/
firestore
/
build
/
src
/
/var/www/qr4y.kz/server/delivery/node_modules/@google-cloud/firestore/build/src
mkdir
upload
Name
Size
Mode
Actions
v1/
-
0755
rm
v1beta1/
-
0755
rm
backoff.d.ts
5547
0644
edit
dl
rm
backoff.js
7650
0644
edit
dl
rm
bulk-writer.d.ts
19241
0644
edit
dl
rm
bulk-writer.js
36076
0644
edit
dl
rm
bundle.d.ts
835
0644
edit
dl
rm
bundle.js
8427
0644
edit
dl
rm
collection-group.d.ts
3610
0644
edit
dl
rm
collection-group.js
4520
0644
edit
dl
rm
convert.d.ts
2776
0644
edit
dl
rm
convert.js
7167
0644
edit
dl
rm
document-change.d.ts
5041
0644
edit
dl
rm
document-change.js
5292
0644
edit
dl
rm
document-reader.d.ts
1842
0644
edit
dl
rm
document-reader.js
5353
0644
edit
dl
rm
document.d.ts
18136
0644
edit
dl
rm
document.js
30411
0644
edit
dl
rm
field-value.d.ts
8618
0644
edit
dl
rm
field-value.js
13904
0644
edit
dl
rm
geo-point.d.ts
2644
0644
edit
dl
rm
geo-point.js
3217
0644
edit
dl
rm
index.d.ts
36511
0644
edit
dl
rm
index.js
59421
0644
edit
dl
rm
logger.d.ts
1310
0644
edit
dl
rm
logger.js
2112
0644
edit
dl
rm
order.d.ts
1096
0644
edit
dl
rm
order.js
7525
0644
edit
dl
rm
path.d.ts
12126
0644
edit
dl
rm
path.js
19003
0644
edit
dl
rm
pool.d.ts
4116
0644
edit
dl
rm
pool.js
8859
0644
edit
dl
rm
query-partition.d.ts
4019
0644
edit
dl
rm
query-partition.js
5769
0644
edit
dl
rm
rate-limiter.d.ts
3015
0644
edit
dl
rm
rate-limiter.js
5850
0644
edit
dl
rm
recursive-delete.d.ts
5714
0644
edit
dl
rm
recursive-delete.js
10010
0644
edit
dl
rm
reference.d.ts
45610
0644
edit
dl
rm
reference.js
89449
0644
edit
dl
rm
serializer.d.ts
2942
0644
edit
dl
rm
serializer.js
12813
0644
edit
dl
rm
status-code.d.ts
1121
0644
edit
dl
rm
status-code.js
712
0644
edit
dl
rm
timestamp.d.ts
6987
0644
edit
dl
rm
timestamp.js
9697
0644
edit
dl
rm
transaction.d.ts
9673
0644
edit
dl
rm
transaction.js
18889
0644
edit
dl
rm
types.d.ts
3869
0644
edit
dl
rm
types.js
1387
0644
edit
dl
rm
util.d.ts
3463
0644
edit
dl
rm
util.js
6023
0644
edit
dl
rm
validate.d.ts
6527
0644
edit
dl
rm
validate.js
12314
0644
edit
dl
rm
watch.d.ts
9762
0644
edit
dl
rm
watch.js
24972
0644
edit
dl
rm
write-batch.d.ts
10533
0644
edit
dl
rm
write-batch.js
27234
0644
edit
dl
rm
Edit:
/var/www/qr4y.kz/server/delivery/node_modules/@google-cloud/firestore/build/src/watch.d.ts
(9762B)
/*! * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import * as firestore from '@google-cloud/firestore'; import { google } from '../protos/firestore_v1_proto_api'; import { QueryDocumentSnapshot } from './document'; import { DocumentChange } from './document-change'; import { DocumentReference, Firestore, Query } from './index'; import { Timestamp } from './timestamp'; import api = google.firestore.v1; /*! * Idle timeout used to detect Watch streams that stall (see * https://github.com/googleapis/nodejs-firestore/issues/1057, b/156308554). * Under normal load, the Watch backend will send a TARGET_CHANGE message * roughly every 30 seconds. As discussed with the backend team, we reset the * Watch stream if we do not receive any message within 120 seconds. */ export declare const WATCH_IDLE_TIMEOUT_MS: number; /** * @private * @internal * @callback docsCallback * @returns {Array.<QueryDocumentSnapshot>} An ordered list of documents. */ /** * @private * @internal * @callback changeCallback * @returns {Array.<DocumentChange>} An ordered list of document * changes. */ /** * onSnapshot() callback that receives the updated query state. * * @private * @internal * @callback watchSnapshotCallback * * @param {Timestamp} readTime The time at which this snapshot was obtained. * @param {number} size The number of documents in the result set. * @param {docsCallback} docs A callback that returns the ordered list of * documents stored in this snapshot. * @param {changeCallback} changes A callback that returns the list of * changed documents since the last snapshot delivered for this watch. */ declare type DocumentComparator<T> = (l: QueryDocumentSnapshot<T>, r: QueryDocumentSnapshot<T>) => number; /** * Watch provides listen functionality and exposes the 'onSnapshot' observer. It * can be used with a valid Firestore Listen target. * * @class * @private * @internal */ declare abstract class Watch<T = firestore.DocumentData> { readonly _converter: firestore.FirestoreDataConverter<T>; protected readonly firestore: Firestore; private readonly backoff; private readonly requestTag; /** * Indicates whether we are interested in data from the stream. Set to false in the * 'unsubscribe()' callback. * @private * @internal */ private isActive; /** * The current stream to the backend. * @private * @internal */ private currentStream; /** * The server assigns and updates the resume token. * @private * @internal */ private resumeToken; /** * A map of document names to QueryDocumentSnapshots for the last sent snapshot. * @private * @internal */ private docMap; /** * The accumulated map of document changes (keyed by document name) for the * current snapshot. * @private * @internal */ private changeMap; /** * The current state of the query results. * * @private * @internal */ private current; /** * The sorted tree of QueryDocumentSnapshots as sent in the last snapshot. * We only look at the keys. * @private * @internal */ private docTree; /** * We need this to track whether we've pushed an initial set of changes, * since we should push those even when there are no changes, if there * aren't docs. * @private * @internal */ private hasPushed; /** * The handler used to restart the Watch stream if it has been idle for more * than WATCH_IDLE_TIMEOUT_MS. */ private idleTimeoutHandle?; private onNext; private onError; /** * @private * @internal * @hideconstructor * * @param firestore The Firestore Database client. */ constructor(firestore: Firestore, _converter?: firestore.FirestoreDataConverter<T>); /** Returns a 'Target' proto denoting the target to listen on. */ protected abstract getTarget(resumeToken?: Uint8Array): api.ITarget; /** * Returns a comparator for QueryDocumentSnapshots that is used to order the * document snapshots returned by this watch. */ protected abstract getComparator(): DocumentComparator<T>; /** * Starts a watch and attaches a listener for document change events. * * @private * @internal * @param onNext A callback to be called every time a new snapshot is * available. * @param onError A callback to be called if the listen fails or is cancelled. * No further callbacks will occur. * * @returns An unsubscribe function that can be called to cancel the snapshot * listener. */ onSnapshot(onNext: (readTime: Timestamp, size: number, docs: () => Array<QueryDocumentSnapshot<T>>, changes: () => Array<DocumentChange<T>>) => void, onError: (error: Error) => void): () => void; /** * Returns the current count of all documents, including the changes from * the current changeMap. * @private * @internal */ private currentSize; /** * Splits up document changes into removals, additions, and updates. * @private * @internal */ private extractCurrentChanges; /** * Helper to clear the docs on RESET or filter mismatch. * @private * @internal */ private resetDocs; /** * Closes the stream and calls onError() if the stream is still active. * @private * @internal */ private closeStream; /** * Re-opens the stream unless the specified error is considered permanent. * Clears the change map. * @private * @internal */ private maybeReopenStream; /** * Cancels the current idle timeout and reschedules a new timer. * * @private * @internal */ private resetIdleTimeout; /** * Helper to restart the outgoing stream to the backend. * @private * @internal */ private resetStream; /** * Initializes a new stream to the backend with backoff. * @private * @internal */ private initStream; /** * Handles 'data' events and closes the stream if the response type is * invalid. * @private * @internal */ private onData; /** * Checks if the current target id is included in the list of target ids. * If no targetIds are provided, returns true. * @private * @internal */ private affectsTarget; /** * Assembles a new snapshot from the current set of changes and invokes the * user's callback. Clears the current changes on completion. * @private * @internal */ private pushSnapshot; /** * Applies a document delete to the document tree and the document map. * Returns the corresponding DocumentChange event. * @private * @internal */ private deleteDoc; /** * Applies a document add to the document tree and the document map. Returns * the corresponding DocumentChange event. * @private * @internal */ private addDoc; /** * Applies a document modification to the document tree and the document map. * Returns the DocumentChange event for successful modifications. * @private * @internal */ private modifyDoc; /** * Applies the mutations in changeMap to both the document tree and the * document lookup map. Modified docMap in-place and returns the updated * state. * @private * @internal */ private computeSnapshot; /** * Determines whether a watch error is considered permanent and should not be * retried. Errors that don't provide a GRPC error code are always considered * transient in this context. * * @private * @internal * @param error An error object. * @return Whether the error is permanent. */ private isPermanentWatchError; /** * Determines whether we need to initiate a longer backoff due to system * overload. * * @private * @internal * @param error A GRPC Error object that exposes an error code. * @return Whether we need to back off our retries. */ private isResourceExhaustedError; /** Closes the stream and clears all timeouts. */ private shutdown; } /** * Creates a new Watch instance to listen on DocumentReferences. * * @private * @internal */ export declare class DocumentWatch<T = firestore.DocumentData> extends Watch<T> { private readonly ref; constructor(firestore: Firestore, ref: DocumentReference<T>); getComparator(): DocumentComparator<T>; getTarget(resumeToken?: Uint8Array): google.firestore.v1.ITarget; } /** * Creates a new Watch instance to listen on Queries. * * @private * @internal */ export declare class QueryWatch<T = firestore.DocumentData> extends Watch<T> { private readonly query; private comparator; constructor(firestore: Firestore, query: Query<T>, converter?: firestore.FirestoreDataConverter<T>); getComparator(): DocumentComparator<T>; getTarget(resumeToken?: Uint8Array): google.firestore.v1.ITarget; } export {};
Save
cmd:
run