@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
package/build/index.d.ts
CHANGED
|
@@ -38,12 +38,14 @@ export * from './types/addressType';
|
|
|
38
38
|
export * from './types/imageProcessingStatus';
|
|
39
39
|
export * from './types/whatsapp';
|
|
40
40
|
export * from './types/leadAutomator';
|
|
41
|
+
export * from './types/dmAutomator';
|
|
41
42
|
export * from './types/socialMediaAutomator';
|
|
42
43
|
export * from './types/smaSubscriptionPlan';
|
|
43
44
|
export * from './types/smaSubscriptionStatus';
|
|
44
45
|
export * from './types/calNutri';
|
|
45
46
|
export * from './types/linkedinAutomator';
|
|
46
47
|
export * from './types/babelia';
|
|
48
|
+
export * from './types/notasBr';
|
|
47
49
|
export * from './types/socialCredential';
|
|
48
50
|
export * from './types/darkChannel';
|
|
49
51
|
export * from './types/politicaBetCategory';
|
|
@@ -53,12 +55,16 @@ export * from './types/suggestionStatus';
|
|
|
53
55
|
export * from './types/betOutcome';
|
|
54
56
|
export * from './types/betStatus';
|
|
55
57
|
export * from './types/predictionType';
|
|
58
|
+
export * from './types/trabalhoHomeOffice';
|
|
56
59
|
export * from './events/subjects';
|
|
57
60
|
export * from './events/baseListener';
|
|
58
61
|
export * from './events/basePublisher';
|
|
59
62
|
export * from './events/youtube-dark';
|
|
60
63
|
export * from './events/social-media-automator';
|
|
61
64
|
export * from './events/ai';
|
|
65
|
+
export * from './events/notas-br';
|
|
66
|
+
export * from './events/trabalho-home-office';
|
|
62
67
|
export * from './services/TenantDataService';
|
|
63
68
|
export * from './services/CurrencyService';
|
|
69
|
+
export * from './config/notasBrBilling';
|
|
64
70
|
export * from './helpers/calculateBonus';
|
package/build/index.js
CHANGED
|
@@ -55,6 +55,8 @@ __exportStar(require("./types/imageProcessingStatus"), exports);
|
|
|
55
55
|
__exportStar(require("./types/whatsapp"), exports);
|
|
56
56
|
// leadautomator
|
|
57
57
|
__exportStar(require("./types/leadAutomator"), exports);
|
|
58
|
+
// dm-automator (comentário → DM)
|
|
59
|
+
__exportStar(require("./types/dmAutomator"), exports);
|
|
58
60
|
// social-media-automator
|
|
59
61
|
__exportStar(require("./types/socialMediaAutomator"), exports);
|
|
60
62
|
__exportStar(require("./types/smaSubscriptionPlan"), exports);
|
|
@@ -65,6 +67,8 @@ __exportStar(require("./types/calNutri"), exports);
|
|
|
65
67
|
__exportStar(require("./types/linkedinAutomator"), exports);
|
|
66
68
|
// babelia
|
|
67
69
|
__exportStar(require("./types/babelia"), exports);
|
|
70
|
+
// notas-br
|
|
71
|
+
__exportStar(require("./types/notasBr"), exports);
|
|
68
72
|
// social credentials (multi-tenant, multi-platform)
|
|
69
73
|
__exportStar(require("./types/socialCredential"), exports);
|
|
70
74
|
// dark channel (n8n + Remotion render pipeline)
|
|
@@ -77,12 +81,18 @@ __exportStar(require("./types/suggestionStatus"), exports);
|
|
|
77
81
|
__exportStar(require("./types/betOutcome"), exports);
|
|
78
82
|
__exportStar(require("./types/betStatus"), exports);
|
|
79
83
|
__exportStar(require("./types/predictionType"), exports);
|
|
84
|
+
// trabalho-home-office
|
|
85
|
+
__exportStar(require("./types/trabalhoHomeOffice"), exports);
|
|
80
86
|
__exportStar(require("./events/subjects"), exports);
|
|
81
87
|
__exportStar(require("./events/baseListener"), exports);
|
|
82
88
|
__exportStar(require("./events/basePublisher"), exports);
|
|
83
89
|
__exportStar(require("./events/youtube-dark"), exports);
|
|
84
90
|
__exportStar(require("./events/social-media-automator"), exports);
|
|
85
91
|
__exportStar(require("./events/ai"), exports);
|
|
92
|
+
__exportStar(require("./events/notas-br"), exports);
|
|
93
|
+
__exportStar(require("./events/trabalho-home-office"), exports);
|
|
86
94
|
__exportStar(require("./services/TenantDataService"), exports);
|
|
87
95
|
__exportStar(require("./services/CurrencyService"), exports);
|
|
96
|
+
// notas-br — tabela de billing compartilhada entre gn-business e cb-payments
|
|
97
|
+
__exportStar(require("./config/notasBrBilling"), exports);
|
|
88
98
|
__exportStar(require("./helpers/calculateBonus"), exports);
|
package/build/server.d.ts
CHANGED
|
@@ -88,6 +88,8 @@ export * from './events/compranomia/sellerProductDeletedEvent';
|
|
|
88
88
|
export * from './events/apps/imageCreatedEvent';
|
|
89
89
|
export * from './events/apps/creativeVideoReadyEvent';
|
|
90
90
|
export * from './events/realstate/realStateVideoCreatedEvent';
|
|
91
|
+
export * from './events/notas-br';
|
|
92
|
+
export * from './events/trabalho-home-office';
|
|
91
93
|
export * from './events/linkedin-automator/linkedinPostGeneratedEvent';
|
|
92
94
|
export * from './events/linkedin-automator/linkedinPostGeneratedPublisher';
|
|
93
95
|
export * from './events/linkedin-automator/linkedinPostPublishedEvent';
|
package/build/server.js
CHANGED
|
@@ -104,6 +104,10 @@ __exportStar(require("./events/compranomia/sellerProductDeletedEvent"), exports)
|
|
|
104
104
|
__exportStar(require("./events/apps/imageCreatedEvent"), exports);
|
|
105
105
|
__exportStar(require("./events/apps/creativeVideoReadyEvent"), exports);
|
|
106
106
|
__exportStar(require("./events/realstate/realStateVideoCreatedEvent"), exports);
|
|
107
|
+
// notas-br
|
|
108
|
+
__exportStar(require("./events/notas-br"), exports);
|
|
109
|
+
// trabalho-home-office
|
|
110
|
+
__exportStar(require("./events/trabalho-home-office"), exports);
|
|
107
111
|
// linkedin-automator
|
|
108
112
|
__exportStar(require("./events/linkedin-automator/linkedinPostGeneratedEvent"), exports);
|
|
109
113
|
__exportStar(require("./events/linkedin-automator/linkedinPostGeneratedPublisher"), exports);
|
|
@@ -1096,5 +1096,95 @@ TenantDataService.tenantDataMap = {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
},
|
|
1098
1098
|
RATING_CRITERIA: undefined
|
|
1099
|
+
},
|
|
1100
|
+
// TODO(notas-br): nome comercial e domínio ainda não definidos — SITE_NAME,
|
|
1101
|
+
// SITE_URL, SITE_DESCRIPTION e as redes sociais estão com placeholder.
|
|
1102
|
+
[tenant_1.Tenant.NotasBr]: {
|
|
1103
|
+
TENANT: tenant_1.Tenant.NotasBr,
|
|
1104
|
+
BACKEND_API_VERSION: '1',
|
|
1105
|
+
SITE_NAME: 'NotasBr',
|
|
1106
|
+
SITE_URL: 'https://notasbr.com.br',
|
|
1107
|
+
SITE_WHATSAPP_SUPPORT: '37988083717',
|
|
1108
|
+
SITE_WHATSAPP_BOT: '',
|
|
1109
|
+
WHATSAPP_BOT_NUMBER_ID: '',
|
|
1110
|
+
WHATSAPP_TOKEN: '',
|
|
1111
|
+
WHATSAPP_API_URL: '',
|
|
1112
|
+
WHATSAPP_API_VERSION: '',
|
|
1113
|
+
IOS_APP_DOWNLOAD_LINK: '',
|
|
1114
|
+
ANDROID_APP_DOWNLOAD_LINK: '',
|
|
1115
|
+
SITE_DESCRIPTION: 'Emissão de notas fiscais de serviço e de produto para microempresários, direto do celular',
|
|
1116
|
+
KEYWORDS: ['nota fiscal', 'nfse', 'nfe', 'nfce', 'mei', 'emissor'],
|
|
1117
|
+
SOCIAL_X: '',
|
|
1118
|
+
SOCIAL_YOUTUBE: '',
|
|
1119
|
+
SOCIAL_INSTAGRAM: '',
|
|
1120
|
+
SOCIAL_FACEBOOK: '',
|
|
1121
|
+
USER_CATEGORIES_CONFIG: {},
|
|
1122
|
+
COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_SELLER: [],
|
|
1123
|
+
COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_ADMIN: [],
|
|
1124
|
+
EMAIL_HOST: 'smtp.gmail.com',
|
|
1125
|
+
EMAIL_PORT: '587',
|
|
1126
|
+
EMAIL_USER: 'wrsolucoesdig@gmail.com',
|
|
1127
|
+
EMAIL_PASS: 'lwegguaqrzauawsg',
|
|
1128
|
+
AUTH_FACEBOOK_APP_ID: '',
|
|
1129
|
+
AUTH_GOOGLE_ID: '',
|
|
1130
|
+
AUTH_GOOGLE_SECRET: '',
|
|
1131
|
+
GOOGLE_ANALYTICS_MEASUREMENT_ID: '',
|
|
1132
|
+
GOOGLE_VERIFICATION: '',
|
|
1133
|
+
MEDIA_CONFIG: {
|
|
1134
|
+
maxPhotoSizeMB: 5,
|
|
1135
|
+
maxVideoSizeMB: 20,
|
|
1136
|
+
allowedImageFormats: ['jpg', 'jpeg', 'png', 'webp'],
|
|
1137
|
+
allowedVideoFormats: ['mp4', 'webm'],
|
|
1138
|
+
imageQualities: {
|
|
1139
|
+
thumbnail: { width: 150, height: 150, quality: 80 },
|
|
1140
|
+
medium: { width: 800, height: 800, quality: 85 },
|
|
1141
|
+
large: { width: 1200, height: 1200, quality: 90 }
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
RATING_CRITERIA: undefined
|
|
1145
|
+
},
|
|
1146
|
+
[tenant_1.Tenant.TrabalhoHomeOffice]: {
|
|
1147
|
+
TENANT: tenant_1.Tenant.TrabalhoHomeOffice,
|
|
1148
|
+
BACKEND_API_VERSION: '1',
|
|
1149
|
+
SITE_NAME: 'Trabalho Home Office',
|
|
1150
|
+
SITE_URL: 'https://www.trabalhohomeoffice.com.br',
|
|
1151
|
+
SITE_WHATSAPP_SUPPORT: '',
|
|
1152
|
+
SITE_WHATSAPP_BOT: '',
|
|
1153
|
+
WHATSAPP_BOT_NUMBER_ID: '',
|
|
1154
|
+
WHATSAPP_TOKEN: '',
|
|
1155
|
+
WHATSAPP_API_URL: '',
|
|
1156
|
+
WHATSAPP_API_VERSION: '',
|
|
1157
|
+
IOS_APP_DOWNLOAD_LINK: '',
|
|
1158
|
+
ANDROID_APP_DOWNLOAD_LINK: '',
|
|
1159
|
+
SITE_DESCRIPTION: 'Conecta quem quer contratar um freelancer ou preencher uma vaga remota com quem quer trabalhar home office.',
|
|
1160
|
+
KEYWORDS: ['trabalho home office', 'vagas remotas', 'freelancer'],
|
|
1161
|
+
SOCIAL_X: '',
|
|
1162
|
+
SOCIAL_YOUTUBE: '',
|
|
1163
|
+
SOCIAL_INSTAGRAM: '',
|
|
1164
|
+
SOCIAL_FACEBOOK: '',
|
|
1165
|
+
USER_CATEGORIES_CONFIG: {},
|
|
1166
|
+
COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_SELLER: [],
|
|
1167
|
+
COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_ADMIN: [],
|
|
1168
|
+
EMAIL_HOST: 'smtp.gmail.com',
|
|
1169
|
+
EMAIL_PORT: '587',
|
|
1170
|
+
EMAIL_USER: 'wrsolucoesdig@gmail.com',
|
|
1171
|
+
EMAIL_PASS: 'lwegguaqrzauawsg',
|
|
1172
|
+
AUTH_FACEBOOK_APP_ID: '',
|
|
1173
|
+
AUTH_GOOGLE_ID: '',
|
|
1174
|
+
AUTH_GOOGLE_SECRET: '',
|
|
1175
|
+
GOOGLE_ANALYTICS_MEASUREMENT_ID: '',
|
|
1176
|
+
GOOGLE_VERIFICATION: '',
|
|
1177
|
+
MEDIA_CONFIG: {
|
|
1178
|
+
maxPhotoSizeMB: 5,
|
|
1179
|
+
maxVideoSizeMB: 20,
|
|
1180
|
+
allowedImageFormats: ['jpg', 'jpeg', 'png', 'webp'],
|
|
1181
|
+
allowedVideoFormats: ['mp4', 'webm'],
|
|
1182
|
+
imageQualities: {
|
|
1183
|
+
thumbnail: { width: 150, height: 150, quality: 80 },
|
|
1184
|
+
medium: { width: 800, height: 800, quality: 85 },
|
|
1185
|
+
large: { width: 1200, height: 1200, quality: 90 }
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
RATING_CRITERIA: undefined
|
|
1099
1189
|
}
|
|
1100
1190
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type DmChannel = 'instagram' | 'facebook' | 'tiktok' | 'youtube';
|
|
2
|
+
/** O que dispara a automação. */
|
|
3
|
+
export type DmTriggerType = 'comment' | 'direct_message';
|
|
4
|
+
/** Em quais publicações a automação vale. */
|
|
5
|
+
export type DmTriggerScope = 'all_posts' | 'specific_posts';
|
|
6
|
+
/** Templates prontos que o dono da conta escolhe. */
|
|
7
|
+
export type DmTemplateKind = 'link_only' | 'email_then_link' | 'name_email_then_link' | 'qualify_then_link';
|
|
8
|
+
export type DmStepType = 'send_text' | 'ask' | 'buttons';
|
|
9
|
+
/** Campo coletado por um passo `ask`. Alimenta DmContact/DmFlowRun.collected. */
|
|
10
|
+
export type DmAskField = 'name' | 'email' | 'phone' | 'custom';
|
|
11
|
+
export type DmValidation = 'none' | 'email' | 'phone';
|
|
12
|
+
export interface DmSendTextStep {
|
|
13
|
+
type: 'send_text';
|
|
14
|
+
/** Aceita {{link}}, {{name}}, {{email}}, {{phone}}, {{username}}. */
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DmAskStep {
|
|
18
|
+
type: 'ask';
|
|
19
|
+
field: DmAskField;
|
|
20
|
+
/** Obrigatório quando field === 'custom'; é a chave em collected. */
|
|
21
|
+
fieldKey?: string;
|
|
22
|
+
prompt: string;
|
|
23
|
+
validate: DmValidation;
|
|
24
|
+
/** Mensagem quando a resposta não passa na validação. */
|
|
25
|
+
retryPrompt?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Usa o quick reply nativo (`user_email` / `user_phone_number`), que chega
|
|
28
|
+
* preenchido com o dado do perfil — um toque, sem digitação. Só o Messenger
|
|
29
|
+
* suporta; no Instagram o adapter cai automaticamente para texto livre.
|
|
30
|
+
*/
|
|
31
|
+
useNativeQuickReply?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface DmButtonOption {
|
|
34
|
+
label: string;
|
|
35
|
+
value: string;
|
|
36
|
+
/** Quando presente, sobrescreve {{link}} nos passos seguintes. */
|
|
37
|
+
link?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface DmButtonsStep {
|
|
40
|
+
type: 'buttons';
|
|
41
|
+
prompt: string;
|
|
42
|
+
/** Chave em collected onde o valor escolhido é gravado. */
|
|
43
|
+
fieldKey: string;
|
|
44
|
+
options: DmButtonOption[];
|
|
45
|
+
}
|
|
46
|
+
export type DmStep = DmSendTextStep | DmAskStep | DmButtonsStep;
|
|
47
|
+
export type DmMessageDirection = 'incoming' | 'outgoing';
|
|
48
|
+
export type DmMessageSentBy = 'bot' | 'human' | 'contact';
|
|
49
|
+
export type DmMessageType = 'text' | 'image' | 'video' | 'audio' | 'story_reply';
|
|
50
|
+
/** Estado da execução do fluxo para um contato. */
|
|
51
|
+
export type DmFlowRunStatus = 'active' | 'completed' | 'abandoned' | 'opted_out' | 'failed';
|
|
52
|
+
export type DmConversationStatus = 'open' | 'closed';
|
|
53
|
+
/** Origem do evento que criou o contato — usado no funil. */
|
|
54
|
+
export type DmContactSource = 'comment' | 'direct_message' | 'manual';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Automação de DM ("comentou → recebe no direct") para Instagram, Facebook,
|
|
3
|
+
// TikTok e YouTube. O fluxo é um documento de dados (DmStep[]), nunca um if no
|
|
4
|
+
// código: os templates são só sementes desse documento, então um construtor
|
|
5
|
+
// visual no futuro é uma tela que escreve o mesmo JSON.
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
export declare enum NotasBrPlanTier {
|
|
2
|
+
Essential = "Essential",
|
|
3
|
+
Professional = "Professional"
|
|
4
|
+
}
|
|
5
|
+
export declare enum NbInvoiceType {
|
|
6
|
+
NFSe = "NFSe",// serviço — prefeitura / plataforma nacional
|
|
7
|
+
NFe = "NFe",// modelo 55 — produto com entrega/transporte
|
|
8
|
+
NFCe = "NFCe"
|
|
9
|
+
}
|
|
10
|
+
export declare enum NbInvoiceModel {
|
|
11
|
+
Model55 = "55",
|
|
12
|
+
Model65 = "65"
|
|
13
|
+
}
|
|
14
|
+
export declare enum NbInvoiceStatus {
|
|
15
|
+
Pending = "Pending",// salva no sistema, não enviada
|
|
16
|
+
WaitingData = "WaitingData",// falta informação obrigatória
|
|
17
|
+
WaitingAuthorization = "WaitingAuthorization",// enviada, aguardando o órgão
|
|
18
|
+
Authorized = "Authorized",
|
|
19
|
+
Rejected = "Rejected",// recusada por erro nos dados — corrigir e retransmitir
|
|
20
|
+
Denied = "Denied",// irregularidade cadastral — consome o número, não reaproveita
|
|
21
|
+
WaitingCancellation = "WaitingCancellation",
|
|
22
|
+
Cancelled = "Cancelled"
|
|
23
|
+
}
|
|
24
|
+
export declare enum NbInvoicePurpose {
|
|
25
|
+
Normal = "Normal",
|
|
26
|
+
Complementary = "Complementary",
|
|
27
|
+
Adjustment = "Adjustment",
|
|
28
|
+
Return = "Return"
|
|
29
|
+
}
|
|
30
|
+
export declare enum NbOperationType {
|
|
31
|
+
Outgoing = "Outgoing",// saída (padrão)
|
|
32
|
+
Incoming = "Incoming"
|
|
33
|
+
}
|
|
34
|
+
export declare enum NbFreightModality {
|
|
35
|
+
EmitterPaid = "EmitterPaid",// CIF
|
|
36
|
+
RecipientPaid = "RecipientPaid",// FOB
|
|
37
|
+
ThirdPartyPaid = "ThirdPartyPaid",
|
|
38
|
+
OwnSender = "OwnSender",
|
|
39
|
+
OwnRecipient = "OwnRecipient",
|
|
40
|
+
NoFreight = "NoFreight"
|
|
41
|
+
}
|
|
42
|
+
export declare enum NbPaymentMethod {
|
|
43
|
+
Cash = "Cash",
|
|
44
|
+
Pix = "Pix",
|
|
45
|
+
CreditCard = "CreditCard",
|
|
46
|
+
DebitCard = "DebitCard",
|
|
47
|
+
BankSlip = "BankSlip",
|
|
48
|
+
Check = "Check",
|
|
49
|
+
Voucher = "Voucher",
|
|
50
|
+
NoPayment = "NoPayment"
|
|
51
|
+
}
|
|
52
|
+
export declare enum NbPaymentTerm {
|
|
53
|
+
Immediate = "Immediate",// à vista (padrão)
|
|
54
|
+
Deferred = "Deferred"
|
|
55
|
+
}
|
|
56
|
+
export declare enum NbGoodsOrigin {
|
|
57
|
+
National = "0",
|
|
58
|
+
ForeignDirectImport = "1",
|
|
59
|
+
ForeignDomesticMarket = "2",
|
|
60
|
+
NationalImportContentOver40 = "3",
|
|
61
|
+
NationalBasicProductiveProcess = "4",
|
|
62
|
+
NationalImportContentUnder40 = "5",
|
|
63
|
+
ForeignDirectImportNoSimilar = "6",
|
|
64
|
+
ForeignDomesticMarketNoSimilar = "7",
|
|
65
|
+
NationalImportContentOver70 = "8"
|
|
66
|
+
}
|
|
67
|
+
export declare enum NbTaxRegime {
|
|
68
|
+
Mei = "Mei",
|
|
69
|
+
SimplesNacional = "SimplesNacional",
|
|
70
|
+
PresumedProfit = "PresumedProfit",// Lucro Presumido
|
|
71
|
+
RealProfit = "RealProfit"
|
|
72
|
+
}
|
|
73
|
+
export declare enum NbIcmsTaxpayerType {
|
|
74
|
+
Taxpayer = "Taxpayer",// 1 — contribuinte com IE
|
|
75
|
+
ExemptTaxpayer = "ExemptTaxpayer",// 2 — isento de inscrição
|
|
76
|
+
NonTaxpayer = "NonTaxpayer"
|
|
77
|
+
}
|
|
78
|
+
export declare enum NbTaxSituationKind {
|
|
79
|
+
Cst = "Cst",
|
|
80
|
+
Csosn = "Csosn"
|
|
81
|
+
}
|
|
82
|
+
export declare enum NbPersonType {
|
|
83
|
+
Individual = "Individual",// PF
|
|
84
|
+
Company = "Company"
|
|
85
|
+
}
|
|
86
|
+
export declare enum NbEnvironment {
|
|
87
|
+
Production = "Production",
|
|
88
|
+
Homologation = "Homologation"
|
|
89
|
+
}
|
|
90
|
+
export declare enum NbCertificateStatus {
|
|
91
|
+
Missing = "Missing",// nunca enviado — bloqueia a emissão
|
|
92
|
+
Valid = "Valid",
|
|
93
|
+
Expiring = "Expiring",// dentro da janela de alerta
|
|
94
|
+
Expired = "Expired",
|
|
95
|
+
Invalid = "Invalid"
|
|
96
|
+
}
|
|
97
|
+
export declare enum NbCreditPackage {
|
|
98
|
+
Small = "Small",
|
|
99
|
+
Medium = "Medium",
|
|
100
|
+
Large = "Large"
|
|
101
|
+
}
|
|
102
|
+
export declare enum NbCreditEntryType {
|
|
103
|
+
Purchase = "Purchase",
|
|
104
|
+
Consumption = "Consumption",
|
|
105
|
+
Refund = "Refund",// nota rejeitada/cancelada devolve o crédito
|
|
106
|
+
Adjustment = "Adjustment"
|
|
107
|
+
}
|
|
108
|
+
export declare enum NbQuotaSource {
|
|
109
|
+
Trial = "Trial",
|
|
110
|
+
PlanAllowance = "PlanAllowance",
|
|
111
|
+
Credit = "Credit"
|
|
112
|
+
}
|
|
113
|
+
export declare enum NbInvoiceEventType {
|
|
114
|
+
Created = "Created",
|
|
115
|
+
Updated = "Updated",
|
|
116
|
+
TransmissionRequested = "TransmissionRequested",
|
|
117
|
+
Authorized = "Authorized",
|
|
118
|
+
Rejected = "Rejected",
|
|
119
|
+
Denied = "Denied",
|
|
120
|
+
CancellationRequested = "CancellationRequested",
|
|
121
|
+
Cancelled = "Cancelled",
|
|
122
|
+
CorrectionLetterIssued = "CorrectionLetterIssued",
|
|
123
|
+
EmailSent = "EmailSent",
|
|
124
|
+
Deleted = "Deleted"
|
|
125
|
+
}
|
|
126
|
+
export declare enum NbMemberStatus {
|
|
127
|
+
Active = "Active",
|
|
128
|
+
Invited = "Invited",
|
|
129
|
+
Removed = "Removed"
|
|
130
|
+
}
|
|
131
|
+
export interface NbAddress {
|
|
132
|
+
zipCode: string;
|
|
133
|
+
street: string;
|
|
134
|
+
number: string;
|
|
135
|
+
complement?: string;
|
|
136
|
+
district: string;
|
|
137
|
+
city: string;
|
|
138
|
+
cityIbgeCode: string;
|
|
139
|
+
state: string;
|
|
140
|
+
}
|
|
141
|
+
export interface NbCnae {
|
|
142
|
+
code: string;
|
|
143
|
+
description: string;
|
|
144
|
+
isPrimary: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface NbInvoiceRecipient {
|
|
147
|
+
personId?: string;
|
|
148
|
+
personType?: NbPersonType;
|
|
149
|
+
document?: string;
|
|
150
|
+
name: string;
|
|
151
|
+
tradeName?: string;
|
|
152
|
+
stateRegistration?: string;
|
|
153
|
+
municipalRegistration?: string;
|
|
154
|
+
icmsTaxpayerType?: NbIcmsTaxpayerType;
|
|
155
|
+
address?: NbAddress;
|
|
156
|
+
emails: string[];
|
|
157
|
+
}
|
|
158
|
+
export interface NbInvoiceItem {
|
|
159
|
+
productId?: string;
|
|
160
|
+
code: string;
|
|
161
|
+
description: string;
|
|
162
|
+
unit: string;
|
|
163
|
+
quantity: number;
|
|
164
|
+
unitPriceCents: number;
|
|
165
|
+
discountCents: number;
|
|
166
|
+
totalCents: number;
|
|
167
|
+
ncm: string;
|
|
168
|
+
cfop: string;
|
|
169
|
+
taxSituationCode: string;
|
|
170
|
+
goodsOrigin: NbGoodsOrigin;
|
|
171
|
+
cest?: string;
|
|
172
|
+
gtin?: string;
|
|
173
|
+
ibptPercent?: number;
|
|
174
|
+
}
|
|
175
|
+
export interface NbInvoiceTotals {
|
|
176
|
+
itemsTotalCents: number;
|
|
177
|
+
discountCents: number;
|
|
178
|
+
freightCents: number;
|
|
179
|
+
totalCents: number;
|
|
180
|
+
approximateTaxesCents?: number;
|
|
181
|
+
}
|
|
182
|
+
export interface NbInvoiceFreight {
|
|
183
|
+
modality: NbFreightModality;
|
|
184
|
+
carrierName?: string;
|
|
185
|
+
carrierDocument?: string;
|
|
186
|
+
freightCents?: number;
|
|
187
|
+
vehiclePlate?: string;
|
|
188
|
+
vehicleState?: string;
|
|
189
|
+
volumeQuantity?: number;
|
|
190
|
+
volumeKind?: string;
|
|
191
|
+
volumeBrand?: string;
|
|
192
|
+
grossWeight?: number;
|
|
193
|
+
netWeight?: number;
|
|
194
|
+
}
|
|
195
|
+
export interface NbInvoiceBilling {
|
|
196
|
+
number: string;
|
|
197
|
+
amountCents: number;
|
|
198
|
+
dueDate: string;
|
|
199
|
+
sequence: number;
|
|
200
|
+
}
|
|
201
|
+
export interface NbInvoiceWithholdings {
|
|
202
|
+
pisCents: number;
|
|
203
|
+
cofinsCents: number;
|
|
204
|
+
csllCents: number;
|
|
205
|
+
inssCents: number;
|
|
206
|
+
irCents: number;
|
|
207
|
+
}
|
|
208
|
+
export interface NbInvoiceServiceInfo {
|
|
209
|
+
serviceId?: string;
|
|
210
|
+
cnaeCode: string;
|
|
211
|
+
lc116Item: string;
|
|
212
|
+
nationalTaxCode?: string;
|
|
213
|
+
municipalServiceCode?: string;
|
|
214
|
+
nbsCode?: string;
|
|
215
|
+
description: string;
|
|
216
|
+
competence: string;
|
|
217
|
+
provisionState: string;
|
|
218
|
+
provisionCityIbgeCode: string;
|
|
219
|
+
issRate: number;
|
|
220
|
+
issWithheld: boolean;
|
|
221
|
+
issCents: number;
|
|
222
|
+
withholdings: NbInvoiceWithholdings;
|
|
223
|
+
}
|
|
224
|
+
export interface NbInvoiceRejection {
|
|
225
|
+
code: string;
|
|
226
|
+
message: string;
|
|
227
|
+
friendlyMessage: string;
|
|
228
|
+
field?: string;
|
|
229
|
+
}
|
|
230
|
+
export interface NbCorrectionLetter {
|
|
231
|
+
sequence: number;
|
|
232
|
+
text: string;
|
|
233
|
+
protocol?: string;
|
|
234
|
+
createdAt: string;
|
|
235
|
+
}
|
|
236
|
+
export interface NbInvoiceEventLog {
|
|
237
|
+
type: NbInvoiceEventType;
|
|
238
|
+
at: string;
|
|
239
|
+
message?: string;
|
|
240
|
+
userId?: string;
|
|
241
|
+
}
|
|
242
|
+
export interface NbPlanConfig {
|
|
243
|
+
tier: NotasBrPlanTier;
|
|
244
|
+
monthlyPriceCents: number;
|
|
245
|
+
annualPriceCents: number;
|
|
246
|
+
monthlyInvoiceAllowance: number;
|
|
247
|
+
maxCompanies: number | null;
|
|
248
|
+
maxUsers: number | null;
|
|
249
|
+
}
|
|
250
|
+
export interface NbCreditPackageConfig {
|
|
251
|
+
creditPackage: NbCreditPackage;
|
|
252
|
+
priceCents: number;
|
|
253
|
+
quantity: number;
|
|
254
|
+
}
|
|
255
|
+
export interface NbTrialConfig {
|
|
256
|
+
durationDays: number;
|
|
257
|
+
invoicesPerDay: number;
|
|
258
|
+
}
|
|
259
|
+
export interface NbBillingTable {
|
|
260
|
+
version: string;
|
|
261
|
+
plans: Record<NotasBrPlanTier, NbPlanConfig>;
|
|
262
|
+
creditPackages: Record<NbCreditPackage, NbCreditPackageConfig>;
|
|
263
|
+
trial: NbTrialConfig;
|
|
264
|
+
}
|