@wrcb/cb-common 1.0.864 → 1.0.866
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/build/config/notasBrBilling.d.ts +6 -0
- package/build/config/notasBrBilling.js +72 -0
- package/build/events/notas-br/certificateExpiringEvent.d.ts +14 -0
- package/build/events/notas-br/certificateExpiringEvent.js +2 -0
- package/build/events/notas-br/certificateExpiringPublisher.d.ts +6 -0
- package/build/events/notas-br/certificateExpiringPublisher.js +12 -0
- package/build/events/notas-br/creditsGrantedEvent.d.ts +15 -0
- package/build/events/notas-br/creditsGrantedEvent.js +2 -0
- package/build/events/notas-br/creditsGrantedPublisher.d.ts +6 -0
- package/build/events/notas-br/creditsGrantedPublisher.js +12 -0
- package/build/events/notas-br/index.d.ts +10 -0
- package/build/events/notas-br/index.js +26 -0
- package/build/events/notas-br/invoiceAuthorizedEvent.d.ts +22 -0
- package/build/events/notas-br/invoiceAuthorizedEvent.js +2 -0
- package/build/events/notas-br/invoiceAuthorizedPublisher.d.ts +6 -0
- package/build/events/notas-br/invoiceAuthorizedPublisher.js +12 -0
- package/build/events/notas-br/invoiceCancelledEvent.d.ts +19 -0
- package/build/events/notas-br/invoiceCancelledEvent.js +2 -0
- package/build/events/notas-br/invoiceCancelledPublisher.d.ts +6 -0
- package/build/events/notas-br/invoiceCancelledPublisher.js +12 -0
- package/build/events/notas-br/invoiceRejectedEvent.d.ts +18 -0
- package/build/events/notas-br/invoiceRejectedEvent.js +2 -0
- package/build/events/notas-br/invoiceRejectedPublisher.d.ts +6 -0
- package/build/events/notas-br/invoiceRejectedPublisher.js +12 -0
- package/build/events/subjects.d.ts +11 -1
- package/build/events/subjects.js +12 -0
- package/build/events/trabalho-home-office/index.d.ts +10 -0
- package/build/events/trabalho-home-office/index.js +26 -0
- package/build/events/trabalho-home-office/jobApplicationCreatedEvent.d.ts +15 -0
- package/build/events/trabalho-home-office/jobApplicationCreatedEvent.js +2 -0
- package/build/events/trabalho-home-office/jobApplicationCreatedPublisher.d.ts +6 -0
- package/build/events/trabalho-home-office/jobApplicationCreatedPublisher.js +12 -0
- package/build/events/trabalho-home-office/jobApplicationStatusUpdatedEvent.d.ts +12 -0
- package/build/events/trabalho-home-office/jobApplicationStatusUpdatedEvent.js +2 -0
- package/build/events/trabalho-home-office/jobApplicationStatusUpdatedPublisher.d.ts +6 -0
- package/build/events/trabalho-home-office/jobApplicationStatusUpdatedPublisher.js +12 -0
- package/build/events/trabalho-home-office/messageSentEvent.d.ts +14 -0
- package/build/events/trabalho-home-office/messageSentEvent.js +2 -0
- package/build/events/trabalho-home-office/messageSentPublisher.d.ts +6 -0
- package/build/events/trabalho-home-office/messageSentPublisher.js +12 -0
- package/build/events/trabalho-home-office/proposalCreatedEvent.d.ts +15 -0
- package/build/events/trabalho-home-office/proposalCreatedEvent.js +2 -0
- package/build/events/trabalho-home-office/proposalCreatedPublisher.d.ts +6 -0
- package/build/events/trabalho-home-office/proposalCreatedPublisher.js +12 -0
- package/build/events/trabalho-home-office/proposalStatusUpdatedEvent.d.ts +12 -0
- package/build/events/trabalho-home-office/proposalStatusUpdatedEvent.js +2 -0
- package/build/events/trabalho-home-office/proposalStatusUpdatedPublisher.d.ts +6 -0
- package/build/events/trabalho-home-office/proposalStatusUpdatedPublisher.js +12 -0
- package/build/index.d.ts +6 -0
- package/build/index.js +10 -0
- package/build/server.d.ts +2 -0
- package/build/server.js +4 -0
- package/build/services/TenantDataService.js +90 -0
- package/build/types/dmAutomator.d.ts +54 -0
- package/build/types/dmAutomator.js +6 -0
- package/build/types/notasBr.d.ts +264 -0
- package/build/types/notasBr.js +174 -0
- package/build/types/tenant.d.ts +3 -1
- package/build/types/tenant.js +2 -0
- package/build/types/trabalhoHomeOffice.d.ts +26 -0
- package/build/types/trabalhoHomeOffice.js +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NbBillingTable, NbCreditPackage, NotasBrPlanTier } from '../types/notasBr';
|
|
2
|
+
export declare const CURRENT_BILLING_VERSION = "2026-08";
|
|
3
|
+
export declare const getBillingTable: (version?: string) => NbBillingTable;
|
|
4
|
+
export declare const getPlanConfig: (tier: NotasBrPlanTier, version?: string) => import("../types/notasBr").NbPlanConfig;
|
|
5
|
+
export declare const getCreditPackageConfig: (creditPackage: NbCreditPackage, version?: string) => import("../types/notasBr").NbCreditPackageConfig;
|
|
6
|
+
export declare const getTrialConfig: (version?: string) => import("../types/notasBr").NbTrialConfig;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Configuração de billing do notas_br — fonte única de preços, franquias e limites.
|
|
3
|
+
//
|
|
4
|
+
// Mora no cb-common porque DOIS serviços precisam dos mesmos números: o
|
|
5
|
+
// gn-business decide se pode emitir, e o cb-payments cobra o pacote de crédito.
|
|
6
|
+
// Uma cópia em cada lado sairia do ar na primeira mudança de preço.
|
|
7
|
+
//
|
|
8
|
+
// Nenhum outro arquivo pode conter esses números. A tabela é versionada porque o
|
|
9
|
+
// preço muda com o tempo e o cliente que já assinou mantém o que contratou: a
|
|
10
|
+
// conta guarda `billingVersion` e todo cálculo passa por getBillingTable(versão).
|
|
11
|
+
//
|
|
12
|
+
// Ao mudar preço ou franquia: crie uma NOVA versão, não edite a existente.
|
|
13
|
+
// Editar uma versão publicada reescreve retroativamente o contrato de quem assinou.
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.getTrialConfig = exports.getCreditPackageConfig = exports.getPlanConfig = exports.getBillingTable = exports.CURRENT_BILLING_VERSION = void 0;
|
|
16
|
+
const notasBr_1 = require("../types/notasBr");
|
|
17
|
+
exports.CURRENT_BILLING_VERSION = '2026-08';
|
|
18
|
+
const BILLING_TABLES = {
|
|
19
|
+
'2026-08': {
|
|
20
|
+
version: '2026-08',
|
|
21
|
+
plans: {
|
|
22
|
+
[notasBr_1.NotasBrPlanTier.Essential]: {
|
|
23
|
+
tier: notasBr_1.NotasBrPlanTier.Essential,
|
|
24
|
+
monthlyPriceCents: 5900,
|
|
25
|
+
annualPriceCents: 59000, // 2 meses grátis
|
|
26
|
+
monthlyInvoiceAllowance: 50,
|
|
27
|
+
maxCompanies: 1,
|
|
28
|
+
maxUsers: 2
|
|
29
|
+
},
|
|
30
|
+
[notasBr_1.NotasBrPlanTier.Professional]: {
|
|
31
|
+
tier: notasBr_1.NotasBrPlanTier.Professional,
|
|
32
|
+
monthlyPriceCents: 11900,
|
|
33
|
+
annualPriceCents: 119000,
|
|
34
|
+
monthlyInvoiceAllowance: 200,
|
|
35
|
+
maxCompanies: null,
|
|
36
|
+
maxUsers: null
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
creditPackages: {
|
|
40
|
+
[notasBr_1.NbCreditPackage.Small]: {
|
|
41
|
+
creditPackage: notasBr_1.NbCreditPackage.Small,
|
|
42
|
+
priceCents: 1000,
|
|
43
|
+
quantity: 10
|
|
44
|
+
},
|
|
45
|
+
[notasBr_1.NbCreditPackage.Medium]: {
|
|
46
|
+
creditPackage: notasBr_1.NbCreditPackage.Medium,
|
|
47
|
+
priceCents: 5000,
|
|
48
|
+
quantity: 60
|
|
49
|
+
},
|
|
50
|
+
[notasBr_1.NbCreditPackage.Large]: {
|
|
51
|
+
creditPackage: notasBr_1.NbCreditPackage.Large,
|
|
52
|
+
priceCents: 15000,
|
|
53
|
+
quantity: 200
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
trial: {
|
|
57
|
+
durationDays: 7,
|
|
58
|
+
invoicesPerDay: 1
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
// Conta antiga com versão que não existe mais cai na atual em vez de quebrar a
|
|
63
|
+
// emissão. Só acontece se uma versão for removida do arquivo — o que não deve
|
|
64
|
+
// ser feito, mas falhar aberto aqui é melhor que bloquear quem paga.
|
|
65
|
+
const getBillingTable = (version) => (version && BILLING_TABLES[version]) || BILLING_TABLES[exports.CURRENT_BILLING_VERSION];
|
|
66
|
+
exports.getBillingTable = getBillingTable;
|
|
67
|
+
const getPlanConfig = (tier, version) => (0, exports.getBillingTable)(version).plans[tier];
|
|
68
|
+
exports.getPlanConfig = getPlanConfig;
|
|
69
|
+
const getCreditPackageConfig = (creditPackage, version) => (0, exports.getBillingTable)(version).creditPackages[creditPackage];
|
|
70
|
+
exports.getCreditPackageConfig = getCreditPackageConfig;
|
|
71
|
+
const getTrialConfig = (version) => (0, exports.getBillingTable)(version).trial;
|
|
72
|
+
exports.getTrialConfig = getTrialConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
export interface NotasBrCertificateExpiringEvent {
|
|
3
|
+
subject: Subjects.NotasBrCertificateExpiring;
|
|
4
|
+
data: {
|
|
5
|
+
accountId: string;
|
|
6
|
+
companyId: string;
|
|
7
|
+
companyName: string;
|
|
8
|
+
cnpj: string;
|
|
9
|
+
ownerEmail: string;
|
|
10
|
+
expiresAt: string;
|
|
11
|
+
daysUntilExpiration: number;
|
|
12
|
+
timestamp: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { NotasBrCertificateExpiringEvent } from './certificateExpiringEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class NotasBrCertificateExpiringPublisher extends Publisher<NotasBrCertificateExpiringEvent> {
|
|
5
|
+
subject: Subjects.NotasBrCertificateExpiring;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotasBrCertificateExpiringPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class NotasBrCertificateExpiringPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.NotasBrCertificateExpiring;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.NotasBrCertificateExpiringPublisher = NotasBrCertificateExpiringPublisher;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { NbCreditPackage } from '../../types/notasBr';
|
|
3
|
+
export interface NotasBrCreditsGrantedEvent {
|
|
4
|
+
subject: Subjects.NotasBrCreditsGranted;
|
|
5
|
+
data: {
|
|
6
|
+
accountId: string;
|
|
7
|
+
purchasedByUserId: string;
|
|
8
|
+
creditPackage: NbCreditPackage;
|
|
9
|
+
quantity: number;
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
externalPaymentId: string;
|
|
13
|
+
timestamp: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { NotasBrCreditsGrantedEvent } from './creditsGrantedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class NotasBrCreditsGrantedPublisher extends Publisher<NotasBrCreditsGrantedEvent> {
|
|
5
|
+
subject: Subjects.NotasBrCreditsGranted;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotasBrCreditsGrantedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class NotasBrCreditsGrantedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.NotasBrCreditsGranted;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.NotasBrCreditsGrantedPublisher = NotasBrCreditsGrantedPublisher;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './invoiceAuthorizedEvent';
|
|
2
|
+
export * from './invoiceAuthorizedPublisher';
|
|
3
|
+
export * from './invoiceRejectedEvent';
|
|
4
|
+
export * from './invoiceRejectedPublisher';
|
|
5
|
+
export * from './invoiceCancelledEvent';
|
|
6
|
+
export * from './invoiceCancelledPublisher';
|
|
7
|
+
export * from './certificateExpiringEvent';
|
|
8
|
+
export * from './certificateExpiringPublisher';
|
|
9
|
+
export * from './creditsGrantedEvent';
|
|
10
|
+
export * from './creditsGrantedPublisher';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./invoiceAuthorizedEvent"), exports);
|
|
18
|
+
__exportStar(require("./invoiceAuthorizedPublisher"), exports);
|
|
19
|
+
__exportStar(require("./invoiceRejectedEvent"), exports);
|
|
20
|
+
__exportStar(require("./invoiceRejectedPublisher"), exports);
|
|
21
|
+
__exportStar(require("./invoiceCancelledEvent"), exports);
|
|
22
|
+
__exportStar(require("./invoiceCancelledPublisher"), exports);
|
|
23
|
+
__exportStar(require("./certificateExpiringEvent"), exports);
|
|
24
|
+
__exportStar(require("./certificateExpiringPublisher"), exports);
|
|
25
|
+
__exportStar(require("./creditsGrantedEvent"), exports);
|
|
26
|
+
__exportStar(require("./creditsGrantedPublisher"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { NbInvoiceType } from '../../types/notasBr';
|
|
3
|
+
export interface NotasBrInvoiceAuthorizedEvent {
|
|
4
|
+
subject: Subjects.NotasBrInvoiceAuthorized;
|
|
5
|
+
data: {
|
|
6
|
+
accountId: string;
|
|
7
|
+
companyId: string;
|
|
8
|
+
invoiceId: string;
|
|
9
|
+
invoiceType: NbInvoiceType;
|
|
10
|
+
number: string;
|
|
11
|
+
series?: string;
|
|
12
|
+
accessKey?: string;
|
|
13
|
+
issuerName: string;
|
|
14
|
+
recipientName: string;
|
|
15
|
+
recipientEmails: string[];
|
|
16
|
+
totalAmount: number;
|
|
17
|
+
pdfUrl: string;
|
|
18
|
+
xmlUrl: string;
|
|
19
|
+
authorizedAt: string;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { NotasBrInvoiceAuthorizedEvent } from './invoiceAuthorizedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class NotasBrInvoiceAuthorizedPublisher extends Publisher<NotasBrInvoiceAuthorizedEvent> {
|
|
5
|
+
subject: Subjects.NotasBrInvoiceAuthorized;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotasBrInvoiceAuthorizedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class NotasBrInvoiceAuthorizedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.NotasBrInvoiceAuthorized;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.NotasBrInvoiceAuthorizedPublisher = NotasBrInvoiceAuthorizedPublisher;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { NbInvoiceType } from '../../types/notasBr';
|
|
3
|
+
export interface NotasBrInvoiceCancelledEvent {
|
|
4
|
+
subject: Subjects.NotasBrInvoiceCancelled;
|
|
5
|
+
data: {
|
|
6
|
+
accountId: string;
|
|
7
|
+
companyId: string;
|
|
8
|
+
invoiceId: string;
|
|
9
|
+
invoiceType: NbInvoiceType;
|
|
10
|
+
number: string;
|
|
11
|
+
accessKey?: string;
|
|
12
|
+
issuerName: string;
|
|
13
|
+
recipientName: string;
|
|
14
|
+
recipientEmails: string[];
|
|
15
|
+
reason: string;
|
|
16
|
+
cancelledAt: string;
|
|
17
|
+
timestamp: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { NotasBrInvoiceCancelledEvent } from './invoiceCancelledEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class NotasBrInvoiceCancelledPublisher extends Publisher<NotasBrInvoiceCancelledEvent> {
|
|
5
|
+
subject: Subjects.NotasBrInvoiceCancelled;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotasBrInvoiceCancelledPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class NotasBrInvoiceCancelledPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.NotasBrInvoiceCancelled;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.NotasBrInvoiceCancelledPublisher = NotasBrInvoiceCancelledPublisher;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { NbInvoiceType } from '../../types/notasBr';
|
|
3
|
+
export interface NotasBrInvoiceRejectedEvent {
|
|
4
|
+
subject: Subjects.NotasBrInvoiceRejected;
|
|
5
|
+
data: {
|
|
6
|
+
accountId: string;
|
|
7
|
+
companyId: string;
|
|
8
|
+
invoiceId: string;
|
|
9
|
+
invoiceType: NbInvoiceType;
|
|
10
|
+
issuerName: string;
|
|
11
|
+
ownerEmail: string;
|
|
12
|
+
rejectionCode: string;
|
|
13
|
+
rejectionMessage: string;
|
|
14
|
+
friendlyMessage: string;
|
|
15
|
+
rejectedAt: string;
|
|
16
|
+
timestamp: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { NotasBrInvoiceRejectedEvent } from './invoiceRejectedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class NotasBrInvoiceRejectedPublisher extends Publisher<NotasBrInvoiceRejectedEvent> {
|
|
5
|
+
subject: Subjects.NotasBrInvoiceRejected;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotasBrInvoiceRejectedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class NotasBrInvoiceRejectedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.NotasBrInvoiceRejected;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.NotasBrInvoiceRejectedPublisher = NotasBrInvoiceRejectedPublisher;
|
|
@@ -64,5 +64,15 @@ export declare enum Subjects {
|
|
|
64
64
|
SMAPostFailed = "sma:post:failed",
|
|
65
65
|
AIRequestMade = "ai:request:made",
|
|
66
66
|
LinkedinPostGenerated = "linkedin:post:generated",
|
|
67
|
-
LinkedinPostPublished = "linkedin:post:published"
|
|
67
|
+
LinkedinPostPublished = "linkedin:post:published",
|
|
68
|
+
NotasBrInvoiceAuthorized = "notasbr:invoice:authorized",
|
|
69
|
+
NotasBrInvoiceRejected = "notasbr:invoice:rejected",
|
|
70
|
+
NotasBrInvoiceCancelled = "notasbr:invoice:cancelled",
|
|
71
|
+
NotasBrCertificateExpiring = "notasbr:certificate:expiring",
|
|
72
|
+
NotasBrCreditsGranted = "notasbr:credits:granted",
|
|
73
|
+
ThoJobApplicationCreated = "tho:job-application:created",
|
|
74
|
+
ThoProposalCreated = "tho:proposal:created",
|
|
75
|
+
ThoMessageSent = "tho:message:sent",
|
|
76
|
+
ThoJobApplicationStatusUpdated = "tho:job-application:status-updated",
|
|
77
|
+
ThoProposalStatusUpdated = "tho:proposal:status-updated"
|
|
68
78
|
}
|
package/build/events/subjects.js
CHANGED
|
@@ -78,4 +78,16 @@ var Subjects;
|
|
|
78
78
|
// linkedin-automator
|
|
79
79
|
Subjects["LinkedinPostGenerated"] = "linkedin:post:generated";
|
|
80
80
|
Subjects["LinkedinPostPublished"] = "linkedin:post:published";
|
|
81
|
+
// notas-br
|
|
82
|
+
Subjects["NotasBrInvoiceAuthorized"] = "notasbr:invoice:authorized";
|
|
83
|
+
Subjects["NotasBrInvoiceRejected"] = "notasbr:invoice:rejected";
|
|
84
|
+
Subjects["NotasBrInvoiceCancelled"] = "notasbr:invoice:cancelled";
|
|
85
|
+
Subjects["NotasBrCertificateExpiring"] = "notasbr:certificate:expiring";
|
|
86
|
+
Subjects["NotasBrCreditsGranted"] = "notasbr:credits:granted";
|
|
87
|
+
// trabalho-home-office
|
|
88
|
+
Subjects["ThoJobApplicationCreated"] = "tho:job-application:created";
|
|
89
|
+
Subjects["ThoProposalCreated"] = "tho:proposal:created";
|
|
90
|
+
Subjects["ThoMessageSent"] = "tho:message:sent";
|
|
91
|
+
Subjects["ThoJobApplicationStatusUpdated"] = "tho:job-application:status-updated";
|
|
92
|
+
Subjects["ThoProposalStatusUpdated"] = "tho:proposal:status-updated";
|
|
81
93
|
})(Subjects || (exports.Subjects = Subjects = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './jobApplicationCreatedEvent';
|
|
2
|
+
export * from './jobApplicationCreatedPublisher';
|
|
3
|
+
export * from './proposalCreatedEvent';
|
|
4
|
+
export * from './proposalCreatedPublisher';
|
|
5
|
+
export * from './messageSentEvent';
|
|
6
|
+
export * from './messageSentPublisher';
|
|
7
|
+
export * from './jobApplicationStatusUpdatedEvent';
|
|
8
|
+
export * from './jobApplicationStatusUpdatedPublisher';
|
|
9
|
+
export * from './proposalStatusUpdatedEvent';
|
|
10
|
+
export * from './proposalStatusUpdatedPublisher';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./jobApplicationCreatedEvent"), exports);
|
|
18
|
+
__exportStar(require("./jobApplicationCreatedPublisher"), exports);
|
|
19
|
+
__exportStar(require("./proposalCreatedEvent"), exports);
|
|
20
|
+
__exportStar(require("./proposalCreatedPublisher"), exports);
|
|
21
|
+
__exportStar(require("./messageSentEvent"), exports);
|
|
22
|
+
__exportStar(require("./messageSentPublisher"), exports);
|
|
23
|
+
__exportStar(require("./jobApplicationStatusUpdatedEvent"), exports);
|
|
24
|
+
__exportStar(require("./jobApplicationStatusUpdatedPublisher"), exports);
|
|
25
|
+
__exportStar(require("./proposalStatusUpdatedEvent"), exports);
|
|
26
|
+
__exportStar(require("./proposalStatusUpdatedPublisher"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
export interface ThoJobApplicationCreatedEvent {
|
|
3
|
+
subject: Subjects.ThoJobApplicationCreated;
|
|
4
|
+
data: {
|
|
5
|
+
applicationId: string;
|
|
6
|
+
jobPostingId: string;
|
|
7
|
+
jobPostingTitle: string;
|
|
8
|
+
freelancerId: string;
|
|
9
|
+
freelancerNickName: string;
|
|
10
|
+
consumerId: string;
|
|
11
|
+
consumerEmail: string;
|
|
12
|
+
consumerNickName: string;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { ThoJobApplicationCreatedEvent } from './jobApplicationCreatedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class ThoJobApplicationCreatedPublisher extends Publisher<ThoJobApplicationCreatedEvent> {
|
|
5
|
+
subject: Subjects.ThoJobApplicationCreated;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThoJobApplicationCreatedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class ThoJobApplicationCreatedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.ThoJobApplicationCreated;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ThoJobApplicationCreatedPublisher = ThoJobApplicationCreatedPublisher;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { ApplicationStatus } from '../../types/trabalhoHomeOffice';
|
|
3
|
+
export interface ThoJobApplicationStatusUpdatedEvent {
|
|
4
|
+
subject: Subjects.ThoJobApplicationStatusUpdated;
|
|
5
|
+
data: {
|
|
6
|
+
applicationId: string;
|
|
7
|
+
jobPostingTitle: string;
|
|
8
|
+
status: ApplicationStatus;
|
|
9
|
+
freelancerEmail: string;
|
|
10
|
+
freelancerNickName: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { ThoJobApplicationStatusUpdatedEvent } from './jobApplicationStatusUpdatedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class ThoJobApplicationStatusUpdatedPublisher extends Publisher<ThoJobApplicationStatusUpdatedEvent> {
|
|
5
|
+
subject: Subjects.ThoJobApplicationStatusUpdated;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThoJobApplicationStatusUpdatedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class ThoJobApplicationStatusUpdatedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.ThoJobApplicationStatusUpdated;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ThoJobApplicationStatusUpdatedPublisher = ThoJobApplicationStatusUpdatedPublisher;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
export interface ThoMessageSentEvent {
|
|
3
|
+
subject: Subjects.ThoMessageSent;
|
|
4
|
+
data: {
|
|
5
|
+
conversationId: string;
|
|
6
|
+
messageId: string;
|
|
7
|
+
senderId: string;
|
|
8
|
+
senderNickName: string;
|
|
9
|
+
recipientId: string;
|
|
10
|
+
recipientEmail: string;
|
|
11
|
+
recipientNickName: string;
|
|
12
|
+
body: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { ThoMessageSentEvent } from './messageSentEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class ThoMessageSentPublisher extends Publisher<ThoMessageSentEvent> {
|
|
5
|
+
subject: Subjects.ThoMessageSent;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThoMessageSentPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class ThoMessageSentPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.ThoMessageSent;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ThoMessageSentPublisher = ThoMessageSentPublisher;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
export interface ThoProposalCreatedEvent {
|
|
3
|
+
subject: Subjects.ThoProposalCreated;
|
|
4
|
+
data: {
|
|
5
|
+
proposalId: string;
|
|
6
|
+
serviceId: string;
|
|
7
|
+
serviceTitle: string;
|
|
8
|
+
consumerId: string;
|
|
9
|
+
consumerNickName: string;
|
|
10
|
+
sellerId: string;
|
|
11
|
+
sellerEmail: string;
|
|
12
|
+
sellerNickName: string;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { ThoProposalCreatedEvent } from './proposalCreatedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class ThoProposalCreatedPublisher extends Publisher<ThoProposalCreatedEvent> {
|
|
5
|
+
subject: Subjects.ThoProposalCreated;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThoProposalCreatedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class ThoProposalCreatedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.ThoProposalCreated;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ThoProposalCreatedPublisher = ThoProposalCreatedPublisher;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { ApplicationStatus } from '../../types/trabalhoHomeOffice';
|
|
3
|
+
export interface ThoProposalStatusUpdatedEvent {
|
|
4
|
+
subject: Subjects.ThoProposalStatusUpdated;
|
|
5
|
+
data: {
|
|
6
|
+
proposalId: string;
|
|
7
|
+
serviceTitle: string;
|
|
8
|
+
status: ApplicationStatus;
|
|
9
|
+
consumerEmail: string;
|
|
10
|
+
consumerNickName: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { ThoProposalStatusUpdatedEvent } from './proposalStatusUpdatedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class ThoProposalStatusUpdatedPublisher extends Publisher<ThoProposalStatusUpdatedEvent> {
|
|
5
|
+
subject: Subjects.ThoProposalStatusUpdated;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThoProposalStatusUpdatedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class ThoProposalStatusUpdatedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.ThoProposalStatusUpdated;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ThoProposalStatusUpdatedPublisher = ThoProposalStatusUpdatedPublisher;
|