@squidcloud/client 1.0.46 → 1.0.47
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.
|
@@ -66,14 +66,41 @@ export declare class DocumentReference<T extends DocumentData = any> {
|
|
|
66
66
|
* is part of a transaction.
|
|
67
67
|
*
|
|
68
68
|
* @param data The data to update - can be partial.
|
|
69
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
70
|
+
* immediately.
|
|
69
71
|
*/
|
|
70
72
|
update(data: Partial<Record<Paths<T>, any>>, transactionId?: TransactionId): Promise<void>;
|
|
71
73
|
/**
|
|
72
74
|
* Similar to {@link update}, but only updates the given path.
|
|
75
|
+
* @param path The path to update.
|
|
76
|
+
* @param value The value to set at the given path.
|
|
77
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
78
|
+
* immediately.
|
|
73
79
|
*/
|
|
74
80
|
setInPath(path: Paths<T>, value: any, transactionId?: TransactionId): Promise<void>;
|
|
75
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Similar to `update`, but only deletes the given path.
|
|
83
|
+
* @param path The path to delete.
|
|
84
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
85
|
+
* immediately.
|
|
86
|
+
*/
|
|
76
87
|
deleteInPath(path: Paths<T>, transactionId?: TransactionId): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Increments the value at the given path by the given value. The value may be both positive and negative.
|
|
90
|
+
* @param path The path to the value to increment.
|
|
91
|
+
* @param value The value to increment by.
|
|
92
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
93
|
+
* immediately.
|
|
94
|
+
*/
|
|
95
|
+
incrementInPath(path: Paths<T>, value: number, transactionId?: TransactionId): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Decrements the value at the given path by the given value. The value may be both positive and negative.
|
|
98
|
+
* @param path The path to the value to decrement.
|
|
99
|
+
* @param value The value to decrement by.
|
|
100
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
101
|
+
* immediately.
|
|
102
|
+
*/
|
|
103
|
+
decrementInPath(path: Paths<T>, value: number, transactionId?: TransactionId): Promise<void>;
|
|
77
104
|
/**
|
|
78
105
|
* Inserts the document with the given data. If the document already exists, the operation will be treated as
|
|
79
106
|
* `upsert`. The `insert` will be reflected optimistically locally and will be applied to the server later. If a
|
|
@@ -84,6 +111,10 @@ export declare class DocumentReference<T extends DocumentData = any> {
|
|
|
84
111
|
*
|
|
85
112
|
* The returned promise will resolve once the `insert` has been applied to the server or immediately if the `insert`
|
|
86
113
|
* is part of a transaction.
|
|
114
|
+
*
|
|
115
|
+
* @param data The data to insert.
|
|
116
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
117
|
+
* immediately.
|
|
87
118
|
*/
|
|
88
119
|
insert(data: T, transactionId?: TransactionId): Promise<void>;
|
|
89
120
|
/**
|
|
@@ -95,6 +126,9 @@ export declare class DocumentReference<T extends DocumentData = any> {
|
|
|
95
126
|
*
|
|
96
127
|
* The returned promise will resolve once the `delete` has been applied to the server or immediately if the `delete`
|
|
97
128
|
* is part of a transaction.
|
|
129
|
+
*
|
|
130
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
131
|
+
* immediately.
|
|
98
132
|
*/
|
|
99
133
|
delete(transactionId?: TransactionId): Promise<void>;
|
|
100
134
|
}
|