@colijnit/mainapi 260.1.7 → 260.1.8
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/forms-method-name.enum.d.ts +3 -0
- package/build/enum/forms-method-name.enum.js +7 -0
- package/build/enum/module-name.enum.d.ts +2 -1
- package/build/enum/module-name.enum.js +1 -0
- package/build/main-api-connection.d.ts +1 -0
- package/build/main-api.d.ts +1 -0
- package/build/main-api.js +3 -0
- package/build/main-api.unit.test.js +14 -0
- package/build/main-auth.d.ts +1 -0
- package/build/main-auth.js +16 -1
- package/build/main-public.d.ts +1 -0
- package/build/main-public.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormsMethodName = void 0;
|
|
4
|
+
var FormsMethodName;
|
|
5
|
+
(function (FormsMethodName) {
|
|
6
|
+
FormsMethodName["UpsertTransactionLineFormResponse"] = "upsertTransactionLineFormResponse";
|
|
7
|
+
})(FormsMethodName = exports.FormsMethodName || (exports.FormsMethodName = {}));
|
|
@@ -94,4 +94,5 @@ export declare abstract class MainApiConnection {
|
|
|
94
94
|
abstract unlockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
95
95
|
abstract getGoogleTranslation(sourceLanguageCode: string, targetLanguageCode: string, toTranslateList: string[]): Promise<DataServiceResponseData>;
|
|
96
96
|
abstract isGoogleTranslateEnabled(): Promise<DataServiceResponseData>;
|
|
97
|
+
abstract upsertTransactionLineFormResponse(transUUID: string, transactionLineUUID: string, formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
97
98
|
}
|
package/build/main-api.d.ts
CHANGED
|
@@ -108,6 +108,7 @@ export declare class MainApi {
|
|
|
108
108
|
updateFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
109
109
|
getGoogleTranslation(sourceLanguageCode: string, targetLanguageCode: string, toTranslateList: string[]): Promise<DataServiceResponseData>;
|
|
110
110
|
isGoogleTranslateEnabled(): Promise<DataServiceResponseData>;
|
|
111
|
+
upsertTransactionLineFormResponse(transUUID: string, transactionLineUUID: string, formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
111
112
|
static createConnector(isPublicSession: boolean, sessionExists: boolean): MainApiConnection;
|
|
112
113
|
private _handleConnectionReset;
|
|
113
114
|
}
|
package/build/main-api.js
CHANGED
|
@@ -293,6 +293,9 @@ class MainApi {
|
|
|
293
293
|
isGoogleTranslateEnabled() {
|
|
294
294
|
return this.mainApi.isGoogleTranslateEnabled();
|
|
295
295
|
}
|
|
296
|
+
upsertTransactionLineFormResponse(transUUID, transactionLineUUID, formResponse) {
|
|
297
|
+
return this.mainApi.upsertTransactionLineFormResponse(transUUID, transactionLineUUID, formResponse);
|
|
298
|
+
}
|
|
296
299
|
static createConnector(isPublicSession, sessionExists) {
|
|
297
300
|
if (!isPublicSession || sessionExists) {
|
|
298
301
|
return new main_auth_1.MainAuth();
|
|
@@ -16,6 +16,7 @@ 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
18
|
const table_name_enum_1 = require("./enum/table-name.enum");
|
|
19
|
+
const form_response_bo_1 = require("./model/form-response.bo");
|
|
19
20
|
const options = {
|
|
20
21
|
url: 'http'
|
|
21
22
|
};
|
|
@@ -158,6 +159,19 @@ describe("Connector", () => {
|
|
|
158
159
|
const result = yield connector.unlockFormResponse(295);
|
|
159
160
|
expect(result).toBeDefined();
|
|
160
161
|
}));
|
|
162
|
+
it('upsertTransactionLineFormResponse', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
163
|
+
yield connector.connect();
|
|
164
|
+
let lineUUID = "";
|
|
165
|
+
let transUUID = "";
|
|
166
|
+
let formResponse = new form_response_bo_1.FormResponse();
|
|
167
|
+
const result = yield connector.upsertTransactionLineFormResponse(transUUID, lineUUID, formResponse);
|
|
168
|
+
expect(result).toBeDefined();
|
|
169
|
+
}));
|
|
170
|
+
it('getFormResponseById', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
171
|
+
yield connector.connect();
|
|
172
|
+
const result = yield connector.getFormResponse(295);
|
|
173
|
+
expect(result).toBeDefined();
|
|
174
|
+
}));
|
|
161
175
|
it('getGoogleTranslation', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
162
176
|
yield connector.connect();
|
|
163
177
|
const sourceLang = 'NL';
|
package/build/main-auth.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare class MainAuth extends MainApiConnection {
|
|
|
82
82
|
getFormById(formId: number): Promise<DataServiceResponseData>;
|
|
83
83
|
getFormResponse(formResponseId: number): Promise<DataServiceResponseData>;
|
|
84
84
|
getAllFormResponsesForTableAndKey(table: TableName, key: string): Promise<DataServiceResponseData>;
|
|
85
|
+
upsertTransactionLineFormResponse(transUUID: string, transactionLineUUID: string, formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
85
86
|
lockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
86
87
|
unlockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
87
88
|
insertFormResponse(formResponse: FormResponse): Promise<DataServiceResponseData>;
|
package/build/main-auth.js
CHANGED
|
@@ -44,6 +44,7 @@ const article_method_enum_1 = require("./enum/article-method.enum");
|
|
|
44
44
|
const file_utils_1 = require("./utils/file-utils");
|
|
45
45
|
const image_content_bo_1 = require("./model/image-content.bo");
|
|
46
46
|
const forms_object_name_enum_1 = require("./enum/forms-object-name.enum");
|
|
47
|
+
const forms_method_name_enum_1 = require("./enum/forms-method-name.enum");
|
|
47
48
|
class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
48
49
|
constructor() {
|
|
49
50
|
super(...arguments);
|
|
@@ -762,7 +763,7 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
762
763
|
refCursorAsArray: true,
|
|
763
764
|
objectId: formResponseId
|
|
764
765
|
};
|
|
765
|
-
return this._call(data_service_method_enum_1.DataServiceMethod.
|
|
766
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.SelectSingleObject, data);
|
|
766
767
|
}
|
|
767
768
|
getAllFormResponsesForTableAndKey(table, key) {
|
|
768
769
|
const params = {
|
|
@@ -777,6 +778,20 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
777
778
|
};
|
|
778
779
|
return this._call(data_service_method_enum_1.DataServiceMethod.SelectMultipleObjects, data);
|
|
779
780
|
}
|
|
781
|
+
upsertTransactionLineFormResponse(transUUID, transactionLineUUID, formResponse) {
|
|
782
|
+
const params = {
|
|
783
|
+
lineUuid: transactionLineUUID,
|
|
784
|
+
transactionUuid: transUUID,
|
|
785
|
+
formResponseDTO: formResponse
|
|
786
|
+
};
|
|
787
|
+
const data = {
|
|
788
|
+
moduleName: module_name_enum_1.ModuleName.Transaction,
|
|
789
|
+
methodName: forms_method_name_enum_1.FormsMethodName.UpsertTransactionLineFormResponse,
|
|
790
|
+
parameterValues: params,
|
|
791
|
+
refCursorAsArray: true
|
|
792
|
+
};
|
|
793
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data, backend_service_name_enum_1.BackendServiceName.DataService);
|
|
794
|
+
}
|
|
780
795
|
lockFormResponse(id) {
|
|
781
796
|
const data = {
|
|
782
797
|
moduleName: module_name_enum_1.ModuleName.Forms,
|
package/build/main-public.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare class MainPublic extends MainApiConnection {
|
|
|
82
82
|
unlockFormResponse(id: number): Promise<DataServiceResponseData>;
|
|
83
83
|
insertFormResponse(formResponse: FormResponse, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
84
84
|
updateFormResponse(formResponse: FormResponse, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
85
|
+
upsertTransactionLineFormResponse(transUUID: string, transactionLineUUID: string, formResponse: FormResponse): Promise<DataServiceResponseData>;
|
|
85
86
|
getGoogleTranslation(sourceLanguageCode: string, targetLanguageCode: string, toTranslateList: string[]): Promise<DataServiceResponseData>;
|
|
86
87
|
isGoogleTranslateEnabled(): Promise<DataServiceResponseData>;
|
|
87
88
|
selectMultiple(moduleName: ModuleName, objectName: string, operationName?: string, parameterValues?: any, showLoader?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-public.js
CHANGED
|
@@ -336,6 +336,10 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
336
336
|
console.warn('updateFormResponse not implemented');
|
|
337
337
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
338
338
|
}
|
|
339
|
+
upsertTransactionLineFormResponse(transUUID, transactionLineUUID, formResponse) {
|
|
340
|
+
console.warn('upsertTransactionLineFormResponse not implemented');
|
|
341
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
342
|
+
}
|
|
339
343
|
getGoogleTranslation(sourceLanguageCode, targetLanguageCode, toTranslateList) {
|
|
340
344
|
const params = {
|
|
341
345
|
sourceLanguageCode: sourceLanguageCode,
|