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.
- package/dist/bruce-models.es5.js +28 -1
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +28 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/global-api.js +1 -1
- package/dist/lib/api/global-api.js.map +1 -1
- package/dist/lib/client-file/client-file.js +27 -0
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/types/client-file/client-file.d.ts +9 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -1184,7 +1184,7 @@
|
|
|
1184
1184
|
*/
|
|
1185
1185
|
class Api$$1 extends AbstractApi {
|
|
1186
1186
|
constructor(env) {
|
|
1187
|
-
super("
|
|
1187
|
+
super("x-sessionid");
|
|
1188
1188
|
this.baseUrl = "";
|
|
1189
1189
|
this.env = env !== null && env !== void 0 ? env : exports.Api.EEnv.PROD;
|
|
1190
1190
|
this.setBaseUrl();
|
|
@@ -3910,6 +3910,33 @@
|
|
|
3910
3910
|
});
|
|
3911
3911
|
}
|
|
3912
3912
|
ClientFile.Upload = Upload;
|
|
3913
|
+
/**
|
|
3914
|
+
* Uploads a temp file.
|
|
3915
|
+
* This will return a temp file id which can be used in various endpoints.
|
|
3916
|
+
* @param api
|
|
3917
|
+
* @param file
|
|
3918
|
+
* @param reqParams
|
|
3919
|
+
* @returns
|
|
3920
|
+
*/
|
|
3921
|
+
function UploadTemp(api, file, reqParams) {
|
|
3922
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3923
|
+
if (!file) {
|
|
3924
|
+
throw ("File is required.");
|
|
3925
|
+
}
|
|
3926
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
3927
|
+
try {
|
|
3928
|
+
const params = exports.Api.PrepReqParams(reqParams);
|
|
3929
|
+
const data = yield api.UPLOAD("file/uploadTemp", file, params);
|
|
3930
|
+
res(data["TempFile.ID"]);
|
|
3931
|
+
}
|
|
3932
|
+
catch (e) {
|
|
3933
|
+
rej(e);
|
|
3934
|
+
}
|
|
3935
|
+
}));
|
|
3936
|
+
return prom;
|
|
3937
|
+
});
|
|
3938
|
+
}
|
|
3939
|
+
ClientFile.UploadTemp = UploadTemp;
|
|
3913
3940
|
let Filter;
|
|
3914
3941
|
(function (Filter) {
|
|
3915
3942
|
let V1;
|