totalum-api-sdk 2.0.29 → 2.0.30

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.
Files changed (2) hide show
  1. package/README.MD +3 -3
  2. package/package.json +1 -1
package/README.MD CHANGED
@@ -92,7 +92,7 @@ const result = await totalumClient.crud.getItems('your_element_table_name', {});
92
92
 
93
93
  ```html
94
94
  <head>
95
- <script src="https://cdn.jsdelivr.net/npm/totalum-api-sdk@2.0.27/dist/totalum-sdk.min.js"></script>
95
+ <script src="https://cdn.jsdelivr.net/npm/totalum-api-sdk@2.0.29/dist/totalum-sdk.min.js"></script>
96
96
  </head>
97
97
  <script>
98
98
  //Example of use TotalumSdk in your custom html page
@@ -558,11 +558,11 @@ const variablesExample = { // replace the variables with your variables, can con
558
558
  const fileName = 'your_pdf_name.pdf'; // replace 'your_pdf_name' with the name of your pdf
559
559
  //CAUTION: if you use the same name for multiple pdfs, the pdfs will be overwritten
560
560
  const result = await totalumClient.files.generatePdfByTemplate(templateId, variablesExample, name);
561
- const fileUrl = result.data.data;
561
+ const fileResult = result.data.data;
562
562
  // with the fileUrl you can download the pdf
563
563
 
564
564
  //if you want to link this pdf to an item, you need to add the fileName to the item property of type file
565
- const result2 = await totalumClient.crud.editItemById('your_element_table_name', 'your_item_id', {'your_pdf_property_name': {name: fileName}});
565
+ const result2 = await totalumClient.crud.editItemById('your_element_table_name', 'your_item_id', {'your_pdf_property_name': {name: fileResult.fileName}});
566
566
 
567
567
  ```
568
568
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totalum-api-sdk",
3
- "version": "2.0.29",
3
+ "version": "2.0.30",
4
4
  "description": "Totalum sdk wrapper and utils of totalum api",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",