@colijnit/mainapi 1.0.23 → 1.0.24
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/build/enum/printing-service-method.d.ts +8 -0
- package/build/enum/printing-service-method.js +12 -0
- package/build/main-api-connection.d.ts +1 -0
- package/build/main-api.d.ts +4 -0
- package/build/main-api.js +13 -0
- package/build/main-api.unit.test.js +6 -0
- package/build/main-auth.d.ts +4 -3
- package/build/main-auth.js +7 -0
- package/build/main-public.d.ts +1 -0
- package/build/main-public.js +4 -0
- package/build/model/printing-service-request-data.d.ts +16 -0
- package/build/model/printing-service-request-data.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrintServiceMethod = void 0;
|
|
4
|
+
var PrintServiceMethod;
|
|
5
|
+
(function (PrintServiceMethod) {
|
|
6
|
+
PrintServiceMethod["ListPrinters"] = "listPrinters";
|
|
7
|
+
PrintServiceMethod["PrintReport"] = "printReport";
|
|
8
|
+
PrintServiceMethod["SendEmail"] = "sendEmail";
|
|
9
|
+
PrintServiceMethod["TextingReport"] = "textingReport";
|
|
10
|
+
PrintServiceMethod["CutReceipt"] = "cutReceipt";
|
|
11
|
+
PrintServiceMethod["OpenDrawer"] = "openDrawer";
|
|
12
|
+
})(PrintServiceMethod = exports.PrintServiceMethod || (exports.PrintServiceMethod = {}));
|
|
@@ -16,6 +16,7 @@ export declare abstract class MainApiConnection {
|
|
|
16
16
|
branchNr: string;
|
|
17
17
|
abstract getSequenceValue(sequenceName: SequenceName, noSequence: boolean): Promise<DataServiceResponseData>;
|
|
18
18
|
abstract listAllPrinters(): Promise<DataServiceResponseData>;
|
|
19
|
+
abstract listPrinters(showAll: boolean): Promise<DataServiceResponseData>;
|
|
19
20
|
abstract getSendMethods(): Promise<DataServiceResponseData>;
|
|
20
21
|
abstract getDocumentContent(id: number, thumbnail: boolean): Promise<DataServiceResponseData>;
|
|
21
22
|
abstract getCurrencies(active: boolean): Promise<DataServiceResponseData>;
|
package/build/main-api.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { DomainName } from './enum/domain-name.enum';
|
|
|
8
8
|
import { TagCategory } from "./enum/tab-category.enum";
|
|
9
9
|
import { TagTreeItem } from "./model/tag-tree-item.bo";
|
|
10
10
|
import { Preset } from "./model/preset.bo";
|
|
11
|
+
import { ServerResponseData } from '@colijnit/ioneconnector/build/model/server-response-data';
|
|
11
12
|
export declare class MainApi {
|
|
12
13
|
readonly showLoader: Subject<boolean>;
|
|
13
14
|
readonly connectionAborted: Subject<void>;
|
|
@@ -23,8 +24,11 @@ export declare class MainApi {
|
|
|
23
24
|
private readonly _subs;
|
|
24
25
|
private _connector;
|
|
25
26
|
constructor(options?: Options);
|
|
27
|
+
connect(): Promise<boolean>;
|
|
28
|
+
logOut(): Promise<ServerResponseData>;
|
|
26
29
|
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
27
30
|
listAllPrinters(): Promise<DataServiceResponseData>;
|
|
31
|
+
listPrinters(showAll?: boolean): Promise<DataServiceResponseData>;
|
|
28
32
|
getSendMethods(): Promise<DataServiceResponseData>;
|
|
29
33
|
getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
|
|
30
34
|
getCurrencies(active?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-api.js
CHANGED
|
@@ -38,6 +38,16 @@ class MainApi {
|
|
|
38
38
|
this.mainApi.branchNr = this.branch;
|
|
39
39
|
this._subs.push(this._connector.showLoader.subscribe(value => this.showLoader.next(value)), this._connector.connectionAborted.subscribe(() => this.connectionAborted.next()), this._connector.connectionResetInactivity.subscribe(() => this._handleConnectionReset()));
|
|
40
40
|
}
|
|
41
|
+
connect() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return this._connector.connect();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
logOut() {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return this._connector.logOut();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
41
51
|
getSequenceValue(sequenceName, noSequence = false) {
|
|
42
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
53
|
return this.mainApi.getSequenceValue(sequenceName, noSequence);
|
|
@@ -46,6 +56,9 @@ class MainApi {
|
|
|
46
56
|
listAllPrinters() {
|
|
47
57
|
return this.mainApi.listAllPrinters();
|
|
48
58
|
}
|
|
59
|
+
listPrinters(showAll = false) {
|
|
60
|
+
return this.mainApi.listPrinters(showAll);
|
|
61
|
+
}
|
|
49
62
|
getSendMethods() {
|
|
50
63
|
return this.mainApi.getSendMethods();
|
|
51
64
|
}
|
|
@@ -108,4 +108,10 @@ describe("Connector", () => {
|
|
|
108
108
|
const result = yield connector.savePreset(testPreset);
|
|
109
109
|
expect(result).toBeDefined();
|
|
110
110
|
}));
|
|
111
|
+
it('listPrinters', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
112
|
+
const showAll = false;
|
|
113
|
+
yield connector.connect();
|
|
114
|
+
const result = yield connector.listPrinters(showAll);
|
|
115
|
+
expect(result).toBeDefined();
|
|
116
|
+
}));
|
|
111
117
|
});
|
package/build/main-auth.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { SequenceName } from './enum/sequence-name.enum';
|
|
|
3
3
|
import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
|
|
4
4
|
import { InternalParam } from './enum/internal-param.enum';
|
|
5
5
|
import { DomainName } from './enum/domain-name.enum';
|
|
6
|
-
import { Preset } from
|
|
7
|
-
import { TagCategory } from
|
|
8
|
-
import { TagTreeItem } from
|
|
6
|
+
import { Preset } from './model/preset.bo';
|
|
7
|
+
import { TagCategory } from './enum/tab-category.enum';
|
|
8
|
+
import { TagTreeItem } from './model/tag-tree-item.bo';
|
|
9
9
|
export declare class MainAuth extends MainApiConnection {
|
|
10
10
|
private _boSerializer;
|
|
11
11
|
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
12
12
|
listAllPrinters(): Promise<DataServiceResponseData>;
|
|
13
|
+
listPrinters(showAll?: boolean): Promise<DataServiceResponseData>;
|
|
13
14
|
getSendMethods(): Promise<DataServiceResponseData>;
|
|
14
15
|
getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
|
|
15
16
|
getCurrencies(active?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-auth.js
CHANGED
|
@@ -28,6 +28,7 @@ const preset_object_name_enum_1 = require("./enum/preset-object-name.enum");
|
|
|
28
28
|
const public_service_method_1 = require("./enum/public-service-method");
|
|
29
29
|
const tag_object_enum_1 = require("./enum/tag-object.enum");
|
|
30
30
|
const tag_operation_name_enum_1 = require("./enum/tag-operation-name.enum");
|
|
31
|
+
const printing_service_method_1 = require("./enum/printing-service-method");
|
|
31
32
|
class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
32
33
|
constructor() {
|
|
33
34
|
super(...arguments);
|
|
@@ -62,6 +63,12 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
62
63
|
};
|
|
63
64
|
return this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data);
|
|
64
65
|
}
|
|
66
|
+
listPrinters(showAll = false) {
|
|
67
|
+
const data = {
|
|
68
|
+
showAll: showAll
|
|
69
|
+
};
|
|
70
|
+
return this._call(printing_service_method_1.PrintServiceMethod.ListPrinters, data, backend_service_name_enum_1.BackendServiceName.PrintingService);
|
|
71
|
+
}
|
|
65
72
|
getSendMethods() {
|
|
66
73
|
const data = {
|
|
67
74
|
moduleName: module_name_enum_1.ModuleName.Report,
|
package/build/main-public.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare class MainPublic extends MainApiConnection {
|
|
|
10
10
|
protected endPoint: string;
|
|
11
11
|
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
12
12
|
listAllPrinters(): Promise<DataServiceResponseData>;
|
|
13
|
+
listPrinters(showAll?: boolean): Promise<DataServiceResponseData>;
|
|
13
14
|
getSendMethods(): Promise<DataServiceResponseData>;
|
|
14
15
|
getDocumentContent(id: number, thumbnail: boolean): Promise<DataServiceResponseData>;
|
|
15
16
|
getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
package/build/main-public.js
CHANGED
|
@@ -34,6 +34,10 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
34
34
|
console.warn('listAllPrinters not implemented');
|
|
35
35
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
36
36
|
}
|
|
37
|
+
listPrinters(showAll = false) {
|
|
38
|
+
console.warn('listPrinters not implemented');
|
|
39
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
40
|
+
}
|
|
37
41
|
getSendMethods() {
|
|
38
42
|
console.warn('getSendMethods not implemented');
|
|
39
43
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TrueFalseDbType } from '../enum/true-false-db-type.enum';
|
|
2
|
+
export interface PrintingServiceRequestData {
|
|
3
|
+
reportId?: number;
|
|
4
|
+
showAll?: boolean;
|
|
5
|
+
locale?: string;
|
|
6
|
+
copies?: number;
|
|
7
|
+
printerName?: string;
|
|
8
|
+
parameterValues?: any;
|
|
9
|
+
emailTo?: string;
|
|
10
|
+
subject?: string;
|
|
11
|
+
ccToSelf?: TrueFalseDbType;
|
|
12
|
+
message?: string;
|
|
13
|
+
attachments?: string[];
|
|
14
|
+
receiver?: string;
|
|
15
|
+
receiverId?: string;
|
|
16
|
+
}
|