@orchesty/connector-flexi-bee 1.0.1 → 1.0.2

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.
@@ -0,0 +1,26 @@
1
+ import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
2
+ import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
3
+ export declare const NAME = "flexibee-create-faktura-prijata-connector";
4
+ export default class FlexiBeeCreateFakturaPrijataConnector extends AConnector {
5
+ getName(): string;
6
+ processAction(dto: ProcessDto): Promise<ProcessDto<IOutput[]>>;
7
+ }
8
+ export interface IResponse {
9
+ winstrom: {
10
+ '@version': string;
11
+ success: string;
12
+ stats: {
13
+ created: string;
14
+ updated: string;
15
+ deleted: string;
16
+ skipped: string;
17
+ failed: string;
18
+ };
19
+ results: IOutput[];
20
+ };
21
+ }
22
+ export interface IOutput {
23
+ id: string;
24
+ 'request-id': `ext:${string}`;
25
+ ref: string;
26
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NAME = void 0;
7
+ const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
8
+ const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
9
+ const FexiBeeApplication_1 = require("../FexiBeeApplication");
10
+ exports.NAME = `${FexiBeeApplication_1.FLEXI_BEE_APPLICATION}-create-faktura-prijata-connector`;
11
+ class FlexiBeeCreateFakturaPrijataConnector extends AConnector_1.default {
12
+ getName() {
13
+ return exports.NAME;
14
+ }
15
+ async processAction(dto) {
16
+ const applicationInstall = await this.getApplicationInstallFromProcess(dto);
17
+ const application = this.getApplication();
18
+ const request = await application.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.POST, application.getUrl(applicationInstall, 'faktura-prijata'), dto.getJsonData());
19
+ const response = await this.getSender().send(request);
20
+ return dto.setNewJsonData(response.getJsonBody().winstrom.results);
21
+ }
22
+ }
23
+ exports.default = FlexiBeeCreateFakturaPrijataConnector;
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-flexi-bee",
3
3
  "description": "",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-flexi-bee",
3
3
  "description": "",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",