@colijnit/mainapi 1.0.27 → 1.0.29
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/co-sub-report.bo.d.ts +11 -0
- package/build/enum/co-sub-report.bo.js +21 -0
- package/build/enum/document-allowed-type.enum.d.ts +10 -0
- package/build/enum/document-allowed-type.enum.js +14 -0
- package/build/enum/general-method.enum.d.ts +33 -2
- package/build/enum/general-method.enum.js +32 -1
- package/build/enum/module-name.enum.d.ts +6 -4
- package/build/enum/module-name.enum.js +6 -4
- package/build/enum/report-method.enum.d.ts +13 -1
- package/build/enum/report-method.enum.js +12 -0
- package/build/enum/report-object-name.enum.d.ts +3 -0
- package/build/enum/report-object-name.enum.js +7 -0
- package/build/enum/report-param-type.enum.d.ts +15 -0
- package/build/enum/report-param-type.enum.js +19 -0
- package/build/enum/report-type.enum.d.ts +45 -0
- package/build/enum/report-type.enum.js +49 -0
- package/build/enum/sequence-name.enum.d.ts +28 -1
- package/build/enum/sequence-name.enum.js +27 -0
- package/build/main-api-connection.d.ts +5 -0
- package/build/main-api.d.ts +5 -0
- package/build/main-api.js +13 -0
- package/build/main-api.unit.test.js +12 -1
- package/build/main-auth.d.ts +5 -1
- package/build/main-auth.js +31 -3
- package/build/main-public.d.ts +5 -0
- package/build/main-public.js +12 -0
- package/build/model/branch.bo.d.ts +8 -0
- package/build/model/branch.bo.js +7 -0
- package/build/model/co-report-category-link.bo.d.ts +8 -0
- package/build/model/co-report-category-link.bo.js +7 -0
- package/build/model/co-report-sjablonen-documenten.bo.d.ts +6 -0
- package/build/model/co-report-sjablonen-documenten.bo.js +7 -0
- package/build/model/co-report.bo.d.ts +47 -0
- package/build/model/co-report.bo.js +68 -0
- package/build/model/document-allowed-extension.bo.d.ts +6 -0
- package/build/model/document-allowed-extension.bo.js +7 -0
- package/build/model/get-postal-code-retrieval-output-params.d.ts +7 -0
- package/build/model/get-postal-code-retrieval-output-params.js +6 -0
- package/build/model/language.bo.d.ts +5 -0
- package/build/model/language.bo.js +7 -0
- package/build/model/report-category.bo.d.ts +6 -0
- package/build/model/report-category.bo.js +7 -0
- package/build/model/report-param.d.ts +16 -0
- package/build/model/report-param.js +9 -0
- package/build/model/title.bo.d.ts +9 -0
- package/build/model/title.bo.js +13 -0
- package/build/utils/file-utils.d.ts +29 -0
- package/build/utils/file-utils.js +348 -0
- package/package.json +2 -1
package/build/main-public.d.ts
CHANGED
|
@@ -6,9 +6,12 @@ import { DomainName } from './enum/domain-name.enum';
|
|
|
6
6
|
import { TagCategory } from "./enum/tab-category.enum";
|
|
7
7
|
import { TagTreeItem } from "./model/tag-tree-item.bo";
|
|
8
8
|
import { Preset } from "./model/preset.bo";
|
|
9
|
+
import { ReportType } from './enum/report-type.enum';
|
|
10
|
+
import { ModuleName } from './enum/module-name.enum';
|
|
9
11
|
export declare class MainPublic extends MainApiConnection {
|
|
10
12
|
protected endPoint: string;
|
|
11
13
|
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
14
|
+
getTemplates(documentCode: ReportType, defaultTemplate: boolean): Promise<DataServiceResponseData>;
|
|
12
15
|
listAllPrinters(): Promise<DataServiceResponseData>;
|
|
13
16
|
listPrinters(showAll?: boolean): Promise<DataServiceResponseData>;
|
|
14
17
|
getSendMethods(): Promise<DataServiceResponseData>;
|
|
@@ -34,6 +37,8 @@ export declare class MainPublic extends MainApiConnection {
|
|
|
34
37
|
savePreset(preset: Preset): Promise<DataServiceResponseData>;
|
|
35
38
|
updatePreset(presetName: string): Promise<DataServiceResponseData>;
|
|
36
39
|
getOrderLineSetCategories(): Promise<DataServiceResponseData>;
|
|
40
|
+
getPostalCodeRetrieval(postalCode: string, houseNumber: string, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
41
|
+
selectMultiple(moduleName: ModuleName, objectName: string, operationName?: string, parameterValues?: any, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
37
42
|
private createServiceRequestData;
|
|
38
43
|
private _call;
|
|
39
44
|
private _callAjaxService;
|
package/build/main-public.js
CHANGED
|
@@ -30,6 +30,10 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
30
30
|
return this._call(public_service_method_1.PublicServiceMethod.GetSequenceValue, data);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
+
getTemplates(documentCode, defaultTemplate) {
|
|
34
|
+
console.warn('getTemplates not implemented');
|
|
35
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
36
|
+
}
|
|
33
37
|
listAllPrinters() {
|
|
34
38
|
console.warn('listAllPrinters not implemented');
|
|
35
39
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
@@ -154,6 +158,14 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
154
158
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
155
159
|
});
|
|
156
160
|
}
|
|
161
|
+
getPostalCodeRetrieval(postalCode, houseNumber, showLoader) {
|
|
162
|
+
console.warn('getPostalCodeRetrieval not implemented');
|
|
163
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
164
|
+
}
|
|
165
|
+
selectMultiple(moduleName, objectName, operationName, parameterValues, showLoader) {
|
|
166
|
+
console.warn('getOrderLineSetCategories not implemented');
|
|
167
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
168
|
+
}
|
|
157
169
|
createServiceRequestData() {
|
|
158
170
|
const data = { languageCode: this.languageCode };
|
|
159
171
|
return data;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Branch = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class Branch extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.Branch = Branch;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoReportCategoryLink = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class CoReportCategoryLink extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.CoReportCategoryLink = CoReportCategoryLink;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoReportSjablonenDocumenten = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class CoReportSjablonenDocumenten extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.CoReportSjablonenDocumenten = CoReportSjablonenDocumenten;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { SendMethod } from './send-method.bo';
|
|
2
|
+
import { ReportParam } from './report-param';
|
|
3
|
+
import { CoDocument } from './co-document';
|
|
4
|
+
import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
|
|
5
|
+
import { CoSubReport } from '../enum/co-sub-report.bo';
|
|
6
|
+
import { CoReportSjablonenDocumenten } from './co-report-sjablonen-documenten.bo';
|
|
7
|
+
import { Branch } from './branch.bo';
|
|
8
|
+
import { CoReportCategoryLink } from './co-report-category-link.bo';
|
|
9
|
+
import { ReportCategory } from './report-category.bo';
|
|
10
|
+
export declare class CoReport extends BusinessObject {
|
|
11
|
+
reportId: number;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
templateName: string;
|
|
15
|
+
templateSourceBody: Int32Array;
|
|
16
|
+
templateCompiledBody: Int32Array;
|
|
17
|
+
fileTypeDefault: number;
|
|
18
|
+
fileTypesAvailable: number;
|
|
19
|
+
reportKind: string;
|
|
20
|
+
documentId: number;
|
|
21
|
+
sendMethod: SendMethod;
|
|
22
|
+
standard: boolean;
|
|
23
|
+
emailSubject: string;
|
|
24
|
+
documentKind: string;
|
|
25
|
+
compiledVersion: string;
|
|
26
|
+
parentReportId: number;
|
|
27
|
+
bodyTemplate: string;
|
|
28
|
+
bodyTemplateId: number;
|
|
29
|
+
isDefault: boolean;
|
|
30
|
+
templateModified: Date;
|
|
31
|
+
bodyLoaded: boolean;
|
|
32
|
+
articleGroup: string;
|
|
33
|
+
turnoverGroup: string;
|
|
34
|
+
concept: number;
|
|
35
|
+
branch: string;
|
|
36
|
+
copiesAmount: number;
|
|
37
|
+
iOneParam: string;
|
|
38
|
+
reportParameters: ReportParam[];
|
|
39
|
+
images: CoDocument[];
|
|
40
|
+
subReports: CoSubReport[];
|
|
41
|
+
documentLinksToBodyTemplate: CoReportSjablonenDocumenten[];
|
|
42
|
+
branchAvailability: Branch[];
|
|
43
|
+
categoryLinks: CoReportCategoryLink[];
|
|
44
|
+
categories: ReportCategory[];
|
|
45
|
+
userGroups: number[];
|
|
46
|
+
reportSource: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CoReport = void 0;
|
|
13
|
+
const date_field_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/date-field.decorator");
|
|
14
|
+
const report_param_1 = require("./report-param");
|
|
15
|
+
const complex_array_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/complex-array.decorator");
|
|
16
|
+
const co_document_1 = require("./co-document");
|
|
17
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
18
|
+
const co_sub_report_bo_1 = require("../enum/co-sub-report.bo");
|
|
19
|
+
const co_report_sjablonen_documenten_bo_1 = require("./co-report-sjablonen-documenten.bo");
|
|
20
|
+
const branch_bo_1 = require("./branch.bo");
|
|
21
|
+
const co_report_category_link_bo_1 = require("./co-report-category-link.bo");
|
|
22
|
+
const report_category_bo_1 = require("./report-category.bo");
|
|
23
|
+
class CoReport extends business_object_1.BusinessObject {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.reportParameters = [];
|
|
27
|
+
this.images = [];
|
|
28
|
+
this.subReports = [];
|
|
29
|
+
this.documentLinksToBodyTemplate = [];
|
|
30
|
+
this.branchAvailability = [];
|
|
31
|
+
this.categoryLinks = [];
|
|
32
|
+
this.categories = [];
|
|
33
|
+
this.userGroups = [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
date_field_decorator_1.DateField(),
|
|
38
|
+
__metadata("design:type", Date)
|
|
39
|
+
], CoReport.prototype, "templateModified", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
complex_array_decorator_1.ComplexArray(report_param_1.ReportParam),
|
|
42
|
+
__metadata("design:type", Array)
|
|
43
|
+
], CoReport.prototype, "reportParameters", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
complex_array_decorator_1.ComplexArray(co_document_1.CoDocument),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], CoReport.prototype, "images", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
complex_array_decorator_1.ComplexArray(co_sub_report_bo_1.CoSubReport),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], CoReport.prototype, "subReports", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
complex_array_decorator_1.ComplexArray(co_report_sjablonen_documenten_bo_1.CoReportSjablonenDocumenten),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], CoReport.prototype, "documentLinksToBodyTemplate", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
complex_array_decorator_1.ComplexArray(branch_bo_1.Branch),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], CoReport.prototype, "branchAvailability", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
complex_array_decorator_1.ComplexArray(co_report_category_link_bo_1.CoReportCategoryLink),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], CoReport.prototype, "categoryLinks", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
complex_array_decorator_1.ComplexArray(report_category_bo_1.ReportCategory),
|
|
66
|
+
__metadata("design:type", Array)
|
|
67
|
+
], CoReport.prototype, "categories", void 0);
|
|
68
|
+
exports.CoReport = CoReport;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
|
|
2
|
+
import { DocumentAllowedType } from '../enum/document-allowed-type.enum';
|
|
3
|
+
export declare class DocumentAllowedExtension extends BusinessObject {
|
|
4
|
+
extension: string;
|
|
5
|
+
type: DocumentAllowedType;
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentAllowedExtension = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class DocumentAllowedExtension extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.DocumentAllowedExtension = DocumentAllowedExtension;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Language = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class Language extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.Language = Language;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReportCategory = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class ReportCategory extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.ReportCategory = ReportCategory;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReportParamType } from '../enum/report-param-type.enum';
|
|
2
|
+
export declare class ReportParam {
|
|
3
|
+
reportParamId: number;
|
|
4
|
+
reportId: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
paramType: ReportParamType;
|
|
8
|
+
defaultValue: string;
|
|
9
|
+
field: string;
|
|
10
|
+
listRef: string;
|
|
11
|
+
dataRef: string;
|
|
12
|
+
idField: string;
|
|
13
|
+
idDisplayField: string;
|
|
14
|
+
descriptionField: string;
|
|
15
|
+
mandatory: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Title = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class Title extends business_object_1.BusinessObject {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
getId() {
|
|
10
|
+
return this.titleId;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.Title = Title;
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
import { FileTypeInternal } from '../enum/file-type-internal.enum';
|
|
2
|
+
import { CoDocument } from '../model/co-document';
|
|
3
|
+
import { DocumentAllowedExtension } from '../model/document-allowed-extension.bo';
|
|
2
4
|
export declare class FileUtils {
|
|
5
|
+
static get DefaultMaxUploadSizeInMb(): number;
|
|
6
|
+
static getMaxUploadSizeInMb(sizeInBytes: number): number;
|
|
3
7
|
static DocumentBodyToDataUri(documentBody: string, mimeType: string): string;
|
|
4
8
|
static FileNameToFileTypeInternal(fileName: string): FileTypeInternal;
|
|
9
|
+
static IsImageFile(file: File | CoDocument): boolean;
|
|
10
|
+
static GetGlobalFileType(document: CoDocument): FileTypeInternal;
|
|
11
|
+
static CheckMaxUploadSize(file: CoDocument | File, maxSizeInBytesFromParameter?: number): boolean;
|
|
12
|
+
static CheckExtension(file: CoDocument | File, allowedExtensions: DocumentAllowedExtension[]): boolean;
|
|
13
|
+
static ConvertFileToDataUri(file: File): Promise<string>;
|
|
14
|
+
static StripMimeStringFromDataUri(dataUri: string): string;
|
|
15
|
+
static GetMimeStringFromDataUri(dataUri: string): string;
|
|
16
|
+
static ConvertStringToArrayBuffer(stringData: string): Uint8Array;
|
|
17
|
+
static ConvertByteArrayToString(byteArray: number[]): string;
|
|
18
|
+
static StringIsImageDataUriOrURL(str: string): boolean;
|
|
19
|
+
static FixAssetUrl(assetUrl: string): string;
|
|
20
|
+
static MimeTypeFromFilename(fileName: string): string;
|
|
21
|
+
static DownloadFile(fileName: string, content: string, mimeType?: string): void;
|
|
22
|
+
static ReadAsText(file: File): Promise<string>;
|
|
23
|
+
static readAsDataURL(file: File): Promise<string>;
|
|
24
|
+
static ReadFileAsNewCoDocument(file: File, resize?: boolean, maxSizeInPixels?: number): Promise<CoDocument>;
|
|
25
|
+
static ResizeImage(src: string, fileType: string, maxSizeInPixels: number): Promise<string>;
|
|
26
|
+
static ReadFileAsDataURL(file: File): Promise<string>;
|
|
27
|
+
static DataURLtoFile(dataURL: string, filename: string): File;
|
|
28
|
+
static GetExtensionFromDataUri(dataUri: string): string;
|
|
29
|
+
static CreateDownloadFileNameFromBase64(dataUri: string): string;
|
|
30
|
+
static DownloadFromDataUri(dataUri: string, fileName: string): void;
|
|
31
|
+
static ValidUrl(stringToCheck: string): boolean;
|
|
32
|
+
static ReplaceExtension(fileName: string, newExtension: string): string;
|
|
33
|
+
static GenerateQRCode(url: string): string;
|
|
5
34
|
}
|