@klardaten/n8n-nodes-datevconnect 1.0.7 → 1.0.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentFileResourceHandler.d.ts","sourceRoot":"","sources":["../../../../nodes/DocumentManagement/handlers/DocumentFileResourceHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,kBAAkB,EAAoB,MAAM,cAAc,CAAC;AAG/G,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D;;;;;;;;;GASG;AACH,qBAAa,2BAA4B,SAAQ,mBAAmB;IAClE,SAAS,CAAC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAG3C;;OAEG;IACG,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,kBAAkB,EAAE,GAC/B,OAAO,CAAC,IAAI,CAAC;IAkDhB;;OAEG;YACW,qBAAqB;YAuCrB,kBAAkB;CA4BjC"}
1
+ {"version":3,"file":"DocumentFileResourceHandler.d.ts","sourceRoot":"","sources":["../../../../nodes/DocumentManagement/handlers/DocumentFileResourceHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,kBAAkB,EAAoB,MAAM,cAAc,CAAC;AAG/G,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D;;;;;;;;;GASG;AACH,qBAAa,2BAA4B,SAAQ,mBAAmB;IAClE,SAAS,CAAC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAG3C;;OAEG;IACG,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,kBAAkB,EAAE,GAC/B,OAAO,CAAC,IAAI,CAAC;IAkDhB;;OAEG;YACW,qBAAqB;YAuCrB,kBAAkB;CAyBjC"}
@@ -104,16 +104,10 @@ class DocumentFileResourceHandler extends BaseResourceHandler_1.BaseResourceHand
104
104
  });
105
105
  }
106
106
  async uploadDocumentFile(authContext, sendSuccess) {
107
- var _a;
108
- // Get binary data from the input data
109
- const inputData = this.context.getInputData();
110
- const currentItem = inputData[this.itemIndex];
111
- if (!((_a = currentItem === null || currentItem === void 0 ? void 0 : currentItem.binary) === null || _a === void 0 ? void 0 : _a.data)) {
107
+ const bufferData = await this.context.helpers.getBinaryDataBuffer(this.itemIndex, 'data');
108
+ if (!bufferData || bufferData.length === 0) {
112
109
  throw new n8n_workflow_1.NodeOperationError(this.context.getNode(), "No binary data found. Please provide binary data through the 'data' binary property.", { itemIndex: this.itemIndex });
113
110
  }
114
- // Get from binary property
115
- const binaryDataObj = currentItem.binary.data;
116
- const bufferData = Buffer.from(binaryDataObj.data, 'base64');
117
111
  const response = await documentManagementClient_1.DocumentManagementClient.uploadDocumentFile({
118
112
  host: authContext.host,
119
113
  token: authContext.token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klardaten/n8n-nodes-datevconnect",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "n8n community node for DATEVconnect API via Klardaten Gateway",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/Klardaten/n8n-nodes-datevconnect#readme",