totalum-api-sdk 2.0.1 → 2.0.3

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/README.MD CHANGED
@@ -36,7 +36,7 @@ const totalumClient = new TotalumApiSdk(options);
36
36
 
37
37
  // execute some function
38
38
 
39
- const result = await totalumClient.getItems('your_item', {});
39
+ const result = await totalumClient.crud.getItems('your_item', {});
40
40
  ```
41
41
 
42
42
  ```javascript
@@ -62,6 +62,6 @@ const options: AuthOptions = {
62
62
 
63
63
  const totalumClient = new totalum.TotalumApiSdk(options);
64
64
 
65
- const result = await totalumClient.getItems('your_item', {});
65
+ const result = await totalumClient.crud.getItems('your_item', {});
66
66
 
67
67
  ```
@@ -13,6 +13,8 @@ export const endpoints = {
13
13
  uploadFile: 'api/v1/files/upload',
14
14
  getDownloadUrl: 'api/v1/files/download/:fileName',
15
15
  deleteFile: 'api/v1/files/:fileName',
16
+ ocrOfImage: 'api/v1/files/ocr/image',
17
+ ocrOfPdf: 'api/v1/files/ocr/pdf'
16
18
  },
17
19
  filter: {
18
20
  lookUpFilter: 'api/v1/filter/:idPage',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totalum-api-sdk",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Totalum sdk wraper of totalum api",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,4 +29,15 @@ export class FilesService {
29
29
  return axios.post(url, { templateId: id, variables, name }, { headers: this.headers });
30
30
  }
31
31
 
32
+
33
+ public async ocrOfImage(fileName:string) {
34
+ const url = UtilsService.getUrl(this.baseUrl, endpoints.files.ocrOfImage);
35
+ return axios.post(url, { fileName }, { headers: this.headers });
36
+ }
37
+
38
+ public async ocrOfPdf(fileName:string) {
39
+ const url = UtilsService.getUrl(this.baseUrl, endpoints.files.ocrOfPdf);
40
+ return axios.post(url, { fileName }, { headers: this.headers });
41
+ }
42
+
32
43
  }
@@ -23,8 +23,7 @@ export class GoogleService {
23
23
  return axios.get(url, { params: params, headers: this.headers });
24
24
  }
25
25
 
26
- public async googleAccountSendEmail(accountEmail: string, body: {to: string, subject: string, message: string}) {
27
-
26
+ public async googleAccountSendEmail(accountEmail: string, body: {to: string, subject: string, message?: string, html?:string}) {
28
27
  const url = UtilsService.getUrl(this.baseUrl, endpoints.googleIntegration.sendEmail, {});
29
28
  const params = { userEmail: accountEmail };
30
29
  return axios.post(url, body, { params: params, headers: this.headers });