@dangl/avacloud-client-node 1.61.1-beta0014-avacloud-preview → 1.62.0-avacloud-preview

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.
Files changed (5) hide show
  1. package/api.d.ts +60 -0
  2. package/api.js +198 -3
  3. package/api.js.map +1 -1
  4. package/api.ts +226 -0
  5. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -377,6 +377,26 @@ export declare class AvaConversionApi {
377
377
  avaConversionConvertToIdsConnect(avaProject: ProjectDto, tryAutoGenerateItemNumbersAndSchema?: boolean | undefined, version?: IdsConnectVersion | undefined): Promise<SwaggerResponse<FileResponse>>;
378
378
  protected processAvaConversionConvertToIdsConnect(response: Response): Promise<SwaggerResponse<FileResponse>>;
379
379
  }
380
+ export declare class AvaMergeApi {
381
+ private http;
382
+ private _accessToken;
383
+ set accessToken(token: string | null);
384
+ private baseUrl;
385
+ get basePath(): string;
386
+ set basePath(value: string);
387
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
388
+ constructor(baseUrl?: string, http?: {
389
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
390
+ });
391
+ /**
392
+ * This will merge two AVA projects into one. Typically this is used for merging offers into a base project, which
393
+ preserves the base projects structure and adds prices and text additions from the offer project.
394
+ This is currently in a preview phase, and the endpoint and its models are subject to change in the next versions
395
+ of AVACloud.
396
+ */
397
+ avaMergeConvertToAva(mergeConfiguration: PostAvaProjectMerge): Promise<SwaggerResponse<GetProjectMergeResult>>;
398
+ protected processAvaMergeConvertToAva(response: Response): Promise<SwaggerResponse<GetProjectMergeResult>>;
399
+ }
380
400
  export declare class DatanormConversionApi {
381
401
  private http;
382
402
  private _accessToken;
@@ -3933,6 +3953,46 @@ export declare enum UglDestinationVersion {
3933
3953
  export declare enum IdsConnectVersion {
3934
3954
  V2_5 = "V2_5"
3935
3955
  }
3956
+ /** This represents the result of merging two AVA projects. */
3957
+ export declare class GetProjectMergeResult implements IGetProjectMergeResult {
3958
+ /** The resulting merged project. */
3959
+ mergedProject?: ProjectDto | undefined;
3960
+ /** Elements that were present in the source project, but could not be matched to any element in the target project. */
3961
+ nonMatchedSourceElements?: IElementDto[] | undefined;
3962
+ /** Elements that were present in the target project, but could not be matched to any element in the source project. */
3963
+ nonMatchedTargetElements?: IElementDto[] | undefined;
3964
+ constructor(data?: IGetProjectMergeResult);
3965
+ init?(_data?: any): void;
3966
+ static fromJS(data: any): GetProjectMergeResult;
3967
+ toJSON?(data?: any): any;
3968
+ }
3969
+ /** This represents the result of merging two AVA projects. */
3970
+ export interface IGetProjectMergeResult {
3971
+ /** The resulting merged project. */
3972
+ mergedProject?: IProjectDto | undefined;
3973
+ /** Elements that were present in the source project, but could not be matched to any element in the target project. */
3974
+ nonMatchedSourceElements?: IElementDto[] | undefined;
3975
+ /** Elements that were present in the target project, but could not be matched to any element in the source project. */
3976
+ nonMatchedTargetElements?: IElementDto[] | undefined;
3977
+ }
3978
+ /** This model represents the configuration needed to merge two AVA projects. */
3979
+ export declare class PostAvaProjectMerge implements IPostAvaProjectMerge {
3980
+ /** The source project from which to take prices and text additions. */
3981
+ sourceProject?: ProjectDto | undefined;
3982
+ /** The target project which will keep its structure and receive prices and text additions from the source project. */
3983
+ targetProject?: ProjectDto | undefined;
3984
+ constructor(data?: IPostAvaProjectMerge);
3985
+ init?(_data?: any): void;
3986
+ static fromJS(data: any): PostAvaProjectMerge;
3987
+ toJSON?(data?: any): any;
3988
+ }
3989
+ /** This model represents the configuration needed to merge two AVA projects. */
3990
+ export interface IPostAvaProjectMerge {
3991
+ /** The source project from which to take prices and text additions. */
3992
+ sourceProject?: IProjectDto | undefined;
3993
+ /** The target project which will keep its structure and receive prices and text additions from the source project. */
3994
+ targetProject?: IProjectDto | undefined;
3995
+ }
3936
3996
  /** Indicates the status of the AVACloud service */
3937
3997
  export declare class GetStatus implements IGetStatus {
3938
3998
  /** If any problems in the service health are known, this is set to false */
package/api.js CHANGED
@@ -5,9 +5,9 @@
5
5
  // </auto-generated>
6
6
  //----------------------
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ArticleDataDto = exports.ProductDataDto = exports.ServiceTypeDto = exports.PriceTypeDto = exports.PositionTypeDto = exports.ItemNumberDto = exports.ComissionStatusDto = exports.STLBKeyDto = exports.STLBReferenceDto = exports.StandardReferenceTypeDto = exports.StandardizedDescriptionDto = exports.AdditionTypeDto = exports.SubDescriptionDto = exports.PriceComponentDto = exports.CalculationDto = exports.LabourPriceComponentDto = exports.PositionDto = exports.CatalogueReferenceDto = exports.CatalogueTypeDto = exports.CatalogueDto = exports.IElementDto = exports.ServiceSpecificationDto = exports.SpecialAwardKindDto = exports.AwardTypeDto = exports.PriceComponentTypeDto = exports.ItemNumberSchemaTierTypeDto = exports.ItemNumberSchemaTierAlignmentDto = exports.ItemNumberTypeDto = exports.ItemNumberSchemaTierDto = exports.ItemNumberSchemaDto = exports.BankingInformationDto = exports.PartyInformationDto = exports.ProjectInformationDto = exports.PriceRoundingModeDto = exports.ProjectDto = exports.DanglIdentityApi = exports.XRechnungConversionApi = exports.ValidationApi = exports.UglConversionApi = exports.StatusApi = exports.SiaConversionApi = exports.RebConversionApi = exports.OenormConversionApi = exports.IdsConnectConversionApi = exports.GaebConversionApi = exports.FlatAvaConversionApi = exports.ExcelConversionApi = exports.DatanormConversionApi = exports.AvaConversionApi = exports.AslvConversionApi = void 0;
9
- exports.PostGaebDestinationOptions = exports.PostOenormDestinationOptions = exports.PostAvaSourceOptions = exports.PostAvaProjectValidationSourceOptions = exports.FileValidationSourceType = exports.ValidationType = exports.ProjectValidationCheckDetails = exports.XmlSchemaValidationCheckDetails = exports.ObjectValidationCheckDetails = exports.ValidationCheckType = exports.ValidationSeverity = exports.ValidationCheckResult = exports.ValidationResult = exports.GetStatus = exports.IdsConnectVersion = exports.UglDestinationVersion = exports.DatanormDestinationVersion = exports.SiaDestinationType = exports.DestinationRebType = exports.DestinationOenormType = exports.DestinationGaebExchangePhase = exports.DestinationGaebType = exports.FlatElementDto = exports.FlatAvaProject = exports.ApiError = exports.CommerceInquiryTypeDto = exports.ServiceSpecificationCommercePropertiesDto = exports.DurationUnitDto = exports.WarrantyDurationDto = exports.TradeDiscountDto = exports.PriceInformationDto = exports.OriginDto = exports.ExchangePhaseDto = exports.OenormPropertiesDto = exports.GrossPriceComponentDto = exports.ServiceSpecificationGroupDto = exports.OenormNoteTextPropertiesDto = exports.NoteTextDto = exports.ExecutionDescriptionDto = exports.PriceCatalogueDataDto = exports.HoldOutDurationUnitDto = exports.HoldOutTypeDto = exports.PositionHoldOutPropertiesDto = exports.PositionComplementingTypeDto = exports.AddendumStatusDto = exports.OenormOriginCodeDto = exports.OenormPositionPropertiesDto = exports.ComplementedByQuantityDto = exports.CommercePropertiesDto = exports.QuantityAssignmentDto = void 0;
10
- exports.ApiException = exports.SwaggerResponse = exports.ClaimGet = exports.UserInfoGet = exports.ForgotPasswordPost = exports.RegisterPost = exports.TokenRefreshPost = exports.TokenLoginPost = exports.ResponseErrorType = exports.HttpStatusCode = exports.TokenResponseGet = exports.LoginPost = exports.DestinationXRechnungFormat = exports.AvaProjectWrapper = exports.SourceType = exports.LineItemAttribute = exports.LineItemInformation = exports.LineItemVatInformation = exports.LineItemPriceDetail = exports.LineItemCharge = exports.LineItemAllowance = exports.InvoiceLineItem = exports.ChargeReasonType = exports.InvoiceCharge = exports.AllowanceReasonType = exports.InvoiceAllowance = exports.VatCategory = exports.VatBreakdown = exports.AttachmentMimeType = exports.SupportingDocument = exports.PaymentMeans = exports.PaymentType = exports.PaymentInstructions = exports.InvoiceTotals = exports.DeliveryAddress = exports.DeliveryInformation = exports.InvoicePeriod = exports.ShortTextType = exports.InvoiceNote = exports.Payee = exports.Organization = exports.PreviousInvoice = exports.PaymentTerm = exports.References = exports.InvoiceType = exports.Invoice = void 0;
8
+ exports.ProductDataDto = exports.ServiceTypeDto = exports.PriceTypeDto = exports.PositionTypeDto = exports.ItemNumberDto = exports.ComissionStatusDto = exports.STLBKeyDto = exports.STLBReferenceDto = exports.StandardReferenceTypeDto = exports.StandardizedDescriptionDto = exports.AdditionTypeDto = exports.SubDescriptionDto = exports.PriceComponentDto = exports.CalculationDto = exports.LabourPriceComponentDto = exports.PositionDto = exports.CatalogueReferenceDto = exports.CatalogueTypeDto = exports.CatalogueDto = exports.IElementDto = exports.ServiceSpecificationDto = exports.SpecialAwardKindDto = exports.AwardTypeDto = exports.PriceComponentTypeDto = exports.ItemNumberSchemaTierTypeDto = exports.ItemNumberSchemaTierAlignmentDto = exports.ItemNumberTypeDto = exports.ItemNumberSchemaTierDto = exports.ItemNumberSchemaDto = exports.BankingInformationDto = exports.PartyInformationDto = exports.ProjectInformationDto = exports.PriceRoundingModeDto = exports.ProjectDto = exports.DanglIdentityApi = exports.XRechnungConversionApi = exports.ValidationApi = exports.UglConversionApi = exports.StatusApi = exports.SiaConversionApi = exports.RebConversionApi = exports.OenormConversionApi = exports.IdsConnectConversionApi = exports.GaebConversionApi = exports.FlatAvaConversionApi = exports.ExcelConversionApi = exports.DatanormConversionApi = exports.AvaMergeApi = exports.AvaConversionApi = exports.AslvConversionApi = void 0;
9
+ exports.PostAvaProjectValidationSourceOptions = exports.FileValidationSourceType = exports.ValidationType = exports.ProjectValidationCheckDetails = exports.XmlSchemaValidationCheckDetails = exports.ObjectValidationCheckDetails = exports.ValidationCheckType = exports.ValidationSeverity = exports.ValidationCheckResult = exports.ValidationResult = exports.GetStatus = exports.PostAvaProjectMerge = exports.GetProjectMergeResult = exports.IdsConnectVersion = exports.UglDestinationVersion = exports.DatanormDestinationVersion = exports.SiaDestinationType = exports.DestinationRebType = exports.DestinationOenormType = exports.DestinationGaebExchangePhase = exports.DestinationGaebType = exports.FlatElementDto = exports.FlatAvaProject = exports.ApiError = exports.CommerceInquiryTypeDto = exports.ServiceSpecificationCommercePropertiesDto = exports.DurationUnitDto = exports.WarrantyDurationDto = exports.TradeDiscountDto = exports.PriceInformationDto = exports.OriginDto = exports.ExchangePhaseDto = exports.OenormPropertiesDto = exports.GrossPriceComponentDto = exports.ServiceSpecificationGroupDto = exports.OenormNoteTextPropertiesDto = exports.NoteTextDto = exports.ExecutionDescriptionDto = exports.PriceCatalogueDataDto = exports.HoldOutDurationUnitDto = exports.HoldOutTypeDto = exports.PositionHoldOutPropertiesDto = exports.PositionComplementingTypeDto = exports.AddendumStatusDto = exports.OenormOriginCodeDto = exports.OenormPositionPropertiesDto = exports.ComplementedByQuantityDto = exports.CommercePropertiesDto = exports.QuantityAssignmentDto = exports.ArticleDataDto = void 0;
10
+ exports.ApiException = exports.SwaggerResponse = exports.ClaimGet = exports.UserInfoGet = exports.ForgotPasswordPost = exports.RegisterPost = exports.TokenRefreshPost = exports.TokenLoginPost = exports.ResponseErrorType = exports.HttpStatusCode = exports.TokenResponseGet = exports.LoginPost = exports.DestinationXRechnungFormat = exports.AvaProjectWrapper = exports.SourceType = exports.LineItemAttribute = exports.LineItemInformation = exports.LineItemVatInformation = exports.LineItemPriceDetail = exports.LineItemCharge = exports.LineItemAllowance = exports.InvoiceLineItem = exports.ChargeReasonType = exports.InvoiceCharge = exports.AllowanceReasonType = exports.InvoiceAllowance = exports.VatCategory = exports.VatBreakdown = exports.AttachmentMimeType = exports.SupportingDocument = exports.PaymentMeans = exports.PaymentType = exports.PaymentInstructions = exports.InvoiceTotals = exports.DeliveryAddress = exports.DeliveryInformation = exports.InvoicePeriod = exports.ShortTextType = exports.InvoiceNote = exports.Payee = exports.Organization = exports.PreviousInvoice = exports.PaymentTerm = exports.References = exports.InvoiceType = exports.Invoice = exports.PostGaebDestinationOptions = exports.PostOenormDestinationOptions = exports.PostAvaSourceOptions = void 0;
11
11
  /* tslint:disable */
12
12
  /* eslint-disable */
13
13
  // ReSharper disable InconsistentNaming
@@ -1346,6 +1346,80 @@ class AvaConversionApi {
1346
1346
  }
1347
1347
  }
1348
1348
  exports.AvaConversionApi = AvaConversionApi;
1349
+ class AvaMergeApi {
1350
+ set accessToken(token) {
1351
+ this._accessToken = token;
1352
+ }
1353
+ get basePath() {
1354
+ return this.baseUrl;
1355
+ }
1356
+ set basePath(value) {
1357
+ this.baseUrl = value;
1358
+ }
1359
+ constructor(baseUrl, http) {
1360
+ this._accessToken = null;
1361
+ this.jsonParseReviver = undefined;
1362
+ this.http = http ? http : (typeof window !== 'undefined' ? window : { fetch });
1363
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "https://avacloud-api.dangl-it.com";
1364
+ }
1365
+ /**
1366
+ * This will merge two AVA projects into one. Typically this is used for merging offers into a base project, which
1367
+ preserves the base projects structure and adds prices and text additions from the offer project.
1368
+ This is currently in a preview phase, and the endpoint and its models are subject to change in the next versions
1369
+ of AVACloud.
1370
+ */
1371
+ avaMergeConvertToAva(mergeConfiguration) {
1372
+ let url_ = this.baseUrl + "/ava-merge";
1373
+ url_ = url_.replace(/[?&]$/, "");
1374
+ const content_ = JSON.stringify(mergeConfiguration);
1375
+ let options_ = {
1376
+ body: content_,
1377
+ method: "POST",
1378
+ headers: {
1379
+ "Content-Type": "application/json",
1380
+ "Accept": "application/vnd.com.dangl-it.ProjectDto.v1+json"
1381
+ }
1382
+ };
1383
+ if (this._accessToken) {
1384
+ options_.headers = options_.headers || {};
1385
+ options_.headers['Authorization'] = `Bearer ${this._accessToken}`;
1386
+ }
1387
+ return this.http.fetch(url_, options_).then((_response) => {
1388
+ return this.processAvaMergeConvertToAva(_response);
1389
+ });
1390
+ }
1391
+ processAvaMergeConvertToAva(response) {
1392
+ const status = response.status;
1393
+ let _headers = {};
1394
+ if (response.headers && response.headers.forEach) {
1395
+ response.headers.forEach((v, k) => _headers[k] = v);
1396
+ }
1397
+ ;
1398
+ if (status === 200) {
1399
+ return response.text().then((_responseText) => {
1400
+ let result200 = null;
1401
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1402
+ result200 = GetProjectMergeResult.fromJS(resultData200);
1403
+ return new SwaggerResponse(status, _headers, result200);
1404
+ });
1405
+ }
1406
+ else if (status === 400) {
1407
+ return response.text().then((_responseText) => {
1408
+ let result400 = null;
1409
+ let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1410
+ result400 = ApiError.fromJS(resultData400);
1411
+ return throwException("A server side error occurred.", status, _responseText, _headers, result400);
1412
+ });
1413
+ }
1414
+ else if (status !== 200 && status !== 204) {
1415
+ return response.text().then((_responseText) => {
1416
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1417
+ });
1418
+ }
1419
+ return Promise.resolve(new SwaggerResponse(status, _headers, null));
1420
+ }
1421
+ }
1422
+ exports.AvaMergeApi = AvaMergeApi;
1349
1423
  class DatanormConversionApi {
1350
1424
  set accessToken(token) {
1351
1425
  this._accessToken = token;
@@ -9349,6 +9423,127 @@ var IdsConnectVersion;
9349
9423
  (function (IdsConnectVersion) {
9350
9424
  IdsConnectVersion["V2_5"] = "V2_5";
9351
9425
  })(IdsConnectVersion = exports.IdsConnectVersion || (exports.IdsConnectVersion = {}));
9426
+ /** This represents the result of merging two AVA projects. */
9427
+ class GetProjectMergeResult {
9428
+ constructor(data) {
9429
+ if (data) {
9430
+ for (var property in data) {
9431
+ if (data.hasOwnProperty(property))
9432
+ this[property] = data[property];
9433
+ }
9434
+ this.mergedProject = data.mergedProject && !data.mergedProject.toJSON ? new ProjectDto(data.mergedProject) : this.mergedProject;
9435
+ }
9436
+ }
9437
+ init(_data) {
9438
+ if (_data) {
9439
+ this.mergedProject = _data["mergedProject"] ? ProjectDto.fromJS(_data["mergedProject"]) : undefined;
9440
+ if (Array.isArray(_data["nonMatchedSourceElements"])) {
9441
+ this.nonMatchedSourceElements = [];
9442
+ for (let item of _data["nonMatchedSourceElements"])
9443
+ this.nonMatchedSourceElements.push(IElementDto.fromJS(item));
9444
+ }
9445
+ if (Array.isArray(_data["nonMatchedTargetElements"])) {
9446
+ this.nonMatchedTargetElements = [];
9447
+ for (let item of _data["nonMatchedTargetElements"])
9448
+ this.nonMatchedTargetElements.push(IElementDto.fromJS(item));
9449
+ }
9450
+ }
9451
+ }
9452
+ static fromJS(data) {
9453
+ data = typeof data === 'object' ? data : {};
9454
+ let result = new GetProjectMergeResult();
9455
+ result.init(data);
9456
+ return result;
9457
+ }
9458
+ toJSON(data) {
9459
+ data = typeof data === 'object' ? data : {};
9460
+ if (this.mergedProject) {
9461
+ if (typeof this.mergedProject.toJSON !== "undefined") {
9462
+ data["mergedProject"] = this.mergedProject.toJSON();
9463
+ }
9464
+ else {
9465
+ data["mergedProject"] = this.mergedProject;
9466
+ }
9467
+ }
9468
+ else {
9469
+ data["mergedProject"] = undefined;
9470
+ }
9471
+ if (Array.isArray(this.nonMatchedSourceElements)) {
9472
+ data["nonMatchedSourceElements"] = [];
9473
+ for (let item of this.nonMatchedSourceElements)
9474
+ if (typeof item.toJSON !== "undefined") {
9475
+ data["nonMatchedSourceElements"].push(item.toJSON());
9476
+ }
9477
+ else {
9478
+ data["nonMatchedSourceElements"].push(item);
9479
+ }
9480
+ }
9481
+ if (Array.isArray(this.nonMatchedTargetElements)) {
9482
+ data["nonMatchedTargetElements"] = [];
9483
+ for (let item of this.nonMatchedTargetElements)
9484
+ if (typeof item.toJSON !== "undefined") {
9485
+ data["nonMatchedTargetElements"].push(item.toJSON());
9486
+ }
9487
+ else {
9488
+ data["nonMatchedTargetElements"].push(item);
9489
+ }
9490
+ }
9491
+ return data;
9492
+ }
9493
+ }
9494
+ exports.GetProjectMergeResult = GetProjectMergeResult;
9495
+ /** This model represents the configuration needed to merge two AVA projects. */
9496
+ class PostAvaProjectMerge {
9497
+ constructor(data) {
9498
+ if (data) {
9499
+ for (var property in data) {
9500
+ if (data.hasOwnProperty(property))
9501
+ this[property] = data[property];
9502
+ }
9503
+ this.sourceProject = data.sourceProject && !data.sourceProject.toJSON ? new ProjectDto(data.sourceProject) : this.sourceProject;
9504
+ this.targetProject = data.targetProject && !data.targetProject.toJSON ? new ProjectDto(data.targetProject) : this.targetProject;
9505
+ }
9506
+ }
9507
+ init(_data) {
9508
+ if (_data) {
9509
+ this.sourceProject = _data["sourceProject"] ? ProjectDto.fromJS(_data["sourceProject"]) : undefined;
9510
+ this.targetProject = _data["targetProject"] ? ProjectDto.fromJS(_data["targetProject"]) : undefined;
9511
+ }
9512
+ }
9513
+ static fromJS(data) {
9514
+ data = typeof data === 'object' ? data : {};
9515
+ let result = new PostAvaProjectMerge();
9516
+ result.init(data);
9517
+ return result;
9518
+ }
9519
+ toJSON(data) {
9520
+ data = typeof data === 'object' ? data : {};
9521
+ if (this.sourceProject) {
9522
+ if (typeof this.sourceProject.toJSON !== "undefined") {
9523
+ data["sourceProject"] = this.sourceProject.toJSON();
9524
+ }
9525
+ else {
9526
+ data["sourceProject"] = this.sourceProject;
9527
+ }
9528
+ }
9529
+ else {
9530
+ data["sourceProject"] = undefined;
9531
+ }
9532
+ if (this.targetProject) {
9533
+ if (typeof this.targetProject.toJSON !== "undefined") {
9534
+ data["targetProject"] = this.targetProject.toJSON();
9535
+ }
9536
+ else {
9537
+ data["targetProject"] = this.targetProject;
9538
+ }
9539
+ }
9540
+ else {
9541
+ data["targetProject"] = undefined;
9542
+ }
9543
+ return data;
9544
+ }
9545
+ }
9546
+ exports.PostAvaProjectMerge = PostAvaProjectMerge;
9352
9547
  /** Indicates the status of the AVACloud service */
9353
9548
  class GetStatus {
9354
9549
  constructor(data) {