@dangl/avacloud-client-node 1.63.3-beta0001-avacloud-preview → 1.63.4-beta0005-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 +76 -0
  2. package/api.js +114 -1
  3. package/api.js.map +1 -1
  4. package/api.ts +180 -0
  5. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -4431,6 +4431,9 @@ Single line items in the invoice */
4431
4431
  lineItems?: InvoiceLineItem[] | undefined;
4432
4432
  /** The source type from which the invoice was created */
4433
4433
  sourceType: SourceType;
4434
+ /** In case the original invoice document was in Factur-X / ZUGFeRD format, this property can hold
4435
+ additional Factur-X specific data that is not part of the XRechnung specification */
4436
+ facturXData?: FacturXData | undefined;
4434
4437
  constructor(data?: IInvoice);
4435
4438
  init?(_data?: any): void;
4436
4439
  static fromJS(data: any): Invoice;
@@ -4510,6 +4513,9 @@ Single line items in the invoice */
4510
4513
  lineItems?: IInvoiceLineItem[] | undefined;
4511
4514
  /** The source type from which the invoice was created */
4512
4515
  sourceType: SourceType;
4516
+ /** In case the original invoice document was in Factur-X / ZUGFeRD format, this property can hold
4517
+ additional Factur-X specific data that is not part of the XRechnung specification */
4518
+ facturXData?: IFacturXData | undefined;
4513
4519
  }
4514
4520
  /** Type of the invoice */
4515
4521
  export declare enum InvoiceType {
@@ -5532,6 +5538,7 @@ export declare enum PaymentType {
5532
5538
  ClearingBetweenPartners = "ClearingBetweenPartners",
5533
5539
  JPElectronicallyRecordedMonetaryClaims = "JPElectronicallyRecordedMonetaryClaims"
5534
5540
  }
5541
+ /** BG-16, BG-17 & BG-18 Represents a payment means for an invoice */
5535
5542
  export declare class PaymentMeans implements IPaymentMeans {
5536
5543
  /** BT-84
5537
5544
  This is typically the IBAN or account number
@@ -5577,6 +5584,7 @@ https://github.com/itplr-kosit/validator-configuration-xrechnung/issues/53 */
5577
5584
  static fromJS(data: any): PaymentMeans;
5578
5585
  toJSON?(data?: any): any;
5579
5586
  }
5587
+ /** BG-16, BG-17 & BG-18 Represents a payment means for an invoice */
5580
5588
  export interface IPaymentMeans {
5581
5589
  /** BT-84
5582
5590
  This is typically the IBAN or account number
@@ -6541,6 +6549,74 @@ export declare enum SourceType {
6541
6549
  Cii = "Cii",
6542
6550
  FacturX = "FacturX"
6543
6551
  }
6552
+ /** Represents data related to Factur-X, including additional payment terms. */
6553
+ export declare class FacturXData implements IFacturXData {
6554
+ /** The field BT-20 in XRechnung can only hold one payment term, but Factur-X / ZUGFeRD
6555
+ allows multiple payment terms. If the invoice was originally created in Factur-X / ZUGFeRD format,
6556
+ then this property holds all additional payment terms except the first one. Similar,
6557
+ on export, this property is used to export additional payment terms to Factur-X / ZUGFeRD. */
6558
+ additionalPaymentTerms?: string[] | undefined;
6559
+ /** Factur-X / ZUGFeRD allows a more detailled representation of payment discount terms. */
6560
+ facturXPaymentDiscountTerms?: FacturXPaymentDiscountTerm[] | undefined;
6561
+ constructor(data?: IFacturXData);
6562
+ init?(_data?: any): void;
6563
+ static fromJS(data: any): FacturXData;
6564
+ toJSON?(data?: any): any;
6565
+ }
6566
+ /** Represents data related to Factur-X, including additional payment terms. */
6567
+ export interface IFacturXData {
6568
+ /** The field BT-20 in XRechnung can only hold one payment term, but Factur-X / ZUGFeRD
6569
+ allows multiple payment terms. If the invoice was originally created in Factur-X / ZUGFeRD format,
6570
+ then this property holds all additional payment terms except the first one. Similar,
6571
+ on export, this property is used to export additional payment terms to Factur-X / ZUGFeRD. */
6572
+ additionalPaymentTerms?: string[] | undefined;
6573
+ /** Factur-X / ZUGFeRD allows a more detailled representation of payment discount terms. */
6574
+ facturXPaymentDiscountTerms?: IFacturXPaymentDiscountTerm[] | undefined;
6575
+ }
6576
+ /** Factur-X / ZUGFeRD allows a more detailled representation of payment discount terms. If those are present in the invoice, they will be stored in this object. */
6577
+ export declare class FacturXPaymentDiscountTerm implements IFacturXPaymentDiscountTerm {
6578
+ /** Such payment terms are usually an additional, machine-readable representation of a given payment term,
6579
+ so they usually are linked to a specific payment term by its index. Please note that the index is 0-based,
6580
+ so the first payment term will refer PaymentTerms, subsequent ones
6581
+ will refer to AdditionalPaymentTerms. */
6582
+ index?: number | undefined;
6583
+ /** The base amount unto which the discount applies. */
6584
+ baseAmount?: number | undefined;
6585
+ /** The actual discount amount that will be deducted if the payment is done within the specified period. */
6586
+ actualDiscountAmount?: number | undefined;
6587
+ /** The base date for calculating the discount period. This is typically the invoice date. */
6588
+ baseDate?: Date | undefined;
6589
+ /** The duration of the discount period, e.g. "30" for 30 days. */
6590
+ periodMeasure?: number | undefined;
6591
+ /** The unit in which the period is specified, e.g. "DAY". */
6592
+ periodMeasureUnitCode?: string | undefined;
6593
+ /** The percentage of the discount, e.g. ".02" for 2%. */
6594
+ calculationPercent?: number | undefined;
6595
+ constructor(data?: IFacturXPaymentDiscountTerm);
6596
+ init?(_data?: any): void;
6597
+ static fromJS(data: any): FacturXPaymentDiscountTerm;
6598
+ toJSON?(data?: any): any;
6599
+ }
6600
+ /** Factur-X / ZUGFeRD allows a more detailled representation of payment discount terms. If those are present in the invoice, they will be stored in this object. */
6601
+ export interface IFacturXPaymentDiscountTerm {
6602
+ /** Such payment terms are usually an additional, machine-readable representation of a given payment term,
6603
+ so they usually are linked to a specific payment term by its index. Please note that the index is 0-based,
6604
+ so the first payment term will refer PaymentTerms, subsequent ones
6605
+ will refer to AdditionalPaymentTerms. */
6606
+ index?: number | undefined;
6607
+ /** The base amount unto which the discount applies. */
6608
+ baseAmount?: number | undefined;
6609
+ /** The actual discount amount that will be deducted if the payment is done within the specified period. */
6610
+ actualDiscountAmount?: number | undefined;
6611
+ /** The base date for calculating the discount period. This is typically the invoice date. */
6612
+ baseDate?: Date | undefined;
6613
+ /** The duration of the discount period, e.g. "30" for 30 days. */
6614
+ periodMeasure?: number | undefined;
6615
+ /** The unit in which the period is specified, e.g. "DAY". */
6616
+ periodMeasureUnitCode?: string | undefined;
6617
+ /** The percentage of the discount, e.g. ".02" for 2%. */
6618
+ calculationPercent?: number | undefined;
6619
+ }
6544
6620
  /** This is a wrapper class that maps Dangl.AVA projects along with additional required information to create invoices */
6545
6621
  export declare class AvaProjectWrapper implements IAvaProjectWrapper {
6546
6622
  /** The Dangl.AVA.Project from which to convert */
package/api.js CHANGED
@@ -7,7 +7,8 @@
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
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
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.PostXRechnungPdfEmbedd = 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;
10
+ exports.ClaimGet = exports.UserInfoGet = exports.ForgotPasswordPost = exports.RegisterPost = exports.TokenRefreshPost = exports.TokenLoginPost = exports.ResponseErrorType = exports.HttpStatusCode = exports.TokenResponseGet = exports.LoginPost = exports.PostXRechnungPdfEmbedd = exports.DestinationXRechnungFormat = exports.AvaProjectWrapper = exports.FacturXPaymentDiscountTerm = exports.FacturXData = 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
+ exports.ApiException = exports.SwaggerResponse = void 0;
11
12
  /* tslint:disable */
12
13
  /* eslint-disable */
13
14
  // ReSharper disable InconsistentNaming
@@ -10159,6 +10160,7 @@ class Invoice {
10159
10160
  this.lineItems[i] = item && !item.toJSON ? new InvoiceLineItem(item) : item;
10160
10161
  }
10161
10162
  }
10163
+ this.facturXData = data.facturXData && !data.facturXData.toJSON ? new FacturXData(data.facturXData) : this.facturXData;
10162
10164
  }
10163
10165
  }
10164
10166
  init(_data) {
@@ -10219,6 +10221,7 @@ class Invoice {
10219
10221
  this.lineItems.push(InvoiceLineItem.fromJS(item));
10220
10222
  }
10221
10223
  this.sourceType = _data["sourceType"];
10224
+ this.facturXData = _data["facturXData"] ? FacturXData.fromJS(_data["facturXData"]) : undefined;
10222
10225
  }
10223
10226
  }
10224
10227
  static fromJS(data) {
@@ -10415,6 +10418,17 @@ class Invoice {
10415
10418
  }
10416
10419
  }
10417
10420
  data["sourceType"] = this.sourceType;
10421
+ if (this.facturXData) {
10422
+ if (typeof this.facturXData.toJSON !== "undefined") {
10423
+ data["facturXData"] = this.facturXData.toJSON();
10424
+ }
10425
+ else {
10426
+ data["facturXData"] = this.facturXData;
10427
+ }
10428
+ }
10429
+ else {
10430
+ data["facturXData"] = undefined;
10431
+ }
10418
10432
  return data;
10419
10433
  }
10420
10434
  }
@@ -11338,6 +11352,7 @@ var PaymentType;
11338
11352
  PaymentType["ClearingBetweenPartners"] = "ClearingBetweenPartners";
11339
11353
  PaymentType["JPElectronicallyRecordedMonetaryClaims"] = "JPElectronicallyRecordedMonetaryClaims";
11340
11354
  })(PaymentType = exports.PaymentType || (exports.PaymentType = {}));
11355
+ /** BG-16, BG-17 & BG-18 Represents a payment means for an invoice */
11341
11356
  class PaymentMeans {
11342
11357
  constructor(data) {
11343
11358
  if (data) {
@@ -12270,6 +12285,104 @@ var SourceType;
12270
12285
  SourceType["Cii"] = "Cii";
12271
12286
  SourceType["FacturX"] = "FacturX";
12272
12287
  })(SourceType = exports.SourceType || (exports.SourceType = {}));
12288
+ /** Represents data related to Factur-X, including additional payment terms. */
12289
+ class FacturXData {
12290
+ constructor(data) {
12291
+ if (data) {
12292
+ for (var property in data) {
12293
+ if (data.hasOwnProperty(property))
12294
+ this[property] = data[property];
12295
+ }
12296
+ if (data.facturXPaymentDiscountTerms) {
12297
+ this.facturXPaymentDiscountTerms = [];
12298
+ for (let i = 0; i < data.facturXPaymentDiscountTerms.length; i++) {
12299
+ let item = data.facturXPaymentDiscountTerms[i];
12300
+ this.facturXPaymentDiscountTerms[i] = item && !item.toJSON ? new FacturXPaymentDiscountTerm(item) : item;
12301
+ }
12302
+ }
12303
+ }
12304
+ }
12305
+ init(_data) {
12306
+ if (_data) {
12307
+ if (Array.isArray(_data["additionalPaymentTerms"])) {
12308
+ this.additionalPaymentTerms = [];
12309
+ for (let item of _data["additionalPaymentTerms"])
12310
+ this.additionalPaymentTerms.push(item);
12311
+ }
12312
+ if (Array.isArray(_data["facturXPaymentDiscountTerms"])) {
12313
+ this.facturXPaymentDiscountTerms = [];
12314
+ for (let item of _data["facturXPaymentDiscountTerms"])
12315
+ this.facturXPaymentDiscountTerms.push(FacturXPaymentDiscountTerm.fromJS(item));
12316
+ }
12317
+ }
12318
+ }
12319
+ static fromJS(data) {
12320
+ data = typeof data === 'object' ? data : {};
12321
+ let result = new FacturXData();
12322
+ result.init(data);
12323
+ return result;
12324
+ }
12325
+ toJSON(data) {
12326
+ data = typeof data === 'object' ? data : {};
12327
+ if (Array.isArray(this.additionalPaymentTerms)) {
12328
+ data["additionalPaymentTerms"] = [];
12329
+ for (let item of this.additionalPaymentTerms)
12330
+ data["additionalPaymentTerms"].push(item);
12331
+ }
12332
+ if (Array.isArray(this.facturXPaymentDiscountTerms)) {
12333
+ data["facturXPaymentDiscountTerms"] = [];
12334
+ for (let item of this.facturXPaymentDiscountTerms)
12335
+ if (typeof item.toJSON !== "undefined") {
12336
+ data["facturXPaymentDiscountTerms"].push(item.toJSON());
12337
+ }
12338
+ else {
12339
+ data["facturXPaymentDiscountTerms"].push(item);
12340
+ }
12341
+ }
12342
+ return data;
12343
+ }
12344
+ }
12345
+ exports.FacturXData = FacturXData;
12346
+ /** Factur-X / ZUGFeRD allows a more detailled representation of payment discount terms. If those are present in the invoice, they will be stored in this object. */
12347
+ class FacturXPaymentDiscountTerm {
12348
+ constructor(data) {
12349
+ if (data) {
12350
+ for (var property in data) {
12351
+ if (data.hasOwnProperty(property))
12352
+ this[property] = data[property];
12353
+ }
12354
+ }
12355
+ }
12356
+ init(_data) {
12357
+ if (_data) {
12358
+ this.index = _data["index"];
12359
+ this.baseAmount = _data["baseAmount"];
12360
+ this.actualDiscountAmount = _data["actualDiscountAmount"];
12361
+ this.baseDate = _data["baseDate"] ? new Date(_data["baseDate"].toString()) : undefined;
12362
+ this.periodMeasure = _data["periodMeasure"];
12363
+ this.periodMeasureUnitCode = _data["periodMeasureUnitCode"];
12364
+ this.calculationPercent = _data["calculationPercent"];
12365
+ }
12366
+ }
12367
+ static fromJS(data) {
12368
+ data = typeof data === 'object' ? data : {};
12369
+ let result = new FacturXPaymentDiscountTerm();
12370
+ result.init(data);
12371
+ return result;
12372
+ }
12373
+ toJSON(data) {
12374
+ data = typeof data === 'object' ? data : {};
12375
+ data["index"] = this.index;
12376
+ data["baseAmount"] = this.baseAmount;
12377
+ data["actualDiscountAmount"] = this.actualDiscountAmount;
12378
+ data["baseDate"] = this.baseDate ? this.baseDate.toISOString() : undefined;
12379
+ data["periodMeasure"] = this.periodMeasure;
12380
+ data["periodMeasureUnitCode"] = this.periodMeasureUnitCode;
12381
+ data["calculationPercent"] = this.calculationPercent;
12382
+ return data;
12383
+ }
12384
+ }
12385
+ exports.FacturXPaymentDiscountTerm = FacturXPaymentDiscountTerm;
12273
12386
  /** This is a wrapper class that maps Dangl.AVA projects along with additional required information to create invoices */
12274
12387
  class AvaProjectWrapper {
12275
12388
  constructor(data) {