backendless 6.2.25 → 6.3.3
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 +48 -6
- package/dist/backendless.js +473 -100
- 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/index.js +63 -11
- package/es/local-cache/index.js +1 -1
- package/es/messaging/helpers/email-envelope.js +22 -0
- package/es/messaging/index.js +6 -2
- package/es/rt.js +53 -5
- 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 +10 -0
- package/lib/data/rt-handlers.js +42 -2
- package/lib/data/store.js +81 -34
- package/lib/index.js +63 -11
- package/lib/local-cache/index.js +1 -1
- package/lib/messaging/helpers/email-envelope.js +22 -0
- package/lib/messaging/index.js +6 -2
- package/lib/rt.js +53 -5
- 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 +10 -0
- package/package.json +2 -2
- package/src/data/rt-handlers.js +42 -7
- package/src/data/store.js +27 -2
- package/src/index.js +60 -11
- package/src/local-cache/index.js +1 -1
- package/src/messaging/helpers/email-envelope.js +20 -0
- package/src/messaging/index.js +5 -1
- package/src/rt.js +20 -3
- 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 +8 -0
package/backendless.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
declare module Backendless {
|
|
6
6
|
let debugMode: boolean;
|
|
7
7
|
let serverURL: string;
|
|
8
|
-
let
|
|
9
|
-
let
|
|
8
|
+
let appId: string;
|
|
9
|
+
let apiKey: string;
|
|
10
10
|
let appPath: string;
|
|
11
11
|
let domain: string;
|
|
12
12
|
let apiURI: string;
|
|
@@ -17,6 +17,12 @@ declare module Backendless {
|
|
|
17
17
|
version: string;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
/** @deprecated **/
|
|
21
|
+
let applicationId: string;
|
|
22
|
+
|
|
23
|
+
/** @deprecated **/
|
|
24
|
+
let secretKey: string;
|
|
25
|
+
|
|
20
26
|
/**
|
|
21
27
|
* @dictionary
|
|
22
28
|
*/
|
|
@@ -371,6 +377,12 @@ declare module Backendless {
|
|
|
371
377
|
|
|
372
378
|
function sendEmailFromTemplate(templateName: string, emailEnvelope: Backendless.EmailEnvelope, templateValues?: object, attachments?: string[]): Promise<object>;
|
|
373
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
|
+
|
|
374
386
|
function cancel(messageId: string): Promise<boolean>;
|
|
375
387
|
|
|
376
388
|
function registerDevice(deviceToken: string, channels?: string[], expiration?: number | Date): Promise<Object>;
|
|
@@ -487,13 +499,13 @@ declare module Backendless {
|
|
|
487
499
|
export interface CustomServicesI {
|
|
488
500
|
invoke(serviceName: string, method: string, parameters?: object): Promise<any>;
|
|
489
501
|
|
|
490
|
-
invoke(serviceName: string, method: string, parameters: object|null, executionType?: string): Promise<any>;
|
|
502
|
+
invoke(serviceName: string, method: string, parameters: object | null, executionType?: string): Promise<any>;
|
|
491
503
|
|
|
492
504
|
invoke(serviceName: string, method: string, executionType?: string): Promise<any>;
|
|
493
505
|
|
|
494
|
-
invoke(serviceName: string, method: string, parameters: object|null, executionType?: string): Promise<any>;
|
|
506
|
+
invoke(serviceName: string, method: string, parameters: object | null, executionType?: string): Promise<any>;
|
|
495
507
|
|
|
496
|
-
invoke(serviceName: string, method: string, parameters: object|null, options?: { executionType?: string, httpRequestHeaders?: object }): Promise<any>;
|
|
508
|
+
invoke(serviceName: string, method: string, parameters: object | null, options?: { executionType?: string, httpRequestHeaders?: object }): Promise<any>;
|
|
497
509
|
}
|
|
498
510
|
|
|
499
511
|
/**
|
|
@@ -854,6 +866,7 @@ declare module Backendless {
|
|
|
854
866
|
ccAddresses: string[];
|
|
855
867
|
bccAddresses: string[];
|
|
856
868
|
query: string | null;
|
|
869
|
+
uniqueEmails: boolean;
|
|
857
870
|
|
|
858
871
|
constructor(data?: Object);
|
|
859
872
|
|
|
@@ -880,6 +893,10 @@ declare module Backendless {
|
|
|
880
893
|
setQuery(query: string): Backendless.EmailEnvelope;
|
|
881
894
|
|
|
882
895
|
getQuery(): string;
|
|
896
|
+
|
|
897
|
+
setUniqueEmails(uniqueEmails: boolean): Backendless.EmailEnvelope;
|
|
898
|
+
|
|
899
|
+
getUniqueEmails(): boolean;
|
|
883
900
|
}
|
|
884
901
|
|
|
885
902
|
/**
|
|
@@ -951,6 +968,16 @@ declare module Backendless {
|
|
|
951
968
|
* @class EventHandler
|
|
952
969
|
*/
|
|
953
970
|
class EventHandler {
|
|
971
|
+
addUpsertListener<T = object>(whereClause: string, callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
972
|
+
addUpsertListener<T = object>(whereClause: string, callback: (obj: T) => void): Backendless.EventHandler;
|
|
973
|
+
addUpsertListener<T = object>(callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
974
|
+
addUpsertListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
|
|
975
|
+
|
|
976
|
+
removeUpsertListeners(whereClause: string): Backendless.EventHandler;
|
|
977
|
+
removeUpsertListeners(): Backendless.EventHandler;
|
|
978
|
+
|
|
979
|
+
removeUpsertListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
|
|
980
|
+
|
|
954
981
|
addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
955
982
|
addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void): Backendless.EventHandler;
|
|
956
983
|
addCreateListener<T = object>(callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
@@ -981,6 +1008,13 @@ declare module Backendless {
|
|
|
981
1008
|
|
|
982
1009
|
removeDeleteListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
|
|
983
1010
|
|
|
1011
|
+
addBulkUpsertListener(callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
1012
|
+
addBulkUpsertListener(callback: (list: string[]) => void): Backendless.EventHandler;
|
|
1013
|
+
|
|
1014
|
+
removeBulkUpsertListener(callback: (list: string[]) => void): Backendless.EventHandler;
|
|
1015
|
+
|
|
1016
|
+
removeBulkUpsertListeners(): Backendless.EventHandler;
|
|
1017
|
+
|
|
984
1018
|
addBulkCreateListener(callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
|
|
985
1019
|
addBulkCreateListener(callback: (list: string[]) => void): Backendless.EventHandler;
|
|
986
1020
|
|
|
@@ -1054,7 +1088,7 @@ declare module Backendless {
|
|
|
1054
1088
|
|
|
1055
1089
|
constructor(name: string | Object | Function, classToTableMap: Object);
|
|
1056
1090
|
|
|
1057
|
-
save<T = object>(obj: T | object): Promise<T>;
|
|
1091
|
+
save<T = object>(obj: T | object, isUpsert?: boolean): Promise<T>;
|
|
1058
1092
|
|
|
1059
1093
|
deepSave<T = object>(obj: T | object): Promise<T>;
|
|
1060
1094
|
|
|
@@ -1088,6 +1122,8 @@ declare module Backendless {
|
|
|
1088
1122
|
|
|
1089
1123
|
bulkCreate(objects: Array<object>): Promise<Array<string>>;
|
|
1090
1124
|
|
|
1125
|
+
bulkUpsert(objects: Array<object>): Promise<Array<string>>;
|
|
1126
|
+
|
|
1091
1127
|
bulkUpdate(whereClause: string, changes: object): Promise<string>;
|
|
1092
1128
|
|
|
1093
1129
|
bulkDelete(where: string | Array<string> | Array<{ objectId: string, [key: string]: any }>): Promise<string>;
|
|
@@ -1239,6 +1275,9 @@ declare module Backendless {
|
|
|
1239
1275
|
create(object: object): OpResult;
|
|
1240
1276
|
create(tableName: string, object: object): OpResult;
|
|
1241
1277
|
|
|
1278
|
+
upsert(object: object): OpResult;
|
|
1279
|
+
upsert(tableName: string, object: object): OpResult;
|
|
1280
|
+
|
|
1242
1281
|
update(object: object): OpResult;
|
|
1243
1282
|
update(tableName: string, object: object): OpResult;
|
|
1244
1283
|
update(opResult: OpResult | OpResultValueReference, changes: object): OpResult;
|
|
@@ -1253,6 +1292,9 @@ declare module Backendless {
|
|
|
1253
1292
|
bulkCreate(tableName: string, objects: object[]): OpResult;
|
|
1254
1293
|
bulkCreate(objects: object[]): OpResult;
|
|
1255
1294
|
|
|
1295
|
+
bulkUpsert(tableName: string, objects: object[]): OpResult;
|
|
1296
|
+
bulkUpsert(objects: object[]): OpResult;
|
|
1297
|
+
|
|
1256
1298
|
bulkUpdate(tableName: string, whereClause: string, changes: object): OpResult;
|
|
1257
1299
|
bulkUpdate(tableName: string, objectIds: string[], changes: object): OpResult;
|
|
1258
1300
|
bulkUpdate(tableName: string, objects: object[], changes: object): OpResult;
|