@@ -968,6 +968,16 @@ declare module Backendless {
968968 * @class EventHandler
969969 */
970970 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+
971981 addCreateListener < T = object > ( whereClause : string , callback : ( obj : T ) => void , onError : ( error : RTSubscriptionError ) => void ) : Backendless . EventHandler ;
972982 addCreateListener < T = object > ( whereClause : string , callback : ( obj : T ) => void ) : Backendless . EventHandler ;
973983 addCreateListener < T = object > ( callback : ( obj : T ) => void , onError : ( error : RTSubscriptionError ) => void ) : Backendless . EventHandler ;
@@ -998,6 +1008,13 @@ declare module Backendless {
9981008
9991009 removeDeleteListener < T = object > ( callback : ( obj : T ) => void ) : Backendless . EventHandler ;
10001010
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+
10011018 addBulkCreateListener ( callback : ( list : string [ ] ) => void , onError : ( error : RTSubscriptionError ) => void ) : Backendless . EventHandler ;
10021019 addBulkCreateListener ( callback : ( list : string [ ] ) => void ) : Backendless . EventHandler ;
10031020
@@ -1071,7 +1088,7 @@ declare module Backendless {
10711088
10721089 constructor ( name : string | Object | Function , classToTableMap : Object ) ;
10731090
1074- save < T = object > ( obj : T | object ) : Promise < T > ;
1091+ save < T = object > ( obj : T | object , isUpsert ?: boolean ) : Promise < T > ;
10751092
10761093 deepSave < T = object > ( obj : T | object ) : Promise < T > ;
10771094
@@ -1105,6 +1122,8 @@ declare module Backendless {
11051122
11061123 bulkCreate ( objects : Array < object > ) : Promise < Array < string > > ;
11071124
1125+ bulkUpsert ( objects : Array < object > ) : Promise < Array < string > > ;
1126+
11081127 bulkUpdate ( whereClause : string , changes : object ) : Promise < string > ;
11091128
11101129 bulkDelete ( where : string | Array < string > | Array < { objectId : string , [ key : string ] : any } > ) : Promise < string > ;
@@ -1256,6 +1275,9 @@ declare module Backendless {
12561275 create ( object : object ) : OpResult ;
12571276 create ( tableName : string , object : object ) : OpResult ;
12581277
1278+ upsert ( object : object ) : OpResult ;
1279+ upsert ( tableName : string , object : object ) : OpResult ;
1280+
12591281 update ( object : object ) : OpResult ;
12601282 update ( tableName : string , object : object ) : OpResult ;
12611283 update ( opResult : OpResult | OpResultValueReference , changes : object ) : OpResult ;
@@ -1270,6 +1292,9 @@ declare module Backendless {
12701292 bulkCreate ( tableName : string , objects : object [ ] ) : OpResult ;
12711293 bulkCreate ( objects : object [ ] ) : OpResult ;
12721294
1295+ bulkUpsert ( tableName : string , objects : object [ ] ) : OpResult ;
1296+ bulkUpsert ( objects : object [ ] ) : OpResult ;
1297+
12731298 bulkUpdate ( tableName : string , whereClause : string , changes : object ) : OpResult ;
12741299 bulkUpdate ( tableName : string , objectIds : string [ ] , changes : object ) : OpResult ;
12751300 bulkUpdate ( tableName : string , objects : object [ ] , changes : object ) : OpResult ;
0 commit comments