@dangl/avacloud-client-node 1.63.5-avacloud-preview → 1.63.6-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.
- package/api.d.ts +40 -25
- package/api.js +46 -36
- package/api.js.map +1 -1
- package/api.ts +74 -58
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -5677,8 +5677,8 @@ export class XRechnungConversionApi {
|
|
|
5677
5677
|
/**
|
|
5678
5678
|
* This is a generated method that accepts an options object, it simply calls the generated method with the parameter list
|
|
5679
5679
|
*/
|
|
5680
|
-
xRechnungConversionConvertInvoiceToXRechnungWithRequestObject(invoice: Invoice, options?: { targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined }): Promise<SwaggerResponse<FileResponse>> {
|
|
5681
|
-
return this.xRechnungConversionConvertInvoiceToXRechnung(invoice, options?.targetFormat, options?.disablePriceRounding);
|
|
5680
|
+
xRechnungConversionConvertInvoiceToXRechnungWithRequestObject(invoice: Invoice, options?: { targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined, disableBrandingComment?: boolean | undefined }): Promise<SwaggerResponse<FileResponse>> {
|
|
5681
|
+
return this.xRechnungConversionConvertInvoiceToXRechnung(invoice, options?.targetFormat, options?.disablePriceRounding, options?.disableBrandingComment);
|
|
5682
5682
|
}
|
|
5683
5683
|
|
|
5684
5684
|
/**
|
|
@@ -5687,8 +5687,10 @@ export class XRechnungConversionApi {
|
|
|
5687
5687
|
Ubl, CrossIndustryInvoice and FacturX (ZUGFerd)
|
|
5688
5688
|
* @param disablePriceRounding (optional) If this is enabled, then the price values in the XRechnung export will not be rounded.
|
|
5689
5689
|
Otherwise, prices will by default be rounded to two decimal places.
|
|
5690
|
+
* @param disableBrandingComment (optional) If this is set to true, exported XRechnung files will not contain an XML comment
|
|
5691
|
+
indicating their origin. This is false by default, meaning the comment will be included.
|
|
5690
5692
|
*/
|
|
5691
|
-
xRechnungConversionConvertInvoiceToXRechnung(invoice: Invoice, targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined): Promise<SwaggerResponse<FileResponse>> {
|
|
5693
|
+
xRechnungConversionConvertInvoiceToXRechnung(invoice: Invoice, targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined, disableBrandingComment?: boolean | undefined): Promise<SwaggerResponse<FileResponse>> {
|
|
5692
5694
|
let url_ = this.baseUrl + "/conversion/xrechnung/invoice/xrechnung?";
|
|
5693
5695
|
if (targetFormat === null)
|
|
5694
5696
|
throw new Error("The parameter 'targetFormat' cannot be null.");
|
|
@@ -5698,6 +5700,10 @@ export class XRechnungConversionApi {
|
|
|
5698
5700
|
throw new Error("The parameter 'disablePriceRounding' cannot be null.");
|
|
5699
5701
|
else if (disablePriceRounding !== undefined)
|
|
5700
5702
|
url_ += "DisablePriceRounding=" + encodeURIComponent("" + disablePriceRounding) + "&";
|
|
5703
|
+
if (disableBrandingComment === null)
|
|
5704
|
+
throw new Error("The parameter 'disableBrandingComment' cannot be null.");
|
|
5705
|
+
else if (disableBrandingComment !== undefined)
|
|
5706
|
+
url_ += "DisableBrandingComment=" + encodeURIComponent("" + disableBrandingComment) + "&";
|
|
5701
5707
|
url_ = url_.replace(/[?&]$/, "");
|
|
5702
5708
|
|
|
5703
5709
|
const content_ = JSON.stringify(invoice);
|
|
@@ -5753,8 +5759,8 @@ export class XRechnungConversionApi {
|
|
|
5753
5759
|
/**
|
|
5754
5760
|
* This is a generated method that accepts an options object, it simply calls the generated method with the parameter list
|
|
5755
5761
|
*/
|
|
5756
|
-
xRechnungConversionConvertAvaToXRechnungWithRequestObject(avaWrapper: AvaProjectWrapper, options?: { targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined }): Promise<SwaggerResponse<FileResponse>> {
|
|
5757
|
-
return this.xRechnungConversionConvertAvaToXRechnung(avaWrapper, options?.targetFormat, options?.disablePriceRounding);
|
|
5762
|
+
xRechnungConversionConvertAvaToXRechnungWithRequestObject(avaWrapper: AvaProjectWrapper, options?: { targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined, disableBrandingComment?: boolean | undefined }): Promise<SwaggerResponse<FileResponse>> {
|
|
5763
|
+
return this.xRechnungConversionConvertAvaToXRechnung(avaWrapper, options?.targetFormat, options?.disablePriceRounding, options?.disableBrandingComment);
|
|
5758
5764
|
}
|
|
5759
5765
|
|
|
5760
5766
|
/**
|
|
@@ -5763,8 +5769,10 @@ export class XRechnungConversionApi {
|
|
|
5763
5769
|
Ubl, CrossIndustryInvoice and FacturX (ZUGFerd)
|
|
5764
5770
|
* @param disablePriceRounding (optional) If this is enabled, then the price values in the XRechnung export will not be rounded.
|
|
5765
5771
|
Otherwise, prices will by default be rounded to two decimal places.
|
|
5772
|
+
* @param disableBrandingComment (optional) If this is set to true, exported XRechnung files will not contain an XML comment
|
|
5773
|
+
indicating their origin. This is false by default, meaning the comment will be included.
|
|
5766
5774
|
*/
|
|
5767
|
-
xRechnungConversionConvertAvaToXRechnung(avaWrapper: AvaProjectWrapper, targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined): Promise<SwaggerResponse<FileResponse>> {
|
|
5775
|
+
xRechnungConversionConvertAvaToXRechnung(avaWrapper: AvaProjectWrapper, targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined, disableBrandingComment?: boolean | undefined): Promise<SwaggerResponse<FileResponse>> {
|
|
5768
5776
|
let url_ = this.baseUrl + "/conversion/xrechnung/ava-wrapper/xrechnung?";
|
|
5769
5777
|
if (targetFormat === null)
|
|
5770
5778
|
throw new Error("The parameter 'targetFormat' cannot be null.");
|
|
@@ -5774,6 +5782,10 @@ export class XRechnungConversionApi {
|
|
|
5774
5782
|
throw new Error("The parameter 'disablePriceRounding' cannot be null.");
|
|
5775
5783
|
else if (disablePriceRounding !== undefined)
|
|
5776
5784
|
url_ += "DisablePriceRounding=" + encodeURIComponent("" + disablePriceRounding) + "&";
|
|
5785
|
+
if (disableBrandingComment === null)
|
|
5786
|
+
throw new Error("The parameter 'disableBrandingComment' cannot be null.");
|
|
5787
|
+
else if (disableBrandingComment !== undefined)
|
|
5788
|
+
url_ += "DisableBrandingComment=" + encodeURIComponent("" + disableBrandingComment) + "&";
|
|
5777
5789
|
url_ = url_.replace(/[?&]$/, "");
|
|
5778
5790
|
|
|
5779
5791
|
const content_ = JSON.stringify(avaWrapper);
|
|
@@ -5943,8 +5955,8 @@ export class XRechnungConversionApi {
|
|
|
5943
5955
|
/**
|
|
5944
5956
|
* This is a generated method that accepts an options object, it simply calls the generated method with the parameter list
|
|
5945
5957
|
*/
|
|
5946
|
-
xRechnungConversionMergeInvoiceIntoPdfFileWithRequestObject(pdfEmbeddModel: PostXRechnungPdfEmbedd, options?: { targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined }): Promise<SwaggerResponse<FileResponse>> {
|
|
5947
|
-
return this.xRechnungConversionMergeInvoiceIntoPdfFile(pdfEmbeddModel, options?.targetFormat, options?.disablePriceRounding);
|
|
5958
|
+
xRechnungConversionMergeInvoiceIntoPdfFileWithRequestObject(pdfEmbeddModel: PostXRechnungPdfEmbedd, options?: { targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined, disableBrandingComment?: boolean | undefined }): Promise<SwaggerResponse<FileResponse>> {
|
|
5959
|
+
return this.xRechnungConversionMergeInvoiceIntoPdfFile(pdfEmbeddModel, options?.targetFormat, options?.disablePriceRounding, options?.disableBrandingComment);
|
|
5948
5960
|
}
|
|
5949
5961
|
|
|
5950
5962
|
/**
|
|
@@ -5953,8 +5965,10 @@ export class XRechnungConversionApi {
|
|
|
5953
5965
|
Ubl, CrossIndustryInvoice and FacturX (ZUGFerd)
|
|
5954
5966
|
* @param disablePriceRounding (optional) If this is enabled, then the price values in the XRechnung export will not be rounded.
|
|
5955
5967
|
Otherwise, prices will by default be rounded to two decimal places.
|
|
5968
|
+
* @param disableBrandingComment (optional) If this is set to true, exported XRechnung files will not contain an XML comment
|
|
5969
|
+
indicating their origin. This is false by default, meaning the comment will be included.
|
|
5956
5970
|
*/
|
|
5957
|
-
xRechnungConversionMergeInvoiceIntoPdfFile(pdfEmbeddModel: PostXRechnungPdfEmbedd, targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined): Promise<SwaggerResponse<FileResponse>> {
|
|
5971
|
+
xRechnungConversionMergeInvoiceIntoPdfFile(pdfEmbeddModel: PostXRechnungPdfEmbedd, targetFormat?: DestinationXRechnungFormat | undefined, disablePriceRounding?: boolean | undefined, disableBrandingComment?: boolean | undefined): Promise<SwaggerResponse<FileResponse>> {
|
|
5958
5972
|
let url_ = this.baseUrl + "/conversion/xrechnung/merge?";
|
|
5959
5973
|
if (targetFormat === null)
|
|
5960
5974
|
throw new Error("The parameter 'targetFormat' cannot be null.");
|
|
@@ -5964,6 +5978,10 @@ export class XRechnungConversionApi {
|
|
|
5964
5978
|
throw new Error("The parameter 'disablePriceRounding' cannot be null.");
|
|
5965
5979
|
else if (disablePriceRounding !== undefined)
|
|
5966
5980
|
url_ += "DisablePriceRounding=" + encodeURIComponent("" + disablePriceRounding) + "&";
|
|
5981
|
+
if (disableBrandingComment === null)
|
|
5982
|
+
throw new Error("The parameter 'disableBrandingComment' cannot be null.");
|
|
5983
|
+
else if (disableBrandingComment !== undefined)
|
|
5984
|
+
url_ += "DisableBrandingComment=" + encodeURIComponent("" + disableBrandingComment) + "&";
|
|
5967
5985
|
url_ = url_.replace(/[?&]$/, "");
|
|
5968
5986
|
|
|
5969
5987
|
const content_ = JSON.stringify(pdfEmbeddModel);
|
|
@@ -15756,10 +15774,12 @@ export class FacturXData implements IFacturXData {
|
|
|
15756
15774
|
/** The field BT-20 in XRechnung can only hold one payment term, but Factur-X / ZUGFeRD
|
|
15757
15775
|
allows multiple payment terms. If the invoice was originally created in Factur-X / ZUGFeRD format,
|
|
15758
15776
|
then this property holds all additional payment terms except the first one. Similar,
|
|
15759
|
-
on export, this property is used to export additional payment terms to Factur-X / ZUGFeRD.
|
|
15760
|
-
|
|
15761
|
-
|
|
15762
|
-
|
|
15777
|
+
on export, this property is used to export additional payment terms to Factur-X / ZUGFeRD.
|
|
15778
|
+
Factur-X / ZUGFeRD also allows a more detailled representation of payment terms,
|
|
15779
|
+
so they are given in a special object instead of just a string.
|
|
15780
|
+
If those are present, the regular PaymentTerms will be ignored on export
|
|
15781
|
+
to the CII / Factur-X format, as the information in this object is more detailled. */
|
|
15782
|
+
facturXPaymentTerms?: FacturXPaymentTerm[] | undefined;
|
|
15763
15783
|
|
|
15764
15784
|
constructor(data?: IFacturXData) {
|
|
15765
15785
|
if (data) {
|
|
@@ -15767,11 +15787,11 @@ on export, this property is used to export additional payment terms to Factur-X
|
|
|
15767
15787
|
if (data.hasOwnProperty(property))
|
|
15768
15788
|
(<any>this)[property] = (<any>data)[property];
|
|
15769
15789
|
}
|
|
15770
|
-
if (data.
|
|
15771
|
-
this.
|
|
15772
|
-
for (let i = 0; i < data.
|
|
15773
|
-
let item = data.
|
|
15774
|
-
this.
|
|
15790
|
+
if (data.facturXPaymentTerms) {
|
|
15791
|
+
this.facturXPaymentTerms = [];
|
|
15792
|
+
for (let i = 0; i < data.facturXPaymentTerms.length; i++) {
|
|
15793
|
+
let item = data.facturXPaymentTerms[i];
|
|
15794
|
+
this.facturXPaymentTerms[i] = item && !(<any>item).toJSON ? new FacturXPaymentTerm(item) : <FacturXPaymentTerm>item;
|
|
15775
15795
|
}
|
|
15776
15796
|
}
|
|
15777
15797
|
}
|
|
@@ -15779,15 +15799,10 @@ on export, this property is used to export additional payment terms to Factur-X
|
|
|
15779
15799
|
|
|
15780
15800
|
init?(_data?: any) {
|
|
15781
15801
|
if (_data) {
|
|
15782
|
-
if (Array.isArray(_data["
|
|
15783
|
-
this.
|
|
15784
|
-
for (let item of _data["
|
|
15785
|
-
this.
|
|
15786
|
-
}
|
|
15787
|
-
if (Array.isArray(_data["facturXPaymentDiscountTerms"])) {
|
|
15788
|
-
this.facturXPaymentDiscountTerms = [] as any;
|
|
15789
|
-
for (let item of _data["facturXPaymentDiscountTerms"])
|
|
15790
|
-
this.facturXPaymentDiscountTerms!.push(FacturXPaymentDiscountTerm.fromJS(item));
|
|
15802
|
+
if (Array.isArray(_data["facturXPaymentTerms"])) {
|
|
15803
|
+
this.facturXPaymentTerms = [] as any;
|
|
15804
|
+
for (let item of _data["facturXPaymentTerms"])
|
|
15805
|
+
this.facturXPaymentTerms!.push(FacturXPaymentTerm.fromJS(item));
|
|
15791
15806
|
}
|
|
15792
15807
|
}
|
|
15793
15808
|
}
|
|
@@ -15801,18 +15816,13 @@ on export, this property is used to export additional payment terms to Factur-X
|
|
|
15801
15816
|
|
|
15802
15817
|
toJSON?(data?: any) {
|
|
15803
15818
|
data = typeof data === 'object' ? data : {};
|
|
15804
|
-
if (Array.isArray(this.
|
|
15805
|
-
data["
|
|
15806
|
-
for (let item of this.
|
|
15807
|
-
data["additionalPaymentTerms"].push(item);
|
|
15808
|
-
}
|
|
15809
|
-
if (Array.isArray(this.facturXPaymentDiscountTerms)) {
|
|
15810
|
-
data["facturXPaymentDiscountTerms"] = [];
|
|
15811
|
-
for (let item of this.facturXPaymentDiscountTerms)
|
|
15819
|
+
if (Array.isArray(this.facturXPaymentTerms)) {
|
|
15820
|
+
data["facturXPaymentTerms"] = [];
|
|
15821
|
+
for (let item of this.facturXPaymentTerms)
|
|
15812
15822
|
if (typeof item.toJSON !== "undefined") {
|
|
15813
|
-
data["
|
|
15823
|
+
data["facturXPaymentTerms"].push(item.toJSON());
|
|
15814
15824
|
} else {
|
|
15815
|
-
data["
|
|
15825
|
+
data["facturXPaymentTerms"].push(item);
|
|
15816
15826
|
}
|
|
15817
15827
|
}
|
|
15818
15828
|
return data;
|
|
@@ -15824,19 +15834,22 @@ export interface IFacturXData {
|
|
|
15824
15834
|
/** The field BT-20 in XRechnung can only hold one payment term, but Factur-X / ZUGFeRD
|
|
15825
15835
|
allows multiple payment terms. If the invoice was originally created in Factur-X / ZUGFeRD format,
|
|
15826
15836
|
then this property holds all additional payment terms except the first one. Similar,
|
|
15827
|
-
on export, this property is used to export additional payment terms to Factur-X / ZUGFeRD.
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15837
|
+
on export, this property is used to export additional payment terms to Factur-X / ZUGFeRD.
|
|
15838
|
+
Factur-X / ZUGFeRD also allows a more detailled representation of payment terms,
|
|
15839
|
+
so they are given in a special object instead of just a string.
|
|
15840
|
+
If those are present, the regular PaymentTerms will be ignored on export
|
|
15841
|
+
to the CII / Factur-X format, as the information in this object is more detailled. */
|
|
15842
|
+
facturXPaymentTerms?: IFacturXPaymentTerm[] | undefined;
|
|
15831
15843
|
}
|
|
15832
15844
|
|
|
15833
15845
|
/** 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. */
|
|
15834
|
-
export class
|
|
15835
|
-
/**
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15846
|
+
export class FacturXPaymentTerm implements IFacturXPaymentTerm {
|
|
15847
|
+
/** A text description of the payment discount term. BT-20 in XRechnung,
|
|
15848
|
+
but this parent object is only used for Factur-X / ZUGFeRD and holds
|
|
15849
|
+
more detailled information about the payment term. */
|
|
15850
|
+
description?: string | undefined;
|
|
15851
|
+
/** The date until which the payment term applies. */
|
|
15852
|
+
dueDate?: Date | undefined;
|
|
15840
15853
|
/** The base amount unto which the discount applies. */
|
|
15841
15854
|
baseAmount?: number | undefined;
|
|
15842
15855
|
/** The actual discount amount that will be deducted if the payment is done within the specified period. */
|
|
@@ -15850,7 +15863,7 @@ will refer to AdditionalPaymentTerms. */
|
|
|
15850
15863
|
/** The percentage of the discount, e.g. ".02" for 2%. */
|
|
15851
15864
|
calculationPercent?: number | undefined;
|
|
15852
15865
|
|
|
15853
|
-
constructor(data?:
|
|
15866
|
+
constructor(data?: IFacturXPaymentTerm) {
|
|
15854
15867
|
if (data) {
|
|
15855
15868
|
for (var property in data) {
|
|
15856
15869
|
if (data.hasOwnProperty(property))
|
|
@@ -15861,7 +15874,8 @@ will refer to AdditionalPaymentTerms. */
|
|
|
15861
15874
|
|
|
15862
15875
|
init?(_data?: any) {
|
|
15863
15876
|
if (_data) {
|
|
15864
|
-
this.
|
|
15877
|
+
this.description = _data["description"];
|
|
15878
|
+
this.dueDate = _data["dueDate"] ? new Date(_data["dueDate"].toString()) : <any>undefined;
|
|
15865
15879
|
this.baseAmount = _data["baseAmount"];
|
|
15866
15880
|
this.actualDiscountAmount = _data["actualDiscountAmount"];
|
|
15867
15881
|
this.baseDate = _data["baseDate"] ? new Date(_data["baseDate"].toString()) : <any>undefined;
|
|
@@ -15871,16 +15885,17 @@ will refer to AdditionalPaymentTerms. */
|
|
|
15871
15885
|
}
|
|
15872
15886
|
}
|
|
15873
15887
|
|
|
15874
|
-
static fromJS(data: any):
|
|
15888
|
+
static fromJS(data: any): FacturXPaymentTerm {
|
|
15875
15889
|
data = typeof data === 'object' ? data : {};
|
|
15876
|
-
let result = new
|
|
15890
|
+
let result = new FacturXPaymentTerm();
|
|
15877
15891
|
result.init!(data);
|
|
15878
15892
|
return result;
|
|
15879
15893
|
}
|
|
15880
15894
|
|
|
15881
15895
|
toJSON?(data?: any) {
|
|
15882
15896
|
data = typeof data === 'object' ? data : {};
|
|
15883
|
-
data["
|
|
15897
|
+
data["description"] = this.description;
|
|
15898
|
+
data["dueDate"] = this.dueDate ? this.dueDate.toISOString() : <any>undefined;
|
|
15884
15899
|
data["baseAmount"] = this.baseAmount;
|
|
15885
15900
|
data["actualDiscountAmount"] = this.actualDiscountAmount;
|
|
15886
15901
|
data["baseDate"] = this.baseDate ? this.baseDate.toISOString() : <any>undefined;
|
|
@@ -15892,12 +15907,13 @@ will refer to AdditionalPaymentTerms. */
|
|
|
15892
15907
|
}
|
|
15893
15908
|
|
|
15894
15909
|
/** 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. */
|
|
15895
|
-
export interface
|
|
15896
|
-
/**
|
|
15897
|
-
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15910
|
+
export interface IFacturXPaymentTerm {
|
|
15911
|
+
/** A text description of the payment discount term. BT-20 in XRechnung,
|
|
15912
|
+
but this parent object is only used for Factur-X / ZUGFeRD and holds
|
|
15913
|
+
more detailled information about the payment term. */
|
|
15914
|
+
description?: string | undefined;
|
|
15915
|
+
/** The date until which the payment term applies. */
|
|
15916
|
+
dueDate?: Date | undefined;
|
|
15901
15917
|
/** The base amount unto which the discount applies. */
|
|
15902
15918
|
baseAmount?: number | undefined;
|
|
15903
15919
|
/** The actual discount amount that will be deducted if the payment is done within the specified period. */
|