quickblox 2.19.1 → 2.19.3-beta.1

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.
@@ -103,36 +103,9 @@ excluded under applicable law. Both parties are in understanding that some
103
103
  jurisdictions do not allow the exclusion of liability for consequential damages
104
104
  and as so the above limitation may not apply.
105
105
 
106
- 13. **SAMPLES AND EXAMPLES LICENSE.**
107
- All samples and examples provided within this SDK are distributed under the MIT
108
- License. The text of the MIT License is included within each sample.
109
-
110
-
111
106
  # Third-Party Licenses
112
107
 
113
- ## MIT License
114
-
115
- Permission is hereby granted, free of charge, to any person obtaining a copy
116
- of this software and associated documentation files (the "Software"), to deal
117
- in the Software without restriction, including without limitation the rights
118
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
119
- copies of the Software, and to permit persons to whom the Software is
120
- furnished to do so, subject to the following conditions:
121
-
122
- The above copyright notice and this permission notice shall be included in all
123
- copies or substantial portions of the Software.
124
-
125
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
126
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
127
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
128
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
129
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
130
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
131
- SOFTWARE.
132
-
133
- You may obtain a copy of the License at https://opensource.org/licenses/MIT
134
-
135
- ## BSD-3-Clause License
108
+ ## Crypto-js (BSD-3-Clause License)
136
109
 
137
110
  Redistribution and use in source and binary forms, with or without
138
111
  modification, are permitted provided that the following conditions are met:
@@ -161,7 +134,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
161
134
 
162
135
  You may obtain a copy of the License at https://opensource.org/licenses/BSD-3-Clause
163
136
 
164
- ## Form-Data License
137
+ ## Form-Data (MIT License)
165
138
 
166
139
  Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors
167
140
 
@@ -184,11 +157,7 @@ Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors
184
157
  THE SOFTWARE.
185
158
 
186
159
 
187
- ## NativeScript XMPP Client License
188
-
189
- The MIT License (MIT)
190
-
191
- nativescript-xmpp-client
160
+ ## NativeScript XMPP Client (MIT License)
192
161
 
193
162
  Copyright (c) 2016, Samuel Monday Agbonkpolo
194
163
 
@@ -209,9 +178,7 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
209
178
  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
210
179
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
211
180
 
212
- ## Node-fetch License
213
-
214
- The MIT License (MIT)
181
+ ## Node-fetch (MIT License)
215
182
 
216
183
  Copyright (c) 2016 David Frank
217
184
 
@@ -233,10 +200,29 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
233
200
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
234
201
  SOFTWARE.
235
202
 
203
+ ## Node-xmpp-client (MIT License)
204
+
205
+ Permission is hereby granted, free of charge, to any person obtaining a copy
206
+ of this software and associated documentation files (the "Software"), to deal
207
+ in the Software without restriction, including without limitation the rights
208
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
209
+ copies of the Software, and to permit persons to whom the Software is
210
+ furnished to do so, subject to the following conditions:
211
+
212
+ The above copyright notice and this permission notice shall be included in all
213
+ copies or substantial portions of the Software.
236
214
 
237
- ## SDP-Transform License
215
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
216
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
217
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
218
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
219
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
220
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
221
+ SOFTWARE.
222
+
223
+ You may obtain a copy of the License at https://opensource.org/licenses/MIT
238
224
 
239
- (The MIT License)
225
+ ## SDP-Transform (MIT License)
240
226
 
241
227
  Copyright (c) 2013 Eirik Albrigtsen
242
228
 
@@ -260,7 +246,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
260
246
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
261
247
 
262
248
 
263
- ## Strophe.js License
249
+ ## Strophe.js (MIT License)
264
250
 
265
251
  Copyright (c) 2006-2009 Collecta, Inc.
266
252
 
@@ -282,7 +268,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
282
268
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
283
269
  THE SOFTWARE.
284
270
 
285
- ## WebRTC adapter License
271
+ ## WebRTC adapter (BSD-3-Clause License)
286
272
 
287
273
  Copyright (c) 2014, The WebRTC project authors. All rights reserved.
288
274
  Copyright (c) 2018, The adapter.js project authors. All rights reserved.
@@ -321,14 +307,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
321
307
 
322
308
  This product includes software developed by:
323
309
 
324
- - [crypto-js] (BSD-3-Clause License)
325
- - [form-data] (Form-Data License)
326
- - [nativescript-xmpp-client] (NativeScript XMPP Client License)
327
- - [node-fetch] (Node-fetch License)
328
- - [node-xmpp-client] (MIT License)
329
- - [sdp-transform] (SDP-Transform License)
330
- - [strophe.js] (Strophe.js License)
331
- - [webrtc-adapter] (WebRTC adapter License)
310
+ - Crypto-js (BSD-3-Clause License)
311
+ - Form-Data (MIT License)
312
+ - NativeScript XMPP Client (MIT License)
313
+ - Node-fetch (MIT License)
314
+ - Node-xmpp-client (MIT License)
315
+ - SDP-Transform (MIT License)
316
+ - Strophe.js (MIT License)
317
+ - WebRTC adapter (BSD-3-Clause License)
332
318
 
333
319
 
334
320
 
package/README.md CHANGED
@@ -73,4 +73,6 @@ See more information at [contributing.md](https://github.com/QuickBlox/quickblox
73
73
 
74
74
  # License
75
75
 
76
- QuickBlox SDK License Agreement. Please see the LICENSE.txt file distributed with the SDK.
76
+ QuickBlox SDK License Agreement. Please see the LICENSE.md file distributed with the SDK.
77
+ All samples and examples provided within this SDK are distributed under the MIT License.
78
+ The text of the MIT License is included within each sample.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quickblox",
3
3
  "description": "QuickBlox JavaScript SDK",
4
- "version": "2.19.1",
4
+ "version": "2.19.3-beta.1",
5
5
  "homepage": "https://quickblox.com/developers/Javascript",
6
6
  "main": "src/qbMain.js",
7
7
  "types": "quickblox.d.ts",
package/quickblox.d.ts CHANGED
@@ -140,6 +140,9 @@ export declare interface QBConfig {
140
140
  retry: (session: QBSession) => void,
141
141
  ) => void
142
142
  }
143
+ pingTimeout?: number
144
+ pingLocalhostTimeInterval?: number
145
+ chatReconnectionTimeInterval?: number
143
146
  }
144
147
 
145
148
  export declare interface QBError {
@@ -246,13 +249,21 @@ export declare interface ChatMessageAttachment {
246
249
  type: string
247
250
  /** Link to a file in Internet. */
248
251
  url?: string
249
- /** UID of file from `QB.content.createAndUpload` */
250
- uid?: string
251
252
  /** Name of attachment. */
252
253
  name?: string
253
254
  /** Size of attachment. */
254
- size?: number
255
- [key: string]: QBCustomField
255
+ size?: string | number
256
+ /** Content-Type of attachment. */
257
+ 'content-type'?: string
258
+ /* Width of Image/Video. Useful for Image/Video type attachments */
259
+ width?: string | number
260
+ /* Height of Image/Video. Useful for Image/Video type attachments */
261
+ height?: string | number
262
+ /* Duration of Video. Useful for Video type attachments */
263
+ duration?: string | number
264
+ /* Custom parameters. Useful for storing metadata of attachment */
265
+ data?: string
266
+ [key: string]: string | number | undefined
256
267
  }
257
268
 
258
269
  declare enum QBChatDialogType {
@@ -577,8 +588,7 @@ interface QBChatModule {
577
588
  */
578
589
  sendSystemMessage(
579
590
  jidOrUserId: QBUser['id'] | string,
580
- // TODO: change type
581
- message: { extension: QBSystemMessage['extension'] },
591
+ message: Partial<Omit<QBSystemMessage, 'userId'>>,
582
592
  ): string
583
593
  /** Send is delivered status. */
584
594
  sendDeliveredStatus(params: QBMessageStatusParams): void
@@ -820,7 +830,7 @@ export declare interface QBBlobCreate extends QBBlob {
820
830
  }
821
831
  export declare interface QBBlobCreateUploadParams {
822
832
  name: string
823
- file: File
833
+ file: File | Blob | Buffer
824
834
  type: string
825
835
  size: number
826
836
  public?: boolean // optional, "false" by default
@@ -890,7 +900,11 @@ interface QBContentModule {
890
900
  upload(
891
901
  params: {
892
902
  url: string
893
- data: Dictionary<any>
903
+ data: {
904
+ name?: string
905
+ file: File | Blob | Buffer
906
+ key: string
907
+ }
894
908
  },
895
909
  callback: QBCallback<any>,
896
910
  ): void
@@ -952,7 +966,7 @@ interface QBDataModule {
952
966
  callback: QBCallback<T>,
953
967
  ): void
954
968
  /**
955
- * Delete record/records by ID, IDs or criteria (filters) of particular class
969
+ * Delete record/records by ID, IDs
956
970
  * ([read more](https://docs.quickblox.com/docs/js-custom-objects#delete-records)).
957
971
  */
958
972
  delete(
@@ -961,13 +975,13 @@ interface QBDataModule {
961
975
  callback: QBCallback<QBDataDeletedResponse>,
962
976
  ): void
963
977
  /**
964
- * Delete record/records by ID, IDs or criteria (filters) of particular class
978
+ * Delete records by criteria (filters) of particular class
965
979
  * ([read more](https://docs.quickblox.com/docs/js-custom-objects#delete-records)).
966
980
  */
967
981
  delete(
968
982
  className: string,
969
983
  criteria: Dictionary<any>,
970
- callback: QBCallback<{ total_deleted: number }>,
984
+ callback: QBCallback<{ deleted: null; deletedCount: number }>,
971
985
  ): void
972
986
  /**
973
987
  * Delete file from file field by ID
@@ -1028,7 +1042,7 @@ interface QBDataModule {
1028
1042
  */
1029
1043
  uploadFile(
1030
1044
  className: string,
1031
- params: { id: string; field_name: string; file: File; name: string },
1045
+ params: { id: string; field_name: string; file: File | Blob | Buffer; name: string },
1032
1046
  callback: QBCallback<QBDataFile>,
1033
1047
  ): void
1034
1048
  }
@@ -1041,14 +1055,9 @@ export declare type ListUserParams = {
1041
1055
  }
1042
1056
 
1043
1057
  export declare type GetUserParams =
1044
- | { login: string }
1045
1058
  | { full_name: string; page?: number; per_page?: number }
1046
- | { facebook_id: string }
1047
- | { phone: string }
1048
- | { email: string }
1049
1059
  | { tags: string | string[]; page?: number; per_page?: number }
1050
1060
  | Omit<ListUserParams, 'filter'>
1051
- | { external: string }
1052
1061
 
1053
1062
  interface QBUsersModule {
1054
1063
  /**
@@ -1068,11 +1077,31 @@ interface QBUsersModule {
1068
1077
  * Remove a user from the app, by user's external id that represents the user in an external user registry.
1069
1078
  * ([read more](https://docs.quickblox.com/docs/js-users#delete-user)).
1070
1079
  */
1071
- delete(params: { external: number }, callback: QBCallback<any>): void
1080
+ delete(params: { external: string | number }, callback: QBCallback<any>): void
1072
1081
  /**
1073
1082
  * Retrieve the user by id.
1074
1083
  */
1075
1084
  get(userId: QBUser['id'], callback: QBCallback<QBUser>): void
1085
+ /**
1086
+ * Retrieve the user by login.
1087
+ */
1088
+ get(params: { login: string }, callback: QBCallback<QBUser>): void
1089
+ /**
1090
+ * Retrieve the user by phone.
1091
+ */
1092
+ get(params: { phone: string }, callback: QBCallback<QBUser>): void
1093
+ /**
1094
+ * Retrieve the user by email.
1095
+ */
1096
+ get(params: { email: string }, callback: QBCallback<QBUser>): void
1097
+ /**
1098
+ * Retrieve the user by facebook_id.
1099
+ */
1100
+ get(params: { facebook_id: string }, callback: QBCallback<QBUser>): void
1101
+ /**
1102
+ * Retrieve the user by external user id.
1103
+ */
1104
+ get(params: { external: string | number }, callback: QBCallback<QBUser>): void
1076
1105
  /**
1077
1106
  * Retrieve a specific users.
1078
1107
  */