oneentry 1.0.44 → 1.0.45

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.
@@ -49,7 +49,7 @@ class OneEntry {
49
49
  'Content-Type': 'application/json'
50
50
  }
51
51
  };
52
- if (data instanceof FormData) {
52
+ if (data instanceof FormData || data instanceof Blob) {
53
53
  delete options.headers['Content-Type'];
54
54
  }
55
55
  if (!this._NO_FETCH) {
@@ -22,7 +22,7 @@ export default class FileUploadingApi extends OneEntry implements IFileUploading
22
22
  *
23
23
  * @returns Uploads a file to an Amazon S3-compatible cloud file storage
24
24
  */
25
- upload(data: File, fileQuery?: IUploadingQuery): Promise<IUploadingReturns>;
25
+ upload(data: File | string, fileQuery?: IUploadingQuery): Promise<IUploadingReturns>;
26
26
  /**
27
27
  * Deletes a file from the cloud file storage.
28
28
  *
@@ -37,7 +37,7 @@ class FileUploadingApi extends oneEntry_1.default {
37
37
  const body = new FormData();
38
38
  body.append('files', data);
39
39
  const result = await this._fetchPost('?' + this._queryParamsToString(query), body);
40
- return result.json();
40
+ return result;
41
41
  }
42
42
  /**
43
43
  * Deletes a file from the cloud file storage.
@@ -55,8 +55,8 @@ class FormsDataApi extends oneEntry_1.default {
55
55
  * @returns Returns array of object FormDataEntity
56
56
  */
57
57
  async getFormsDataByMarker(marker, langCode = this._defaultLangCode, offset = 0, limit = 30) {
58
- const result = await this._fetchGet(`marker/${marker}?langCode=${langCode}&offset=${offset}&limit=${limit}`);
59
- return this._normalizeData(result);
58
+ const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}&offset=${offset}&limit=${limit}`);
59
+ return this._normalizeData(result.items);
60
60
  }
61
61
  }
62
62
  exports.default = FormsDataApi;
@@ -27,6 +27,7 @@ interface IFormsDataEntity {
27
27
  formIdentifier: string;
28
28
  time: Date | string;
29
29
  formData: IFormData;
30
+ attributeSetIdentifier?: string;
30
31
  }
31
32
  /**
32
33
  * @property {string} [formIdentifier] - Text identifier of the form object (marker)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",