@colijnit/mainapi 301.1.1 → 301.1.3

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.
@@ -39,6 +39,7 @@ export declare abstract class MainApiConnection {
39
39
  abstract getDocumentContent(id: number, thumbnail: boolean): Promise<DataServiceResponseData>;
40
40
  abstract getDocumentsForCurrentUserByTransId(transId: number): Promise<DataServiceResponseData>;
41
41
  abstract loadDocuments(key: string, table: TableName): Promise<DataServiceResponseData>;
42
+ abstract selectNotesByTableKey(key: string, table: TableName): Promise<DataServiceResponseData>;
42
43
  abstract loadDocumentContent(docId: number): Promise<DataServiceResponseData>;
43
44
  abstract deleteDocument(documentId: number): Promise<DataServiceResponseData>;
44
45
  abstract upsertDocument(key: string, table: TableName, document: CoDocument): Promise<DataServiceResponseData>;
@@ -55,6 +55,7 @@ export declare class MainApi {
55
55
  getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
56
56
  getDocumentsForCurrentUserByTransId(transId: number): Promise<DataServiceResponseData>;
57
57
  loadDocuments(key: string, table: TableName): Promise<DataServiceResponseData>;
58
+ selectNotesByTableKey(key: string, table: TableName): Promise<DataServiceResponseData>;
58
59
  loadDocumentContent(docId: number): Promise<DataServiceResponseData>;
59
60
  deleteDocument(documentId: number): Promise<DataServiceResponseData>;
60
61
  upsertDocument(key: string, table: TableName, document: CoDocument): Promise<DataServiceResponseData>;
package/build/main-api.js CHANGED
@@ -97,6 +97,11 @@ class MainApi {
97
97
  return this.mainApi.loadDocuments(key, table);
98
98
  });
99
99
  }
100
+ selectNotesByTableKey(key, table) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ return this.mainApi.selectNotesByTableKey(key, table);
103
+ });
104
+ }
100
105
  loadDocumentContent(docId) {
101
106
  return this.mainApi.loadDocumentContent(docId);
102
107
  }
@@ -23,7 +23,7 @@ const options = {
23
23
  const localOptions = {
24
24
  url: 'http://localhost:8080/ione',
25
25
  schema: "815",
26
- version: "261",
26
+ version: "301",
27
27
  useLoginEncryption: true,
28
28
  username: "patrick",
29
29
  password: "vankeulen1234567890!",
@@ -39,13 +39,15 @@ const remoteOptions = {
39
39
  const publicOptions = {
40
40
  url: "https://develop.colijn-it.nl/",
41
41
  schema: "815",
42
- version: "260",
42
+ version: "301",
43
43
  useLoginEncryption: false,
44
44
  };
45
45
  describe("Connector", () => {
46
46
  let connector;
47
+ let publicConnector;
47
48
  beforeEach(() => {
48
49
  connector = new main_api_1.MainApi(localOptions);
50
+ publicConnector = new main_api_1.MainApi(publicOptions);
49
51
  jest.setTimeout(1300000);
50
52
  });
51
53
  it('getSequenceValue', () => __awaiter(void 0, void 0, void 0, function* () {
@@ -218,4 +220,14 @@ describe("Connector", () => {
218
220
  const result = yield connector.createQRCode(width, height, value);
219
221
  expect(result).toBeDefined();
220
222
  }));
223
+ it('selectNotesByTableKey', () => __awaiter(void 0, void 0, void 0, function* () {
224
+ yield connector.connect();
225
+ const result = yield connector.selectNotesByTableKey('738428', table_name_enum_1.TableName.Goods);
226
+ expect(result).toBeDefined();
227
+ }));
228
+ it('getPublicInternalParameterValue', () => __awaiter(void 0, void 0, void 0, function* () {
229
+ yield publicConnector.connect();
230
+ const result = yield publicConnector.getInternalParameterValue(internal_param_enum_1.InternalParam.TransManualSave);
231
+ expect(result).toBeDefined();
232
+ }));
221
233
  });
@@ -34,6 +34,7 @@ export declare class MainAuth extends MainApiConnection {
34
34
  getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
35
35
  getDocumentsForCurrentUserByTransId(transId: number): Promise<DataServiceResponseData>;
36
36
  loadDocuments(key: string, table: TableName): Promise<DataServiceResponseData>;
37
+ selectNotesByTableKey(key: string, table: TableName): Promise<DataServiceResponseData>;
37
38
  loadDocumentContent(docId: number): Promise<DataServiceResponseData>;
38
39
  upsertDocument(key: string, table: TableName, document: CoDocument): Promise<DataServiceResponseData>;
39
40
  deleteDocument(documentId: number): Promise<DataServiceResponseData>;
@@ -152,6 +152,13 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
152
152
  };
153
153
  return this.selectMultiple(module_name_enum_1.ModuleName.General, "CoDocument", document_method_enum_1.DocumentMethod.SelectDocsByTableKey, data);
154
154
  }
155
+ selectNotesByTableKey(key, table) {
156
+ const data = {
157
+ key: key,
158
+ table: table
159
+ };
160
+ return this.selectMultiple(module_name_enum_1.ModuleName.General, "Note", general_method_enum_1.GeneralMethod.SelectNotesByTableKey, data);
161
+ }
155
162
  loadDocumentContent(docId) {
156
163
  const params = {
157
164
  docId: docId
@@ -33,6 +33,7 @@ export declare class MainPublic extends MainApiConnection {
33
33
  getDocumentContent(id: number, thumbnail: boolean): Promise<DataServiceResponseData>;
34
34
  getDocumentsForCurrentUserByTransId(transId: number): Promise<DataServiceResponseData>;
35
35
  loadDocuments(key: string, table: TableName): Promise<DataServiceResponseData>;
36
+ selectNotesByTableKey(key: string, table: TableName): Promise<DataServiceResponseData>;
36
37
  loadDocumentContent(docId: number): Promise<DataServiceResponseData>;
37
38
  upsertDocument(key: string, table: TableName, document: CoDocument): Promise<DataServiceResponseData>;
38
39
  deleteDocument(documentId: number): Promise<DataServiceResponseData>;
@@ -75,6 +75,12 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
75
75
  return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
76
76
  });
77
77
  }
78
+ selectNotesByTableKey(key, table) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ console.warn('selectNotesByTableKey not implemented');
81
+ return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
82
+ });
83
+ }
78
84
  loadDocumentContent(docId) {
79
85
  console.warn('loadDocumentContent not implemented');
80
86
  return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
@@ -134,6 +140,12 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
134
140
  return this._callAjaxService(public_service_method_1.PublicServiceMethod.GetPublicParams, data, backend_service_name_enum_1.BackendServiceName.PublicService, false, message);
135
141
  }
136
142
  getObjectConfigurations(screenCfgModule, params = ['ALL'], insertMode = false) {
143
+ if (!Array.isArray(params)) {
144
+ params = [params];
145
+ }
146
+ if (params && params.length === 1 && (params[0] === undefined || params[0] === null)) {
147
+ params[0] = 'ALL';
148
+ }
137
149
  const paramValues = {
138
150
  moduleId: screenCfgModule,
139
151
  params: params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/mainapi",
3
- "version": "301.1.1",
3
+ "version": "301.1.3",
4
4
  "scripts": {
5
5
  "build": "grunt clean && tsc",
6
6
  "browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",
@@ -13,7 +13,7 @@
13
13
  "unit": "jest unit",
14
14
  "integration": "jest int"
15
15
  },
16
- "description": "public main api for ione backend specific for version 3.0.0.",
16
+ "description": "public main api for ione backend specific for version 3.0.1.",
17
17
  "repository": "npm/npm",
18
18
  "author": "Colijn IT",
19
19
  "license": "ISC",
@@ -24,11 +24,11 @@
24
24
  "rxjs": "6.6.3"
25
25
  },
26
26
  "peerDependencies": {
27
- "@colijnit/ioneconnector": ">=301.1.0"
27
+ "@colijnit/ioneconnector": ">=301.1.1 < 302"
28
28
  },
29
29
  "devDependencies": {
30
+ "@colijnit/ioneconnector": "301.1.1",
30
31
  "@types/jest": "^24.0.13",
31
- "@colijnit/ioneconnector": "301.1.0",
32
32
  "grunt": "^1.0.3",
33
33
  "grunt-clean": "^0.4.0",
34
34
  "grunt-contrib-clean": "^1.1.0",
@@ -36,6 +36,7 @@
36
36
  "grunt-contrib-uglify-es": "git+https://github.com/gruntjs/grunt-contrib-uglify.git#harmony",
37
37
  "gulp": "^3.9.1",
38
38
  "jest": "^30.3.0",
39
+ "jest-environment-jsdom": "^30.5.2",
39
40
  "request": "2.34.0",
40
41
  "ts-jest": "^29.4.9",
41
42
  "typescript": "5.8.3"
@@ -46,12 +47,20 @@
46
47
  "main": "build/main-api.js",
47
48
  "types": "build/main-api.d.ts",
48
49
  "jest": {
50
+ "testEnvironment": "jsdom",
49
51
  "verbose": true,
50
52
  "roots": [
51
53
  "<rootDir>/src"
52
54
  ],
53
55
  "transform": {
54
- "^.+\\.tsx?$": "ts-jest"
56
+ "^.+\\.tsx?$": [
57
+ "ts-jest",
58
+ {
59
+ "tsconfig": {
60
+ "sourceMap": true
61
+ }
62
+ }
63
+ ]
55
64
  }
56
65
  }
57
66
  }