code: function execute(method, params) {
    var output = !params ? [] : params;
  
    if (method == "getStandardEvents") {
      return new Promise(function promise(resolve, reject) {
        resolve(standardEvent);  
      });
    }
  
    return new Promise(function promise(resolve, reject) {
      exec(
        function success(res) {
          resolve(res);
        },
        function failure(err) {
          reject(err);
        },
        API_CLASS,
        method,
        output
      );
    });
  }
docs: JavsSript to SDK wrappers