backendless 6.3.0 → 6.3.4
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 +57 -8
- package/dist/backendless.js +523 -138
- 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/index.js +2 -1
- package/es/messaging/helpers/email-envelope.js +22 -0
- package/es/messaging/index.js +6 -2
- 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/index.js +2 -1
- package/lib/messaging/helpers/email-envelope.js +22 -0
- package/lib/messaging/index.js +6 -2
- 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/index.js +2 -1
- package/src/messaging/helpers/email-envelope.js +20 -0
- package/src/messaging/index.js +5 -1
- 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
|
@@ -377,6 +377,12 @@ declare module Backendless {
|
|
|
377
377
|
|
|
378
378
|
function sendEmailFromTemplate(templateName: string, emailEnvelope: Backendless.EmailEnvelope, templateValues?: object, attachments?: string[]): Promise<object>;
|
|
379
379
|
|
|
380
|
+
function sendEmailFromTemplate(templateName: string, emailEnvelope: Backendless.EmailEnvelope, templateValues?: object): Promise<object>;
|
|
381
|
+
|
|
382
|
+
function sendEmailFromTemplate(templateName: string, emailEnvelope: Backendless.EmailEnvelope, attachments?: string[]): Promise<object>;
|
|
383
|
+
|
|
384
|
+
function sendEmailFromTemplate(templateName: string, emailEnvelope: Backendless.EmailEnvelope): Promise<object>;
|
|
385
|
+
|
|
380
386
|
function cancel(messageId: string): Promise<boolean>;
|
|
381
387
|
|
|
382
388
|
function registerDevice(deviceToken: string, channels?: string[], expiration?: number | Date): Promise<Object>;
|
|
@@ -441,12 +447,25 @@ declare module Backendless {
|
|
|
441
447
|
|
|
442
448
|
let restUrl: string;
|
|
443
449
|
|
|
444
|
-
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>;
|
|
445
451
|
|
|
446
|
-
function upload(file: File, path: string, overwrite?: boolean): Promise<Object>;
|
|
447
|
-
function upload(fileURL: string, path: string, overwrite?: boolean): Promise<Object>;
|
|
448
452
|
// @ts-ignore - file has to be an instance of File in browser env and an instance of ReadStream in nodejs env
|
|
449
|
-
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>;
|
|
450
469
|
|
|
451
470
|
function listing(path: string, pattern?: string, sub?: boolean, pageSize?: number, offset?: number): Promise<Object>;
|
|
452
471
|
|
|
@@ -493,13 +512,13 @@ declare module Backendless {
|
|
|
493
512
|
export interface CustomServicesI {
|
|
494
513
|
invoke(serviceName: string, method: string, parameters?: object): Promise<any>;
|
|
495
514
|
|
|
496
|
-
invoke(serviceName: string, method: string, parameters: object|null, executionType?: string): Promise<any>;
|
|
515
|
+
invoke(serviceName: string, method: string, parameters: object | null, executionType?: string): Promise<any>;
|
|
497
516
|
|
|
498
517
|
invoke(serviceName: string, method: string, executionType?: string): Promise<any>;
|
|
499
518
|
|
|
500
|
-
invoke(serviceName: string, method: string, parameters: object|null, executionType?: string): Promise<any>;
|
|
519
|
+
invoke(serviceName: string, method: string, parameters: object | null, executionType?: string): Promise<any>;
|
|
501
520
|
|
|
502
|
-
invoke(serviceName: string, method: string, parameters: object|null, options?: { executionType?: string, httpRequestHeaders?: object }): Promise<any>;
|
|
521
|
+
invoke(serviceName: string, method: string, parameters: object | null, options?: { executionType?: string, httpRequestHeaders?: object }): Promise<any>;
|
|
503
522
|
}
|
|
504
523
|
|
|
505
524
|
/**
|
|
@@ -860,6 +879,7 @@ declare module Backendless {
|
|
|
860
879
|
ccAddresses: string[];
|
|
861
880
|
bccAddresses: string[];
|
|
862
881
|
query: string | null;
|
|
882
|
+
uniqueEmails: boolean;
|
|
863
883
|
|
|
864
884
|
constructor(data?: Object);
|
|
865
885
|
|
|
@@ -886,6 +906,10 @@ declare module Backendless {
|
|
|
886
906
|
setQuery(query: string): Backendless.EmailEnvelope;
|
|
887
907
|
|
|
888
908
|
getQuery(): string;
|
|
909
|
+
|
|
910
|
+
setUniqueEmails(uniqueEmails: boolean): Backendless.EmailEnvelope;
|
|
911
|
+
|
|
912
|
+
getUniqueEmails(): boolean;
|
|
889
913
|
}
|
|
890
914
|
|
|
891
915
|
/**
|
|
@@ -957,6 +981,16 @@ declare module Backendless {
|
|
|
957
981
|
* @class EventHandler
|
|
958
982
|
*/
|
|
959
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
|
+
|
|
960
994
|
addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
961
995
|
addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void): Backendless.EventHandler;
|
|
962
996
|
addCreateListener<T = object>(callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
@@ -987,6 +1021,13 @@ declare module Backendless {
|
|
|
987
1021
|
|
|
988
1022
|
removeDeleteListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
|
|
989
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
|
+
|
|
990
1031
|
addBulkCreateListener(callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
991
1032
|
addBulkCreateListener(callback: (list: string[]) => void): Backendless.EventHandler;
|
|
992
1033
|
|
|
@@ -1060,7 +1101,7 @@ declare module Backendless {
|
|
|
1060
1101
|
|
|
1061
1102
|
constructor(name: string | Object | Function, classToTableMap: Object);
|
|
1062
1103
|
|
|
1063
|
-
save<T = object>(obj: T | object): Promise<T>;
|
|
1104
|
+
save<T = object>(obj: T | object, isUpsert?: boolean): Promise<T>;
|
|
1064
1105
|
|
|
1065
1106
|
deepSave<T = object>(obj: T | object): Promise<T>;
|
|
1066
1107
|
|
|
@@ -1094,6 +1135,8 @@ declare module Backendless {
|
|
|
1094
1135
|
|
|
1095
1136
|
bulkCreate(objects: Array<object>): Promise<Array<string>>;
|
|
1096
1137
|
|
|
1138
|
+
bulkUpsert(objects: Array<object>): Promise<Array<string>>;
|
|
1139
|
+
|
|
1097
1140
|
bulkUpdate(whereClause: string, changes: object): Promise<string>;
|
|
1098
1141
|
|
|
1099
1142
|
bulkDelete(where: string | Array<string> | Array<{ objectId: string, [key: string]: any }>): Promise<string>;
|
|
@@ -1245,6 +1288,9 @@ declare module Backendless {
|
|
|
1245
1288
|
create(object: object): OpResult;
|
|
1246
1289
|
create(tableName: string, object: object): OpResult;
|
|
1247
1290
|
|
|
1291
|
+
upsert(object: object): OpResult;
|
|
1292
|
+
upsert(tableName: string, object: object): OpResult;
|
|
1293
|
+
|
|
1248
1294
|
update(object: object): OpResult;
|
|
1249
1295
|
update(tableName: string, object: object): OpResult;
|
|
1250
1296
|
update(opResult: OpResult | OpResultValueReference, changes: object): OpResult;
|
|
@@ -1259,6 +1305,9 @@ declare module Backendless {
|
|
|
1259
1305
|
bulkCreate(tableName: string, objects: object[]): OpResult;
|
|
1260
1306
|
bulkCreate(objects: object[]): OpResult;
|
|
1261
1307
|
|
|
1308
|
+
bulkUpsert(tableName: string, objects: object[]): OpResult;
|
|
1309
|
+
bulkUpsert(objects: object[]): OpResult;
|
|
1310
|
+
|
|
1262
1311
|
bulkUpdate(tableName: string, whereClause: string, changes: object): OpResult;
|
|
1263
1312
|
bulkUpdate(tableName: string, objectIds: string[], changes: object): OpResult;
|
|
1264
1313
|
bulkUpdate(tableName: string, objects: object[], changes: object): OpResult;
|