bruce-models 0.9.9 → 1.0.0

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.
@@ -1204,7 +1204,7 @@ var GlobalApi;
1204
1204
  */
1205
1205
  class Api$$1 extends AbstractApi {
1206
1206
  constructor(env) {
1207
- super("SSID");
1207
+ super("x-sessionid");
1208
1208
  this.baseUrl = "";
1209
1209
  this.env = env !== null && env !== void 0 ? env : Api.EEnv.PROD;
1210
1210
  this.setBaseUrl();
@@ -4038,6 +4038,33 @@ var ClientFile;
4038
4038
  });
4039
4039
  }
4040
4040
  ClientFile.Upload = Upload;
4041
+ /**
4042
+ * Uploads a temp file.
4043
+ * This will return a temp file id which can be used in various endpoints.
4044
+ * @param api
4045
+ * @param file
4046
+ * @param reqParams
4047
+ * @returns
4048
+ */
4049
+ function UploadTemp(api, file, reqParams) {
4050
+ return __awaiter(this, void 0, void 0, function* () {
4051
+ if (!file) {
4052
+ throw ("File is required.");
4053
+ }
4054
+ const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
4055
+ try {
4056
+ const params = Api.PrepReqParams(reqParams);
4057
+ const data = yield api.UPLOAD("file/uploadTemp", file, params);
4058
+ res(data["TempFile.ID"]);
4059
+ }
4060
+ catch (e) {
4061
+ rej(e);
4062
+ }
4063
+ }));
4064
+ return prom;
4065
+ });
4066
+ }
4067
+ ClientFile.UploadTemp = UploadTemp;
4041
4068
  let Filter;
4042
4069
  (function (Filter) {
4043
4070
  let V1;