@seedgrid/fe-billing-user 2026.7.0
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/README.md +78 -0
- package/dist/billing.d.ts +234 -0
- package/dist/billing.d.ts.map +1 -0
- package/dist/billing.js +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/messages.d.ts +348 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +148 -0
- package/dist/module.d.ts +3 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +13 -0
- package/dist/module.json +15 -0
- package/dist/paths.d.ts +29 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +35 -0
- package/dist/server/create-billing-user-server.d.ts +34 -0
- package/dist/server/create-billing-user-server.d.ts.map +1 -0
- package/dist/server/create-billing-user-server.js +33 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +2 -0
- package/package.json +43 -0
- package/scaffold/README.md +72 -0
- package/scaffold/src/app/api/billing/cancel/route.ts +10 -0
- package/scaffold/src/app/api/billing/cancel-scheduled-change/route.ts +10 -0
- package/scaffold/src/app/api/billing/change-plan/route.ts +14 -0
- package/scaffold/src/app/api/billing/change-preview/route.ts +13 -0
- package/scaffold/src/app/api/billing/checkout/route.ts +14 -0
- package/scaffold/src/app/api/billing/invoices/route.ts +14 -0
- package/scaffold/src/app/api/billing/me/route.ts +15 -0
- package/scaffold/src/app/api/billing/plans/route.ts +10 -0
- package/scaffold/src/app/api/billing/portal/route.ts +10 -0
- package/scaffold/src/app/api/billing/reactivate/route.ts +10 -0
- package/scaffold/src/app/api/billing/upcoming/route.ts +10 -0
- package/scaffold/src/app/billing/invoices/page.tsx +213 -0
- package/scaffold/src/app/billing/page.tsx +273 -0
- package/scaffold/src/app/billing/plans/page.tsx +248 -0
- package/scaffold/src/modules/billing-user/config.ts +7 -0
- package/scaffold/src/modules/billing-user/index.ts +17 -0
- package/scaffold/src/modules/billing-user/server.ts.hbs +34 -0
- package/scaffold/src/modules/billing-user/useBillingUserAppShellSections.tsx +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# @seedgrid/fe-billing-user
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@seedgrid/fe-billing-user)
|
|
4
|
+
[](https://www.npmjs.com/package/@seedgrid/fe-billing-user)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
|
|
7
|
+
Módulo front de **billing do assinante** do SeedGrid: a visão do usuário final sobre a própria assinatura — plano atual, uso do ciclo, checkout, troca de plano com prévia de rateio, cancelamento/reativação e faturas. A visão de backoffice (cadastro de planos) fica no [`@seedgrid/fe-billing-platform`](https://www.npmjs.com/package/@seedgrid/fe-billing-platform). Compõe sobre o motor de sessão do [`@seedgrid/fe-security`](https://www.npmjs.com/package/@seedgrid/fe-security).
|
|
8
|
+
|
|
9
|
+
## Sumário
|
|
10
|
+
|
|
11
|
+
- [Funcionalidades](#funcionalidades)
|
|
12
|
+
- [Telas entregues pelo scaffold](#telas-entregues-pelo-scaffold)
|
|
13
|
+
- [Instalação](#instalação)
|
|
14
|
+
- [Uso rápido](#uso-rápido)
|
|
15
|
+
- [Backend correspondente](#backend-correspondente)
|
|
16
|
+
- [Suporte](#suporte)
|
|
17
|
+
|
|
18
|
+
## Funcionalidades
|
|
19
|
+
|
|
20
|
+
- **Assinatura corrente** — plano, status e resumo de uso do ciclo (`/me/subscription`, `/me/usage/summary`); extrato detalhado de uso com permissão `STATEMENT_READ`.
|
|
21
|
+
- **Checkout** — primeira assinatura via sessão de checkout do provedor de pagamento (redirect).
|
|
22
|
+
- **Troca de plano** — com **prévia do impacto** (rateio) antes de confirmar; upgrade imediato, downgrade agendado pro fim do ciclo; troca agendada pode ser cancelada.
|
|
23
|
+
- **Cancelar / reativar** — cancelamento agendado pro fim do ciclo vigente, reversível enquanto não efetivado.
|
|
24
|
+
- **Customer portal** — sessão do portal do provedor pra gestão de meio de pagamento.
|
|
25
|
+
- **Faturas** — prévia da próxima fatura (preço fixo + excedente acumulado) e histórico de cobranças.
|
|
26
|
+
- **i18n pronto** — `billingUserMessages` (en + pt-BR completos; es/fr/pt-PT com fallback).
|
|
27
|
+
|
|
28
|
+
O pacote exporta:
|
|
29
|
+
|
|
30
|
+
- `BillingUserPaths` — contrato dos endpoints REST (`/me/subscription`, `/me/plans`, `/me/usage/*`, `/me/billing/*`) — conferido contra os resources reais do backend.
|
|
31
|
+
- DTOs client-safe da assinatura, planos, uso e faturas.
|
|
32
|
+
- `billingUserMessages` (i18n).
|
|
33
|
+
- `createBillingUserServer` (em `@seedgrid/fe-billing-user/server`, SERVER-ONLY) — engine tipado sobre a sessão do fe-security; **todas as capacidades do engine têm UI correspondente no scaffold**.
|
|
34
|
+
|
|
35
|
+
## Telas entregues pelo scaffold
|
|
36
|
+
|
|
37
|
+
| Tela | Rota | O que faz |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| Visão geral | `/billing` | Plano atual, uso do ciclo, acesso ao portal; cancelar, reativar e cancelar troca agendada (com confirmação) |
|
|
40
|
+
| Planos | `/billing/plans` | Catálogo assinável: sem assinatura → assinar (checkout); com assinatura → trocar, com diálogo de prévia do rateio |
|
|
41
|
+
| Faturas | `/billing/invoices` | Próxima fatura (prévia) + histórico de cobranças do provedor |
|
|
42
|
+
|
|
43
|
+
O scaffold também traz as rotas-proxy de API (`/api/billing/*` — checkout, portal, change-plan, cancel, reactivate, invoices, upcoming etc.), o bootstrap de servidor (compondo `createSecurityServer` + `createBillingUserServer` com a mesma sessão/cookie do app) e o submenu Billing (`useBillingUserAppShellSections`), gated por `BILLING_READ` — tudo wireado pelo SeedGrid CLI via `module.json` (`id: "billing-user"`, `requires: ["security"]`).
|
|
44
|
+
|
|
45
|
+
## Instalação
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pnpm add @seedgrid/fe-billing-user @seedgrid/fe-security @seedgrid/fe-core
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Uso rápido
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// server-only — compõe sobre a sessão do fe-security
|
|
55
|
+
import { createSecurityServer } from "@seedgrid/fe-security/server";
|
|
56
|
+
import { createBillingUserServer } from "@seedgrid/fe-billing-user/server";
|
|
57
|
+
|
|
58
|
+
const session = createSecurityServer({ /* ... */ });
|
|
59
|
+
export const billing = createBillingUserServer(session);
|
|
60
|
+
|
|
61
|
+
// Em uma rota/action:
|
|
62
|
+
const assinatura = await billing.getSubscription(); // pode ser null (sem assinatura)
|
|
63
|
+
const preview = await billing.getChangePreview("plan-pro");
|
|
64
|
+
await billing.changePlan({ planId: "plan-pro" }); // upgrade imediato / downgrade agendado
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Backend correspondente
|
|
68
|
+
|
|
69
|
+
Resources do `seedgrid-report-api`: `MeBillingResource`, `BillingCheckoutResource`, `SubscriptionResource`, `UsageResource`, `PlansCatalogResource`. Os paths foram auditados contra os `@Path` reais do backend.
|
|
70
|
+
|
|
71
|
+
## Suporte
|
|
72
|
+
|
|
73
|
+
- Issues: https://github.com/SeedGrid/seedgrid-fe-components/issues
|
|
74
|
+
- Repositório: https://github.com/SeedGrid/seedgrid-fe-components
|
|
75
|
+
|
|
76
|
+
## Licença
|
|
77
|
+
|
|
78
|
+
MIT
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
export interface SubscriptionCycle {
|
|
2
|
+
id: string;
|
|
3
|
+
periodStart: string;
|
|
4
|
+
periodEnd: string;
|
|
5
|
+
includedRequests: number;
|
|
6
|
+
usedRequests: number;
|
|
7
|
+
remainingRequests: number;
|
|
8
|
+
overageRequests: number;
|
|
9
|
+
}
|
|
10
|
+
export interface SubscriptionPlanRef {
|
|
11
|
+
id: string;
|
|
12
|
+
code: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string | null;
|
|
15
|
+
isTrial?: boolean;
|
|
16
|
+
upgradePromptThresholdPercent?: number;
|
|
17
|
+
quotaWarningRemainingPercent?: number;
|
|
18
|
+
quotaCriticalRemainingPercent?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface SubscriptionPlanTerm {
|
|
21
|
+
id: string;
|
|
22
|
+
monthlyPrice: number | string;
|
|
23
|
+
monthlyRequests: number;
|
|
24
|
+
maxUsers?: number | null;
|
|
25
|
+
overagePrice: number | string;
|
|
26
|
+
effectiveFrom?: string;
|
|
27
|
+
effectiveTo?: string | null;
|
|
28
|
+
featuresJson?: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface SubscriptionPendingChange {
|
|
31
|
+
planId: string | null;
|
|
32
|
+
planCode: string | null;
|
|
33
|
+
planName: string | null;
|
|
34
|
+
monthlyPrice: number | string | null;
|
|
35
|
+
monthlyRequests: number | null;
|
|
36
|
+
effectiveAt: string | null;
|
|
37
|
+
}
|
|
38
|
+
/** GET /me/subscription. Pode ser null se não houver assinatura. */
|
|
39
|
+
export interface SubscriptionResponse {
|
|
40
|
+
tenantId: string;
|
|
41
|
+
subscriptionId: string;
|
|
42
|
+
status: string;
|
|
43
|
+
startsAt: string;
|
|
44
|
+
endsAt: string | null;
|
|
45
|
+
billingDay: number | null;
|
|
46
|
+
plan: SubscriptionPlanRef | null;
|
|
47
|
+
planTerm: SubscriptionPlanTerm | null;
|
|
48
|
+
billingCycle: SubscriptionCycle;
|
|
49
|
+
/** Downgrade agendado que entra em vigor no próximo ciclo. */
|
|
50
|
+
pendingChange: SubscriptionPendingChange | null;
|
|
51
|
+
/** Cancelamento agendado: acesso até cancelEffectiveAt; pode reativar até lá. */
|
|
52
|
+
cancelAtPeriodEnd: boolean;
|
|
53
|
+
cancelEffectiveAt: string | null;
|
|
54
|
+
}
|
|
55
|
+
export interface UsageAlert {
|
|
56
|
+
id: string;
|
|
57
|
+
tenantId: string;
|
|
58
|
+
billingCycleId: string;
|
|
59
|
+
thresholdPercent: number;
|
|
60
|
+
triggeredAt: string;
|
|
61
|
+
channel: string;
|
|
62
|
+
recipient: string | null;
|
|
63
|
+
payloadJson: string | null;
|
|
64
|
+
message: string;
|
|
65
|
+
}
|
|
66
|
+
/** GET /me/usage/summary. */
|
|
67
|
+
export interface UsageSummaryResponse {
|
|
68
|
+
tenantId: string;
|
|
69
|
+
subscriptionId: string;
|
|
70
|
+
plan: Pick<SubscriptionPlanRef, "id" | "code" | "name" | "isTrial" | "upgradePromptThresholdPercent" | "quotaWarningRemainingPercent" | "quotaCriticalRemainingPercent"> | null;
|
|
71
|
+
planTerm: {
|
|
72
|
+
id: string;
|
|
73
|
+
monthlyPrice: number | string;
|
|
74
|
+
monthlyRequests: number;
|
|
75
|
+
overagePrice: number | string;
|
|
76
|
+
} | null;
|
|
77
|
+
cycle: SubscriptionCycle;
|
|
78
|
+
alerts?: UsageAlert[];
|
|
79
|
+
}
|
|
80
|
+
export interface UsageStatementEntry {
|
|
81
|
+
id: string;
|
|
82
|
+
tenantId: string;
|
|
83
|
+
billingCycleId: string;
|
|
84
|
+
aiRequestId: string | null;
|
|
85
|
+
occurredAt: string;
|
|
86
|
+
operationType: string;
|
|
87
|
+
description: string | null;
|
|
88
|
+
/** Frase que o usuário digitou e gerou o consumo. */
|
|
89
|
+
userPrompt?: string | null;
|
|
90
|
+
requestStatus?: string | null;
|
|
91
|
+
balanceBefore: number;
|
|
92
|
+
consumedRequests: number;
|
|
93
|
+
balanceAfter: number;
|
|
94
|
+
isOverage: boolean;
|
|
95
|
+
overageUnitPrice: number | string | null;
|
|
96
|
+
planTermId: string | null;
|
|
97
|
+
chatId: string | null;
|
|
98
|
+
reportId: string | null;
|
|
99
|
+
metadataJson: string | null;
|
|
100
|
+
}
|
|
101
|
+
/** GET /me/usage/statement. */
|
|
102
|
+
export interface UsageStatementResponse {
|
|
103
|
+
tenantId: string;
|
|
104
|
+
entries: UsageStatementEntry[];
|
|
105
|
+
}
|
|
106
|
+
/** Item do catálogo de planos assináveis (GET /me/plans). */
|
|
107
|
+
export interface PlanCatalogItem {
|
|
108
|
+
planId: string;
|
|
109
|
+
planTermId: string;
|
|
110
|
+
code: string;
|
|
111
|
+
name: string;
|
|
112
|
+
description: string | null;
|
|
113
|
+
monthlyPrice: number | string;
|
|
114
|
+
monthlyRequests: number;
|
|
115
|
+
maxUsers: number | null;
|
|
116
|
+
overagePrice: number | string;
|
|
117
|
+
featuresJson: string | null;
|
|
118
|
+
/** Só assina se houver priceId configurado no provedor. */
|
|
119
|
+
checkoutEnabled: boolean;
|
|
120
|
+
/** Plano da assinatura ativa atual. */
|
|
121
|
+
current: boolean;
|
|
122
|
+
/** Já há downgrade agendado pra este plano. */
|
|
123
|
+
pendingDowngrade?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface PlansPendingChange {
|
|
126
|
+
planId: string;
|
|
127
|
+
planName: string;
|
|
128
|
+
effectiveAt: string | null;
|
|
129
|
+
}
|
|
130
|
+
export interface PlansCatalogResponse {
|
|
131
|
+
items: PlanCatalogItem[];
|
|
132
|
+
pendingChange?: PlansPendingChange | null;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* POST /me/billing/checkout (request).
|
|
136
|
+
*
|
|
137
|
+
* Corrigido contra `BillingCheckoutResource.CreateCheckoutRequest` (backend real):
|
|
138
|
+
* o único campo aceito é `planId` (`@NotBlank`, é o `publicId` do `PlanEntity`, não um
|
|
139
|
+
* "planCode"). `customerEmail`/`successUrl`/`cancelUrl` NÃO são enviados pelo client —
|
|
140
|
+
* o backend resolve o e-mail do usuário autenticado e as URLs de config
|
|
141
|
+
* (`seedgrid.report.billing.checkout.{success,cancel}-url`). O shape anterior
|
|
142
|
+
* (`planCode?`, `customerEmail?`, `successUrl?`, `cancelUrl?`, tudo opcional) não batia
|
|
143
|
+
* com nenhum campo real do request.
|
|
144
|
+
*/
|
|
145
|
+
export interface CheckoutRequest {
|
|
146
|
+
planId: string;
|
|
147
|
+
}
|
|
148
|
+
/** POST /me/billing/checkout (response). */
|
|
149
|
+
export interface CheckoutSessionResponse {
|
|
150
|
+
provider: string | null;
|
|
151
|
+
checkoutUrl: string;
|
|
152
|
+
checkoutSessionId: string | null;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* POST /me/billing/portal (response).
|
|
156
|
+
*
|
|
157
|
+
* Sem tipo de request: `MeBillingResource.portal()` não declara `@Consumes` nem parâmetro
|
|
158
|
+
* de corpo — o endpoint não aceita nenhum payload do client (customerId/returnUrl são
|
|
159
|
+
* resolvidos no servidor a partir da assinatura ativa e de
|
|
160
|
+
* `seedgrid.report.billing.portal.return-url`). O `PortalRequest` antigo
|
|
161
|
+
* (`customerReference?`, `returnUrl?`, `metadata?`) não correspondia a nada aceito pelo
|
|
162
|
+
* backend e foi removido — ver `scaffold/README.md`.
|
|
163
|
+
*/
|
|
164
|
+
export interface PortalSessionResponse {
|
|
165
|
+
provider: string | null;
|
|
166
|
+
portalUrl: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* POST /me/billing/change-plan (request). Troca a assinatura EXISTENTE (upgrade ou
|
|
170
|
+
* downgrade) — não confundir com {@link CheckoutRequest} (1ª assinatura via checkout).
|
|
171
|
+
* `planId` é o `publicId` do `PlanEntity` (mesma convenção de {@link CheckoutRequest}).
|
|
172
|
+
*/
|
|
173
|
+
export interface ChangePlanRequest {
|
|
174
|
+
planId: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* POST /me/billing/change-plan (response). Upgrade aplica na hora (rateio cobrado já);
|
|
178
|
+
* downgrade é agendado pro fim do ciclo atual — `effectiveAt` só vem preenchido nesse caso.
|
|
179
|
+
*/
|
|
180
|
+
export interface ChangePlanResponse {
|
|
181
|
+
planCode: string;
|
|
182
|
+
status: "PLAN_CHANGED" | "DOWNGRADE_SCHEDULED";
|
|
183
|
+
effectiveAt?: string | null;
|
|
184
|
+
}
|
|
185
|
+
/** POST /me/billing/cancel-scheduled-change (response). Idempotente. */
|
|
186
|
+
export interface CancelScheduledChangeResponse {
|
|
187
|
+
status: "NO_PENDING_CHANGE" | "SCHEDULED_CHANGE_CANCELED";
|
|
188
|
+
}
|
|
189
|
+
/** POST /me/billing/cancel (response). Mantém acesso até o fim do ciclo vigente. */
|
|
190
|
+
export interface CancelSubscriptionResponse {
|
|
191
|
+
status: "CANCELLATION_SCHEDULED";
|
|
192
|
+
}
|
|
193
|
+
/** POST /me/billing/reactivate (response). Só vale enquanto ainda vigente. */
|
|
194
|
+
export interface ReactivateSubscriptionResponse {
|
|
195
|
+
status: "REACTIVATED";
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* GET /me/billing/change-preview (response). Prévia do impacto de uma troca de plano
|
|
199
|
+
* ANTES de confirmar via {@link ChangePlanRequest}. Downgrade nunca cobra na hora
|
|
200
|
+
* (`immediate: false`, `amountDue: 0`).
|
|
201
|
+
*/
|
|
202
|
+
export interface ChangePreviewResponse {
|
|
203
|
+
downgrade: boolean;
|
|
204
|
+
immediate: boolean;
|
|
205
|
+
amountDue: number | null;
|
|
206
|
+
currency: string | null;
|
|
207
|
+
}
|
|
208
|
+
/** Item de linha da prévia de fatura (GET /me/billing/upcoming). */
|
|
209
|
+
export interface UpcomingInvoiceLine {
|
|
210
|
+
description: string | null;
|
|
211
|
+
amount: number | null;
|
|
212
|
+
quantity: number | null;
|
|
213
|
+
}
|
|
214
|
+
/** GET /me/billing/upcoming (response, campo `upcoming`). Vem `null` se não houver próxima fatura. */
|
|
215
|
+
export interface UpcomingInvoiceResponse {
|
|
216
|
+
amountDue: number | null;
|
|
217
|
+
total: number | null;
|
|
218
|
+
currency: string | null;
|
|
219
|
+
nextPaymentAttempt: string | null;
|
|
220
|
+
periodStart: string | null;
|
|
221
|
+
periodEnd: string | null;
|
|
222
|
+
lines: UpcomingInvoiceLine[];
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* GET /me/billing/invoices?limit=. (response). O item de `invoices` é repassado cru do
|
|
226
|
+
* provedor pela lib `seedgrid-billing` (`BillingService.listInvoices`, agnóstica de
|
|
227
|
+
* Stripe/etc.) — o shape exato não foi confirmado no OpenAPI nem no fonte disponível
|
|
228
|
+
* (a lib não estava no escopo inspecionado), então fica como registro aberto até
|
|
229
|
+
* alguém confirmar o DTO real e apertar o tipo.
|
|
230
|
+
*/
|
|
231
|
+
export interface BillingInvoiceEnvelope {
|
|
232
|
+
invoices: Record<string, unknown>[];
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=billing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,6BAA6B,CAAC,EAAE,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAA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,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACrC"}
|
package/dist/billing.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Barrel client-safe (@seedgrid/fe-billing-user). Tipos + paths. Server helper em /server.
|
|
2
|
+
// As telas de assinatura/uso são SCAFFOLD (app owns), entregues pelo CLI.
|
|
3
|
+
export * from "./billing";
|
|
4
|
+
export * from "./paths";
|
|
5
|
+
export { billingUserMessages } from "./messages";
|