@colijnit/mainapi 262.1.2 → 262.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.
- package/build/main-api-connection.d.ts +1 -1
- package/build/main-api.d.ts +1 -1
- package/build/main-api.js +2 -2
- package/build/main-auth.d.ts +1 -1
- package/build/main-auth.js +1 -1
- package/build/main-public.d.ts +1 -1
- package/build/main-public.js +2 -2
- package/build/model/file-upload-common-response.d.ts +8 -0
- package/build/model/file-upload-common-response.js +7 -0
- package/build/utils/file-utils.d.ts +1 -0
- package/build/utils/file-utils.js +7 -0
- package/package.json +2 -2
|
@@ -44,7 +44,7 @@ export declare abstract class MainApiConnection {
|
|
|
44
44
|
abstract getTagsFullTree(category: TagCategory, includeTags: boolean): Promise<DataServiceResponseData>;
|
|
45
45
|
abstract getPublicParams(upId: number): Promise<DataServiceResponseData>;
|
|
46
46
|
abstract getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
|
47
|
-
abstract
|
|
47
|
+
abstract storeCustomerThreeDObject(filename: string, fileContents: string): Promise<DataServiceResponseData>;
|
|
48
48
|
abstract getPackageStickerPrintLayouts(): Promise<DataServiceResponseData>;
|
|
49
49
|
abstract getObjectConfigurations(screenCfgModule: string, params: string | string[], insertMode: boolean): Promise<DataServiceResponseData>;
|
|
50
50
|
abstract getStoreGroups(): Promise<DataServiceResponseData>;
|
package/build/main-api.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare class MainApi {
|
|
|
60
60
|
getTagsFullTree(category: TagCategory, includeTags: boolean): Promise<DataServiceResponseData>;
|
|
61
61
|
getPublicParams(upId: number): Promise<DataServiceResponseData>;
|
|
62
62
|
getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
|
63
|
-
|
|
63
|
+
storeCustomerThreeDObject(filename: string, fileContents: string): Promise<DataServiceResponseData>;
|
|
64
64
|
getPackageStickerPrintLayouts(): Promise<DataServiceResponseData>;
|
|
65
65
|
getObjectConfigurations(screenCfgModule: string, params?: string | string[], insertMode?: boolean): Promise<DataServiceResponseData>;
|
|
66
66
|
getStoreGroups(): Promise<DataServiceResponseData>;
|
package/build/main-api.js
CHANGED
|
@@ -124,8 +124,8 @@ class MainApi {
|
|
|
124
124
|
getInternalParameterValue(param) {
|
|
125
125
|
return this.mainApi.getInternalParameterValue(param);
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
return this.mainApi.
|
|
127
|
+
storeCustomerThreeDObject(filename, fileContents) {
|
|
128
|
+
return this.mainApi.storeCustomerThreeDObject(filename, fileContents);
|
|
129
129
|
}
|
|
130
130
|
getPackageStickerPrintLayouts() {
|
|
131
131
|
return this.mainApi.getPackageStickerPrintLayouts();
|
package/build/main-auth.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare class MainAuth extends MainApiConnection {
|
|
|
38
38
|
mergeJoinedTags(table: string, key: string, tags: TagTreeItem[]): Promise<DataServiceResponseData>;
|
|
39
39
|
getTagsFullTree(category: TagCategory, includeTags: boolean): Promise<DataServiceResponseData>;
|
|
40
40
|
getPublicParams(upId: number): Promise<DataServiceResponseData>;
|
|
41
|
-
|
|
41
|
+
storeCustomerThreeDObject(filename: string, fileContents: string): Promise<DataServiceResponseData>;
|
|
42
42
|
getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
|
43
43
|
getPackageStickerPrintLayouts(): Promise<DataServiceResponseData>;
|
|
44
44
|
getObjectConfigurations(screenCfgModule: string, params?: string | string[], insertMode?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-auth.js
CHANGED
|
@@ -236,7 +236,7 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
236
236
|
};
|
|
237
237
|
return this._call(public_service_method_1.PublicServiceMethod.GetPublicParams, data, backend_service_name_enum_1.BackendServiceName.PublicService);
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
storeCustomerThreeDObject(filename, fileContents) {
|
|
240
240
|
const inputParams = {
|
|
241
241
|
fileName: filename,
|
|
242
242
|
fileContents: fileContents
|
package/build/main-public.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare class MainPublic extends MainApiConnection {
|
|
|
32
32
|
upsertDocument(key: string, table: TableName, document: CoDocument): Promise<DataServiceResponseData>;
|
|
33
33
|
deleteDocument(documentId: number): Promise<DataServiceResponseData>;
|
|
34
34
|
getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
|
35
|
-
|
|
35
|
+
storeCustomerThreeDObject(filename: string, fileContents: string): Promise<DataServiceResponseData>;
|
|
36
36
|
getPackageStickerPrintLayouts(): Promise<DataServiceResponseData>;
|
|
37
37
|
getCurrencies(active?: boolean): Promise<DataServiceResponseData>;
|
|
38
38
|
getPaymentConditions(name?: string): Promise<DataServiceResponseData>;
|
package/build/main-public.js
CHANGED
|
@@ -87,8 +87,8 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
87
87
|
console.warn('getInternalParameterValue not implemented');
|
|
88
88
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
console.warn('
|
|
90
|
+
storeCustomerThreeDObject(filename, fileContents) {
|
|
91
|
+
console.warn('storeCustomerThreeDObject not implemented');
|
|
92
92
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
93
93
|
}
|
|
94
94
|
getPackageStickerPrintLayouts() {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileUploadCommonResponse = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class FileUploadCommonResponse extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.FileUploadCommonResponse = FileUploadCommonResponse;
|
|
@@ -23,6 +23,7 @@ export declare class FileUtils {
|
|
|
23
23
|
static readAsDataURL(file: File): Promise<string>;
|
|
24
24
|
static ReadFileAsNewCoDocument(file: File, resize?: boolean, maxSizeInPixels?: number): Promise<CoDocument>;
|
|
25
25
|
static ResizeImage(src: string, fileType: string, maxSizeInPixels: number): Promise<string>;
|
|
26
|
+
static CalculateSha256Hash(file: ArrayBuffer): Promise<string>;
|
|
26
27
|
static ReadFileAsDataURL(file: File): Promise<string>;
|
|
27
28
|
static DataURLtoFile(dataURL: string, filename: string): File;
|
|
28
29
|
static GetExtensionFromDataUri(dataUri: string): string;
|
|
@@ -331,6 +331,13 @@ class FileUtils {
|
|
|
331
331
|
});
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
+
static CalculateSha256Hash(file) {
|
|
335
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
+
const hashBuffer = yield crypto.subtle.digest('SHA-256', file);
|
|
337
|
+
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
338
|
+
return hashArray.map(byte => byte.toString(16).padStart(2, '0')).join('');
|
|
339
|
+
});
|
|
340
|
+
}
|
|
334
341
|
static ReadFileAsDataURL(file) {
|
|
335
342
|
return new Promise((resolve) => {
|
|
336
343
|
const reader = new FileReader();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colijnit/mainapi",
|
|
3
|
-
"version": "262.1.
|
|
3
|
+
"version": "262.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 2.
|
|
16
|
+
"description": "public main api for ione backend specific for version 2.6.2.",
|
|
17
17
|
"repository": "npm/npm",
|
|
18
18
|
"author": "Colijn IT",
|
|
19
19
|
"license": "ISC",
|