@colijnit/mainapi 259.1.7 → 259.1.9
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/internal-param.enum.d.ts +5 -1
- package/build/enum/internal-param.enum.js +4 -0
- package/build/main-api-connection.d.ts +3 -0
- package/build/main-api.d.ts +3 -0
- package/build/main-api.js +9 -0
- package/build/main-api.unit.test.js +6 -0
- package/build/main-auth.d.ts +3 -0
- package/build/main-auth.js +33 -2
- package/build/main-public.d.ts +3 -0
- package/build/main-public.js +14 -2
- package/build/model/co-document.bo.d.ts +1 -1
- package/build/model/co-document.bo.js +8 -2
- package/build/model/form-response.bo.d.ts +2 -1
- package/package.json +1 -1
|
@@ -16,5 +16,9 @@ export declare enum InternalParam {
|
|
|
16
16
|
AfterSalesSystem = "ASS",
|
|
17
17
|
PlanRayon = "PLAN_RAYON",
|
|
18
18
|
EarlyOrderPossible = "VOORTIJDIG_ORDER_MOGELIJK",
|
|
19
|
-
KassaPersnr = "KASSA_PERSNR"
|
|
19
|
+
KassaPersnr = "KASSA_PERSNR",
|
|
20
|
+
UseGoogleTranslateApi = "USE_GOOGLE_TRANSLATE_API",
|
|
21
|
+
GoogleApiKey = "GOOGLE_API_KEY",
|
|
22
|
+
GoogleTranslateApiKey = "GOOGLE_TRANSLATE_API_KEY",
|
|
23
|
+
DefaultLanguage = "STD_TAAL"
|
|
20
24
|
}
|
|
@@ -21,4 +21,8 @@ var InternalParam;
|
|
|
21
21
|
InternalParam["PlanRayon"] = "PLAN_RAYON";
|
|
22
22
|
InternalParam["EarlyOrderPossible"] = "VOORTIJDIG_ORDER_MOGELIJK";
|
|
23
23
|
InternalParam["KassaPersnr"] = "KASSA_PERSNR";
|
|
24
|
+
InternalParam["UseGoogleTranslateApi"] = "USE_GOOGLE_TRANSLATE_API";
|
|
25
|
+
InternalParam["GoogleApiKey"] = "GOOGLE_API_KEY";
|
|
26
|
+
InternalParam["GoogleTranslateApiKey"] = "GOOGLE_TRANSLATE_API_KEY";
|
|
27
|
+
InternalParam["DefaultLanguage"] = "STD_TAAL";
|
|
24
28
|
})(InternalParam = exports.InternalParam || (exports.InternalParam = {}));
|
|
@@ -88,4 +88,7 @@ export declare abstract class MainApiConnection {
|
|
|
88
88
|
abstract getFormResponse(formResponseId: number): Promise<DataServiceResponseData>;
|
|
89
89
|
abstract insertFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
90
90
|
abstract updateFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
91
|
+
abstract getAllFormResponsesForTableAndKey(table: TableName, key: string): Promise<DataServiceResponseData>;
|
|
92
|
+
abstract lockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
93
|
+
abstract unlockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
91
94
|
}
|
package/build/main-api.d.ts
CHANGED
|
@@ -100,6 +100,9 @@ export declare class MainApi {
|
|
|
100
100
|
getImageForCoDocument(document: CoDocument, thumb: boolean): Promise<DataServiceResponseData>;
|
|
101
101
|
getFormById(formId: number): Promise<DataServiceResponseData>;
|
|
102
102
|
getFormResponse(formResponseId: number): Promise<DataServiceResponseData>;
|
|
103
|
+
getAllFormResponsesForTableAndKey(table: TableName, key: string): Promise<DataServiceResponseData>;
|
|
104
|
+
lockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
105
|
+
unlockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
103
106
|
insertFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
104
107
|
updateFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
105
108
|
static createConnector(isPublicSession: boolean, sessionExists: boolean): MainApiConnection;
|
package/build/main-api.js
CHANGED
|
@@ -268,6 +268,15 @@ class MainApi {
|
|
|
268
268
|
getFormResponse(formResponseId) {
|
|
269
269
|
return this.mainApi.getFormResponse(formResponseId);
|
|
270
270
|
}
|
|
271
|
+
getAllFormResponsesForTableAndKey(table, key) {
|
|
272
|
+
return this.mainApi.getAllFormResponsesForTableAndKey(table, key);
|
|
273
|
+
}
|
|
274
|
+
lockFormResponse(id) {
|
|
275
|
+
return this.mainApi.lockFormResponse(id);
|
|
276
|
+
}
|
|
277
|
+
unlockFormResponse(id) {
|
|
278
|
+
return this.mainApi.lockFormResponse(id);
|
|
279
|
+
}
|
|
271
280
|
insertFormResponse(formResponse) {
|
|
272
281
|
return this.mainApi.insertFormResponse(formResponse);
|
|
273
282
|
}
|
|
@@ -15,6 +15,7 @@ const domain_name_enum_1 = require("./enum/domain-name.enum");
|
|
|
15
15
|
const preset_bo_1 = require("./model/preset.bo");
|
|
16
16
|
const report_type_enum_1 = require("./enum/report-type.enum");
|
|
17
17
|
const internal_param_enum_1 = require("./enum/internal-param.enum");
|
|
18
|
+
const table_name_enum_1 = require("./enum/table-name.enum");
|
|
18
19
|
const options = {
|
|
19
20
|
url: 'http'
|
|
20
21
|
};
|
|
@@ -136,4 +137,9 @@ describe("Connector", () => {
|
|
|
136
137
|
const result = yield connector.getFormById(20);
|
|
137
138
|
expect(result).toBeDefined();
|
|
138
139
|
}));
|
|
140
|
+
it('getAllFormResponsesForTableAndKey', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
141
|
+
yield connector.connect();
|
|
142
|
+
const result = yield connector.getAllFormResponsesForTableAndKey(table_name_enum_1.TableName.Transactions, "140320");
|
|
143
|
+
expect(result).toBeDefined();
|
|
144
|
+
}));
|
|
139
145
|
});
|
package/build/main-auth.d.ts
CHANGED
|
@@ -80,6 +80,9 @@ export declare class MainAuth extends MainApiConnection {
|
|
|
80
80
|
emailActivity(request: EmailActivityRequest, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
81
81
|
getFormById(formId: number): Promise<DataServiceResponseData>;
|
|
82
82
|
getFormResponse(formResponseId: number): Promise<DataServiceResponseData>;
|
|
83
|
+
getAllFormResponsesForTableAndKey(table: TableName, key: string): Promise<DataServiceResponseData>;
|
|
84
|
+
lockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
85
|
+
unlockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
83
86
|
insertFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
84
87
|
updateFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
85
88
|
selectMultiple(moduleName: ModuleName, objectName: string, operationName?: string, parameterValues?: any, showLoader?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-auth.js
CHANGED
|
@@ -755,6 +755,37 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
755
755
|
};
|
|
756
756
|
return this._call(data_service_method_enum_1.DataServiceMethod.SelectSingle, data);
|
|
757
757
|
}
|
|
758
|
+
getAllFormResponsesForTableAndKey(table, key) {
|
|
759
|
+
const params = {
|
|
760
|
+
table: table,
|
|
761
|
+
key: key
|
|
762
|
+
};
|
|
763
|
+
const data = {
|
|
764
|
+
moduleName: module_name_enum_1.ModuleName.Forms,
|
|
765
|
+
objectName: forms_object_name_enum_1.FormsObjectName.FormResponse,
|
|
766
|
+
refCursorAsArray: true,
|
|
767
|
+
parameterValues: params
|
|
768
|
+
};
|
|
769
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.SelectMultipleObjects, data);
|
|
770
|
+
}
|
|
771
|
+
lockFormResponse(id) {
|
|
772
|
+
const data = {
|
|
773
|
+
moduleName: module_name_enum_1.ModuleName.Forms,
|
|
774
|
+
objectName: forms_object_name_enum_1.FormsObjectName.FormResponse,
|
|
775
|
+
parameterValues: id,
|
|
776
|
+
refCursorAsArray: true,
|
|
777
|
+
};
|
|
778
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.LockObject, data, backend_service_name_enum_1.BackendServiceName.DataService);
|
|
779
|
+
}
|
|
780
|
+
unlockFormResponse(id) {
|
|
781
|
+
const data = {
|
|
782
|
+
moduleName: module_name_enum_1.ModuleName.Forms,
|
|
783
|
+
objectName: forms_object_name_enum_1.FormsObjectName.FormResponse,
|
|
784
|
+
parameterValues: id,
|
|
785
|
+
refCursorAsArray: true,
|
|
786
|
+
};
|
|
787
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.UnlockObject, data, backend_service_name_enum_1.BackendServiceName.DataService);
|
|
788
|
+
}
|
|
758
789
|
insertFormResponse(formResponse) {
|
|
759
790
|
const data = {
|
|
760
791
|
moduleName: module_name_enum_1.ModuleName.Forms,
|
|
@@ -853,10 +884,10 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
853
884
|
}
|
|
854
885
|
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnDefaultLocation) {
|
|
855
886
|
}
|
|
856
|
-
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && hasPublicAccess
|
|
887
|
+
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && hasPublicAccess) {
|
|
857
888
|
return this._handleDocumentUrl(filePath, fileType);
|
|
858
889
|
}
|
|
859
|
-
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && hasPublicAccess
|
|
890
|
+
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && !hasPublicAccess) {
|
|
860
891
|
return this._handleDocumentBody(documentId, mimeType, thumb, fileType);
|
|
861
892
|
}
|
|
862
893
|
}
|
package/build/main-public.d.ts
CHANGED
|
@@ -76,6 +76,9 @@ export declare class MainPublic extends MainApiConnection {
|
|
|
76
76
|
emailActivity(request: EmailActivityRequest, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
77
77
|
getFormById(formId: number, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
78
78
|
getFormResponse(formResponseId: number, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
79
|
+
getAllFormResponsesForTableAndKey(table: TableName, key: string): Promise<DataServiceResponseData>;
|
|
80
|
+
lockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
81
|
+
unlockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
79
82
|
insertFormResponse(formResponse: FormResponse, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
80
83
|
updateFormResponse(formResponse: FormResponse, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
81
84
|
selectMultiple(moduleName: ModuleName, objectName: string, operationName?: string, parameterValues?: any, showLoader?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-public.js
CHANGED
|
@@ -312,6 +312,18 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
312
312
|
console.warn('getFormResponse not implemented');
|
|
313
313
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
314
314
|
}
|
|
315
|
+
getAllFormResponsesForTableAndKey(table, key) {
|
|
316
|
+
console.warn('getAllFormResponsesForTableAndKey not implemented');
|
|
317
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
318
|
+
}
|
|
319
|
+
lockFormResponse(id) {
|
|
320
|
+
console.warn('lockFormResponse not implemented');
|
|
321
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
322
|
+
}
|
|
323
|
+
unlockFormResponse(id) {
|
|
324
|
+
console.warn('lockFormResponse not implemented');
|
|
325
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
326
|
+
}
|
|
315
327
|
insertFormResponse(formResponse, showLoader) {
|
|
316
328
|
console.warn('insertFormResponse not implemented');
|
|
317
329
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
@@ -424,10 +436,10 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
424
436
|
}
|
|
425
437
|
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnDefaultLocation) {
|
|
426
438
|
}
|
|
427
|
-
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && hasPublicAccess
|
|
439
|
+
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && hasPublicAccess) {
|
|
428
440
|
return this._handleDocumentUrl(filePath, fileType);
|
|
429
441
|
}
|
|
430
|
-
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && hasPublicAccess
|
|
442
|
+
else if (type === co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && !hasPublicAccess) {
|
|
431
443
|
return this._handleDocumentBody(documentId, mimeType, thumb, fileType);
|
|
432
444
|
}
|
|
433
445
|
}
|
|
@@ -32,7 +32,7 @@ export declare class CoDocument extends BusinessObject {
|
|
|
32
32
|
downloadable: boolean;
|
|
33
33
|
attachToNotification: boolean;
|
|
34
34
|
pathIsUrl: boolean;
|
|
35
|
-
hasPublicAccess:
|
|
35
|
+
hasPublicAccess: boolean;
|
|
36
36
|
imageType: string;
|
|
37
37
|
imageDisplayKind: string;
|
|
38
38
|
tags: Tag[];
|
|
@@ -34,6 +34,7 @@ const sort_type_enum_1 = require("@colijnit/ioneconnector/build/enum/sort-type.e
|
|
|
34
34
|
const sort_direction_1 = require("@colijnit/ioneconnector/build/enum/sort-direction");
|
|
35
35
|
const ref_code_class_to_domain_name_map_1 = require("./constant/ref-code-class-to-domain-name-map");
|
|
36
36
|
const co_document_right_1 = require("./co-document-right");
|
|
37
|
+
const default_send_value_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/default-send-value.decorator");
|
|
37
38
|
let CoDocument = class CoDocument extends business_object_1.BusinessObject {
|
|
38
39
|
set documentId(value) {
|
|
39
40
|
this._documentId = value;
|
|
@@ -117,7 +118,7 @@ let CoDocument = class CoDocument extends business_object_1.BusinessObject {
|
|
|
117
118
|
constructor(rawData = {}) {
|
|
118
119
|
super();
|
|
119
120
|
this.pathIsUrl = false;
|
|
120
|
-
this.hasPublicAccess =
|
|
121
|
+
this.hasPublicAccess = false;
|
|
121
122
|
this.tags = [];
|
|
122
123
|
this.rights = [];
|
|
123
124
|
this.seoTitles = [];
|
|
@@ -140,7 +141,7 @@ let CoDocument = class CoDocument extends business_object_1.BusinessObject {
|
|
|
140
141
|
isStoredAsLink() {
|
|
141
142
|
return this.documentType == co_document_type_enum_1.CoDocumentType.SaveAsLinkOnRandomLocation
|
|
142
143
|
|| this.documentType == co_document_type_enum_1.CoDocumentType.SaveAsLinkOnDefaultLocation
|
|
143
|
-
|| (this.documentType == co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && this.hasPublicAccess
|
|
144
|
+
|| (this.documentType == co_document_type_enum_1.CoDocumentType.SaveAsLinkOnCdnServerLocation && this.hasPublicAccess);
|
|
144
145
|
}
|
|
145
146
|
};
|
|
146
147
|
__decorate([
|
|
@@ -163,6 +164,11 @@ __decorate([
|
|
|
163
164
|
(0, boolean_decorator_1.BooleanText)('T'),
|
|
164
165
|
__metadata("design:type", Boolean)
|
|
165
166
|
], CoDocument.prototype, "pathIsUrl", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, boolean_decorator_1.BooleanText)("T"),
|
|
169
|
+
(0, default_send_value_decorator_1.DefaultSendValue)("F"),
|
|
170
|
+
__metadata("design:type", Boolean)
|
|
171
|
+
], CoDocument.prototype, "hasPublicAccess", void 0);
|
|
166
172
|
__decorate([
|
|
167
173
|
(0, complex_array_decorator_1.ComplexArray)(tag_1.Tag),
|
|
168
174
|
__metadata("design:type", Array)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
|
|
2
2
|
import { FormQuestionResponse } from './form-question-response.bo';
|
|
3
3
|
import { CoDocument } from './co-document.bo';
|
|
4
|
+
import { TableName } from '../enum/table-name.enum';
|
|
4
5
|
export declare class FormResponse extends BusinessObject {
|
|
5
6
|
responseId: number;
|
|
6
|
-
table:
|
|
7
|
+
table: TableName;
|
|
7
8
|
key: string;
|
|
8
9
|
formId: number;
|
|
9
10
|
formName: string;
|