@navservice/assinatura 1.33.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.
Files changed (44) hide show
  1. package/build/es/backend/schema/schema_assinatura.d.ts +324 -0
  2. package/build/es/biblioteca/src/componentes/checkout/ButtonGerarUrl.d.ts +7 -0
  3. package/build/es/biblioteca/src/componentes/checkout/CheckoutAssinaturaStripe.d.ts +1 -0
  4. package/build/es/biblioteca/src/componentes/checkout/Stype.d.ts +1 -0
  5. package/build/es/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +5 -0
  6. package/build/es/biblioteca/src/componentes/geral/TopTabs/index.d.ts +10 -0
  7. package/build/es/biblioteca/src/contexto/contexto_assinatura.d.ts +31 -0
  8. package/build/es/biblioteca/src/index.d.ts +2 -0
  9. package/build/es/index.js +19866 -0
  10. package/build/es/index.js.LICENSE.txt +26 -0
  11. package/build/es/shared/configuracoes/_sistema.d.ts +49 -0
  12. package/build/es/shared/configuracoes/_theme.d.ts +91 -0
  13. package/build/es/shared/configuracoes/index.d.ts +142 -0
  14. package/build/es/shared/types/controller/assinatura.d.ts +249 -0
  15. package/build/es/shared/types/controller/cliente.d.ts +112 -0
  16. package/build/es/shared/types/geral/type_response.d.ts +54 -0
  17. package/build/es/shared/types/index.d.ts +38 -0
  18. package/build/lib/backend/schema/schema_assinatura.d.ts +324 -0
  19. package/build/lib/biblioteca/src/componentes/checkout/ButtonGerarUrl.d.ts +7 -0
  20. package/build/lib/biblioteca/src/componentes/checkout/CheckoutAssinaturaStripe.d.ts +1 -0
  21. package/build/lib/biblioteca/src/componentes/checkout/Stype.d.ts +1 -0
  22. package/build/lib/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +5 -0
  23. package/build/lib/biblioteca/src/componentes/geral/TopTabs/index.d.ts +10 -0
  24. package/build/lib/biblioteca/src/config_env/index.d.ts +9 -0
  25. package/build/lib/biblioteca/src/contexto/contexto_assinatura.d.ts +31 -0
  26. package/build/lib/biblioteca/src/index.d.ts +2 -0
  27. package/build/lib/biblioteca/src/utils/_api.d.ts +41 -0
  28. package/build/lib/biblioteca/src/utils/_data.d.ts +11 -0
  29. package/build/lib/biblioteca/src/utils/_form.d.ts +11 -0
  30. package/build/lib/biblioteca/src/utils/_geral.d.ts +9 -0
  31. package/build/lib/biblioteca/src/utils/_hooks.d.ts +5 -0
  32. package/build/lib/biblioteca/src/utils/_local_storage.d.ts +8 -0
  33. package/build/lib/biblioteca/src/utils/_session_storage.d.ts +14 -0
  34. package/build/lib/biblioteca/src/utils/_update_context.d.ts +21 -0
  35. package/build/lib/biblioteca/src/utils/utils.d.ts +108 -0
  36. package/build/lib/index.js +461 -0
  37. package/build/lib/shared/configuracoes/_sistema.d.ts +49 -0
  38. package/build/lib/shared/configuracoes/_theme.d.ts +91 -0
  39. package/build/lib/shared/configuracoes/index.d.ts +142 -0
  40. package/build/lib/shared/types/controller/assinatura.d.ts +229 -0
  41. package/build/lib/shared/types/controller/cliente.d.ts +112 -0
  42. package/build/lib/shared/types/geral/type_response.d.ts +54 -0
  43. package/build/lib/shared/types/index.d.ts +47 -0
  44. package/package.json +31 -0
@@ -0,0 +1,324 @@
1
+ import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
2
+ export declare const AssinaturaStatusEnum: readonly ["active", "canceled", "incomplete", "incomplete_expired", "past_due", "paused", "trialing", "unpaid"];
3
+ export declare const schema_assinatura: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4
+ name: "assinatura";
5
+ schema: undefined;
6
+ columns: {
7
+ _id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
8
+ name: "_id";
9
+ tableName: "assinatura";
10
+ dataType: "string";
11
+ columnType: "SQLiteText";
12
+ data: string;
13
+ driverParam: string;
14
+ notNull: true;
15
+ hasDefault: true;
16
+ isPrimaryKey: true;
17
+ isAutoincrement: false;
18
+ hasRuntimeDefault: true;
19
+ enumValues: [string, ...string[]];
20
+ baseColumn: never;
21
+ identity: undefined;
22
+ generated: undefined;
23
+ }, {}, {
24
+ length: number | undefined;
25
+ }>;
26
+ usuario_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
27
+ name: "usuario_id";
28
+ tableName: "assinatura";
29
+ dataType: "string";
30
+ columnType: "SQLiteText";
31
+ data: string;
32
+ driverParam: string;
33
+ notNull: true;
34
+ hasDefault: false;
35
+ isPrimaryKey: false;
36
+ isAutoincrement: false;
37
+ hasRuntimeDefault: false;
38
+ enumValues: [string, ...string[]];
39
+ baseColumn: never;
40
+ identity: undefined;
41
+ generated: undefined;
42
+ }, {}, {
43
+ length: number | undefined;
44
+ }>;
45
+ usuario_tipo: import("drizzle-orm/sqlite-core").SQLiteColumn<{
46
+ name: "usuario_tipo";
47
+ tableName: "assinatura";
48
+ dataType: "string";
49
+ columnType: "SQLiteText";
50
+ data: "padrao";
51
+ driverParam: string;
52
+ notNull: true;
53
+ hasDefault: false;
54
+ isPrimaryKey: false;
55
+ isAutoincrement: false;
56
+ hasRuntimeDefault: false;
57
+ enumValues: ["padrao"];
58
+ baseColumn: never;
59
+ identity: undefined;
60
+ generated: undefined;
61
+ }, {}, {
62
+ length: number | undefined;
63
+ }>;
64
+ app: import("drizzle-orm/sqlite-core").SQLiteColumn<{
65
+ name: "app";
66
+ tableName: "assinatura";
67
+ dataType: "string";
68
+ columnType: "SQLiteText";
69
+ data: "service-usuario" | "service-financeiro" | "service-pages-ai";
70
+ driverParam: string;
71
+ notNull: true;
72
+ hasDefault: false;
73
+ isPrimaryKey: false;
74
+ isAutoincrement: false;
75
+ hasRuntimeDefault: false;
76
+ enumValues: ["service-usuario", "service-financeiro", "service-pages-ai"];
77
+ baseColumn: never;
78
+ identity: undefined;
79
+ generated: undefined;
80
+ }, {}, {
81
+ length: number | undefined;
82
+ }>;
83
+ data_criacao: import("drizzle-orm/sqlite-core").SQLiteColumn<{
84
+ name: "data_criacao";
85
+ tableName: "assinatura";
86
+ dataType: "number";
87
+ columnType: "SQLiteInteger";
88
+ data: number;
89
+ driverParam: number;
90
+ notNull: true;
91
+ hasDefault: false;
92
+ isPrimaryKey: false;
93
+ isAutoincrement: false;
94
+ hasRuntimeDefault: false;
95
+ enumValues: undefined;
96
+ baseColumn: never;
97
+ identity: undefined;
98
+ generated: undefined;
99
+ }, {}, {}>;
100
+ data_atualizacao: import("drizzle-orm/sqlite-core").SQLiteColumn<{
101
+ name: "data_atualizacao";
102
+ tableName: "assinatura";
103
+ dataType: "number";
104
+ columnType: "SQLiteInteger";
105
+ data: number;
106
+ driverParam: number;
107
+ notNull: false;
108
+ hasDefault: false;
109
+ isPrimaryKey: false;
110
+ isAutoincrement: false;
111
+ hasRuntimeDefault: false;
112
+ enumValues: undefined;
113
+ baseColumn: never;
114
+ identity: undefined;
115
+ generated: undefined;
116
+ }, {}, {}>;
117
+ periodo_inicio: import("drizzle-orm/sqlite-core").SQLiteColumn<{
118
+ name: "periodo_inicio";
119
+ tableName: "assinatura";
120
+ dataType: "number";
121
+ columnType: "SQLiteInteger";
122
+ data: number;
123
+ driverParam: number;
124
+ notNull: false;
125
+ hasDefault: false;
126
+ isPrimaryKey: false;
127
+ isAutoincrement: false;
128
+ hasRuntimeDefault: false;
129
+ enumValues: undefined;
130
+ baseColumn: never;
131
+ identity: undefined;
132
+ generated: undefined;
133
+ }, {}, {}>;
134
+ periodo_fim: import("drizzle-orm/sqlite-core").SQLiteColumn<{
135
+ name: "periodo_fim";
136
+ tableName: "assinatura";
137
+ dataType: "number";
138
+ columnType: "SQLiteInteger";
139
+ data: number;
140
+ driverParam: number;
141
+ notNull: false;
142
+ hasDefault: false;
143
+ isPrimaryKey: false;
144
+ isAutoincrement: false;
145
+ hasRuntimeDefault: false;
146
+ enumValues: undefined;
147
+ baseColumn: never;
148
+ identity: undefined;
149
+ generated: undefined;
150
+ }, {}, {}>;
151
+ status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
152
+ name: "status";
153
+ tableName: "assinatura";
154
+ dataType: "string";
155
+ columnType: "SQLiteText";
156
+ data: "canceled" | "incomplete" | "paused" | "active" | "incomplete_expired" | "past_due" | "trialing" | "unpaid";
157
+ driverParam: string;
158
+ notNull: true;
159
+ hasDefault: true;
160
+ isPrimaryKey: false;
161
+ isAutoincrement: false;
162
+ hasRuntimeDefault: false;
163
+ enumValues: ["active", "canceled", "incomplete", "incomplete_expired", "past_due", "paused", "trialing", "unpaid"];
164
+ baseColumn: never;
165
+ identity: undefined;
166
+ generated: undefined;
167
+ }, {}, {
168
+ length: number | undefined;
169
+ }>;
170
+ valor: import("drizzle-orm/sqlite-core").SQLiteColumn<{
171
+ name: "valor";
172
+ tableName: "assinatura";
173
+ dataType: "number";
174
+ columnType: "SQLiteInteger";
175
+ data: number;
176
+ driverParam: number;
177
+ notNull: true;
178
+ hasDefault: false;
179
+ isPrimaryKey: false;
180
+ isAutoincrement: false;
181
+ hasRuntimeDefault: false;
182
+ enumValues: undefined;
183
+ baseColumn: never;
184
+ identity: undefined;
185
+ generated: undefined;
186
+ }, {}, {}>;
187
+ moeda: import("drizzle-orm/sqlite-core").SQLiteColumn<{
188
+ name: "moeda";
189
+ tableName: "assinatura";
190
+ dataType: "string";
191
+ columnType: "SQLiteText";
192
+ data: string;
193
+ driverParam: string;
194
+ notNull: true;
195
+ hasDefault: true;
196
+ isPrimaryKey: false;
197
+ isAutoincrement: false;
198
+ hasRuntimeDefault: false;
199
+ enumValues: [string, ...string[]];
200
+ baseColumn: never;
201
+ identity: undefined;
202
+ generated: undefined;
203
+ }, {}, {
204
+ length: number | undefined;
205
+ }>;
206
+ plano_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
207
+ name: "plano_id";
208
+ tableName: "assinatura";
209
+ dataType: "string";
210
+ columnType: "SQLiteText";
211
+ data: string;
212
+ driverParam: string;
213
+ notNull: false;
214
+ hasDefault: false;
215
+ isPrimaryKey: false;
216
+ isAutoincrement: false;
217
+ hasRuntimeDefault: false;
218
+ enumValues: [string, ...string[]];
219
+ baseColumn: never;
220
+ identity: undefined;
221
+ generated: undefined;
222
+ }, {}, {
223
+ length: number | undefined;
224
+ }>;
225
+ gateway_subscription_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
226
+ name: "gateway_subscription_id";
227
+ tableName: "assinatura";
228
+ dataType: "string";
229
+ columnType: "SQLiteText";
230
+ data: string;
231
+ driverParam: string;
232
+ notNull: false;
233
+ hasDefault: false;
234
+ isPrimaryKey: false;
235
+ isAutoincrement: false;
236
+ hasRuntimeDefault: false;
237
+ enumValues: [string, ...string[]];
238
+ baseColumn: never;
239
+ identity: undefined;
240
+ generated: undefined;
241
+ }, {}, {
242
+ length: number | undefined;
243
+ }>;
244
+ gateway_customer_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
245
+ name: "gateway_customer_id";
246
+ tableName: "assinatura";
247
+ dataType: "string";
248
+ columnType: "SQLiteText";
249
+ data: string;
250
+ driverParam: string;
251
+ notNull: false;
252
+ hasDefault: false;
253
+ isPrimaryKey: false;
254
+ isAutoincrement: false;
255
+ hasRuntimeDefault: false;
256
+ enumValues: [string, ...string[]];
257
+ baseColumn: never;
258
+ identity: undefined;
259
+ generated: undefined;
260
+ }, {}, {
261
+ length: number | undefined;
262
+ }>;
263
+ ativo: import("drizzle-orm/sqlite-core").SQLiteColumn<{
264
+ name: "ativo";
265
+ tableName: "assinatura";
266
+ dataType: "number";
267
+ columnType: "SQLiteInteger";
268
+ data: 0 | 1;
269
+ driverParam: number;
270
+ notNull: true;
271
+ hasDefault: true;
272
+ isPrimaryKey: false;
273
+ isAutoincrement: false;
274
+ hasRuntimeDefault: false;
275
+ enumValues: undefined;
276
+ baseColumn: never;
277
+ identity: undefined;
278
+ generated: undefined;
279
+ }, {}, {
280
+ $type: 0 | 1;
281
+ }>;
282
+ price_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
283
+ name: "price_id";
284
+ tableName: "assinatura";
285
+ dataType: "string";
286
+ columnType: "SQLiteText";
287
+ data: string;
288
+ driverParam: string;
289
+ notNull: false;
290
+ hasDefault: false;
291
+ isPrimaryKey: false;
292
+ isAutoincrement: false;
293
+ hasRuntimeDefault: false;
294
+ enumValues: [string, ...string[]];
295
+ baseColumn: never;
296
+ identity: undefined;
297
+ generated: undefined;
298
+ }, {}, {
299
+ length: number | undefined;
300
+ }>;
301
+ stripe_latest_invoice_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
302
+ name: "stripe_latest_invoice_id";
303
+ tableName: "assinatura";
304
+ dataType: "string";
305
+ columnType: "SQLiteText";
306
+ data: string;
307
+ driverParam: string;
308
+ notNull: false;
309
+ hasDefault: false;
310
+ isPrimaryKey: false;
311
+ isAutoincrement: false;
312
+ hasRuntimeDefault: false;
313
+ enumValues: [string, ...string[]];
314
+ baseColumn: never;
315
+ identity: undefined;
316
+ generated: undefined;
317
+ }, {}, {
318
+ length: number | undefined;
319
+ }>;
320
+ };
321
+ dialect: "sqlite";
322
+ }>;
323
+ export type AssinaturaSelect = InferSelectModel<typeof schema_assinatura>;
324
+ export type AssinaturaInsert = InferInsertModel<typeof schema_assinatura>;
@@ -0,0 +1,7 @@
1
+ import t from "../../../../shared/types";
2
+ interface ButtonGerarUrlProps {
3
+ input: t.Controller.Assinatura.CriarCheckoutSession.Input;
4
+ label?: string;
5
+ }
6
+ export default function ButtonGerarUrl({ input, label }: ButtonGerarUrlProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare function CheckoutAssinaturaStripe(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CheckoutStripe(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ interface PaginaEmDesenvolvimento {
2
+ title: string;
3
+ }
4
+ export default function PaginaEmDesenvolvimento({ title }: PaginaEmDesenvolvimento): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,10 @@
1
+ import React, { ReactNode } from "react";
2
+ type TabItem = {
3
+ title: string;
4
+ content: ReactNode;
5
+ };
6
+ type TopTabNavigationProps = {
7
+ tabs: TabItem[];
8
+ };
9
+ declare const TopTabNavigation: React.FC<TopTabNavigationProps>;
10
+ export default TopTabNavigation;
@@ -0,0 +1,31 @@
1
+ import t from "../../../shared/types";
2
+ interface AssinaturaState {
3
+ assinaturas: ReturnType<typeof t.Controller.Assinatura.AssinaturaBaseSchema.parse>[];
4
+ assinaturaSelecionada: t.Controller.Assinatura.BuscarPeloId.Output | null;
5
+ paginacao: t.Controller.Assinatura.BuscarPeloFiltro.Output["data"]["paginacao"];
6
+ produto: {
7
+ data: t.Controller.Assinatura.BuscarProdutoStripe.Output['data'];
8
+ loading: boolean;
9
+ periodo_selecionado: string | null;
10
+ produto_id: string | null;
11
+ periodos: string[];
12
+ };
13
+ checkout: t.Controller.Assinatura.CriarCheckoutSession.Output | null;
14
+ loading: boolean;
15
+ }
16
+ declare class contexto_assinatura {
17
+ api: {
18
+ criar: (props: t.Controller.Assinatura.Criar.Input) => Promise<t.Controller.Assinatura.Criar.Output | null>;
19
+ buscar_pelo_id: (props: t.Controller.Assinatura.BuscarPeloId.Input) => Promise<t.Controller.Assinatura.BuscarPeloId.Output | null>;
20
+ buscar_pelo_filtro: (props: t.Controller.Assinatura.BuscarPeloFiltro.Input, setLoading?: boolean) => Promise<t.Controller.Assinatura.BuscarPeloFiltro.Output | null>;
21
+ atualizar_pelo_id: (props: t.Controller.Assinatura.AtualizarPeloId.Input) => Promise<t.Controller.Assinatura.AtualizarPeloId.Output | null>;
22
+ deletar_pelo_id: (props: t.Controller.Assinatura.DeletarPeloId.Input) => Promise<t.Controller.Assinatura.DeletarPeloId.Output | null>;
23
+ buscar_produto_stripe: () => Promise<void>;
24
+ criar_checkout_session: (props: t.Controller.Assinatura.CriarCheckoutSession.Input) => Promise<t.Controller.Assinatura.CriarCheckoutSession.Output | null>;
25
+ };
26
+ get get_jsx(): AssinaturaState;
27
+ get get_state(): AssinaturaState;
28
+ set_state: (updater: (state: AssinaturaState) => void) => void;
29
+ }
30
+ declare const _default: contexto_assinatura;
31
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { CheckoutStripe } from "./componentes/checkout/Stype";
2
+ export { CheckoutAssinaturaStripe } from "./componentes/checkout/CheckoutAssinaturaStripe";