@tillhub/javascript-sdk 4.106.0 → 4.108.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
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
# [4.108.0](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.107.0...v4.108.0) (2023-11-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **transactions:** taking out the ordering outside of the filtering ([634cc20](https://github.com/tillhub/tillhub-sdk-javascript/commit/634cc201ffe8793295ed21c66ad3c7e51a5b713c))
|
|
7
|
+
|
|
8
|
+
# [4.107.0](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.106.0...v4.107.0) (2023-11-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **fiscalization:** change method to post ([a7a9dca](https://github.com/tillhub/tillhub-sdk-javascript/commit/a7a9dcac20e841cd56cc1505a0a7a1863f2f20bf))
|
|
14
|
+
* **fiscalization:** test fail ([69e60d3](https://github.com/tillhub/tillhub-sdk-javascript/commit/69e60d3bf8efa2137adfc323888cbb2e89792cbf))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **fiscalization:** add initalize function ([4f66720](https://github.com/tillhub/tillhub-sdk-javascript/commit/4f667209b4aad62bf3cf7ba8fc41864776aa2107))
|
|
20
|
+
|
|
1
21
|
# [4.106.0](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.105.2...v4.106.0) (2023-11-15)
|
|
2
22
|
|
|
3
23
|
|
|
@@ -27,6 +27,9 @@ export interface FiscalizationItem {
|
|
|
27
27
|
fon: fiscalizationConfiguration;
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
export interface fiscalizationLicenseKey {
|
|
31
|
+
licenseKey: string | null;
|
|
32
|
+
}
|
|
30
33
|
export interface FiscalizationResponse {
|
|
31
34
|
data?: FiscalizationItem;
|
|
32
35
|
msg?: string;
|
|
@@ -38,10 +41,16 @@ export declare class Fiscalization extends ThBaseHandler {
|
|
|
38
41
|
options: FiscalizationOptions;
|
|
39
42
|
uriHelper: UriHelper;
|
|
40
43
|
constructor(options: FiscalizationOptions, http: Client);
|
|
41
|
-
|
|
44
|
+
init(options: FiscalizationItem): Promise<FiscalizationResponse>;
|
|
45
|
+
setLicense(branchId: string, options: fiscalizationLicenseKey): Promise<FiscalizationResponse>;
|
|
42
46
|
}
|
|
43
47
|
export declare class FiscalizationInitFailed extends BaseError {
|
|
44
48
|
message: string;
|
|
45
49
|
name: string;
|
|
46
50
|
constructor(message?: string, properties?: Record<string, unknown>);
|
|
47
51
|
}
|
|
52
|
+
export declare class FiscalizationSetLicenseFailed extends BaseError {
|
|
53
|
+
message: string;
|
|
54
|
+
name: string;
|
|
55
|
+
constructor(message?: string, properties?: Record<string, unknown>);
|
|
56
|
+
}
|
|
@@ -31,11 +31,11 @@ export interface TransactionsQueryHandler {
|
|
|
31
31
|
limit?: number;
|
|
32
32
|
uri?: string;
|
|
33
33
|
query?: TransactionsQuery;
|
|
34
|
+
orderFields?: string[] | string;
|
|
34
35
|
}
|
|
35
36
|
export interface TransactionsQuery extends TransactionEntity {
|
|
36
37
|
deleted?: boolean;
|
|
37
38
|
active?: boolean;
|
|
38
|
-
orderFields?: string[] | string;
|
|
39
39
|
}
|
|
40
40
|
declare type CommerceTypes = 'eCommerce' | 'moto' | 'pos' | 'undefined' | 'unknown';
|
|
41
41
|
declare type PaymentMethodCodeTypes = 'undefined' | 'alipay' | 'applepay' | 'bancontact' | 'bank_transfer' | 'billpay_installment' | 'billpay_invoice' | 'credit_card' | 'debit_card' | 'easycredit_installment' | 'eps' | 'fleetcard' | 'girocard' | 'giropay' | 'googlepay' | 'ideal' | 'installment' | 'invoice' | 'klarna' | 'klarna_installment' | 'klarna_invoice' | 'loyalty' | 'monthly_invoice' | 'paypal' | 'paypal_express' | 'paysafecard' | 'paysafecash' | 'post_finance_card' | 'post_finance_efinance' | 'prepayment' | 'przelewy24' | 'santander_installment' | 'santander_purchase_on_account' | 'sepa_direct_debit' | 'sofort' | 'wechatpay' | 'unknown';
|
package/dist/v0/fiscalization.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FiscalizationInitFailed = exports.Fiscalization = void 0;
|
|
3
|
+
exports.FiscalizationSetLicenseFailed = exports.FiscalizationInitFailed = exports.Fiscalization = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var baseError_1 = require("../errors/baseError");
|
|
6
6
|
var uri_helper_1 = require("../uri-helper");
|
|
@@ -20,17 +20,17 @@ var Fiscalization = (function (_super) {
|
|
|
20
20
|
_this.uriHelper = new uri_helper_1.UriHelper(_this.endpoint, _this.options);
|
|
21
21
|
return _this;
|
|
22
22
|
}
|
|
23
|
-
Fiscalization.prototype.
|
|
23
|
+
Fiscalization.prototype.init = function (options) {
|
|
24
24
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
25
25
|
var uri, response, error_1;
|
|
26
26
|
return tslib_1.__generator(this, function (_a) {
|
|
27
27
|
switch (_a.label) {
|
|
28
28
|
case 0:
|
|
29
|
-
uri = this.uriHelper.generateBaseUri(
|
|
29
|
+
uri = this.uriHelper.generateBaseUri('/initialize');
|
|
30
30
|
_a.label = 1;
|
|
31
31
|
case 1:
|
|
32
32
|
_a.trys.push([1, 3, , 4]);
|
|
33
|
-
return [4, this.http.getClient().
|
|
33
|
+
return [4, this.http.getClient().post(uri, options)];
|
|
34
34
|
case 2:
|
|
35
35
|
response = _a.sent();
|
|
36
36
|
if (response.status !== 200) {
|
|
@@ -48,6 +48,34 @@ var Fiscalization = (function (_super) {
|
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
+
Fiscalization.prototype.setLicense = function (branchId, options) {
|
|
52
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
53
|
+
var uri, response, error_2;
|
|
54
|
+
return tslib_1.__generator(this, function (_a) {
|
|
55
|
+
switch (_a.label) {
|
|
56
|
+
case 0:
|
|
57
|
+
uri = this.uriHelper.generateBaseUri("/branches/" + branchId + "/set-license");
|
|
58
|
+
_a.label = 1;
|
|
59
|
+
case 1:
|
|
60
|
+
_a.trys.push([1, 3, , 4]);
|
|
61
|
+
return [4, this.http.getClient().put(uri, options)];
|
|
62
|
+
case 2:
|
|
63
|
+
response = _a.sent();
|
|
64
|
+
if (response.status !== 200) {
|
|
65
|
+
throw new FiscalizationSetLicenseFailed(undefined, { status: response.status });
|
|
66
|
+
}
|
|
67
|
+
return [2, {
|
|
68
|
+
data: response.data.results[0],
|
|
69
|
+
msg: response.data.msg
|
|
70
|
+
}];
|
|
71
|
+
case 3:
|
|
72
|
+
error_2 = _a.sent();
|
|
73
|
+
throw new FiscalizationSetLicenseFailed(error_2.message, { error: error_2 });
|
|
74
|
+
case 4: return [2];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
51
79
|
Fiscalization.baseEndpoint = '/api/v0/fiscalization';
|
|
52
80
|
return Fiscalization;
|
|
53
81
|
}(base_1.ThBaseHandler));
|
|
@@ -65,4 +93,17 @@ var FiscalizationInitFailed = (function (_super) {
|
|
|
65
93
|
return FiscalizationInitFailed;
|
|
66
94
|
}(baseError_1.BaseError));
|
|
67
95
|
exports.FiscalizationInitFailed = FiscalizationInitFailed;
|
|
96
|
+
var FiscalizationSetLicenseFailed = (function (_super) {
|
|
97
|
+
tslib_1.__extends(FiscalizationSetLicenseFailed, _super);
|
|
98
|
+
function FiscalizationSetLicenseFailed(message, properties) {
|
|
99
|
+
if (message === void 0) { message = 'Could not set license fiscalization'; }
|
|
100
|
+
var _this = _super.call(this, message, properties) || this;
|
|
101
|
+
_this.message = message;
|
|
102
|
+
_this.name = 'FiscalizationSetLicenseFailed';
|
|
103
|
+
Object.setPrototypeOf(_this, FiscalizationSetLicenseFailed.prototype);
|
|
104
|
+
return _this;
|
|
105
|
+
}
|
|
106
|
+
return FiscalizationSetLicenseFailed;
|
|
107
|
+
}(baseError_1.BaseError));
|
|
108
|
+
exports.FiscalizationSetLicenseFailed = FiscalizationSetLicenseFailed;
|
|
68
109
|
//# sourceMappingURL=fiscalization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fiscalization.js","sourceRoot":"","sources":["../../src/v0/fiscalization.ts"],"names":[],"mappings":";;;;AACA,iDAA+C;AAC/C,4CAAyC;AACzC,gCAAuC;
|
|
1
|
+
{"version":3,"file":"fiscalization.js","sourceRoot":"","sources":["../../src/v0/fiscalization.ts"],"names":[],"mappings":";;;;AACA,iDAA+C;AAC/C,4CAAyC;AACzC,gCAAuC;AAyCvC;IAAmC,yCAAa;IAO9C,uBAAa,OAA6B,EAAE,IAAY;;QAAxD,YACE,kBAAM,IAAI,EAAE;YACV,QAAQ,EAAE,aAAa,CAAC,YAAY;YACpC,IAAI,QAAE,OAAO,CAAC,IAAI,mCAAI,yBAAyB;SAChD,CAAC,SAOH;QANC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAEhB,KAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAA;QAC1C,KAAI,CAAC,OAAO,CAAC,IAAI,SAAG,KAAI,CAAC,OAAO,CAAC,IAAI,mCAAI,yBAAyB,CAAA;QAClE,KAAI,CAAC,SAAS,GAAG,IAAI,sBAAS,CAAC,KAAI,CAAC,QAAQ,EAAE,KAAI,CAAC,OAAO,CAAC,CAAA;;IAC7D,CAAC;IAEK,4BAAI,GAAV,UAAY,OAA0B;;;;;;wBAC9B,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,aAAa,CAAC,CAAA;;;;wBAGtC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