yaveon.ecm.d3dwebhooks 0.8.0 → 0.8.2
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/js/Yaveon.ECM.d3d.Client.d.ts +14 -14
- package/js/Yaveon.ECM.d3d.Webhook.Client.d.ts +14 -14
- package/js/Yaveon.ECM.d3d.Webhook.Client.js +2 -2
- package/js/Yaveon.ECM.d3d.Webhook.Constants.d.ts +20 -20
- package/js/Yaveon.ECM.d3d.Webhook.Interfaces.d.ts +61 -18
- package/js/Yaveon.ECM.d3d.Webhook.SetNumberId.d.ts +2 -2
- package/js/Yaveon.ECM.d3d.Webhook.SetNumberId.js +1 -1
- package/package.json +14 -14
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare class D3dClient {
|
|
2
|
-
private baseUrl;
|
|
3
|
-
protected repositoryId: string;
|
|
4
|
-
private defaultHeaders;
|
|
5
|
-
constructor(baseUrl: string, repositoryId: string, accessToken: string);
|
|
6
|
-
private getUploadHeader;
|
|
7
|
-
uploadChunk(binaryData: Uint8Array): Promise<any>;
|
|
8
|
-
updateDocumentProperties(d3dObjectId: string, updateBody: Object): Promise<any>;
|
|
9
|
-
getDocumentContent(d3dDocumentId: string): Promise<any>;
|
|
10
|
-
setObjectState(d3dObjectId: string, ownerUpn: string, stateValue: string, alterationText?: string): Promise<any>;
|
|
11
|
-
getETag(d3dObjectId: string): Promise<string>;
|
|
12
|
-
getCurrentUserObject(): Promise<any>;
|
|
13
|
-
getSearchResults(searchUrlPart: string): Promise<any>;
|
|
14
|
-
}
|
|
1
|
+
export declare class D3dClient {
|
|
2
|
+
private baseUrl;
|
|
3
|
+
protected repositoryId: string;
|
|
4
|
+
private defaultHeaders;
|
|
5
|
+
constructor(baseUrl: string, repositoryId: string, accessToken: string);
|
|
6
|
+
private getUploadHeader;
|
|
7
|
+
uploadChunk(binaryData: Uint8Array): Promise<any>;
|
|
8
|
+
updateDocumentProperties(d3dObjectId: string, updateBody: Object): Promise<any>;
|
|
9
|
+
getDocumentContent(d3dDocumentId: string): Promise<any>;
|
|
10
|
+
setObjectState(d3dObjectId: string, ownerUpn: string, stateValue: string, alterationText?: string): Promise<any>;
|
|
11
|
+
getETag(d3dObjectId: string): Promise<string>;
|
|
12
|
+
getCurrentUserObject(): Promise<any>;
|
|
13
|
+
getSearchResults(searchUrlPart: string): Promise<any>;
|
|
14
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { INumberRangePropertyObject } from "./Yaveon.ECM.d3d.Webhook.Interfaces";
|
|
2
|
-
import { D3dClient } from "./Yaveon.ECM.d3d.Client";
|
|
3
|
-
export declare class D3dWebhookClient extends D3dClient {
|
|
4
|
-
private configFileId;
|
|
5
|
-
private currentUserName;
|
|
6
|
-
constructor(baseUrl: string, repositoryId: string, accessToken: string);
|
|
7
|
-
updateConfiguration(configObject: Object, alterationText: string): Promise<any>;
|
|
8
|
-
private ensureConfigurationFileId;
|
|
9
|
-
getConfiguration(): Promise<any>;
|
|
10
|
-
blockConfiguration(): Promise<void>;
|
|
11
|
-
releaseConfiguration(alterationText?: string): Promise<void>;
|
|
12
|
-
getCurrentUserName(): Promise<string>;
|
|
13
|
-
getNumberRangeInformation(doc: any, config: any): INumberRangePropertyObject[];
|
|
14
|
-
}
|
|
1
|
+
import { INumberRangePropertyObject } from "./Yaveon.ECM.d3d.Webhook.Interfaces";
|
|
2
|
+
import { D3dClient } from "./Yaveon.ECM.d3d.Client";
|
|
3
|
+
export declare class D3dWebhookClient extends D3dClient {
|
|
4
|
+
private configFileId;
|
|
5
|
+
private currentUserName;
|
|
6
|
+
constructor(baseUrl: string, repositoryId: string, accessToken: string);
|
|
7
|
+
updateConfiguration(configObject: Object, alterationText: string): Promise<any>;
|
|
8
|
+
private ensureConfigurationFileId;
|
|
9
|
+
getConfiguration(): Promise<any>;
|
|
10
|
+
blockConfiguration(): Promise<void>;
|
|
11
|
+
releaseConfiguration(alterationText?: string): Promise<void>;
|
|
12
|
+
getCurrentUserName(): Promise<string>;
|
|
13
|
+
getNumberRangeInformation(doc: any, config: any): INumberRangePropertyObject[];
|
|
14
|
+
}
|
|
@@ -97,8 +97,8 @@ class D3dWebhookClient extends Yaveon_ECM_d3d_Client_1.D3dClient {
|
|
|
97
97
|
return tenantProperty.value === cp.tenantPropertyValue;
|
|
98
98
|
});
|
|
99
99
|
let numberRangeInformation = [];
|
|
100
|
-
if (tenantInfo
|
|
101
|
-
numberRangeInformation = tenantInfo.properties.filter(p => p.enabledCategories.some(ec => ec.id === doc.categoryId));
|
|
100
|
+
if (tenantInfo) {
|
|
101
|
+
numberRangeInformation = tenantInfo.properties.filter((p) => p.enabledCategories.some((ec) => ec.id === doc.categoryId));
|
|
102
102
|
}
|
|
103
103
|
return numberRangeInformation;
|
|
104
104
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { IDefaultHeaders } from './Yaveon.ECM.d3d.Webhook.Interfaces';
|
|
2
|
-
declare enum _dmsObjectStates {
|
|
3
|
-
Processing = "processing",
|
|
4
|
-
Verifiction = "verification",
|
|
5
|
-
Released = "released",
|
|
6
|
-
Archive = "archive",
|
|
7
|
-
Block = "Block"
|
|
8
|
-
}
|
|
9
|
-
export declare class DmsObjectStates {
|
|
10
|
-
static States: typeof _dmsObjectStates;
|
|
11
|
-
static isValid(stateValue: string): boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const ConfigFileName: string;
|
|
14
|
-
export declare const ConfigFileExtension: string;
|
|
15
|
-
export declare const ConfigFileDisplayName: string;
|
|
16
|
-
export declare const FILE_STATUS_PROPERTY_NAME: string;
|
|
17
|
-
export declare const FILE_STATUS_RELEASED: string;
|
|
18
|
-
export declare const ConfigFileLockedTimeout: number;
|
|
19
|
-
export declare const defaultHeaders: IDefaultHeaders;
|
|
20
|
-
export {};
|
|
1
|
+
import { IDefaultHeaders } from './Yaveon.ECM.d3d.Webhook.Interfaces';
|
|
2
|
+
declare enum _dmsObjectStates {
|
|
3
|
+
Processing = "processing",
|
|
4
|
+
Verifiction = "verification",
|
|
5
|
+
Released = "released",
|
|
6
|
+
Archive = "archive",
|
|
7
|
+
Block = "Block"
|
|
8
|
+
}
|
|
9
|
+
export declare class DmsObjectStates {
|
|
10
|
+
static States: typeof _dmsObjectStates;
|
|
11
|
+
static isValid(stateValue: string): boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const ConfigFileName: string;
|
|
14
|
+
export declare const ConfigFileExtension: string;
|
|
15
|
+
export declare const ConfigFileDisplayName: string;
|
|
16
|
+
export declare const FILE_STATUS_PROPERTY_NAME: string;
|
|
17
|
+
export declare const FILE_STATUS_RELEASED: string;
|
|
18
|
+
export declare const ConfigFileLockedTimeout: number;
|
|
19
|
+
export declare const defaultHeaders: IDefaultHeaders;
|
|
20
|
+
export {};
|
|
@@ -5,24 +5,6 @@ export interface IDefaultHeaders extends RawAxiosRequestHeaders {
|
|
|
5
5
|
Origin: string;
|
|
6
6
|
'Content-Type': string;
|
|
7
7
|
}
|
|
8
|
-
export interface ITenantInformation {
|
|
9
|
-
tenantPropertyGuid: string;
|
|
10
|
-
tenantPropertyId: string;
|
|
11
|
-
tenantPropertyName: string;
|
|
12
|
-
tenantPropertyValue: string;
|
|
13
|
-
properties: INumberRangePropertyObject[];
|
|
14
|
-
}
|
|
15
|
-
export interface INumberRangePropertyObject {
|
|
16
|
-
enabledCategories: IEnabledCategory[];
|
|
17
|
-
numberRangePropertyGuid: string;
|
|
18
|
-
numberRangePropertyId: number;
|
|
19
|
-
numberRangePropertyName: string;
|
|
20
|
-
nextValue: string;
|
|
21
|
-
}
|
|
22
|
-
export interface IEnabledCategory {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
}
|
|
26
8
|
export interface IDocPropertyObject {
|
|
27
9
|
id: string;
|
|
28
10
|
name: string;
|
|
@@ -40,3 +22,64 @@ export interface IWebhookResponse {
|
|
|
40
22
|
reqBody: any;
|
|
41
23
|
resultMsg: string;
|
|
42
24
|
}
|
|
25
|
+
export interface IWebhookConfigurationKeyProperty {
|
|
26
|
+
id: string;
|
|
27
|
+
uniqueId: string;
|
|
28
|
+
displayName: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IWebhookConfigurationBucketProperty extends IWebhookConfigurationKeyProperty {
|
|
31
|
+
url: string;
|
|
32
|
+
key: IWebhookConfigurationKeyProperty;
|
|
33
|
+
mappings: Map<string, string>;
|
|
34
|
+
}
|
|
35
|
+
export interface IWebhookConfigurationFoldersMoveToCategoryKey {
|
|
36
|
+
toPropertyGuid: string;
|
|
37
|
+
toPropertyId: string;
|
|
38
|
+
toPropertyName: string;
|
|
39
|
+
}
|
|
40
|
+
export interface IWebhookConfigurationFoldersMoveToPropertyMapping {
|
|
41
|
+
fromPropertyGuid: string;
|
|
42
|
+
fromPropertyId: string;
|
|
43
|
+
fromPropertyName: string;
|
|
44
|
+
toPropertyGuid: string;
|
|
45
|
+
toPropertyId: string;
|
|
46
|
+
toPropertyName: string;
|
|
47
|
+
}
|
|
48
|
+
export interface IWebhookConfigurationFoldersMoveToCategoryMapping {
|
|
49
|
+
toPropertyGuid: string;
|
|
50
|
+
toPropertyId: string;
|
|
51
|
+
toCategoryKeys: IWebhookConfigurationFoldersMoveToCategoryKey[];
|
|
52
|
+
propertyMapping: IWebhookConfigurationFoldersMoveToPropertyMapping[];
|
|
53
|
+
}
|
|
54
|
+
export interface IWebhookConfigurationFoldersMoveProperty {
|
|
55
|
+
fromCategoryGuid: string;
|
|
56
|
+
fromCategoryId: string;
|
|
57
|
+
toCategoryMappings: IWebhookConfigurationFoldersMoveToCategoryMapping[];
|
|
58
|
+
}
|
|
59
|
+
export interface IWebhookConfigurationNumRangesTenantCategories {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
}
|
|
63
|
+
export interface IWebhookConfigurationNumRangesTenantProperty {
|
|
64
|
+
enabledCategories: IWebhookConfigurationNumRangesTenantCategories[];
|
|
65
|
+
numberRangePropertyGuid: string;
|
|
66
|
+
numberRangePropertyId: string;
|
|
67
|
+
numberRangePropertyName: string;
|
|
68
|
+
nextValue: number;
|
|
69
|
+
}
|
|
70
|
+
export interface IWebhookConfigurationNumRangesTenant {
|
|
71
|
+
tenantPropertyGuid: string;
|
|
72
|
+
tenantPropertyId: string;
|
|
73
|
+
tenantPropertyName: string;
|
|
74
|
+
tenantPropertyValue: string;
|
|
75
|
+
properties: IWebhookConfigurationNumRangesTenantProperty[];
|
|
76
|
+
}
|
|
77
|
+
export interface IWebhookConfiguration {
|
|
78
|
+
buckets: IWebhookConfigurationBucketProperty[];
|
|
79
|
+
folders: {
|
|
80
|
+
move: IWebhookConfigurationFoldersMoveProperty[];
|
|
81
|
+
};
|
|
82
|
+
numberRanges: {
|
|
83
|
+
tenants: IWebhookConfigurationNumRangesTenant[];
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IWebhookResponse } from './Yaveon.ECM.d3d.Webhook.Interfaces';
|
|
2
|
-
export declare let runWebHook: (req: any) => Promise<IWebhookResponse>;
|
|
1
|
+
import { IWebhookResponse } from './Yaveon.ECM.d3d.Webhook.Interfaces';
|
|
2
|
+
export declare let runWebHook: (req: any) => Promise<IWebhookResponse>;
|
|
@@ -30,7 +30,7 @@ let runWebHook = async (req) => {
|
|
|
30
30
|
webHookResponse.resultMsg += 'Setting number range id ';
|
|
31
31
|
let property = doc.properties.find((p) => p.id === numberRangeInfo.numberRangePropertyGuid);
|
|
32
32
|
webHookResponse.resultMsg += 'for \'' + property.name + '\'... ';
|
|
33
|
-
if (property.value === null || property.value ===
|
|
33
|
+
if (property.value === null || property.value === '') {
|
|
34
34
|
property.value = numberRangeInfo.nextValue.toString();
|
|
35
35
|
numberRangeInfo.nextValue += 1;
|
|
36
36
|
configNeedsUpdate = true;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "yaveon.ecm.d3dwebhooks",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "Utility files for triggered d3d webhooks",
|
|
5
|
-
"main": "",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "YAVEON GmbH",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"axios": "1.4"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "yaveon.ecm.d3dwebhooks",
|
|
3
|
+
"version": "0.8.2",
|
|
4
|
+
"description": "Utility files for triggered d3d webhooks",
|
|
5
|
+
"main": "",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "YAVEON GmbH",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"axios": "1.4"
|
|
13
|
+
}
|
|
14
|
+
}
|