@@ -14,7 +14,6 @@ external object firebase {
14
14
15
15
open class App {
16
16
fun functions (region : String? = definedExternally): functions.Functions
17
- fun firestore (): firestore.Firestore
18
17
}
19
18
20
19
fun app (name : String? = definedExternally): App
@@ -41,140 +40,6 @@ external object firebase {
41
40
42
41
}
43
42
44
- fun firestore (): firestore.Firestore
45
-
46
- object firestore {
47
- fun setLogLevel (level : String )
48
-
49
- open class PersistenceSettings {
50
- var experimentalTabSynchronization: Boolean
51
- }
52
-
53
- open class Firestore {
54
- fun <T > runTransaction (func : (transaction: Transaction ) -> Promise <T >): Promise <T >
55
- fun batch (): WriteBatch
56
- fun collection (collectionPath : String ): CollectionReference
57
- fun collectionGroup (collectionId : String ): Query
58
- fun doc (documentPath : String ): DocumentReference
59
- fun settings (settings : Json )
60
- fun enablePersistence (): Promise <Unit >
61
- fun clearPersistence (): Promise <Unit >
62
- fun useEmulator (host : String , port : Int )
63
- fun disableNetwork (): Promise <Unit >
64
- fun enableNetwork (): Promise <Unit >
65
- }
66
-
67
- open class Timestamp {
68
- val seconds: Double
69
- val nanoseconds: Double
70
- fun toMillis (): Double
71
- }
72
-
73
- open class Query {
74
- fun get (options : Any? = definedExternally): Promise <QuerySnapshot >
75
- fun where (field : String , opStr : String , value : Any? ): Query
76
- fun where (field : FieldPath , opStr : String , value : Any? ): Query
77
- fun onSnapshot (next : (snapshot: QuerySnapshot ) -> Unit , error : (error: Error ) -> Unit ): () -> Unit
78
- fun onSnapshot (options : Json , next : (snapshot: QuerySnapshot ) -> Unit , error : (error: Error ) -> Unit ): () -> Unit
79
- fun limit (limit : Double ): Query
80
- fun orderBy (field : String , direction : Any ): Query
81
- fun orderBy (field : FieldPath , direction : Any ): Query
82
- fun startAfter (document : DocumentSnapshot ): Query
83
- fun startAfter (vararg fieldValues : Any ): Query
84
- fun startAt (document : DocumentSnapshot ): Query
85
- fun startAt (vararg fieldValues : Any ): Query
86
- fun endBefore (document : DocumentSnapshot ): Query
87
- fun endBefore (vararg fieldValues : Any ): Query
88
- fun endAt (document : DocumentSnapshot ): Query
89
- fun endAt (vararg fieldValues : Any ): Query
90
- }
91
-
92
- open class CollectionReference : Query {
93
- val path: String
94
- val parent: DocumentReference ?
95
- fun doc (path : String = definedExternally): DocumentReference
96
- fun add (data : Any ): Promise <DocumentReference >
97
- }
98
-
99
- open class QuerySnapshot {
100
- val docs: Array <DocumentSnapshot >
101
- fun docChanges (): Array <DocumentChange >
102
- val empty: Boolean
103
- val metadata: SnapshotMetadata
104
- }
105
-
106
- open class DocumentChange {
107
- val doc: DocumentSnapshot
108
- val newIndex: Int
109
- val oldIndex: Int
110
- val type: String
111
- }
112
-
113
- open class DocumentSnapshot {
114
- val id: String
115
- val ref: DocumentReference
116
- val exists: Boolean
117
- val metadata: SnapshotMetadata
118
- fun data (options : Any? = definedExternally): Any?
119
- fun get (fieldPath : String , options : Any? = definedExternally): Any?
120
- fun get (fieldPath : FieldPath , options : Any? = definedExternally): Any?
121
- }
122
-
123
- open class SnapshotMetadata {
124
- val hasPendingWrites: Boolean
125
- val fromCache: Boolean
126
- }
127
-
128
- open class DocumentReference {
129
- val id: String
130
- val path: String
131
- val parent: CollectionReference
132
-
133
- fun collection (path : String ): CollectionReference
134
- fun get (options : Any? = definedExternally): Promise <DocumentSnapshot >
135
- fun set (data : Any , options : Any? = definedExternally): Promise <Unit >
136
- fun update (data : Any ): Promise <Unit >
137
- fun update (field : String , value : Any? , vararg moreFieldsAndValues : Any? ): Promise <Unit >
138
- fun update (field : FieldPath , value : Any? , vararg moreFieldsAndValues : Any? ): Promise <Unit >
139
- fun delete (): Promise <Unit >
140
- fun onSnapshot (next : (snapshot: DocumentSnapshot ) -> Unit , error : (error: Error ) -> Unit ): ()-> Unit
141
- }
142
-
143
- open class WriteBatch {
144
- fun commit (): Promise <Unit >
145
- fun delete (documentReference : DocumentReference ): WriteBatch
146
- fun set (documentReference : DocumentReference , data : Any , options : Any? = definedExternally): WriteBatch
147
- fun update (documentReference : DocumentReference , data : Any ): WriteBatch
148
- fun update (documentReference : DocumentReference , field : String , value : Any? , vararg moreFieldsAndValues : Any? ): WriteBatch
149
- fun update (documentReference : DocumentReference , field : FieldPath , value : Any? , vararg moreFieldsAndValues : Any? ): WriteBatch
150
- }
151
-
152
- open class Transaction {
153
- fun get (documentReference : DocumentReference ): Promise <DocumentSnapshot >
154
- fun set (documentReference : DocumentReference , data : Any , options : Any? = definedExternally): Transaction
155
- fun update (documentReference : DocumentReference , data : Any ): Transaction
156
- fun update (documentReference : DocumentReference , field : String , value : Any? , vararg moreFieldsAndValues : Any? ): Transaction
157
- fun update (documentReference : DocumentReference , field : FieldPath , value : Any? , vararg moreFieldsAndValues : Any? ): Transaction
158
- fun delete (documentReference : DocumentReference ): Transaction
159
- }
160
-
161
- open class FieldPath (vararg fieldNames : String ) {
162
- companion object {
163
- val documentId: FieldPath
164
- }
165
- }
166
-
167
- abstract class FieldValue {
168
- companion object {
169
- fun serverTimestamp (): FieldValue
170
- fun delete (): FieldValue
171
- fun increment (value : Int ): FieldValue
172
- fun arrayRemove (vararg elements : Any ): FieldValue
173
- fun arrayUnion (vararg elements : Any ): FieldValue
174
- }
175
- }
176
- }
177
-
178
43
fun remoteConfig (app : App ? = definedExternally): remoteConfig.RemoteConfig
179
44
180
45
object remoteConfig {
0 commit comments