@colijnit/mainapi 1.0.1
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/absence-type.enum.d.ts +10 -0
- package/build/enum/absence-type.enum.js +13 -0
- package/build/enum/article-publication.enum.d.ts +5 -0
- package/build/enum/article-publication.enum.js +8 -0
- package/build/enum/backend-service-name.enum.d.ts +9 -0
- package/build/enum/backend-service-name.enum.js +12 -0
- package/build/enum/co-document-image-display-kind.enum.d.ts +5 -0
- package/build/enum/co-document-image-display-kind.enum.js +8 -0
- package/build/enum/co-document-type.enum.d.ts +5 -0
- package/build/enum/co-document-type.enum.js +8 -0
- package/build/enum/data-mapping.enum.d.ts +5 -0
- package/build/enum/data-mapping.enum.js +8 -0
- package/build/enum/data-service-method.enum.d.ts +14 -0
- package/build/enum/data-service-method.enum.js +17 -0
- package/build/enum/db-boolean-value-type.enum.d.ts +12 -0
- package/build/enum/db-boolean-value-type.enum.js +31 -0
- package/build/enum/delivery-time-unit-type.enum.d.ts +4 -0
- package/build/enum/delivery-time-unit-type.enum.js +7 -0
- package/build/enum/file-type-internal.enum.d.ts +11 -0
- package/build/enum/file-type-internal.enum.js +14 -0
- package/build/enum/file-type.enum.d.ts +5 -0
- package/build/enum/file-type.enum.js +8 -0
- package/build/enum/general-method.enum.d.ts +5 -0
- package/build/enum/general-method.enum.js +8 -0
- package/build/enum/insured-interest-type.enum.d.ts +10 -0
- package/build/enum/insured-interest-type.enum.js +13 -0
- package/build/enum/message-type.enum.d.ts +6 -0
- package/build/enum/message-type.enum.js +9 -0
- package/build/enum/module-name.enum.d.ts +3 -0
- package/build/enum/module-name.enum.js +6 -0
- package/build/enum/note-display-type.enum.d.ts +5 -0
- package/build/enum/note-display-type.enum.js +8 -0
- package/build/enum/one-zero-bool-db-type.enum.d.ts +5 -0
- package/build/enum/one-zero-bool-db-type.enum.js +19 -0
- package/build/enum/own-risk.enum.d.ts +7 -0
- package/build/enum/own-risk.enum.js +10 -0
- package/build/enum/price-type.enum.d.ts +4 -0
- package/build/enum/price-type.enum.js +7 -0
- package/build/enum/priority-type.enum.d.ts +7 -0
- package/build/enum/priority-type.enum.js +10 -0
- package/build/enum/product-kind.enum.d.ts +6 -0
- package/build/enum/product-kind.enum.js +9 -0
- package/build/enum/public-service-method.d.ts +17 -0
- package/build/enum/public-service-method.js +20 -0
- package/build/enum/sequence-name.enum.d.ts +4 -0
- package/build/enum/sequence-name.enum.js +7 -0
- package/build/enum/table-name.enum.d.ts +82 -0
- package/build/enum/table-name.enum.js +85 -0
- package/build/enum/text-standard-type-text.d.ts +7 -0
- package/build/enum/text-standard-type-text.js +10 -0
- package/build/enum/text-standard-type.d.ts +7 -0
- package/build/enum/text-standard-type.js +10 -0
- package/build/enum/true-false-db-type.enum.d.ts +5 -0
- package/build/enum/true-false-db-type.enum.js +19 -0
- package/build/enum/vat-type.enum.d.ts +4 -0
- package/build/enum/vat-type.enum.js +7 -0
- package/build/enum/yes-no-db-type.enum.d.ts +5 -0
- package/build/enum/yes-no-db-type.enum.js +19 -0
- package/build/main-api-connection.d.ts +14 -0
- package/build/main-api-connection.js +13 -0
- package/build/main-api.d.ts +26 -0
- package/build/main-api.js +59 -0
- package/build/main-api.unit.test.d.ts +1 -0
- package/build/main-api.unit.test.js +37 -0
- package/build/main-auth.d.ts +9 -0
- package/build/main-auth.js +64 -0
- package/build/main-public.d.ts +9 -0
- package/build/main-public.js +40 -0
- package/build/model/article-seo-value.d.ts +5 -0
- package/build/model/article-seo-value.js +5 -0
- package/build/model/brand.d.ts +8 -0
- package/build/model/brand.js +9 -0
- package/build/model/co-document-right.d.ts +7 -0
- package/build/model/co-document-right.js +6 -0
- package/build/model/co-document.d.ts +62 -0
- package/build/model/co-document.js +175 -0
- package/build/model/co-domain-value.bo.d.ts +10 -0
- package/build/model/co-domain-value.bo.js +19 -0
- package/build/model/co-notition-right.bo.d.ts +10 -0
- package/build/model/co-notition-right.bo.js +12 -0
- package/build/model/co-notition.bo.d.ts +24 -0
- package/build/model/co-notition.bo.js +78 -0
- package/build/model/co-text.d.ts +26 -0
- package/build/model/co-text.js +27 -0
- package/build/model/constant/java-constants.d.ts +2 -0
- package/build/model/constant/java-constants.js +4 -0
- package/build/model/contact-moment.bo.d.ts +17 -0
- package/build/model/contact-moment.bo.js +38 -0
- package/build/model/department.bo.d.ts +12 -0
- package/build/model/department.bo.js +68 -0
- package/build/model/insured-interest.bo.d.ts +13 -0
- package/build/model/insured-interest.bo.js +38 -0
- package/build/model/own-risk.bo.d.ts +11 -0
- package/build/model/own-risk.bo.js +38 -0
- package/build/model/privacy-setting.bo.d.ts +9 -0
- package/build/model/privacy-setting.bo.js +12 -0
- package/build/model/tag-stock-item.bo.d.ts +24 -0
- package/build/model/tag-stock-item.bo.js +20 -0
- package/build/model/tag-tree-item.bo.d.ts +18 -0
- package/build/model/tag-tree-item.bo.js +45 -0
- package/build/model/tag.d.ts +11 -0
- package/build/model/tag.js +40 -0
- package/build/model/tree-object.d.ts +8 -0
- package/build/model/tree-object.js +28 -0
- package/build/utils/file-utils.d.ts +5 -0
- package/build/utils/file-utils.js +48 -0
- package/package.json +56 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var TableName;
|
|
4
|
+
(function (TableName) {
|
|
5
|
+
TableName["Absence"] = "ABSENCE";
|
|
6
|
+
TableName["AbsenceEvent"] = "ABSENCE_EVENT";
|
|
7
|
+
TableName["AbsenceFile"] = "ABSENCE_FILE";
|
|
8
|
+
TableName["AbsenceForm"] = "ABSENCE_FORM";
|
|
9
|
+
TableName["AccountingPeriod"] = "PERIODES";
|
|
10
|
+
TableName["Address"] = "ADRESSEN";
|
|
11
|
+
TableName["Administration"] = "ADMINISTRATIES";
|
|
12
|
+
TableName["AnamnesisForm"] = "ANAMNESIS_FORM";
|
|
13
|
+
TableName["ArticleGroup"] = "ARTIKEL_GROEP";
|
|
14
|
+
TableName["Articles"] = "ARTIKELEN";
|
|
15
|
+
TableName["Branch"] = "FILIALEN";
|
|
16
|
+
TableName["BusinessRule"] = "BRE_RULE";
|
|
17
|
+
TableName["Category"] = "CATEGORIE";
|
|
18
|
+
TableName["Characteristic"] = "KENMERKEN";
|
|
19
|
+
TableName["CharacteristicTypes"] = "KENMERK_SOORTEN";
|
|
20
|
+
TableName["CharacteristicLines"] = "KENMERK_REGELS";
|
|
21
|
+
TableName["Company"] = "BEDRIJVEN";
|
|
22
|
+
TableName["Concept"] = "CONCEPTEN";
|
|
23
|
+
TableName["Connections"] = "ASS_VERBINDING";
|
|
24
|
+
TableName["ContactPerson"] = "CONTACTPERSONEN";
|
|
25
|
+
TableName["CostCenter"] = "KOSTENPLAATS_DRAGER";
|
|
26
|
+
TableName["Country"] = "LANDCODE";
|
|
27
|
+
TableName["CurrencyInfo"] = "VALUTA";
|
|
28
|
+
TableName["CurrentIndication"] = "CURRENT_INDICATION";
|
|
29
|
+
TableName["Customer"] = "KLANTEN";
|
|
30
|
+
TableName["DeclarationMedicalOfficer"] = "DECLARATION_MEDICAL_OFFICER";
|
|
31
|
+
TableName["DeliveryMethod"] = "LEVERMETHODES";
|
|
32
|
+
TableName["Department"] = "AFDELING";
|
|
33
|
+
TableName["DiagnosisForm"] = "DIAGNOSIS_FORM";
|
|
34
|
+
TableName["Documents"] = "DOCUMENTATIE";
|
|
35
|
+
TableName["EmployabilityProfile"] = "EMPLOYABILITY_PROFILE";
|
|
36
|
+
TableName["EmployeeContract"] = "EMPLOYEE_CONTRACT";
|
|
37
|
+
TableName["EmployeeContractType"] = "EMPLOYEE_CONTRACT_TYPE";
|
|
38
|
+
TableName["Employee"] = "PERSONEEL";
|
|
39
|
+
TableName["EndEvaluation"] = "END_EVALUATION";
|
|
40
|
+
TableName["ExternalSource"] = "EXTERNE_BRONNEN";
|
|
41
|
+
TableName["FirstYearEvaluation"] = "FIRST_YEAR_EVALUATION";
|
|
42
|
+
TableName["FmlDocument"] = "FML_DOCUMENT";
|
|
43
|
+
TableName["Goods"] = "GOEDEREN";
|
|
44
|
+
TableName["Hardware"] = "ASS_HARDWARE";
|
|
45
|
+
TableName["Identification"] = "IDENTIFICATION";
|
|
46
|
+
TableName["JobCategory"] = "JOB_CATEGORY";
|
|
47
|
+
TableName["JobType"] = "JOB_TYPE";
|
|
48
|
+
TableName["LedgerAccount"] = "GROOTBOEKEN";
|
|
49
|
+
TableName["LedgerClassification"] = "VERDICHTINGEN";
|
|
50
|
+
TableName["LedgerJournal"] = "DAGBOEKEN";
|
|
51
|
+
TableName["LedgerMainClassification"] = "HOOFDVERDICHTINGEN";
|
|
52
|
+
TableName["LedgerMutation"] = "GROOTBOEK_MUTATIES";
|
|
53
|
+
TableName["Location"] = "LOCATIES";
|
|
54
|
+
TableName["MainArticle"] = "HOOFDARTIKELEN";
|
|
55
|
+
TableName["MedicalConsultFeedback"] = "MEDICAL_CONSULT_FEEDBACK";
|
|
56
|
+
TableName["MedicalFile"] = "MEDICAL_FILE";
|
|
57
|
+
TableName["MedicalForm"] = "MEDICAL_FORM";
|
|
58
|
+
TableName["MedicalInformationForm"] = "MEDICAL_INFORMATION_FORM";
|
|
59
|
+
TableName["Note"] = "NOTITIE";
|
|
60
|
+
TableName["NotificationFullyRecovered"] = "NOTIFICATION_FULLY_RECOVERED";
|
|
61
|
+
TableName["NotificationLongTermIllness"] = "NOTIFICATION_LONG_TERM_ILLNESS";
|
|
62
|
+
TableName["PaymentCondition"] = "BETALINGSCONDITIES";
|
|
63
|
+
TableName["PaymentMethod"] = "BETAALWIJZE";
|
|
64
|
+
TableName["PlanOfApproach"] = "PLAN_OF_APPROACH";
|
|
65
|
+
TableName["PriceList"] = "PRIJSLIJSTEN";
|
|
66
|
+
TableName["ProblemAnalysis"] = "PROBLEM_ANALYSIS";
|
|
67
|
+
TableName["ProblemAnalysisAdjustment"] = "PROBLEM_ANALYSIS_ADJUSTMENT";
|
|
68
|
+
TableName["Relations"] = "RELATIES";
|
|
69
|
+
TableName["RelationAddress"] = "ADRES_RELATIES";
|
|
70
|
+
TableName["RelationCommunication"] = "COMM_RELATIES";
|
|
71
|
+
TableName["Remarks"] = "OPMERKINGEN";
|
|
72
|
+
TableName["Salary"] = "SALARY";
|
|
73
|
+
TableName["ServiceProvision"] = "ASS_DIENSTVERLENING";
|
|
74
|
+
TableName["ShortReintegrationReport"] = "SHORT_REINTEGRATION_REPORT";
|
|
75
|
+
TableName["Software"] = "ASS_SOFTWARE";
|
|
76
|
+
TableName["Supplier"] = "LEVERANCIERS";
|
|
77
|
+
TableName["TagValues"] = "TAG_VALUES";
|
|
78
|
+
TableName["Tasks"] = "TAKEN";
|
|
79
|
+
TableName["Transactions"] = "TRANSACTIES";
|
|
80
|
+
TableName["TurnoverGroup"] = "OMZETGROEPEN";
|
|
81
|
+
TableName["Unit"] = "EENHEDEN";
|
|
82
|
+
TableName["User"] = "GEBRUIKERS";
|
|
83
|
+
TableName["Vat"] = "BTW";
|
|
84
|
+
TableName["Warehouse"] = "MAGAZIJNEN";
|
|
85
|
+
})(TableName = exports.TableName || (exports.TableName = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var TextStandardTypeText;
|
|
4
|
+
(function (TextStandardTypeText) {
|
|
5
|
+
TextStandardTypeText["IntroductorySentence"] = "A";
|
|
6
|
+
TextStandardTypeText["Normal"] = "N";
|
|
7
|
+
TextStandardTypeText["Everywhere"] = "O";
|
|
8
|
+
TextStandardTypeText["IntroductoryAndConcludingSentence"] = "B";
|
|
9
|
+
TextStandardTypeText["ConcludingSentence"] = "S";
|
|
10
|
+
})(TextStandardTypeText = exports.TextStandardTypeText || (exports.TextStandardTypeText = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var TextStandardType;
|
|
4
|
+
(function (TextStandardType) {
|
|
5
|
+
TextStandardType["Transaction"] = "T";
|
|
6
|
+
TextStandardType["Article"] = "A";
|
|
7
|
+
TextStandardType["SuperArticle"] = "H";
|
|
8
|
+
TextStandardType["TurnoverGroup"] = "Z";
|
|
9
|
+
TextStandardType["Miscellaneous"] = "O";
|
|
10
|
+
})(TextStandardType = exports.TextStandardType || (exports.TextStandardType = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var TrueFalseDbType;
|
|
4
|
+
(function (TrueFalseDbType) {
|
|
5
|
+
TrueFalseDbType["True"] = "T";
|
|
6
|
+
TrueFalseDbType["False"] = "F";
|
|
7
|
+
})(TrueFalseDbType = exports.TrueFalseDbType || (exports.TrueFalseDbType = {}));
|
|
8
|
+
function GetTrueFalseDbBooleanValue(clientBool) {
|
|
9
|
+
if (clientBool === true) {
|
|
10
|
+
return TrueFalseDbType.True;
|
|
11
|
+
}
|
|
12
|
+
else if (clientBool === false) {
|
|
13
|
+
return TrueFalseDbType.False;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GetTrueFalseDbBooleanValue = GetTrueFalseDbBooleanValue;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var YesNoDbType;
|
|
4
|
+
(function (YesNoDbType) {
|
|
5
|
+
YesNoDbType["Yes"] = "J";
|
|
6
|
+
YesNoDbType["No"] = "N";
|
|
7
|
+
})(YesNoDbType = exports.YesNoDbType || (exports.YesNoDbType = {}));
|
|
8
|
+
function GetYesNoDbBooleanValue(clientBool) {
|
|
9
|
+
if (clientBool === true) {
|
|
10
|
+
return YesNoDbType.Yes;
|
|
11
|
+
}
|
|
12
|
+
else if (clientBool === false) {
|
|
13
|
+
return YesNoDbType.No;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GetYesNoDbBooleanValue = GetYesNoDbBooleanValue;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { Connector } from '@colijnit/ioneconnector';
|
|
3
|
+
import { SequenceName } from './enum/sequence-name.enum';
|
|
4
|
+
import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
|
|
5
|
+
export declare abstract class MainApiConnection {
|
|
6
|
+
readonly showLoader: Subject<boolean>;
|
|
7
|
+
readonly connectionAborted: Subject<void>;
|
|
8
|
+
readonly connectionResetInactivity: Subject<void>;
|
|
9
|
+
connector: Connector;
|
|
10
|
+
languageCode: string;
|
|
11
|
+
branchNr: string;
|
|
12
|
+
abstract getSequenceValue(sequenceName: SequenceName, noSequence: boolean): Promise<DataServiceResponseData>;
|
|
13
|
+
protected endPoint: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rxjs_1 = require("rxjs");
|
|
4
|
+
const end_point_enum_1 = require("@colijnit/ioneconnector/build/enum/end-point.enum");
|
|
5
|
+
class MainApiConnection {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.showLoader = new rxjs_1.Subject();
|
|
8
|
+
this.connectionAborted = new rxjs_1.Subject();
|
|
9
|
+
this.connectionResetInactivity = new rxjs_1.Subject();
|
|
10
|
+
this.endPoint = end_point_enum_1.EndPoint.AjaxService;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MainApiConnection = MainApiConnection;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { Session } from '@colijnit/ioneconnector/build/model/session';
|
|
3
|
+
import { Options } from '@colijnit/ioneconnector/build/model/options';
|
|
4
|
+
import { MainApiConnection } from './main-api-connection';
|
|
5
|
+
import { SequenceName } from './enum/sequence-name.enum';
|
|
6
|
+
import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
|
|
7
|
+
export declare class MainApi {
|
|
8
|
+
readonly showLoader: Subject<boolean>;
|
|
9
|
+
readonly connectionAborted: Subject<void>;
|
|
10
|
+
readonly connectionResetInactivity: Subject<void>;
|
|
11
|
+
url: string;
|
|
12
|
+
version: string;
|
|
13
|
+
schema: string;
|
|
14
|
+
branch: string;
|
|
15
|
+
currencyId: number;
|
|
16
|
+
session: Session;
|
|
17
|
+
useLoginEncryption: boolean;
|
|
18
|
+
languageCode: string;
|
|
19
|
+
mainApi: MainApiConnection;
|
|
20
|
+
private readonly _subs;
|
|
21
|
+
private _connector;
|
|
22
|
+
constructor(options?: Options);
|
|
23
|
+
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
24
|
+
static createConnector(options: Options): MainApiConnection;
|
|
25
|
+
private _handleConnectionReset;
|
|
26
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const rxjs_1 = require("rxjs");
|
|
13
|
+
const ioneconnector_1 = require("@colijnit/ioneconnector");
|
|
14
|
+
const main_auth_1 = require("./main-auth");
|
|
15
|
+
const main_public_1 = require("./main-public");
|
|
16
|
+
class MainApi {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.showLoader = new rxjs_1.Subject();
|
|
19
|
+
this.connectionAborted = new rxjs_1.Subject();
|
|
20
|
+
this.connectionResetInactivity = new rxjs_1.Subject();
|
|
21
|
+
this.session = undefined;
|
|
22
|
+
this.useLoginEncryption = false;
|
|
23
|
+
this._subs = [];
|
|
24
|
+
if (options) {
|
|
25
|
+
this.url = options.url ? options.url : "";
|
|
26
|
+
this.version = options.version ? options.version : "";
|
|
27
|
+
this.schema = options.schema ? options.schema : "";
|
|
28
|
+
this.branch = options.branch ? options.branch : "";
|
|
29
|
+
this.languageCode = options.languageCode;
|
|
30
|
+
this.currencyId = options.hasOwnProperty("currencyId") ? options.currencyId : undefined;
|
|
31
|
+
this.session = options.hasOwnProperty("session") ? options.session : undefined;
|
|
32
|
+
this.useLoginEncryption = options.hasOwnProperty("useLoginEncryption") ? options.useLoginEncryption === true : false;
|
|
33
|
+
}
|
|
34
|
+
this._connector = new ioneconnector_1.Connector(options);
|
|
35
|
+
this.mainApi = MainApi.createConnector(options);
|
|
36
|
+
this.mainApi.connector = this._connector;
|
|
37
|
+
this.mainApi.languageCode = this.languageCode;
|
|
38
|
+
this.mainApi.branchNr = this.branch;
|
|
39
|
+
if (!this.session && this._connector.hasOwnProperty("session")) {
|
|
40
|
+
this.session = this._connector["session"];
|
|
41
|
+
}
|
|
42
|
+
this._subs.push(this.mainApi.showLoader.subscribe(value => this.showLoader.next(value)), this.mainApi.connectionAborted.subscribe(() => this.connectionAborted.next()), this.mainApi.connectionResetInactivity.subscribe(() => this._handleConnectionReset()));
|
|
43
|
+
}
|
|
44
|
+
getSequenceValue(sequenceName, noSequence = false) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return this.mainApi.getSequenceValue(sequenceName, noSequence);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
static createConnector(options) {
|
|
50
|
+
if ((options.username && options.password) || options.session) {
|
|
51
|
+
return new main_auth_1.MainAuth();
|
|
52
|
+
}
|
|
53
|
+
return new main_public_1.MainPublic();
|
|
54
|
+
}
|
|
55
|
+
_handleConnectionReset() {
|
|
56
|
+
this.connectionResetInactivity.next();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.MainApi = MainApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const main_api_1 = require("./main-api");
|
|
13
|
+
const sequence_name_enum_1 = require("./enum/sequence-name.enum");
|
|
14
|
+
const options = {
|
|
15
|
+
url: 'http',
|
|
16
|
+
ajaxUrl: 'http'
|
|
17
|
+
};
|
|
18
|
+
const localOptions = {
|
|
19
|
+
url: "http://localhost:8080/ione",
|
|
20
|
+
ajaxUrl: "http://localhost:8080/ione",
|
|
21
|
+
schema: "815",
|
|
22
|
+
version: "252",
|
|
23
|
+
useLoginEncryption: true,
|
|
24
|
+
username: "patrick",
|
|
25
|
+
password: "patrick"
|
|
26
|
+
};
|
|
27
|
+
describe("Connector", () => {
|
|
28
|
+
let connector;
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
connector = new main_api_1.MainApi(localOptions);
|
|
31
|
+
jest.setTimeout(1300000);
|
|
32
|
+
});
|
|
33
|
+
it('getSequenceValue', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const result = yield connector.getSequenceValue(sequence_name_enum_1.SequenceName.RelationId);
|
|
35
|
+
expect(result).toBeDefined();
|
|
36
|
+
}));
|
|
37
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MainApiConnection } from './main-api-connection';
|
|
2
|
+
import { SequenceName } from './enum/sequence-name.enum';
|
|
3
|
+
import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
|
|
4
|
+
export declare class MainAuth extends MainApiConnection {
|
|
5
|
+
private _boSerializer;
|
|
6
|
+
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
7
|
+
private selectMultiple;
|
|
8
|
+
private _call;
|
|
9
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const main_api_connection_1 = require("./main-api-connection");
|
|
13
|
+
const module_name_enum_1 = require("./enum/module-name.enum");
|
|
14
|
+
const general_method_enum_1 = require("./enum/general-method.enum");
|
|
15
|
+
const data_service_method_enum_1 = require("./enum/data-service-method.enum");
|
|
16
|
+
const backend_service_name_enum_1 = require("./enum/backend-service-name.enum");
|
|
17
|
+
const business_object_serializer_1 = require("@colijnit/ioneconnector/build/factory/business-object-serializer");
|
|
18
|
+
class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this._boSerializer = new business_object_serializer_1.BusinessObjectSerializer();
|
|
22
|
+
}
|
|
23
|
+
getSequenceValue(sequenceName, noSequence = false) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const params = {
|
|
26
|
+
seqName: sequenceName,
|
|
27
|
+
noSequence: noSequence
|
|
28
|
+
};
|
|
29
|
+
const data = {
|
|
30
|
+
moduleName: module_name_enum_1.ModuleName.General,
|
|
31
|
+
methodName: general_method_enum_1.GeneralMethod.GetSequenceValue,
|
|
32
|
+
parameterValues: params,
|
|
33
|
+
refCursorAsArray: true
|
|
34
|
+
};
|
|
35
|
+
const response = yield this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data);
|
|
36
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
37
|
+
return response.resultObject;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
selectMultiple(moduleName, objectName, operationName, parameterValues) {
|
|
45
|
+
let stronglyTypedResults = [];
|
|
46
|
+
const data = {
|
|
47
|
+
moduleName: moduleName,
|
|
48
|
+
objectName: objectName
|
|
49
|
+
};
|
|
50
|
+
if (operationName) {
|
|
51
|
+
data.operationName = operationName;
|
|
52
|
+
}
|
|
53
|
+
if (parameterValues) {
|
|
54
|
+
data.parameterValues = parameterValues;
|
|
55
|
+
}
|
|
56
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.SelectMultipleObjects, data);
|
|
57
|
+
}
|
|
58
|
+
_call(method, data, service = backend_service_name_enum_1.BackendServiceName.DataService, showLoader = false) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
return this.connector.call(method, data, showLoader, service, this.endPoint);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.MainAuth = MainAuth;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MainApiConnection } from './main-api-connection';
|
|
2
|
+
import { SequenceName } from './enum/sequence-name.enum';
|
|
3
|
+
import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
|
|
4
|
+
export declare class MainPublic extends MainApiConnection {
|
|
5
|
+
protected endPoint: string;
|
|
6
|
+
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
7
|
+
private createServiceRequestData;
|
|
8
|
+
private _call;
|
|
9
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const main_api_connection_1 = require("./main-api-connection");
|
|
13
|
+
const end_point_enum_1 = require("@colijnit/ioneconnector/build/enum/end-point.enum");
|
|
14
|
+
const public_service_method_1 = require("./enum/public-service-method");
|
|
15
|
+
class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.endPoint = end_point_enum_1.EndPoint.PublicService;
|
|
19
|
+
}
|
|
20
|
+
getSequenceValue(sequenceName, noSequence = false) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const params = {
|
|
23
|
+
seqName: sequenceName,
|
|
24
|
+
noSequence: noSequence
|
|
25
|
+
};
|
|
26
|
+
const data = Object.assign(Object.assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
27
|
+
return this._call(public_service_method_1.PublicServiceMethod.GetSequenceValue, data);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
createServiceRequestData() {
|
|
31
|
+
const data = { languageCode: this.languageCode };
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
_call(method, data, showLoader = false) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return this.connector.call(method, data, showLoader, undefined, this.endPoint);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.MainPublic = MainPublic;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
4
|
+
class Brand extends business_object_1.BusinessObject {
|
|
5
|
+
getId() {
|
|
6
|
+
return (this.brandId + "");
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.Brand = Brand;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
|
|
2
|
+
import { ObjectRightType } from '@colijnit/ioneconnector/build/enum/object-right-type.enum';
|
|
3
|
+
export declare class CoDocumentRight extends BusinessObject {
|
|
4
|
+
userGroupId: number;
|
|
5
|
+
documentId: number;
|
|
6
|
+
rightLevel: ObjectRightType;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
4
|
+
class CoDocumentRight extends business_object_1.BusinessObject {
|
|
5
|
+
}
|
|
6
|
+
exports.CoDocumentRight = CoDocumentRight;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { CoDocumentType } from '../enum/co-document-type.enum';
|
|
4
|
+
import { FileType } from '../enum/file-type.enum';
|
|
5
|
+
import { CoDocumentRight } from './co-document-right';
|
|
6
|
+
import { Tag } from './tag';
|
|
7
|
+
import { ArticleSeoValue } from './article-seo-value';
|
|
8
|
+
import { FileTypeInternal } from '../enum/file-type-internal.enum';
|
|
9
|
+
import { ObjectRightType } from '@colijnit/ioneconnector/build/enum/object-right-type.enum';
|
|
10
|
+
export declare class CoDocument extends BusinessObject {
|
|
11
|
+
set documentId(value: number);
|
|
12
|
+
get documentId(): number;
|
|
13
|
+
creationDate: Date;
|
|
14
|
+
modifiedDate: Date;
|
|
15
|
+
creationUser: string;
|
|
16
|
+
modifiedUser: string;
|
|
17
|
+
description: string;
|
|
18
|
+
thumbnailBody: string;
|
|
19
|
+
table: string;
|
|
20
|
+
key: string;
|
|
21
|
+
filePath: string;
|
|
22
|
+
documentType: CoDocumentType;
|
|
23
|
+
mimeType: string;
|
|
24
|
+
publication: number;
|
|
25
|
+
fileSize: string;
|
|
26
|
+
fileType: FileType;
|
|
27
|
+
isLoaded: boolean;
|
|
28
|
+
index: number;
|
|
29
|
+
imageDimensions: string;
|
|
30
|
+
title: string;
|
|
31
|
+
downloadable: boolean;
|
|
32
|
+
attachToNotification: boolean;
|
|
33
|
+
pathIsUrl: boolean;
|
|
34
|
+
imageType: string;
|
|
35
|
+
imageDisplayKind: string;
|
|
36
|
+
tags: Tag[];
|
|
37
|
+
rightLevel: ObjectRightType;
|
|
38
|
+
rights: CoDocumentRight[];
|
|
39
|
+
set documentBody(documentBody: string);
|
|
40
|
+
get documentBody(): string;
|
|
41
|
+
seoTitles: ArticleSeoValue[];
|
|
42
|
+
fileName: string;
|
|
43
|
+
retailFormulas: string[];
|
|
44
|
+
idForLink: number;
|
|
45
|
+
get fileTypeInternal(): FileTypeInternal;
|
|
46
|
+
get mimeTypeInternal(): string;
|
|
47
|
+
set mimeTypeInternal(value: string);
|
|
48
|
+
get bodyAsDataUri(): string;
|
|
49
|
+
get documentBodyAsDataUri(): string;
|
|
50
|
+
get thumbnailBodyAsDataUri(): string;
|
|
51
|
+
private _documentBody;
|
|
52
|
+
private _documentId;
|
|
53
|
+
readonly documentBodyChange: Subject<string>;
|
|
54
|
+
private _fileTypeInternal;
|
|
55
|
+
private _mimeTypeInternal;
|
|
56
|
+
private _idObject;
|
|
57
|
+
get readonly(): boolean;
|
|
58
|
+
constructor(rawData?: any);
|
|
59
|
+
getId(): any;
|
|
60
|
+
isImageDocument(): boolean;
|
|
61
|
+
private _initMimetypeInternal;
|
|
62
|
+
}
|