@dangl/avacloud-client-node 1.23.0 → 1.25.0-beta0001
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/.swagger-codegen/VERSION +1 -1
- package/api.d.ts +91 -3
- package/api.js +205 -6
- package/api.js.map +1 -1
- package/api.ts +234 -4
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AVACloud API 1.
|
|
2
|
+
* AVACloud API 1.42.0-beta0007
|
|
3
3
|
* AVACloud API specification
|
|
4
4
|
*
|
|
5
|
-
* OpenAPI spec version: 1.
|
|
5
|
+
* OpenAPI spec version: 1.42.0-beta0007
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import localVarRequest = require('request');
|
|
14
14
|
import http = require('http');
|
|
15
15
|
|
|
16
|
-
let defaultBasePath = 'https://avacloud-api.dangl-it.com';
|
|
16
|
+
let defaultBasePath = 'https://avacloud-api-dev.dangl-it.com';
|
|
17
17
|
|
|
18
18
|
// ===============================================
|
|
19
19
|
// This file is autogenerated - Please do not edit
|
|
@@ -1136,6 +1136,21 @@ export class HttpStatusCode {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
1138
|
|
|
1139
|
+
/**
|
|
1140
|
+
* Represents valid IDS Connect versions for export
|
|
1141
|
+
*/
|
|
1142
|
+
export class IdsConnectVersion {
|
|
1143
|
+
|
|
1144
|
+
static discriminator: string | undefined = undefined;
|
|
1145
|
+
|
|
1146
|
+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
|
1147
|
+
];
|
|
1148
|
+
|
|
1149
|
+
static getAttributeTypeMap() {
|
|
1150
|
+
return IdsConnectVersion.attributeTypeMap;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1139
1154
|
/**
|
|
1140
1155
|
* This class represents as identifier of a certain service specification's element and is uniquely within the service specification.
|
|
1141
1156
|
*/
|
|
@@ -2217,6 +2232,10 @@ export class PositionDto extends IElementDto {
|
|
|
2217
2232
|
* HoldOut properties describe services that are to be provided and maintained for a specific time, e.g. fences on a construction site.
|
|
2218
2233
|
*/
|
|
2219
2234
|
'holdOutProperties'?: PositionHoldOutPropertiesDto;
|
|
2235
|
+
/**
|
|
2236
|
+
* This is an informational property, which directly holds a numerical value for an estimated quantity. It is not used for any price calculations.
|
|
2237
|
+
*/
|
|
2238
|
+
'estimatedQuantity'?: number;
|
|
2220
2239
|
|
|
2221
2240
|
static discriminator: string | undefined = undefined;
|
|
2222
2241
|
|
|
@@ -2485,6 +2504,11 @@ export class PositionDto extends IElementDto {
|
|
|
2485
2504
|
"name": "holdOutProperties",
|
|
2486
2505
|
"baseName": "holdOutProperties",
|
|
2487
2506
|
"type": "PositionHoldOutPropertiesDto"
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
"name": "estimatedQuantity",
|
|
2510
|
+
"baseName": "estimatedQuantity",
|
|
2511
|
+
"type": "number"
|
|
2488
2512
|
} ];
|
|
2489
2513
|
|
|
2490
2514
|
static getAttributeTypeMap() {
|
|
@@ -3033,10 +3057,14 @@ export class ProjectDto {
|
|
|
3033
3057
|
*/
|
|
3034
3058
|
'id': string;
|
|
3035
3059
|
/**
|
|
3036
|
-
* This property controls the accuracy of all price properties, meaning how many decimal places are preserved in calculations. It defaults to DEFAULT_PRICE_ACCURACY. Please see the Dangl.AVA documentation for further information about decimal precision.
|
|
3060
|
+
* This property controls the accuracy of all price properties, meaning how many decimal places are preserved in calculations. It defaults to DEFAULT_PRICE_ACCURACY. Please see the Dangl.AVA documentation for further information about decimal precision. If UnitPriceAccuracy is set, then this property is ignored for unit prices.
|
|
3037
3061
|
*/
|
|
3038
3062
|
'priceAccuracy': number;
|
|
3039
3063
|
/**
|
|
3064
|
+
* This property controls the accuracy of position unit price properties, meaning how many decimal places are preserved in calculations. Please see the Dangl.AVA documentation for further information about decimal precision. This can be separately set from PriceAccuracy, and it only controls the accuracy of the unit price of positions, not the total price. It defaults to null, which means the standard PriceAccuracy is used for unit prices.
|
|
3065
|
+
*/
|
|
3066
|
+
'unitPriceAccuracy'?: number;
|
|
3067
|
+
/**
|
|
3040
3068
|
* This forces total prices to be the strict product of quantities times unit price in positions. It is enabled by default. If this is disabled, both the unit price and the total price of positions is calculated from the non-rounded values. Please see the documentation for a more detailed explanation of this setting.
|
|
3041
3069
|
*/
|
|
3042
3070
|
'forceStrictTotals': boolean;
|
|
@@ -3070,6 +3098,11 @@ export class ProjectDto {
|
|
|
3070
3098
|
"baseName": "priceAccuracy",
|
|
3071
3099
|
"type": "number"
|
|
3072
3100
|
},
|
|
3101
|
+
{
|
|
3102
|
+
"name": "unitPriceAccuracy",
|
|
3103
|
+
"baseName": "unitPriceAccuracy",
|
|
3104
|
+
"type": "number"
|
|
3105
|
+
},
|
|
3073
3106
|
{
|
|
3074
3107
|
"name": "forceStrictTotals",
|
|
3075
3108
|
"baseName": "forceStrictTotals",
|
|
@@ -5052,6 +5085,7 @@ let typeMap: {[index: string]: any} = {
|
|
|
5052
5085
|
"HoldOutTypeDto": HoldOutTypeDto,
|
|
5053
5086
|
"HttpStatusCode": HttpStatusCode,
|
|
5054
5087
|
"IElementDto": IElementDto,
|
|
5088
|
+
"IdsConnectVersion": IdsConnectVersion,
|
|
5055
5089
|
"ItemNumberDto": ItemNumberDto,
|
|
5056
5090
|
"ItemNumberSchemaDto": ItemNumberSchemaDto,
|
|
5057
5091
|
"ItemNumberSchemaTierDto": ItemNumberSchemaTierDto,
|
|
@@ -5933,6 +5967,80 @@ export class AvaConversionApi {
|
|
|
5933
5967
|
/**
|
|
5934
5968
|
* This is a generated method that accepts an options object, it simply calls the generated method with the parameter list
|
|
5935
5969
|
*/
|
|
5970
|
+
public avaConversionConvertToIdsConnectWithRequestObject(avaProject: ProjectDto, options: { tryAutoGenerateItemNumbersAndSchema?: boolean, version?: 'V2_5', options?: any }): Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
|
5971
|
+
return this.avaConversionConvertToIdsConnect(avaProject, options.tryAutoGenerateItemNumbersAndSchema, options.version, options.options || {});
|
|
5972
|
+
}
|
|
5973
|
+
|
|
5974
|
+
/**
|
|
5975
|
+
*
|
|
5976
|
+
* @summary Converts Dangl.AVA projects to IDS Connect files
|
|
5977
|
+
* @param avaProject The Dangl.AVA project
|
|
5978
|
+
* @param tryAutoGenerateItemNumbersAndSchema If this is set to true, AVACloud will try to generate item numbers and an item number schema automatically for the input project. The operation will not have any effect if either an item number schema is already present, or if any of the elements already has an item number.
|
|
5979
|
+
* @param version The IDS Connect version to convert to. Defaults to V2_5.
|
|
5980
|
+
* @param {*} [options] Override http request options.
|
|
5981
|
+
*/
|
|
5982
|
+
public avaConversionConvertToIdsConnect (avaProject: ProjectDto, tryAutoGenerateItemNumbersAndSchema?: boolean, version?: 'V2_5', options: any = {}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { const localVarPath = this.basePath + '/conversion/ava/ids-connect';
|
|
5983
|
+
let localVarQueryParameters: any = {};
|
|
5984
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
|
|
5985
|
+
let localVarFormParams: any = {};
|
|
5986
|
+
|
|
5987
|
+
// verify required parameter 'avaProject' is not null or undefined
|
|
5988
|
+
if (avaProject === null || avaProject === undefined) {
|
|
5989
|
+
throw new Error('Required parameter avaProject was null or undefined when calling avaConversionConvertToIdsConnect.');
|
|
5990
|
+
}
|
|
5991
|
+
|
|
5992
|
+
if (tryAutoGenerateItemNumbersAndSchema !== undefined) {
|
|
5993
|
+
localVarQueryParameters['TryAutoGenerateItemNumbersAndSchema'] = ObjectSerializer.serialize(tryAutoGenerateItemNumbersAndSchema, "boolean");
|
|
5994
|
+
}
|
|
5995
|
+
|
|
5996
|
+
if (version !== undefined) {
|
|
5997
|
+
localVarQueryParameters['Version'] = ObjectSerializer.serialize(version, "'V2_5'");
|
|
5998
|
+
}
|
|
5999
|
+
|
|
6000
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
6001
|
+
|
|
6002
|
+
let localVarUseFormData = false;
|
|
6003
|
+
|
|
6004
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
6005
|
+
method: 'POST',
|
|
6006
|
+
qs: localVarQueryParameters,
|
|
6007
|
+
headers: localVarHeaderParams,
|
|
6008
|
+
uri: localVarPath,
|
|
6009
|
+
useQuerystring: this._useQuerystring,
|
|
6010
|
+
encoding: null,
|
|
6011
|
+
body: avaProject,
|
|
6012
|
+
json: true
|
|
6013
|
+
};
|
|
6014
|
+
|
|
6015
|
+
this.authentications['Dangl.Identity'].applyToRequest(localVarRequestOptions);
|
|
6016
|
+
|
|
6017
|
+
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
6018
|
+
|
|
6019
|
+
if (Object.keys(localVarFormParams).length) {
|
|
6020
|
+
if (localVarUseFormData) {
|
|
6021
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
6022
|
+
} else {
|
|
6023
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
6024
|
+
}
|
|
6025
|
+
}
|
|
6026
|
+
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
|
6027
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
6028
|
+
if (error) {
|
|
6029
|
+
reject(error);
|
|
6030
|
+
} else {
|
|
6031
|
+
body = ObjectSerializer.deserialize(body, "Buffer");
|
|
6032
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
6033
|
+
resolve({ response: response, body: body });
|
|
6034
|
+
} else {
|
|
6035
|
+
reject({ response: response, body: body });
|
|
6036
|
+
}
|
|
6037
|
+
}
|
|
6038
|
+
});
|
|
6039
|
+
});
|
|
6040
|
+
}
|
|
6041
|
+
/**
|
|
6042
|
+
* This is a generated method that accepts an options object, it simply calls the generated method with the parameter list
|
|
6043
|
+
*/
|
|
5936
6044
|
public avaConversionConvertToOenormWithRequestObject(avaProject: ProjectDto, options: { tryAutoGenerateItemNumbersAndSchema?: boolean, destinationOenormType?: 'Lv2015' | 'Lb2015' | 'B2063' | 'Lv2009' | 'Lb2009' | 'Lv2021' | 'Lb2021', tryRepairProjectStructure?: boolean, skipTryEnforceSchemaCompliantXmlOutput?: boolean, removeUnprintableCharactersFromTexts?: boolean, options?: any }): Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
|
5937
6045
|
return this.avaConversionConvertToOenorm(avaProject, options.tryAutoGenerateItemNumbersAndSchema, options.destinationOenormType, options.tryRepairProjectStructure, options.skipTryEnforceSchemaCompliantXmlOutput, options.removeUnprintableCharactersFromTexts, options.options || {});
|
|
5938
6046
|
}
|
|
@@ -7621,6 +7729,128 @@ export class GaebConversionApi {
|
|
|
7621
7729
|
});
|
|
7622
7730
|
}
|
|
7623
7731
|
}
|
|
7732
|
+
export enum IdsConnectConversionApiApiKeys {
|
|
7733
|
+
}
|
|
7734
|
+
|
|
7735
|
+
export class IdsConnectConversionApi {
|
|
7736
|
+
protected _basePath = defaultBasePath;
|
|
7737
|
+
protected defaultHeaders : any = {};
|
|
7738
|
+
protected _useQuerystring : boolean = false;
|
|
7739
|
+
|
|
7740
|
+
protected authentications = {
|
|
7741
|
+
'default': <Authentication>new VoidAuth(),
|
|
7742
|
+
'Dangl.Identity': new OAuth(),
|
|
7743
|
+
}
|
|
7744
|
+
|
|
7745
|
+
constructor(basePath?: string);
|
|
7746
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
7747
|
+
if (password) {
|
|
7748
|
+
if (basePath) {
|
|
7749
|
+
this.basePath = basePath;
|
|
7750
|
+
}
|
|
7751
|
+
} else {
|
|
7752
|
+
if (basePathOrUsername) {
|
|
7753
|
+
this.basePath = basePathOrUsername
|
|
7754
|
+
}
|
|
7755
|
+
}
|
|
7756
|
+
}
|
|
7757
|
+
|
|
7758
|
+
set useQuerystring(value: boolean) {
|
|
7759
|
+
this._useQuerystring = value;
|
|
7760
|
+
}
|
|
7761
|
+
|
|
7762
|
+
set basePath(basePath: string) {
|
|
7763
|
+
this._basePath = basePath;
|
|
7764
|
+
}
|
|
7765
|
+
|
|
7766
|
+
get basePath() {
|
|
7767
|
+
return this._basePath;
|
|
7768
|
+
}
|
|
7769
|
+
|
|
7770
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
7771
|
+
this.authentications.default = auth;
|
|
7772
|
+
}
|
|
7773
|
+
|
|
7774
|
+
public setApiKey(key: IdsConnectConversionApiApiKeys, value: string) {
|
|
7775
|
+
(this.authentications as any)[IdsConnectConversionApiApiKeys[key]].apiKey = value;
|
|
7776
|
+
}
|
|
7777
|
+
|
|
7778
|
+
set accessToken(token: string) {
|
|
7779
|
+
this.authentications['Dangl.Identity'].accessToken = token;
|
|
7780
|
+
}
|
|
7781
|
+
/**
|
|
7782
|
+
* This is a generated method that accepts an options object, it simply calls the generated method with the parameter list
|
|
7783
|
+
*/
|
|
7784
|
+
public idsConnectConversionConvertToAvaWithRequestObject(idsConnectFile: FileParameter, options: { removePlainTextLongTexts?: boolean, removeHtmlLongTexts?: boolean, options?: any }): Promise<{ response: http.IncomingMessage; body: ProjectDto; }> {
|
|
7785
|
+
return this.idsConnectConversionConvertToAva(idsConnectFile, options.removePlainTextLongTexts, options.removeHtmlLongTexts, options.options || {});
|
|
7786
|
+
}
|
|
7787
|
+
|
|
7788
|
+
/**
|
|
7789
|
+
*
|
|
7790
|
+
* @summary Converts IDS Connect files to Dangl.AVA projects
|
|
7791
|
+
* @param idsConnectFile The input file
|
|
7792
|
+
* @param removePlainTextLongTexts If set to true, plain text long texts will be removed from the output to reduce response sizes
|
|
7793
|
+
* @param removeHtmlLongTexts If set to true, html long texts will be removed from the output to reduce response sizes
|
|
7794
|
+
* @param {*} [options] Override http request options.
|
|
7795
|
+
*/
|
|
7796
|
+
public idsConnectConversionConvertToAva (idsConnectFile: FileParameter, removePlainTextLongTexts?: boolean, removeHtmlLongTexts?: boolean, options: any = {}) : Promise<{ response: http.IncomingMessage; body: ProjectDto; }> { const localVarPath = this.basePath + '/conversion/ids-connect/ava';
|
|
7797
|
+
let localVarQueryParameters: any = {};
|
|
7798
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
|
|
7799
|
+
let localVarFormParams: any = {};
|
|
7800
|
+
|
|
7801
|
+
if (removePlainTextLongTexts !== undefined) {
|
|
7802
|
+
localVarQueryParameters['RemovePlainTextLongTexts'] = ObjectSerializer.serialize(removePlainTextLongTexts, "boolean");
|
|
7803
|
+
}
|
|
7804
|
+
|
|
7805
|
+
if (removeHtmlLongTexts !== undefined) {
|
|
7806
|
+
localVarQueryParameters['RemoveHtmlLongTexts'] = ObjectSerializer.serialize(removeHtmlLongTexts, "boolean");
|
|
7807
|
+
}
|
|
7808
|
+
|
|
7809
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
7810
|
+
|
|
7811
|
+
let localVarUseFormData = false;
|
|
7812
|
+
|
|
7813
|
+
if (idsConnectFile !== undefined) {
|
|
7814
|
+
localVarFormParams['idsConnectFile'] = idsConnectFile;
|
|
7815
|
+
}
|
|
7816
|
+
localVarUseFormData = true;
|
|
7817
|
+
|
|
7818
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
7819
|
+
method: 'POST',
|
|
7820
|
+
qs: localVarQueryParameters,
|
|
7821
|
+
headers: localVarHeaderParams,
|
|
7822
|
+
uri: localVarPath,
|
|
7823
|
+
useQuerystring: this._useQuerystring,
|
|
7824
|
+
json: true,
|
|
7825
|
+
};
|
|
7826
|
+
|
|
7827
|
+
this.authentications['Dangl.Identity'].applyToRequest(localVarRequestOptions);
|
|
7828
|
+
|
|
7829
|
+
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
7830
|
+
|
|
7831
|
+
if (Object.keys(localVarFormParams).length) {
|
|
7832
|
+
if (localVarUseFormData) {
|
|
7833
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
7834
|
+
} else {
|
|
7835
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
7836
|
+
}
|
|
7837
|
+
}
|
|
7838
|
+
return new Promise<{ response: http.IncomingMessage; body: ProjectDto; }>((resolve, reject) => {
|
|
7839
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
7840
|
+
if (error) {
|
|
7841
|
+
reject(error);
|
|
7842
|
+
} else {
|
|
7843
|
+
body = ObjectSerializer.deserialize(body, "ProjectDto");
|
|
7844
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
7845
|
+
resolve({ response: response, body: body });
|
|
7846
|
+
} else {
|
|
7847
|
+
reject({ response: response, body: body });
|
|
7848
|
+
}
|
|
7849
|
+
}
|
|
7850
|
+
});
|
|
7851
|
+
});
|
|
7852
|
+
}
|
|
7853
|
+
}
|
|
7624
7854
|
export enum OenormConversionApiApiKeys {
|
|
7625
7855
|
}
|
|
7626
7856
|
|