cecon-interfaces 1.1.26 → 1.1.30
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/app/entities/rabbit.entity.d.ts +5 -2
- package/dist/app/entities/rabbit.entity.js +7 -4
- package/dist/app/interfaces/i-rabbit.d.ts +15 -0
- package/dist/esm2022/app/entities/rabbit.entity.mjs +8 -5
- package/dist/esm2022/app/interfaces/i-rabbit.mjs +1 -1
- package/dist/esm2022/general/enums/bank-slip-status.enum.mjs +9 -0
- package/dist/esm2022/general/enums/index.mjs +2 -1
- package/dist/esm2022/general/enums/payment-type.enum.mjs +2 -1
- package/dist/esm2022/invoice/entities/index.mjs +6 -2
- package/dist/esm2022/invoice/entities/invoice-bank-slip.entity.mjs +23 -0
- package/dist/esm2022/invoice/entities/invoice-credit-card.entity.mjs +21 -0
- package/dist/esm2022/invoice/entities/invoice-item.entity.mjs +3 -8
- package/dist/esm2022/invoice/entities/invoice-log.entity.mjs +19 -0
- package/dist/esm2022/invoice/entities/invoice-payer.entity.mjs +22 -0
- package/dist/esm2022/invoice/entities/invoice-pix.entity.mjs +19 -0
- package/dist/esm2022/invoice/entities/invoice.entity.mjs +36 -11
- package/dist/esm2022/invoice/enums/index.mjs +2 -2
- package/dist/esm2022/invoice/enums/invoices-status.enum.mjs +15 -15
- package/dist/esm2022/invoice/interfaces/i-invoice-bank-slip.mjs +2 -0
- package/dist/esm2022/invoice/interfaces/i-invoice-credit-card.mjs +2 -0
- package/dist/esm2022/invoice/interfaces/i-invoice-item.mjs +1 -1
- package/dist/esm2022/invoice/interfaces/i-invoice-log.mjs +2 -0
- package/dist/esm2022/invoice/interfaces/i-invoice-payer.mjs +2 -0
- package/dist/esm2022/invoice/interfaces/i-invoice-pix.mjs +2 -0
- package/dist/esm2022/invoice/interfaces/i-invoice.mjs +1 -1
- package/dist/esm2022/invoice/interfaces/index.mjs +1 -1
- package/dist/esm2022/subscription/interfaces/i-subscription.mjs +1 -1
- package/dist/fesm2022/cecon-interfaces.mjs +154 -51
- package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
- package/dist/general/enums/bank-slip-status.enum.d.ts +7 -0
- package/dist/general/enums/bank-slip-status.enum.js +11 -0
- package/dist/general/enums/index.d.ts +1 -0
- package/dist/general/enums/index.js +3 -1
- package/dist/general/enums/payment-type.enum.d.ts +2 -1
- package/dist/general/enums/payment-type.enum.js +1 -0
- package/dist/invoice/entities/index.d.ts +5 -1
- package/dist/invoice/entities/index.js +11 -3
- package/dist/invoice/entities/invoice-bank-slip.entity.d.ts +11 -0
- package/dist/invoice/entities/invoice-bank-slip.entity.js +27 -0
- package/dist/invoice/entities/invoice-credit-card.entity.d.ts +10 -0
- package/dist/invoice/entities/invoice-credit-card.entity.js +25 -0
- package/dist/invoice/entities/invoice-item.entity.d.ts +0 -5
- package/dist/invoice/entities/invoice-item.entity.js +2 -7
- package/dist/invoice/entities/invoice-log.entity.d.ts +8 -0
- package/dist/invoice/entities/invoice-log.entity.js +23 -0
- package/dist/invoice/entities/invoice-payer.entity.d.ts +11 -0
- package/dist/invoice/entities/invoice-payer.entity.js +26 -0
- package/dist/invoice/entities/invoice-pix.entity.d.ts +8 -0
- package/dist/invoice/entities/invoice-pix.entity.js +23 -0
- package/dist/invoice/entities/invoice.entity.d.ts +36 -8
- package/dist/invoice/entities/invoice.entity.js +34 -9
- package/dist/invoice/enums/index.d.ts +1 -1
- package/dist/invoice/enums/index.js +2 -2
- package/dist/invoice/enums/invoices-status.enum.d.ts +1 -1
- package/dist/invoice/enums/invoices-status.enum.js +15 -15
- package/dist/invoice/interfaces/i-invoice-bank-slip.d.ts +10 -0
- package/dist/invoice/interfaces/i-invoice-credit-card.d.ts +8 -0
- package/dist/invoice/interfaces/i-invoice-credit-card.js +2 -0
- package/dist/invoice/interfaces/i-invoice-item.d.ts +0 -5
- package/dist/invoice/interfaces/i-invoice-log.d.ts +6 -0
- package/dist/invoice/interfaces/i-invoice-log.js +2 -0
- package/dist/invoice/interfaces/i-invoice-payer.d.ts +9 -0
- package/dist/invoice/interfaces/i-invoice-payer.js +2 -0
- package/dist/invoice/interfaces/i-invoice-pix.d.ts +6 -0
- package/dist/invoice/interfaces/i-invoice-pix.js +2 -0
- package/dist/invoice/interfaces/i-invoice.d.ts +38 -10
- package/dist/invoice/interfaces/index.d.ts +5 -1
- package/dist/package.json +1 -1
- package/dist/subscription/interfaces/i-subscription.d.ts +1 -1
- package/package.json +1 -1
- package/dist/esm2022/invoice/entities/invoice-payment-method.entity.mjs +0 -31
- package/dist/esm2022/invoice/interfaces/i-invoice-payment-method.mjs +0 -2
- package/dist/invoice/entities/invoice-payment-method.entity.d.ts +0 -20
- package/dist/invoice/entities/invoice-payment-method.entity.js +0 -35
- package/dist/invoice/interfaces/i-invoice-payment-method.d.ts +0 -18
- /package/dist/invoice/interfaces/{i-invoice-payment-method.js → i-invoice-bank-slip.js} +0 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EBankSlipStatus = void 0;
|
4
|
+
var EBankSlipStatus;
|
5
|
+
(function (EBankSlipStatus) {
|
6
|
+
EBankSlipStatus["REGISTERED"] = "registered";
|
7
|
+
EBankSlipStatus["PAID"] = "paid";
|
8
|
+
EBankSlipStatus["PENDING"] = "pending";
|
9
|
+
EBankSlipStatus["CANCELED"] = "canceled";
|
10
|
+
EBankSlipStatus["EXPIRED"] = "expired";
|
11
|
+
})(EBankSlipStatus || (exports.EBankSlipStatus = EBankSlipStatus = {}));
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ESponsorshipValues = exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.PaymentTypeEnum = exports.PaymentStatusEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.EFiscalDocModelCode = exports.EDiscountType = exports.DocTypeEnum = exports.BooleanStringEnum = void 0;
|
3
|
+
exports.ESponsorshipValues = exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.PaymentTypeEnum = exports.PaymentStatusEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.EFiscalDocModelCode = exports.EDiscountType = exports.DocTypeEnum = exports.BooleanStringEnum = exports.EBankSlipStatus = void 0;
|
4
|
+
var bank_slip_status_enum_1 = require("./bank-slip-status.enum");
|
5
|
+
Object.defineProperty(exports, "EBankSlipStatus", { enumerable: true, get: function () { return bank_slip_status_enum_1.EBankSlipStatus; } });
|
4
6
|
var boolean_string_enum_1 = require("./boolean-string.enum");
|
5
7
|
Object.defineProperty(exports, "BooleanStringEnum", { enumerable: true, get: function () { return boolean_string_enum_1.BooleanStringEnum; } });
|
6
8
|
var doc_type_enum_1 = require("./doc-type.enum");
|
@@ -1,3 +1,7 @@
|
|
1
|
+
export { InvoiceBankSlipEntity } from './invoice-bank-slip.entity';
|
2
|
+
export { InvoiceCreditCardEntity } from './invoice-credit-card.entity';
|
1
3
|
export { InvoiceItemEntity } from './invoice-item.entity';
|
2
|
-
export {
|
4
|
+
export { InvoiceLogEntity } from './invoice-log.entity';
|
5
|
+
export { InvoicePayerEntity } from './invoice-payer.entity';
|
6
|
+
export { InvoicePixEntity } from './invoice-pix.entity';
|
3
7
|
export { InvoiceEntity } from './invoice.entity';
|
@@ -1,9 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.InvoiceEntity = exports.
|
3
|
+
exports.InvoiceEntity = exports.InvoicePixEntity = exports.InvoicePayerEntity = exports.InvoiceLogEntity = exports.InvoiceItemEntity = exports.InvoiceCreditCardEntity = exports.InvoiceBankSlipEntity = void 0;
|
4
|
+
var invoice_bank_slip_entity_1 = require("./invoice-bank-slip.entity");
|
5
|
+
Object.defineProperty(exports, "InvoiceBankSlipEntity", { enumerable: true, get: function () { return invoice_bank_slip_entity_1.InvoiceBankSlipEntity; } });
|
6
|
+
var invoice_credit_card_entity_1 = require("./invoice-credit-card.entity");
|
7
|
+
Object.defineProperty(exports, "InvoiceCreditCardEntity", { enumerable: true, get: function () { return invoice_credit_card_entity_1.InvoiceCreditCardEntity; } });
|
4
8
|
var invoice_item_entity_1 = require("./invoice-item.entity");
|
5
9
|
Object.defineProperty(exports, "InvoiceItemEntity", { enumerable: true, get: function () { return invoice_item_entity_1.InvoiceItemEntity; } });
|
6
|
-
var
|
7
|
-
Object.defineProperty(exports, "
|
10
|
+
var invoice_log_entity_1 = require("./invoice-log.entity");
|
11
|
+
Object.defineProperty(exports, "InvoiceLogEntity", { enumerable: true, get: function () { return invoice_log_entity_1.InvoiceLogEntity; } });
|
12
|
+
var invoice_payer_entity_1 = require("./invoice-payer.entity");
|
13
|
+
Object.defineProperty(exports, "InvoicePayerEntity", { enumerable: true, get: function () { return invoice_payer_entity_1.InvoicePayerEntity; } });
|
14
|
+
var invoice_pix_entity_1 = require("./invoice-pix.entity");
|
15
|
+
Object.defineProperty(exports, "InvoicePixEntity", { enumerable: true, get: function () { return invoice_pix_entity_1.InvoicePixEntity; } });
|
8
16
|
var invoice_entity_1 = require("./invoice.entity");
|
9
17
|
Object.defineProperty(exports, "InvoiceEntity", { enumerable: true, get: function () { return invoice_entity_1.InvoiceEntity; } });
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { IInvoiceBankSlip } from '../interfaces/i-invoice-bank-slip';
|
2
|
+
export declare class InvoiceBankSlipEntity implements IInvoiceBankSlip {
|
3
|
+
bankSlipBank: number;
|
4
|
+
bankSlipErrorCode: string;
|
5
|
+
bankSlipErrorMessage: string;
|
6
|
+
bankSlipStatus: string;
|
7
|
+
barcode: string;
|
8
|
+
barcodeData: string;
|
9
|
+
digitableLine: string;
|
10
|
+
constructor(data?: Partial<InvoiceBankSlipEntity>);
|
11
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InvoiceBankSlipEntity = void 0;
|
4
|
+
var general_1 = require("../../general");
|
5
|
+
var InvoiceBankSlipEntity = /** @class */ (function () {
|
6
|
+
// #endregion Properties (7)
|
7
|
+
// #region Constructors (1)
|
8
|
+
function InvoiceBankSlipEntity(data) {
|
9
|
+
// #region Properties (7)
|
10
|
+
this.bankSlipBank = 0;
|
11
|
+
this.bankSlipErrorCode = '';
|
12
|
+
this.bankSlipErrorMessage = '';
|
13
|
+
this.bankSlipStatus = general_1.EBankSlipStatus.PENDING;
|
14
|
+
this.barcode = '';
|
15
|
+
this.barcodeData = '';
|
16
|
+
this.digitableLine = '';
|
17
|
+
if (data) {
|
18
|
+
for (var key in data) {
|
19
|
+
if (data.hasOwnProperty(key) && key in this) {
|
20
|
+
this[key] = data[key];
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
return InvoiceBankSlipEntity;
|
26
|
+
}());
|
27
|
+
exports.InvoiceBankSlipEntity = InvoiceBankSlipEntity;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { IInvoiceCreditCard } from '../interfaces/i-invoice-credit-card';
|
2
|
+
export declare class InvoiceCreditCardEntity implements IInvoiceCreditCard {
|
3
|
+
bin: string;
|
4
|
+
brand: string;
|
5
|
+
capturedAt: string;
|
6
|
+
last4: string;
|
7
|
+
tid: string;
|
8
|
+
transaction: string;
|
9
|
+
constructor(data?: Partial<InvoiceCreditCardEntity>);
|
10
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InvoiceCreditCardEntity = void 0;
|
4
|
+
var InvoiceCreditCardEntity = /** @class */ (function () {
|
5
|
+
// #endregion Properties (6)
|
6
|
+
// #region Constructors (1)
|
7
|
+
function InvoiceCreditCardEntity(data) {
|
8
|
+
// #region Properties (6)
|
9
|
+
this.bin = '';
|
10
|
+
this.brand = '';
|
11
|
+
this.capturedAt = '';
|
12
|
+
this.last4 = '';
|
13
|
+
this.tid = '';
|
14
|
+
this.transaction = '';
|
15
|
+
if (data) {
|
16
|
+
for (var key in data) {
|
17
|
+
if (data.hasOwnProperty(key) && key in this) {
|
18
|
+
this[key] = data[key];
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return InvoiceCreditCardEntity;
|
24
|
+
}());
|
25
|
+
exports.InvoiceCreditCardEntity = InvoiceCreditCardEntity;
|
@@ -1,12 +1,7 @@
|
|
1
1
|
import { IInvoiceItem } from '../interfaces';
|
2
2
|
export declare class InvoiceItemEntity implements IInvoiceItem {
|
3
|
-
addition: number;
|
4
3
|
description: string;
|
5
|
-
discount: number;
|
6
|
-
id: string;
|
7
4
|
quantity: number;
|
8
|
-
sku: string;
|
9
|
-
totalPrice: number;
|
10
5
|
unitPrice: number;
|
11
6
|
constructor(data?: Partial<InvoiceItemEntity>);
|
12
7
|
}
|
@@ -2,17 +2,12 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.InvoiceItemEntity = void 0;
|
4
4
|
var InvoiceItemEntity = /** @class */ (function () {
|
5
|
-
// #endregion Properties (
|
5
|
+
// #endregion Properties (3)
|
6
6
|
// #region Constructors (1)
|
7
7
|
function InvoiceItemEntity(data) {
|
8
|
-
// #region Properties (
|
9
|
-
this.addition = 0;
|
8
|
+
// #region Properties (3)
|
10
9
|
this.description = '';
|
11
|
-
this.discount = 0;
|
12
|
-
this.id = '';
|
13
10
|
this.quantity = 1;
|
14
|
-
this.sku = '';
|
15
|
-
this.totalPrice = 0;
|
16
11
|
this.unitPrice = 0;
|
17
12
|
if (data) {
|
18
13
|
for (var key in data) {
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InvoiceLogEntity = void 0;
|
4
|
+
var InvoiceLogEntity = /** @class */ (function () {
|
5
|
+
// #endregion Properties (4)
|
6
|
+
// #region Constructors (1)
|
7
|
+
function InvoiceLogEntity(data) {
|
8
|
+
// #region Properties (4)
|
9
|
+
this.createdAt = '';
|
10
|
+
this.description = '';
|
11
|
+
this.id = '';
|
12
|
+
this.notes = '';
|
13
|
+
if (data) {
|
14
|
+
for (var key in data) {
|
15
|
+
if (data.hasOwnProperty(key) && key in this) {
|
16
|
+
this[key] = data[key];
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
return InvoiceLogEntity;
|
22
|
+
}());
|
23
|
+
exports.InvoiceLogEntity = InvoiceLogEntity;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { AddressEntity, DocTypeEnum } from '../../general';
|
2
|
+
import { IInvoicePayer } from '../interfaces/i-invoice-payer';
|
3
|
+
export declare class InvoicePayerEntity implements IInvoicePayer {
|
4
|
+
address: AddressEntity;
|
5
|
+
doc: string;
|
6
|
+
docType: DocTypeEnum;
|
7
|
+
email: string;
|
8
|
+
name: string;
|
9
|
+
phoneNumber: number | null;
|
10
|
+
constructor(data?: Partial<InvoicePayerEntity>);
|
11
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InvoicePayerEntity = void 0;
|
4
|
+
var general_1 = require("../../general");
|
5
|
+
var InvoicePayerEntity = /** @class */ (function () {
|
6
|
+
// #endregion Properties (6)
|
7
|
+
// #region Constructors (1)
|
8
|
+
function InvoicePayerEntity(data) {
|
9
|
+
// #region Properties (6)
|
10
|
+
this.address = new general_1.AddressEntity();
|
11
|
+
this.doc = '';
|
12
|
+
this.docType = general_1.DocTypeEnum.CNPJ;
|
13
|
+
this.email = '';
|
14
|
+
this.name = '';
|
15
|
+
this.phoneNumber = null;
|
16
|
+
if (data) {
|
17
|
+
for (var key in data) {
|
18
|
+
if (data.hasOwnProperty(key) && key in this) {
|
19
|
+
this[key] = data[key];
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
return InvoicePayerEntity;
|
25
|
+
}());
|
26
|
+
exports.InvoicePayerEntity = InvoicePayerEntity;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InvoicePixEntity = void 0;
|
4
|
+
var InvoicePixEntity = /** @class */ (function () {
|
5
|
+
// #endregion Properties (4)
|
6
|
+
// #region Constructors (1)
|
7
|
+
function InvoicePixEntity(data) {
|
8
|
+
// #region Properties (4)
|
9
|
+
this.qrCode = '';
|
10
|
+
this.qrCodeImage = '';
|
11
|
+
this.qrCodeText = '';
|
12
|
+
this.status = '';
|
13
|
+
if (data) {
|
14
|
+
for (var key in data) {
|
15
|
+
if (data.hasOwnProperty(key) && key in this) {
|
16
|
+
this[key] = data[key];
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
return InvoicePixEntity;
|
22
|
+
}());
|
23
|
+
exports.InvoicePixEntity = InvoicePixEntity;
|
@@ -1,28 +1,56 @@
|
|
1
|
-
import {
|
1
|
+
import { PaymentProviderEntity, PaymentTypeEnum } from '../../general';
|
2
|
+
import { EInvoiceStatus } from '../enums';
|
2
3
|
import { IInvoice } from '../interfaces';
|
4
|
+
import { InvoiceBankSlipEntity } from './invoice-bank-slip.entity';
|
5
|
+
import { InvoiceCreditCardEntity } from './invoice-credit-card.entity';
|
3
6
|
import { InvoiceItemEntity } from './invoice-item.entity';
|
4
|
-
import {
|
7
|
+
import { InvoiceLogEntity } from './invoice-log.entity';
|
8
|
+
import { InvoicePayerEntity } from './invoice-payer.entity';
|
9
|
+
import { InvoicePixEntity } from './invoice-pix.entity';
|
5
10
|
export declare class InvoiceEntity implements IInvoice {
|
6
11
|
addition: number;
|
12
|
+
bankSlip: InvoiceBankSlipEntity | null;
|
13
|
+
bankSlipExtraDue: number;
|
14
|
+
ccEmails: string[];
|
7
15
|
companyId: string;
|
8
16
|
containerId: string;
|
9
17
|
createdAt: Date;
|
18
|
+
creditCard: InvoiceCreditCardEntity | null;
|
19
|
+
currency: string;
|
10
20
|
discount: number;
|
11
21
|
dueDateAt: Date;
|
22
|
+
email: string;
|
12
23
|
ensureDueOnWorkday: boolean;
|
13
24
|
expiresIn: number;
|
25
|
+
externalInvoiceId: string;
|
26
|
+
externalInvoiceUrl: string;
|
27
|
+
fineForlatePayment: number;
|
14
28
|
id: string;
|
15
29
|
items: InvoiceItemEntity[];
|
30
|
+
log: InvoiceLogEntity[];
|
16
31
|
notes: string;
|
32
|
+
notificationUrl: string;
|
33
|
+
orderId: string;
|
17
34
|
paidAt: Date;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
35
|
+
partnerId: string;
|
36
|
+
password: string | null;
|
37
|
+
payer: InvoicePayerEntity;
|
38
|
+
paymentMethod: PaymentTypeEnum;
|
39
|
+
paymentProvider: PaymentProviderEntity | null;
|
40
|
+
phoneNumberNotification: number | null;
|
41
|
+
pix: InvoicePixEntity | null;
|
42
|
+
returnExpiredUrl: string;
|
43
|
+
returnUrl: string;
|
44
|
+
secureId: string;
|
45
|
+
secureUrl: string;
|
46
|
+
status: EInvoiceStatus;
|
22
47
|
subscriptionId: string;
|
23
48
|
subtotal: number;
|
24
|
-
|
25
|
-
|
49
|
+
totalAmount: number;
|
50
|
+
totalFee: number;
|
51
|
+
totalOverPaid: number;
|
52
|
+
totalPaid: number;
|
53
|
+
totalRefunded: number;
|
26
54
|
updatedAt: Date;
|
27
55
|
constructor(data?: Partial<InvoiceEntity>);
|
28
56
|
}
|
@@ -1,32 +1,57 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.InvoiceEntity = void 0;
|
4
|
+
var general_1 = require("../../general");
|
4
5
|
var enums_1 = require("../enums");
|
6
|
+
var invoice_payer_entity_1 = require("./invoice-payer.entity");
|
5
7
|
var InvoiceEntity = /** @class */ (function () {
|
6
|
-
// #endregion Properties (
|
8
|
+
// #endregion Properties (44)
|
7
9
|
// #region Constructors (1)
|
8
10
|
function InvoiceEntity(data) {
|
9
|
-
// #region Properties (
|
11
|
+
// #region Properties (44)
|
10
12
|
this.addition = 0;
|
13
|
+
this.bankSlip = null;
|
14
|
+
this.bankSlipExtraDue = 3;
|
15
|
+
this.ccEmails = [];
|
11
16
|
this.companyId = '';
|
12
17
|
this.containerId = '';
|
13
18
|
this.createdAt = new Date();
|
19
|
+
this.creditCard = null;
|
20
|
+
this.currency = 'BRL';
|
14
21
|
this.discount = 0;
|
15
22
|
this.dueDateAt = new Date(Date.now() + 3 * 24 * 60 * 60 * 1000);
|
23
|
+
this.email = '';
|
16
24
|
this.ensureDueOnWorkday = true;
|
17
|
-
this.expiresIn =
|
25
|
+
this.expiresIn = 3;
|
26
|
+
this.externalInvoiceId = '';
|
27
|
+
this.externalInvoiceUrl = '';
|
28
|
+
this.fineForlatePayment = 0;
|
18
29
|
this.id = '';
|
19
30
|
this.items = [];
|
31
|
+
this.log = [];
|
20
32
|
this.notes = '';
|
33
|
+
this.notificationUrl = '';
|
34
|
+
this.orderId = '';
|
21
35
|
this.paidAt = new Date();
|
22
|
-
this.
|
23
|
-
this.
|
24
|
-
this.
|
25
|
-
this.
|
36
|
+
this.partnerId = '';
|
37
|
+
this.password = null;
|
38
|
+
this.payer = new invoice_payer_entity_1.InvoicePayerEntity();
|
39
|
+
this.paymentMethod = general_1.PaymentTypeEnum.NONE;
|
40
|
+
this.paymentProvider = null;
|
41
|
+
this.phoneNumberNotification = null;
|
42
|
+
this.pix = null;
|
43
|
+
this.returnExpiredUrl = '';
|
44
|
+
this.returnUrl = '';
|
45
|
+
this.secureId = '';
|
46
|
+
this.secureUrl = '';
|
47
|
+
this.status = enums_1.EInvoiceStatus.PENDING;
|
26
48
|
this.subscriptionId = '';
|
27
49
|
this.subtotal = 0;
|
28
|
-
this.
|
29
|
-
this.
|
50
|
+
this.totalAmount = 0;
|
51
|
+
this.totalFee = 0;
|
52
|
+
this.totalOverPaid = 0;
|
53
|
+
this.totalPaid = 0;
|
54
|
+
this.totalRefunded = 0;
|
30
55
|
this.updatedAt = new Date();
|
31
56
|
if (data) {
|
32
57
|
for (var key in data) {
|
@@ -1 +1 @@
|
|
1
|
-
export {
|
1
|
+
export { EInvoiceStatus } from './invoices-status.enum';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.EInvoiceStatus = void 0;
|
4
4
|
var invoices_status_enum_1 = require("./invoices-status.enum");
|
5
|
-
Object.defineProperty(exports, "
|
5
|
+
Object.defineProperty(exports, "EInvoiceStatus", { enumerable: true, get: function () { return invoices_status_enum_1.EInvoiceStatus; } });
|
@@ -1,17 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
var
|
5
|
-
(function (
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
})(
|
3
|
+
exports.EInvoiceStatus = void 0;
|
4
|
+
var EInvoiceStatus;
|
5
|
+
(function (EInvoiceStatus) {
|
6
|
+
EInvoiceStatus["PENDING"] = "PENDING";
|
7
|
+
EInvoiceStatus["PAID"] = "PAID";
|
8
|
+
EInvoiceStatus["CANCELED"] = "CANCELED";
|
9
|
+
EInvoiceStatus["IN_ANALYSIS"] = "IN_ANALYSIS";
|
10
|
+
EInvoiceStatus["DRAFT"] = "DRAFT";
|
11
|
+
EInvoiceStatus["PARTIALLY_PAID"] = "PARTIALLY_PAID";
|
12
|
+
EInvoiceStatus["REFUNDED"] = "REFUNDED";
|
13
|
+
EInvoiceStatus["EXPIRED"] = "EXPIRED";
|
14
|
+
EInvoiceStatus["IN_PROTEST"] = "IN_PROTEST";
|
15
|
+
EInvoiceStatus["CHARGEBACK"] = "CHARGEBACK";
|
16
|
+
EInvoiceStatus["EXTERNALLY_PAID"] = "EXTERNALLY_PAID";
|
17
|
+
})(EInvoiceStatus || (exports.EInvoiceStatus = EInvoiceStatus = {}));
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { EBankSlipStatus } from '../../general';
|
2
|
+
export interface IInvoiceBankSlip {
|
3
|
+
bankSlipErrorCode: string | '00';
|
4
|
+
bankSlipErrorMessage: string;
|
5
|
+
bankSlipStatus: string | EBankSlipStatus;
|
6
|
+
bankSlipBank: number;
|
7
|
+
barcode: string;
|
8
|
+
barcodeData: string;
|
9
|
+
digitableLine: string;
|
10
|
+
}
|
@@ -1,26 +1,54 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
import { IPaymentProvider, PaymentTypeEnum } from '../../general';
|
2
|
+
import { EInvoiceStatus } from '../enums';
|
3
|
+
import { IInvoiceBankSlip } from './i-invoice-bank-slip';
|
4
|
+
import { IInvoiceCreditCard } from './i-invoice-credit-card';
|
5
|
+
import { IInvoiceItem } from './i-invoice-item';
|
6
|
+
import { IInvoiceLog } from './i-invoice-log';
|
7
|
+
import { IInvoicePayer } from './i-invoice-payer';
|
8
|
+
import { IInvoicePix } from './i-invoice-pix';
|
4
9
|
export interface IInvoice {
|
5
10
|
addition: number;
|
11
|
+
bankSlip: IInvoiceBankSlip | null;
|
12
|
+
bankSlipExtraDue: number;
|
13
|
+
ccEmails: string[];
|
6
14
|
companyId: string;
|
7
15
|
containerId: string;
|
8
16
|
createdAt: Date;
|
17
|
+
creditCard: IInvoiceCreditCard | null;
|
18
|
+
currency: string;
|
9
19
|
discount: number;
|
10
20
|
dueDateAt: Date;
|
21
|
+
returnUrl: string;
|
22
|
+
returnExpiredUrl: string;
|
23
|
+
notificationUrl: string;
|
24
|
+
email: string;
|
11
25
|
ensureDueOnWorkday: boolean;
|
12
26
|
expiresIn: number;
|
27
|
+
fineForlatePayment: number;
|
13
28
|
id: string;
|
14
29
|
items: IInvoiceItem[];
|
30
|
+
log: IInvoiceLog[];
|
15
31
|
notes: string;
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
32
|
+
orderId: string;
|
33
|
+
paidAt: Date | null;
|
34
|
+
partnerId: string | null;
|
35
|
+
payer: IInvoicePayer;
|
36
|
+
paymentMethod: PaymentTypeEnum;
|
37
|
+
paymentProvider: IPaymentProvider | null;
|
38
|
+
phoneNumberNotification: number | null;
|
39
|
+
pix: IInvoicePix | null;
|
40
|
+
externalInvoiceId: string;
|
41
|
+
externalInvoiceUrl: string;
|
42
|
+
secureId: string;
|
43
|
+
secureUrl: string;
|
44
|
+
status: EInvoiceStatus;
|
21
45
|
subscriptionId: string;
|
22
46
|
subtotal: number;
|
23
|
-
|
24
|
-
|
47
|
+
totalAmount: number;
|
48
|
+
password: string | null;
|
49
|
+
totalFee: number;
|
50
|
+
totalOverPaid: number;
|
51
|
+
totalPaid: number;
|
52
|
+
totalRefunded: number;
|
25
53
|
updatedAt: Date;
|
26
54
|
}
|