@orchesty/connector-fapi 1.0.0
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/CHANGELOG.md +7 -0
- package/LICENSE +190 -0
- package/coverage/clover.xml +234 -0
- package/coverage/coverage-final.json +12 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Batch/AFapiListBatch.ts.html +373 -0
- package/coverage/lcov-report/src/Batch/FapiGetItemTemplateListBatch.ts.html +295 -0
- package/coverage/lcov-report/src/Batch/FapiGetLabelListBatch.ts.html +154 -0
- package/coverage/lcov-report/src/Batch/FapiGetProjectListBatch.ts.html +211 -0
- package/coverage/lcov-report/src/Batch/FapiGetShippingMethodListBatch.ts.html +238 -0
- package/coverage/lcov-report/src/Batch/FapiSubscribeWebhooksBatch.ts.html +364 -0
- package/coverage/lcov-report/src/Batch/FapiUnsubscribeWebhooksBatch.ts.html +247 -0
- package/coverage/lcov-report/src/Batch/index.html +206 -0
- package/coverage/lcov-report/src/Connector/FapiGetInvoiceConnector.ts.html +652 -0
- package/coverage/lcov-report/src/Connector/FapiPostInvoiceLabelConnector.ts.html +229 -0
- package/coverage/lcov-report/src/Connector/index.html +131 -0
- package/coverage/lcov-report/src/FapiApplication.ts.html +394 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/test/dataProvider.ts.html +187 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov.info +380 -0
- package/dist/Batch/AFapiListBatch.d.ts +12 -0
- package/dist/Batch/AFapiListBatch.js +68 -0
- package/dist/Batch/FapiGetItemTemplateListBatch.d.ts +57 -0
- package/dist/Batch/FapiGetItemTemplateListBatch.js +18 -0
- package/dist/Batch/FapiGetLabelListBatch.d.ts +12 -0
- package/dist/Batch/FapiGetLabelListBatch.js +18 -0
- package/dist/Batch/FapiGetProjectListBatch.d.ts +29 -0
- package/dist/Batch/FapiGetProjectListBatch.js +18 -0
- package/dist/Batch/FapiGetShippingMethodListBatch.d.ts +38 -0
- package/dist/Batch/FapiGetShippingMethodListBatch.js +18 -0
- package/dist/Batch/FapiSubscribeWebhooksBatch.d.ts +7 -0
- package/dist/Batch/FapiSubscribeWebhooksBatch.js +62 -0
- package/dist/Batch/FapiUnsubscribeWebhooksBatch.d.ts +7 -0
- package/dist/Batch/FapiUnsubscribeWebhooksBatch.js +41 -0
- package/dist/Connector/FapiGetInvoiceConnector.d.ts +159 -0
- package/dist/Connector/FapiGetInvoiceConnector.js +26 -0
- package/dist/Connector/FapiPostInvoiceLabelConnector.d.ts +17 -0
- package/dist/Connector/FapiPostInvoiceLabelConnector.js +28 -0
- package/dist/FapiApplication.d.ts +24 -0
- package/dist/FapiApplication.js +99 -0
- package/dist/package.json +28 -0
- package/jest.config.js +13 -0
- package/package.json +28 -0
- package/src/Batch/AFapiListBatch.ts +96 -0
- package/src/Batch/FapiGetItemTemplateListBatch.ts +70 -0
- package/src/Batch/FapiGetLabelListBatch.ts +23 -0
- package/src/Batch/FapiGetProjectListBatch.ts +42 -0
- package/src/Batch/FapiGetShippingMethodListBatch.ts +51 -0
- package/src/Batch/FapiSubscribeWebhooksBatch.ts +93 -0
- package/src/Batch/FapiUnsubscribeWebhooksBatch.ts +54 -0
- package/src/Batch/__tests__/Data/FapiGetItemTemplateListBatch/input.json +7 -0
- package/src/Batch/__tests__/Data/FapiGetItemTemplateListBatch/mock.json +55 -0
- package/src/Batch/__tests__/Data/FapiGetItemTemplateListBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FapiGetLabelListBatch/input.json +7 -0
- package/src/Batch/__tests__/Data/FapiGetLabelListBatch/mock.json +14 -0
- package/src/Batch/__tests__/Data/FapiGetLabelListBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FapiGetProjectListBatch/input.json +7 -0
- package/src/Batch/__tests__/Data/FapiGetProjectListBatch/mock.json +26 -0
- package/src/Batch/__tests__/Data/FapiGetProjectListBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FapiGetShippingMethodListBatch/input.json +7 -0
- package/src/Batch/__tests__/Data/FapiGetShippingMethodListBatch/mock.json +31 -0
- package/src/Batch/__tests__/Data/FapiGetShippingMethodListBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FapiSubscribeWebhooksBatch/input.json +7 -0
- package/src/Batch/__tests__/Data/FapiSubscribeWebhooksBatch/mock.json +17 -0
- package/src/Batch/__tests__/Data/FapiSubscribeWebhooksBatch/output.json +6 -0
- package/src/Batch/__tests__/Data/FapiUnsubscribeWebhooksBatch/1-mock.json +5 -0
- package/src/Batch/__tests__/Data/FapiUnsubscribeWebhooksBatch/input.json +7 -0
- package/src/Batch/__tests__/Data/FapiUnsubscribeWebhooksBatch/mock.json +5 -0
- package/src/Batch/__tests__/Data/FapiUnsubscribeWebhooksBatch/output.json +9 -0
- package/src/Batch/__tests__/Data/FapiUnsubscribeWebhooksBatch/output1.json +7 -0
- package/src/Batch/__tests__/FapiGetItemTemplateListBatch.ts +17 -0
- package/src/Batch/__tests__/FapiGetLabelListBatch.ts +17 -0
- package/src/Batch/__tests__/FapiGetProjectListBatch.ts +17 -0
- package/src/Batch/__tests__/FapiGetShippingMethodListBatch.ts +17 -0
- package/src/Batch/__tests__/FapiSubscribeWebhooksBatch.ts +45 -0
- package/src/Batch/__tests__/FapiUnsubscribeWebhooksBatch.ts +57 -0
- package/src/Connector/FapiGetInvoiceConnector.ts +189 -0
- package/src/Connector/FapiPostInvoiceLabelConnector.ts +48 -0
- package/src/Connector/__tests__/Data/FapiGetInvoiceConnector/input.json +8 -0
- package/src/Connector/__tests__/Data/FapiGetInvoiceConnector/mock.json +223 -0
- package/src/Connector/__tests__/Data/FapiGetInvoiceConnector/output.json +224 -0
- package/src/Connector/__tests__/Data/FapiPostInvoiceLabelConnector/input.json +11 -0
- package/src/Connector/__tests__/Data/FapiPostInvoiceLabelConnector/mock.json +12 -0
- package/src/Connector/__tests__/Data/FapiPostInvoiceLabelConnector/output.json +13 -0
- package/src/Connector/__tests__/FapiGetInvoiceConnector.ts +17 -0
- package/src/Connector/__tests__/FapiPostInvoiceLabelConnector.ts +17 -0
- package/src/FapiApplication.ts +103 -0
- package/test/dataProvider.ts +34 -0
- package/tsconfig.json +8 -0
- package/tsconfig.prod.json +13 -0
- package/tsconfig.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.WebhookTypes = exports.NAME = void 0;
|
|
40
|
+
exports.getErrorInResponse = getErrorInResponse;
|
|
41
|
+
const CoreFormsEnum_1 = __importStar(require("@orchesty/nodejs-sdk/dist/lib/Application/Base/CoreFormsEnum"));
|
|
42
|
+
const Field_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/Field"));
|
|
43
|
+
const FieldType_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FieldType"));
|
|
44
|
+
const Form_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/Form"));
|
|
45
|
+
const FormStack_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FormStack"));
|
|
46
|
+
const ABasicApplication_1 = require("@orchesty/nodejs-sdk/dist/lib/Authorization/Type/Basic/ABasicApplication");
|
|
47
|
+
const RequestDto_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Transport/Curl/RequestDto"));
|
|
48
|
+
const Base64_1 = require("@orchesty/nodejs-sdk/dist/lib/Utils/Base64");
|
|
49
|
+
const Headers_1 = require("@orchesty/nodejs-sdk/dist/lib/Utils/Headers");
|
|
50
|
+
exports.NAME = 'fapi';
|
|
51
|
+
var WebhookTypes;
|
|
52
|
+
(function (WebhookTypes) {
|
|
53
|
+
WebhookTypes["ORDERED"] = "ordered";
|
|
54
|
+
WebhookTypes["UPDATED"] = "invoice_update";
|
|
55
|
+
WebhookTypes["PAID"] = "paid";
|
|
56
|
+
})(WebhookTypes || (exports.WebhookTypes = WebhookTypes = {}));
|
|
57
|
+
class FapiApplication extends ABasicApplication_1.ABasicApplication {
|
|
58
|
+
getName() {
|
|
59
|
+
return exports.NAME;
|
|
60
|
+
}
|
|
61
|
+
getDescription() {
|
|
62
|
+
return 'Jednoduchý online prodej';
|
|
63
|
+
}
|
|
64
|
+
getPublicName() {
|
|
65
|
+
return 'Fapi';
|
|
66
|
+
}
|
|
67
|
+
getLogo() {
|
|
68
|
+
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAABXBAMAAADSXjV5AAAACXBIWXMAAAsSAAALEgHS3X78AAAAJFBMVEVHcEwAbtsAbtsAbtsAbtsAbtsAbtsAbtsAbtsAbtsAbtsAbtstx4spAAAAC3RSTlMAwUCBX5wl2hDxsRVwA1oAAARZSURBVGjetZq/b9NQEMdffjlJWQIrS1QQQrAE2oksXhiQl4pKFSiLV5SlEkVC8mKBUFV1CVKFomap2rELifOjrv85aJvY78fd+2H7vS1+5/vEz1/f3TubEOfdY2TshoQbzvv7iX2fwAPwtb/bxeyuXEJaTxN0nHFntQbriWkI0hFfX13EbuWTZiIZ3B8/TifGIB7zFR8gdmPiyfCH7GmDdGIK4nFfT2C7iFzL8Ev2juHr8jAk9/ETaLeSnZIkM8Z7jZq5gPAB7il2QTsTfBtdl/WQuYpAOxO8h3jTwid7RfG0TFbG+EVBvMNMuaZ46vJz4WvM1IUxPiqGZ4PKjTE+e1h18Yy+XzNTc3P8d1P8CI559w+yOT4yxffoPCHPBxr42DfDL2jfdfw51sSnV6OHP3dl6ezGHD+W4Yl8DDlfcxk+PfQ8AG5+HvyAv5NaeFKl+NP8+NaEX0pfC09+iafkwNdlOUSGp5fNzY2vbMy+4QUXjD8WInUOfKq8j7j2YHxVKN5y4Pvp/QvQnAvjKcTf3PhJCh2g2kPwHp/CzPH1bMmHqPYQ/KPi+K0s2FVQ7SH4Ch93zPHUJddQ7SH4WnF8P3t0W2i9Zw9Py/0a0541fJXOwR5UDljFN+jyqw0WQzh+qzD+dGPUof/LXA/f5JO0Md6jk4aD7XMR/LDwc7+JeXHIbBF9LXyfr5xN8Q5b/fUR7cF4qlIYadd6q0tIeTN2NUc6+EZ2uGNQalIh/YTNmE1EezDeE0pdLfwc8NBj88+tBr6uWWwJyw+0I3xux+Gr8X3Ro16dHwrKm/I7/Z4K3/qgW2jjO1Ihx3lw6ys7dWc93gTQjtUQ3+YzfBvWnmqXs5cP7/HnN2DtqfB+Pvw1f8SBtaegL0guvCM+CwGovXLbCz6vvEh8mg6tNVdiIWEuxSQ208fPzVpLC0F5HbF4XVhrrI2FPaILRNLQUltx6vNNnTgEGj2uLr6nwO8wY9cXrnQB7ZpHmvgzVUsZqzXakMw86KCEPvXz4ofQQ9aGlgSnr7okLz5d58vtbLyCtIdfu0vy4sWmToK1tjGTI7wkVeLrilh2qMD/vnop2Qsq8U0FfqkstEkR/FA3j9nB91WN4tAqfqIqIlybeJXyaO1ZwFeU+KVN/FCJX9jE95X42CY+UOIz7ZWPVyuPKoLKx29p4Jf28Kca+Mge3tPAx/bwWcx7u82OZ6L2SsdXodAu/LOOLXwDfqXIvaNZ2sKfIF8SsPEwsoX3EriRwNYhK1v4IMHax0xEcu3gHdlLw5bsBVkp+EaCtW9B7ZWNb0s/VvAkjfJS8F6Cv7IEtFc2fiD7WID+lMUvjI+l34B15cLssuaxHE/ZDZD+LGs3VbzS77K/bzU/BbjNYpdUXH9AN1+4feYQD5FwvJxlwQO6u5t337ELv2WYsMqX+oIC1n+79Vb5CNzdfn6gHyB+fgbs/lnmix60nXOXvX3E8MfdZIg7upt+Qa2HzBcR7f4BpkgWeCA6iDMAAAAASUVORK5CYII=';
|
|
69
|
+
}
|
|
70
|
+
getFormStack() {
|
|
71
|
+
return new FormStack_1.default()
|
|
72
|
+
.addForm(new Form_1.default(CoreFormsEnum_1.default.AUTHORIZATION_FORM, (0, CoreFormsEnum_1.getFormName)(CoreFormsEnum_1.default.AUTHORIZATION_FORM))
|
|
73
|
+
.addField(new Field_1.default(FieldType_1.default.TEXT, ABasicApplication_1.USER, 'User', undefined, true))
|
|
74
|
+
.addField(new Field_1.default(FieldType_1.default.TEXT, ABasicApplication_1.PASSWORD, 'Password', undefined, true)));
|
|
75
|
+
}
|
|
76
|
+
getRequestDto(dto, applicationInstall, method, url, data) {
|
|
77
|
+
const { user, password } = applicationInstall.getSettings()[CoreFormsEnum_1.default.AUTHORIZATION_FORM];
|
|
78
|
+
const requestDto = new RequestDto_1.default(`https://api.fapi.cz/${url}`, method, dto, undefined, {
|
|
79
|
+
[Headers_1.CommonHeaders.CONTENT_TYPE]: Headers_1.JSON_TYPE,
|
|
80
|
+
[Headers_1.CommonHeaders.ACCEPT]: Headers_1.JSON_TYPE,
|
|
81
|
+
[Headers_1.CommonHeaders.AUTHORIZATION]: `Basic ${(0, Base64_1.encode)(`${user}:${password}`)}`,
|
|
82
|
+
});
|
|
83
|
+
if (data) {
|
|
84
|
+
requestDto.setJsonBody(data);
|
|
85
|
+
}
|
|
86
|
+
return requestDto;
|
|
87
|
+
}
|
|
88
|
+
getWebhookSubscriptions() {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.default = FapiApplication;
|
|
93
|
+
async function getErrorInResponse(response, body) {
|
|
94
|
+
const data = JSON.parse(body);
|
|
95
|
+
if ('type' in data && 'message' in data) {
|
|
96
|
+
return `Error: ${data.type}: ${data.message}`;
|
|
97
|
+
}
|
|
98
|
+
return body;
|
|
99
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orchesty/connector-fapi",
|
|
3
|
+
"description": "",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
|
+
"repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "rm -rf dist && rm -rf tsconfig.prod.tsbuildinfo && tsc -d -p tsconfig.prod.json && cp package.json ./dist/package.json",
|
|
10
|
+
"test": "jest --coverage --forceExit --passWithNoTests",
|
|
11
|
+
"lint": "eslint src test --fix",
|
|
12
|
+
"lint-ci": "eslint src test"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "info@hanaboso.com",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@orchesty/nodejs-sdk": "^4.3.6",
|
|
18
|
+
"axios": "^1.13.2",
|
|
19
|
+
"luxon": "^3.7.2",
|
|
20
|
+
"http-status-codes": "^2.3.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/luxon": "^3.7.1"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=24"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const baseConfig = require('../../jest.config.js');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
...baseConfig,
|
|
5
|
+
roots: ["<rootDir>/src"],
|
|
6
|
+
setupFiles: ["<rootDir>/../../.jest/testEnvs.ts"],
|
|
7
|
+
setupFilesAfterEnv: ["<rootDir>/../../.jest/testLifecycle.ts"],
|
|
8
|
+
globalSetup: "<rootDir>/../../.jest/globalSetup.ts",
|
|
9
|
+
moduleNameMapper: {
|
|
10
|
+
"^@orchesty/nodejs-connectors/test/(.*)$": "<rootDir>/../../test/$1",
|
|
11
|
+
"^@orchesty/nodejs-connectors/lib/(.*)$": "<rootDir>/../../lib/$1",
|
|
12
|
+
},
|
|
13
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orchesty/connector-fapi",
|
|
3
|
+
"description": "",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
|
+
"repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"author": "info@hanaboso.com",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@orchesty/nodejs-sdk": "^4.3.6",
|
|
12
|
+
"axios": "^1.13.2",
|
|
13
|
+
"luxon": "^3.7.2",
|
|
14
|
+
"http-status-codes": "^2.3.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/luxon": "^3.7.1"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=24"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "rm -rf dist && rm -rf tsconfig.prod.tsbuildinfo && tsc -d -p tsconfig.prod.json && cp package.json ./dist/package.json",
|
|
24
|
+
"test": "jest --coverage --forceExit --passWithNoTests",
|
|
25
|
+
"lint": "eslint src test --fix",
|
|
26
|
+
"lint-ci": "eslint src test"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
4
|
+
import { DateTime } from 'luxon';
|
|
5
|
+
|
|
6
|
+
const LAST_RUN = 'lastRun';
|
|
7
|
+
|
|
8
|
+
export default abstract class AFapiListBatch<IInput, IOutput> extends ABatchNode {
|
|
9
|
+
|
|
10
|
+
protected abstract getUrl(): string;
|
|
11
|
+
|
|
12
|
+
public async processAction(dto: BatchProcessDto<IInput>): Promise<BatchProcessDto<IOutput>> {
|
|
13
|
+
let url = `${this.getUrl()}?limit=${await this.getLimit(dto)}&offset=${await this.getOffset(dto)}`;
|
|
14
|
+
|
|
15
|
+
if (await this.useLastRun(dto)) {
|
|
16
|
+
const lastRun = await this.getLastRun(dto);
|
|
17
|
+
|
|
18
|
+
if (lastRun) {
|
|
19
|
+
url = `${url}&last_modified_after=${lastRun}`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const requestDto = await this.getApplication().getRequestDto(
|
|
24
|
+
dto,
|
|
25
|
+
await this.getApplicationInstallFromProcess(dto),
|
|
26
|
+
HttpMethods.GET,
|
|
27
|
+
url,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const responseDto = await this.getSender().send<IResponse<IOutput>>(requestDto, [200]);
|
|
31
|
+
const response = responseDto.getJsonBody();
|
|
32
|
+
const items = response[this.getUrl().replace('-', '_')];
|
|
33
|
+
dto.setItemList(items);
|
|
34
|
+
|
|
35
|
+
if (items.length === await this.getLimit(dto)) {
|
|
36
|
+
dto.setBatchCursor((Number(dto.getBatchCursor('1')) + 1).toString());
|
|
37
|
+
} else {
|
|
38
|
+
await this.setLastRun(dto);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return dto as unknown as Promise<BatchProcessDto<IOutput>>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/require-await
|
|
45
|
+
protected async getLimit(dto: BatchProcessDto<IInput>): Promise<number> {
|
|
46
|
+
return 1_000;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
protected async getOffset(dto: BatchProcessDto<IInput>): Promise<number> {
|
|
50
|
+
return (Number(dto.getBatchCursor('1')) - 1) * await this.getLimit(dto);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/require-await
|
|
54
|
+
protected async getLastRunKey(dto: BatchProcessDto<IInput>): Promise<string> {
|
|
55
|
+
return this.getUrl();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/require-await
|
|
59
|
+
protected async useLastRun(dto: BatchProcessDto<IInput>): Promise<boolean> {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
protected async getLastRun(dto: BatchProcessDto<IInput>): Promise<string | undefined> {
|
|
64
|
+
if (!await this.useLastRun(dto)) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
69
|
+
const lastRun = applicationInstall.getNonEncryptedSettings()[LAST_RUN]?.[await this.getLastRunKey(dto)];
|
|
70
|
+
|
|
71
|
+
if (!lastRun) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return DateTime.fromISO(lastRun).toFormat('yyyy-MM-dd HH:mm:ss');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
protected async setLastRun(dto: BatchProcessDto<IInput>): Promise<void> {
|
|
79
|
+
if (!await this.useLastRun(dto)) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
84
|
+
|
|
85
|
+
applicationInstall.addNonEncryptedSettings({
|
|
86
|
+
[LAST_RUN]: {
|
|
87
|
+
[await this.getLastRunKey(dto)]: new Date().toISOString(),
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
await this.getDbClient().getApplicationRepository().update(applicationInstall);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
type IResponse<IOutput> = Record<string, IOutput[]>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { NAME as APPLICATION_NAME } from '../FapiApplication';
|
|
2
|
+
import AFapiListBatch from './AFapiListBatch';
|
|
3
|
+
|
|
4
|
+
export const NAME = `${APPLICATION_NAME}-get-item-template-list-batch`;
|
|
5
|
+
|
|
6
|
+
export default class FapiGetItemTemplateListBatch extends AFapiListBatch<unknown, IOutput> {
|
|
7
|
+
|
|
8
|
+
public getName(): string {
|
|
9
|
+
return NAME;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
protected getUrl(): string {
|
|
13
|
+
return 'item_templates';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IOutput {
|
|
19
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
20
|
+
id: number;
|
|
21
|
+
hidden: boolean;
|
|
22
|
+
name: string;
|
|
23
|
+
code: string;
|
|
24
|
+
accounting_code: string;
|
|
25
|
+
description: string;
|
|
26
|
+
price_czk: number;
|
|
27
|
+
price_eur: number;
|
|
28
|
+
price_usd: number;
|
|
29
|
+
repayment_amount_czk: number;
|
|
30
|
+
repayment_amount_eur: number;
|
|
31
|
+
repayment_amount_usd: number;
|
|
32
|
+
vat: number;
|
|
33
|
+
including_vat: boolean;
|
|
34
|
+
count: number;
|
|
35
|
+
sold_out: boolean;
|
|
36
|
+
allow_change_count: boolean;
|
|
37
|
+
enable_stock: boolean;
|
|
38
|
+
stock: number;
|
|
39
|
+
show_stock_information: boolean;
|
|
40
|
+
type: string;
|
|
41
|
+
electronically_supplied_service: boolean;
|
|
42
|
+
pohoda_accounting: string;
|
|
43
|
+
pohoda_centre: string;
|
|
44
|
+
pohoda_store: string;
|
|
45
|
+
pohoda_stock_item: string;
|
|
46
|
+
mioweb_eshop: boolean;
|
|
47
|
+
mioweb_eshop_url: string;
|
|
48
|
+
disable_discount: boolean;
|
|
49
|
+
prices: {
|
|
50
|
+
type: string;
|
|
51
|
+
price: number;
|
|
52
|
+
currency_code: string;
|
|
53
|
+
metadata: string;
|
|
54
|
+
repayment_count: number;
|
|
55
|
+
}[];
|
|
56
|
+
triggers: string[];
|
|
57
|
+
periodic: boolean;
|
|
58
|
+
period: string;
|
|
59
|
+
voucher_metadata: string;
|
|
60
|
+
metadata: {
|
|
61
|
+
weight: number;
|
|
62
|
+
live_event_country: boolean;
|
|
63
|
+
is_disable_repayment: boolean;
|
|
64
|
+
min_count: number;
|
|
65
|
+
max_count: number;
|
|
66
|
+
allow_reservations: boolean;
|
|
67
|
+
reservation_event_type: string;
|
|
68
|
+
};
|
|
69
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
70
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NAME as APPLICATION_NAME } from '../FapiApplication';
|
|
2
|
+
import AFapiListBatch from './AFapiListBatch';
|
|
3
|
+
|
|
4
|
+
export const NAME = `${APPLICATION_NAME}-get-label-list-batch`;
|
|
5
|
+
|
|
6
|
+
export default class FapiGetLabelListBatch extends AFapiListBatch<unknown, IOutput> {
|
|
7
|
+
|
|
8
|
+
public getName(): string {
|
|
9
|
+
return NAME;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
protected getUrl(): string {
|
|
13
|
+
return 'labels';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IOutput {
|
|
19
|
+
id: number,
|
|
20
|
+
user_id: number,
|
|
21
|
+
name: string,
|
|
22
|
+
color: string
|
|
23
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { NAME as APPLICATION_NAME } from '../FapiApplication';
|
|
2
|
+
import AFapiListBatch from './AFapiListBatch';
|
|
3
|
+
|
|
4
|
+
export const NAME = `${APPLICATION_NAME}-get-project-list-batch`;
|
|
5
|
+
|
|
6
|
+
export default class FapiGetProjectListBatch extends AFapiListBatch<unknown, IOutput> {
|
|
7
|
+
|
|
8
|
+
public getName(): string {
|
|
9
|
+
return NAME;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
protected getUrl(): string {
|
|
13
|
+
return 'projects';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IOutput {
|
|
19
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
20
|
+
id: number;
|
|
21
|
+
hidden: boolean;
|
|
22
|
+
name: string;
|
|
23
|
+
code: string;
|
|
24
|
+
email: string;
|
|
25
|
+
is_default: boolean;
|
|
26
|
+
has_different_logo: boolean;
|
|
27
|
+
logo: string;
|
|
28
|
+
has_different_signature: boolean;
|
|
29
|
+
signature: string;
|
|
30
|
+
has_different_bank_account_set: boolean;
|
|
31
|
+
bank_account_set: boolean;
|
|
32
|
+
has_different_sender: boolean;
|
|
33
|
+
sender_email: string;
|
|
34
|
+
sender_name: string;
|
|
35
|
+
sender_reply_to: string;
|
|
36
|
+
forms: {
|
|
37
|
+
id: number;
|
|
38
|
+
name: string;
|
|
39
|
+
path: string;
|
|
40
|
+
}[];
|
|
41
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
42
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { NAME as APPLICATION_NAME } from '../FapiApplication';
|
|
2
|
+
import AFapiListBatch from './AFapiListBatch';
|
|
3
|
+
|
|
4
|
+
export const NAME = `${APPLICATION_NAME}-get-shipping-method-list-batch`;
|
|
5
|
+
|
|
6
|
+
export default class FapiGetShippingMethodListBatch extends AFapiListBatch<unknown, IOutput> {
|
|
7
|
+
|
|
8
|
+
public getName(): string {
|
|
9
|
+
return NAME;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
protected getUrl(): string {
|
|
13
|
+
return 'shipping-methods';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IOutput {
|
|
19
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
20
|
+
id: number;
|
|
21
|
+
user_id: number;
|
|
22
|
+
name: string;
|
|
23
|
+
type: string;
|
|
24
|
+
subtype: string;
|
|
25
|
+
description: string;
|
|
26
|
+
address_prices: {
|
|
27
|
+
address: {
|
|
28
|
+
country_code: string;
|
|
29
|
+
};
|
|
30
|
+
prices: {
|
|
31
|
+
currency_code: string;
|
|
32
|
+
price: number;
|
|
33
|
+
}[];
|
|
34
|
+
}[];
|
|
35
|
+
free_of_charges: {
|
|
36
|
+
price: number;
|
|
37
|
+
currency_code: string;
|
|
38
|
+
}[];
|
|
39
|
+
meta_data: {
|
|
40
|
+
carrier_id?: number;
|
|
41
|
+
is_disable_repayment: boolean;
|
|
42
|
+
accounting_code: string;
|
|
43
|
+
pohoda_accounting: string;
|
|
44
|
+
pohoda_centre: string;
|
|
45
|
+
pohoda_store: string;
|
|
46
|
+
pohoda_stock_item: string;
|
|
47
|
+
};
|
|
48
|
+
including_vat: boolean;
|
|
49
|
+
deleted: boolean;
|
|
50
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
51
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import Webhook from '@orchesty/nodejs-sdk/dist/lib/Application/Database/Webhook';
|
|
2
|
+
import { IWebhookQueryFilter } from '@orchesty/nodejs-sdk/dist/lib/Application/Database/WebhookRepository';
|
|
3
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
4
|
+
import { IPaging, ISorter } from '@orchesty/nodejs-sdk/dist/lib/Storage/Database/Repository';
|
|
5
|
+
import TopologyRunner from '@orchesty/nodejs-sdk/dist/lib/Topology/TopologyRunner';
|
|
6
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
7
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
8
|
+
import crypto from 'crypto';
|
|
9
|
+
import { StatusCodes } from 'http-status-codes';
|
|
10
|
+
import FapiApplication, { NAME as APPLICATION_NAME } from '../FapiApplication';
|
|
11
|
+
|
|
12
|
+
export const NAME = `${APPLICATION_NAME}-subscribe-webhooks-batch`;
|
|
13
|
+
|
|
14
|
+
export default class FapiSubscribeWebhooksBatch extends ABatchNode {
|
|
15
|
+
|
|
16
|
+
public getName(): string {
|
|
17
|
+
return NAME;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
|
|
21
|
+
const application = this.getApplication<FapiApplication>();
|
|
22
|
+
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
23
|
+
const webhookRepository = this
|
|
24
|
+
.getDbClient()
|
|
25
|
+
.getRepository<Webhook, IWebhookQueryFilter, ISorter, IPaging>(Webhook);
|
|
26
|
+
|
|
27
|
+
const webhookSubscriptions = application.getWebhookSubscriptions().map((webhookSubscription) => ({
|
|
28
|
+
event: webhookSubscription.getName(),
|
|
29
|
+
topology: webhookSubscription.getTopology(),
|
|
30
|
+
node: webhookSubscription.getNode(),
|
|
31
|
+
token: crypto.randomBytes(64).toString('hex'),
|
|
32
|
+
}));
|
|
33
|
+
|
|
34
|
+
const subscribedWebhooks = await webhookRepository.findMany({
|
|
35
|
+
users: [applicationInstall.getUser()],
|
|
36
|
+
apps: [applicationInstall.getName()],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const unsubscribedWebhook = webhookSubscriptions.filter(
|
|
40
|
+
({ event }) => !subscribedWebhooks.find((subscribedWebhook) => subscribedWebhook.getName() === event),
|
|
41
|
+
).shift();
|
|
42
|
+
|
|
43
|
+
if (!unsubscribedWebhook) {
|
|
44
|
+
return dto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const { event, topology, node, token } = unsubscribedWebhook;
|
|
48
|
+
const requestDto = application.getRequestDto(
|
|
49
|
+
dto,
|
|
50
|
+
applicationInstall,
|
|
51
|
+
HttpMethods.POST,
|
|
52
|
+
'connections',
|
|
53
|
+
{
|
|
54
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
55
|
+
application: 'global-webhook',
|
|
56
|
+
credentials: {
|
|
57
|
+
event,
|
|
58
|
+
url: TopologyRunner.getWebhookUrl(topology, node, token),
|
|
59
|
+
},
|
|
60
|
+
meta_data: {
|
|
61
|
+
description: 'Orchesty Webhook',
|
|
62
|
+
},
|
|
63
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
64
|
+
},
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
const responseDto = await this.getSender().send<IResponse>(requestDto, [StatusCodes.CREATED]);
|
|
68
|
+
|
|
69
|
+
await webhookRepository.insert(
|
|
70
|
+
new Webhook()
|
|
71
|
+
.setWebhookId(String(responseDto.getJsonBody().id))
|
|
72
|
+
.setApplication(applicationInstall.getName())
|
|
73
|
+
.setUser(applicationInstall.getUser())
|
|
74
|
+
.setTopology(topology)
|
|
75
|
+
.setNode(node)
|
|
76
|
+
.setToken(token)
|
|
77
|
+
.setName(event),
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
return dto.setBatchCursor('1', true);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface IResponse {
|
|
86
|
+
id: number;
|
|
87
|
+
user_id: number;
|
|
88
|
+
application: string;
|
|
89
|
+
credentials: {
|
|
90
|
+
url: string;
|
|
91
|
+
event: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import Webhook from '@orchesty/nodejs-sdk/dist/lib/Application/Database/Webhook';
|
|
2
|
+
import { IWebhookQueryFilter } from '@orchesty/nodejs-sdk/dist/lib/Application/Database/WebhookRepository';
|
|
3
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
4
|
+
import OnRepeatException from '@orchesty/nodejs-sdk/dist/lib/Exception/OnRepeatException';
|
|
5
|
+
import { IPaging, ISorter } from '@orchesty/nodejs-sdk/dist/lib/Storage/Database/Repository';
|
|
6
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
7
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
8
|
+
import { StatusCodes } from 'http-status-codes';
|
|
9
|
+
import FapiApplication, { NAME as APPLICATION_NAME } from '../FapiApplication';
|
|
10
|
+
|
|
11
|
+
export const NAME = `${APPLICATION_NAME}-unsubscribe-webhooks-batch`;
|
|
12
|
+
|
|
13
|
+
export default class FapiUnsubscribeWebhooksBatch extends ABatchNode {
|
|
14
|
+
|
|
15
|
+
public getName(): string {
|
|
16
|
+
return NAME;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
|
|
20
|
+
const application = this.getApplication<FapiApplication>();
|
|
21
|
+
const applicationInstall = await this.getApplicationInstallFromProcess(dto, null);
|
|
22
|
+
const webhookRepository = this
|
|
23
|
+
.getDbClient()
|
|
24
|
+
.getRepository<Webhook, IWebhookQueryFilter, ISorter, IPaging>(Webhook);
|
|
25
|
+
|
|
26
|
+
const subscribedWebhook = await webhookRepository.findOne({
|
|
27
|
+
users: [applicationInstall.getUser()],
|
|
28
|
+
apps: [applicationInstall.getName()],
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
if (subscribedWebhook) {
|
|
32
|
+
const requestDto = application.getRequestDto(
|
|
33
|
+
dto,
|
|
34
|
+
applicationInstall,
|
|
35
|
+
HttpMethods.DELETE,
|
|
36
|
+
`connections/${subscribedWebhook.getWebhookId()}`,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const responseDto = await this.getSender().send(requestDto);
|
|
40
|
+
|
|
41
|
+
if (![StatusCodes.OK, StatusCodes.NOT_FOUND].includes(responseDto.getResponseCode())) {
|
|
42
|
+
await webhookRepository.update(subscribedWebhook.setUnsubscribeFailed(true));
|
|
43
|
+
|
|
44
|
+
throw new OnRepeatException(300, 12, responseDto.getBody());
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
await webhookRepository.remove(subscribedWebhook);
|
|
48
|
+
dto.setBatchCursor('1', true);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return dto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET https://api.fapi.cz/item_templates?limit=1000&offset=0",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"item_templates": [
|
|
6
|
+
{
|
|
7
|
+
"id": 12,
|
|
8
|
+
"hidden": false,
|
|
9
|
+
"name": "test",
|
|
10
|
+
"code": "12",
|
|
11
|
+
"accounting_code": null,
|
|
12
|
+
"description": null,
|
|
13
|
+
"price_czk": 1066.0,
|
|
14
|
+
"price_eur": 39.42,
|
|
15
|
+
"price_usd": null,
|
|
16
|
+
"repayment_amount_czk": 1500.0,
|
|
17
|
+
"repayment_amount_eur": null,
|
|
18
|
+
"repayment_amount_usd": null,
|
|
19
|
+
"prices": [
|
|
20
|
+
{
|
|
21
|
+
"type": "one_time",
|
|
22
|
+
"price": 1066.000000,
|
|
23
|
+
"currency_code": "CZK"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "one_time",
|
|
27
|
+
"price": 39.420000,
|
|
28
|
+
"currency_code": "EUR"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "repayment",
|
|
32
|
+
"price": 1500.000000,
|
|
33
|
+
"currency_code": "CZK"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"vat": 0,
|
|
37
|
+
"including_vat": false,
|
|
38
|
+
"count": 1,
|
|
39
|
+
"allow_change_count": false,
|
|
40
|
+
"enable_stock": false,
|
|
41
|
+
"stock": 0,
|
|
42
|
+
"show_stock_information": false,
|
|
43
|
+
"type": "electronic-service",
|
|
44
|
+
"pohoda_accounting": null,
|
|
45
|
+
"pohoda_centre": null,
|
|
46
|
+
"pohoda_store": null,
|
|
47
|
+
"pohoda_stock_item": null,
|
|
48
|
+
"mioweb_eshop": false,
|
|
49
|
+
"mioweb_eshop_url": null,
|
|
50
|
+
"disable_discount": false,
|
|
51
|
+
"user": 3
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|