backendless 6.3.2 → 6.3.6
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/backendless.d.ts +43 -5
- package/dist/backendless.js +498 -136
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/data/rt-handlers.js +42 -2
- package/es/data/store.js +81 -34
- package/es/files/index.js +235 -71
- package/es/files/utils.js +23 -2
- package/es/local-cache/index.js +1 -1
- package/es/logging/index.js +4 -0
- package/es/unit-of-work/constants.js +2 -0
- package/es/unit-of-work/index.js +54 -0
- package/es/unit-of-work/json-adapter.js +35 -25
- package/es/urls.js +20 -0
- package/lib/data/rt-handlers.js +42 -2
- package/lib/data/store.js +81 -34
- package/lib/files/index.js +235 -71
- package/lib/files/utils.js +23 -2
- package/lib/local-cache/index.js +1 -1
- package/lib/logging/index.js +4 -0
- package/lib/unit-of-work/constants.js +2 -0
- package/lib/unit-of-work/index.js +54 -0
- package/lib/unit-of-work/json-adapter.js +35 -25
- package/lib/urls.js +20 -0
- package/package.json +2 -2
- package/src/data/rt-handlers.js +42 -7
- package/src/data/store.js +27 -2
- package/src/files/index.js +95 -7
- package/src/files/utils.js +25 -2
- package/src/local-cache/index.js +3 -1
- package/src/logging/index.js +4 -0
- package/src/unit-of-work/constants.js +2 -0
- package/src/unit-of-work/index.js +51 -1
- package/src/unit-of-work/json-adapter.js +6 -0
- package/src/urls.js +16 -0
package/backendless.d.ts
CHANGED
|
@@ -447,12 +447,25 @@ declare module Backendless {
|
|
|
447
447
|
|
|
448
448
|
let restUrl: string;
|
|
449
449
|
|
|
450
|
-
function saveFile(path: string, fileName: string, fileContent: Blob | string, overwrite?: boolean): Promise<
|
|
450
|
+
function saveFile(path: string, fileName: string, fileContent: Blob | Buffer | string, overwrite?: boolean): Promise<string>;
|
|
451
451
|
|
|
452
|
-
function upload(file: File, path: string, overwrite?: boolean): Promise<Object>;
|
|
453
|
-
function upload(fileURL: string, path: string, overwrite?: boolean): Promise<Object>;
|
|
454
452
|
// @ts-ignore - file has to be an instance of File in browser env and an instance of ReadStream in nodejs env
|
|
455
|
-
function upload(readStream: ReadStream, path: string, overwrite?: boolean): Promise<
|
|
453
|
+
function upload(readStream: ReadStream, path: string, overwrite?: boolean): Promise<{ fileURL: string }>;
|
|
454
|
+
function upload(file: File, path: string, overwrite?: boolean): Promise<{ fileURL: string }>;
|
|
455
|
+
function upload(fileURL: string, path: string, overwrite?: boolean): Promise<{ fileURL: string }>;
|
|
456
|
+
|
|
457
|
+
function append(filePath: string, fileURL: string): Promise<string>;
|
|
458
|
+
function append(filePath: string, fileContent: Blob | Buffer | ArrayBuffer | number[]): Promise<string>;
|
|
459
|
+
// @ts-ignore
|
|
460
|
+
function append(filePath: string, readStream: ReadStream): Promise<string>;
|
|
461
|
+
|
|
462
|
+
function append(directoryPath: string, fileName: string, fileURL: string): Promise<string>;
|
|
463
|
+
function append(directoryPath: string, fileName: string, fileContent: Blob | Buffer | ArrayBuffer | number[]): Promise<string>;
|
|
464
|
+
// @ts-ignore
|
|
465
|
+
function append(directoryPath: string, fileName: string, readStream: ReadStream): Promise<string>;
|
|
466
|
+
|
|
467
|
+
function appendText(directoryPath: string, fileName: string, fileContent: string): Promise<string>;
|
|
468
|
+
function appendText(filePath: string, fileContent: string): Promise<string>;
|
|
456
469
|
|
|
457
470
|
function listing(path: string, pattern?: string, sub?: boolean, pageSize?: number, offset?: number): Promise<Object>;
|
|
458
471
|
|
|
@@ -968,6 +981,16 @@ declare module Backendless {
|
|
|
968
981
|
* @class EventHandler
|
|
969
982
|
*/
|
|
970
983
|
class EventHandler {
|
|
984
|
+
addUpsertListener<T = object>(whereClause: string, callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
985
|
+
addUpsertListener<T = object>(whereClause: string, callback: (obj: T) => void): Backendless.EventHandler;
|
|
986
|
+
addUpsertListener<T = object>(callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
987
|
+
addUpsertListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
|
|
988
|
+
|
|
989
|
+
removeUpsertListeners(whereClause: string): Backendless.EventHandler;
|
|
990
|
+
removeUpsertListeners(): Backendless.EventHandler;
|
|
991
|
+
|
|
992
|
+
removeUpsertListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
|
|
993
|
+
|
|
971
994
|
addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
972
995
|
addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void): Backendless.EventHandler;
|
|
973
996
|
addCreateListener<T = object>(callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
@@ -998,6 +1021,13 @@ declare module Backendless {
|
|
|
998
1021
|
|
|
999
1022
|
removeDeleteListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
|
|
1000
1023
|
|
|
1024
|
+
addBulkUpsertListener(callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
1025
|
+
addBulkUpsertListener(callback: (list: string[]) => void): Backendless.EventHandler;
|
|
1026
|
+
|
|
1027
|
+
removeBulkUpsertListener(callback: (list: string[]) => void): Backendless.EventHandler;
|
|
1028
|
+
|
|
1029
|
+
removeBulkUpsertListeners(): Backendless.EventHandler;
|
|
1030
|
+
|
|
1001
1031
|
addBulkCreateListener(callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
1002
1032
|
addBulkCreateListener(callback: (list: string[]) => void): Backendless.EventHandler;
|
|
1003
1033
|
|
|
@@ -1071,7 +1101,7 @@ declare module Backendless {
|
|
|
1071
1101
|
|
|
1072
1102
|
constructor(name: string | Object | Function, classToTableMap: Object);
|
|
1073
1103
|
|
|
1074
|
-
save<T = object>(obj: T | object): Promise<T>;
|
|
1104
|
+
save<T = object>(obj: T | object, isUpsert?: boolean): Promise<T>;
|
|
1075
1105
|
|
|
1076
1106
|
deepSave<T = object>(obj: T | object): Promise<T>;
|
|
1077
1107
|
|
|
@@ -1105,6 +1135,8 @@ declare module Backendless {
|
|
|
1105
1135
|
|
|
1106
1136
|
bulkCreate(objects: Array<object>): Promise<Array<string>>;
|
|
1107
1137
|
|
|
1138
|
+
bulkUpsert(objects: Array<object>): Promise<Array<string>>;
|
|
1139
|
+
|
|
1108
1140
|
bulkUpdate(whereClause: string, changes: object): Promise<string>;
|
|
1109
1141
|
|
|
1110
1142
|
bulkDelete(where: string | Array<string> | Array<{ objectId: string, [key: string]: any }>): Promise<string>;
|
|
@@ -1256,6 +1288,9 @@ declare module Backendless {
|
|
|
1256
1288
|
create(object: object): OpResult;
|
|
1257
1289
|
create(tableName: string, object: object): OpResult;
|
|
1258
1290
|
|
|
1291
|
+
upsert(object: object): OpResult;
|
|
1292
|
+
upsert(tableName: string, object: object): OpResult;
|
|
1293
|
+
|
|
1259
1294
|
update(object: object): OpResult;
|
|
1260
1295
|
update(tableName: string, object: object): OpResult;
|
|
1261
1296
|
update(opResult: OpResult | OpResultValueReference, changes: object): OpResult;
|
|
@@ -1270,6 +1305,9 @@ declare module Backendless {
|
|
|
1270
1305
|
bulkCreate(tableName: string, objects: object[]): OpResult;
|
|
1271
1306
|
bulkCreate(objects: object[]): OpResult;
|
|
1272
1307
|
|
|
1308
|
+
bulkUpsert(tableName: string, objects: object[]): OpResult;
|
|
1309
|
+
bulkUpsert(objects: object[]): OpResult;
|
|
1310
|
+
|
|
1273
1311
|
bulkUpdate(tableName: string, whereClause: string, changes: object): OpResult;
|
|
1274
1312
|
bulkUpdate(tableName: string, objectIds: string[], changes: object): OpResult;
|
|
1275
1313
|
bulkUpdate(tableName: string, objects: object[], changes: object): OpResult;
|