@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.
- package/build/es/backend/schema/schema_assinatura.d.ts +324 -0
- package/build/es/biblioteca/src/componentes/checkout/ButtonGerarUrl.d.ts +7 -0
- package/build/es/biblioteca/src/componentes/checkout/CheckoutAssinaturaStripe.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/checkout/Stype.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +5 -0
- package/build/es/biblioteca/src/componentes/geral/TopTabs/index.d.ts +10 -0
- package/build/es/biblioteca/src/contexto/contexto_assinatura.d.ts +31 -0
- package/build/es/biblioteca/src/index.d.ts +2 -0
- package/build/es/index.js +19866 -0
- package/build/es/index.js.LICENSE.txt +26 -0
- package/build/es/shared/configuracoes/_sistema.d.ts +49 -0
- package/build/es/shared/configuracoes/_theme.d.ts +91 -0
- package/build/es/shared/configuracoes/index.d.ts +142 -0
- package/build/es/shared/types/controller/assinatura.d.ts +249 -0
- package/build/es/shared/types/controller/cliente.d.ts +112 -0
- package/build/es/shared/types/geral/type_response.d.ts +54 -0
- package/build/es/shared/types/index.d.ts +38 -0
- package/build/lib/backend/schema/schema_assinatura.d.ts +324 -0
- package/build/lib/biblioteca/src/componentes/checkout/ButtonGerarUrl.d.ts +7 -0
- package/build/lib/biblioteca/src/componentes/checkout/CheckoutAssinaturaStripe.d.ts +1 -0
- package/build/lib/biblioteca/src/componentes/checkout/Stype.d.ts +1 -0
- package/build/lib/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +5 -0
- package/build/lib/biblioteca/src/componentes/geral/TopTabs/index.d.ts +10 -0
- package/build/lib/biblioteca/src/config_env/index.d.ts +9 -0
- package/build/lib/biblioteca/src/contexto/contexto_assinatura.d.ts +31 -0
- package/build/lib/biblioteca/src/index.d.ts +2 -0
- package/build/lib/biblioteca/src/utils/_api.d.ts +41 -0
- package/build/lib/biblioteca/src/utils/_data.d.ts +11 -0
- package/build/lib/biblioteca/src/utils/_form.d.ts +11 -0
- package/build/lib/biblioteca/src/utils/_geral.d.ts +9 -0
- package/build/lib/biblioteca/src/utils/_hooks.d.ts +5 -0
- package/build/lib/biblioteca/src/utils/_local_storage.d.ts +8 -0
- package/build/lib/biblioteca/src/utils/_session_storage.d.ts +14 -0
- package/build/lib/biblioteca/src/utils/_update_context.d.ts +21 -0
- package/build/lib/biblioteca/src/utils/utils.d.ts +108 -0
- package/build/lib/index.js +461 -0
- package/build/lib/shared/configuracoes/_sistema.d.ts +49 -0
- package/build/lib/shared/configuracoes/_theme.d.ts +91 -0
- package/build/lib/shared/configuracoes/index.d.ts +142 -0
- package/build/lib/shared/types/controller/assinatura.d.ts +229 -0
- package/build/lib/shared/types/controller/cliente.d.ts +112 -0
- package/build/lib/shared/types/geral/type_response.d.ts +54 -0
- package/build/lib/shared/types/index.d.ts +47 -0
- package/package.json +31 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
declare const _theme: {
|
|
2
|
+
extend: {
|
|
3
|
+
colors: {
|
|
4
|
+
primary: {
|
|
5
|
+
50: string;
|
|
6
|
+
100: string;
|
|
7
|
+
200: string;
|
|
8
|
+
300: string;
|
|
9
|
+
400: string;
|
|
10
|
+
500: string;
|
|
11
|
+
600: string;
|
|
12
|
+
700: string;
|
|
13
|
+
800: string;
|
|
14
|
+
900: string;
|
|
15
|
+
950: string;
|
|
16
|
+
};
|
|
17
|
+
standard: {
|
|
18
|
+
50: string;
|
|
19
|
+
100: string;
|
|
20
|
+
200: string;
|
|
21
|
+
300: string;
|
|
22
|
+
400: string;
|
|
23
|
+
500: string;
|
|
24
|
+
600: string;
|
|
25
|
+
700: string;
|
|
26
|
+
800: string;
|
|
27
|
+
900: string;
|
|
28
|
+
950: string;
|
|
29
|
+
};
|
|
30
|
+
basic: {
|
|
31
|
+
50: string;
|
|
32
|
+
100: string;
|
|
33
|
+
200: string;
|
|
34
|
+
300: string;
|
|
35
|
+
400: string;
|
|
36
|
+
500: string;
|
|
37
|
+
600: string;
|
|
38
|
+
700: string;
|
|
39
|
+
800: string;
|
|
40
|
+
900: string;
|
|
41
|
+
950: string;
|
|
42
|
+
};
|
|
43
|
+
default: {
|
|
44
|
+
50: string;
|
|
45
|
+
100: string;
|
|
46
|
+
200: string;
|
|
47
|
+
300: string;
|
|
48
|
+
400: string;
|
|
49
|
+
500: string;
|
|
50
|
+
600: string;
|
|
51
|
+
700: string;
|
|
52
|
+
800: string;
|
|
53
|
+
900: string;
|
|
54
|
+
950: string;
|
|
55
|
+
};
|
|
56
|
+
error: {
|
|
57
|
+
50: string;
|
|
58
|
+
100: string;
|
|
59
|
+
200: string;
|
|
60
|
+
300: string;
|
|
61
|
+
400: string;
|
|
62
|
+
500: string;
|
|
63
|
+
600: string;
|
|
64
|
+
700: string;
|
|
65
|
+
800: string;
|
|
66
|
+
900: string;
|
|
67
|
+
950: string;
|
|
68
|
+
};
|
|
69
|
+
success: {
|
|
70
|
+
50: string;
|
|
71
|
+
100: string;
|
|
72
|
+
200: string;
|
|
73
|
+
300: string;
|
|
74
|
+
400: string;
|
|
75
|
+
500: string;
|
|
76
|
+
600: string;
|
|
77
|
+
700: string;
|
|
78
|
+
800: string;
|
|
79
|
+
900: string;
|
|
80
|
+
950: string;
|
|
81
|
+
};
|
|
82
|
+
theme: {
|
|
83
|
+
bg: string;
|
|
84
|
+
text: string;
|
|
85
|
+
card: string;
|
|
86
|
+
border: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export default _theme;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
declare const shared_configuracoes: {
|
|
2
|
+
new (): {};
|
|
3
|
+
sistema: {
|
|
4
|
+
empresa: {
|
|
5
|
+
nome: string;
|
|
6
|
+
email_suporte: string;
|
|
7
|
+
email_no_replay: string;
|
|
8
|
+
razaoSocial: string;
|
|
9
|
+
cnpj: string;
|
|
10
|
+
inscricaoEstadual: string;
|
|
11
|
+
inscricaoMunicipal: string;
|
|
12
|
+
endereco: {
|
|
13
|
+
logradouro: string;
|
|
14
|
+
numero: string;
|
|
15
|
+
complemento: string;
|
|
16
|
+
bairro: string;
|
|
17
|
+
cidade: string;
|
|
18
|
+
estado: string;
|
|
19
|
+
cep: string;
|
|
20
|
+
pais: string;
|
|
21
|
+
};
|
|
22
|
+
contato: {
|
|
23
|
+
telefone: string;
|
|
24
|
+
celular: string;
|
|
25
|
+
email: string;
|
|
26
|
+
site: string;
|
|
27
|
+
};
|
|
28
|
+
dadosBancarios: {
|
|
29
|
+
banco: string;
|
|
30
|
+
agencia: string;
|
|
31
|
+
conta: string;
|
|
32
|
+
tipoConta: string;
|
|
33
|
+
pix: string;
|
|
34
|
+
};
|
|
35
|
+
responsavel: {
|
|
36
|
+
nome: string;
|
|
37
|
+
cpf: string;
|
|
38
|
+
cargo: string;
|
|
39
|
+
email: string;
|
|
40
|
+
};
|
|
41
|
+
configuracoes: {
|
|
42
|
+
ativo: boolean;
|
|
43
|
+
dataFundacao: string;
|
|
44
|
+
regimeTributario: string;
|
|
45
|
+
ramoAtividade: string;
|
|
46
|
+
cnae: string;
|
|
47
|
+
porteEmpresa: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
theme: {
|
|
52
|
+
extend: {
|
|
53
|
+
colors: {
|
|
54
|
+
primary: {
|
|
55
|
+
50: string;
|
|
56
|
+
100: string;
|
|
57
|
+
200: string;
|
|
58
|
+
300: string;
|
|
59
|
+
400: string;
|
|
60
|
+
500: string;
|
|
61
|
+
600: string;
|
|
62
|
+
700: string;
|
|
63
|
+
800: string;
|
|
64
|
+
900: string;
|
|
65
|
+
950: string;
|
|
66
|
+
};
|
|
67
|
+
standard: {
|
|
68
|
+
50: string;
|
|
69
|
+
100: string;
|
|
70
|
+
200: string;
|
|
71
|
+
300: string;
|
|
72
|
+
400: string;
|
|
73
|
+
500: string;
|
|
74
|
+
600: string;
|
|
75
|
+
700: string;
|
|
76
|
+
800: string;
|
|
77
|
+
900: string;
|
|
78
|
+
950: string;
|
|
79
|
+
};
|
|
80
|
+
basic: {
|
|
81
|
+
50: string;
|
|
82
|
+
100: string;
|
|
83
|
+
200: string;
|
|
84
|
+
300: string;
|
|
85
|
+
400: string;
|
|
86
|
+
500: string;
|
|
87
|
+
600: string;
|
|
88
|
+
700: string;
|
|
89
|
+
800: string;
|
|
90
|
+
900: string;
|
|
91
|
+
950: string;
|
|
92
|
+
};
|
|
93
|
+
default: {
|
|
94
|
+
50: string;
|
|
95
|
+
100: string;
|
|
96
|
+
200: string;
|
|
97
|
+
300: string;
|
|
98
|
+
400: string;
|
|
99
|
+
500: string;
|
|
100
|
+
600: string;
|
|
101
|
+
700: string;
|
|
102
|
+
800: string;
|
|
103
|
+
900: string;
|
|
104
|
+
950: string;
|
|
105
|
+
};
|
|
106
|
+
error: {
|
|
107
|
+
50: string;
|
|
108
|
+
100: string;
|
|
109
|
+
200: string;
|
|
110
|
+
300: string;
|
|
111
|
+
400: string;
|
|
112
|
+
500: string;
|
|
113
|
+
600: string;
|
|
114
|
+
700: string;
|
|
115
|
+
800: string;
|
|
116
|
+
900: string;
|
|
117
|
+
950: string;
|
|
118
|
+
};
|
|
119
|
+
success: {
|
|
120
|
+
50: string;
|
|
121
|
+
100: string;
|
|
122
|
+
200: string;
|
|
123
|
+
300: string;
|
|
124
|
+
400: string;
|
|
125
|
+
500: string;
|
|
126
|
+
600: string;
|
|
127
|
+
700: string;
|
|
128
|
+
800: string;
|
|
129
|
+
900: string;
|
|
130
|
+
950: string;
|
|
131
|
+
};
|
|
132
|
+
theme: {
|
|
133
|
+
bg: string;
|
|
134
|
+
text: string;
|
|
135
|
+
card: string;
|
|
136
|
+
border: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
export default shared_configuracoes;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { AxiosResponse } from "axios";
|
|
2
|
+
import Stripe from "stripe";
|
|
3
|
+
import z4 from "zod/v4";
|
|
4
|
+
import t from "..";
|
|
5
|
+
declare namespace TypeControllerAssinatura {
|
|
6
|
+
const AssinaturaBaseSchema: z4.ZodObject<{
|
|
7
|
+
_id: z4.ZodString;
|
|
8
|
+
usuario_id: z4.ZodString;
|
|
9
|
+
usuario_tipo: z4.ZodEnum<{
|
|
10
|
+
padrao: "padrao";
|
|
11
|
+
}>;
|
|
12
|
+
app: z4.ZodEnum<{
|
|
13
|
+
"service-usuario": "service-usuario";
|
|
14
|
+
"service-financeiro": "service-financeiro";
|
|
15
|
+
"service-pages-ai": "service-pages-ai";
|
|
16
|
+
}>;
|
|
17
|
+
data_criacao: z4.ZodNumber;
|
|
18
|
+
data_atualizacao: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
19
|
+
periodo_inicio: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
20
|
+
periodo_fim: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
21
|
+
status: z4.ZodEnum<{
|
|
22
|
+
canceled: "canceled";
|
|
23
|
+
incomplete: "incomplete";
|
|
24
|
+
paused: "paused";
|
|
25
|
+
active: "active";
|
|
26
|
+
incomplete_expired: "incomplete_expired";
|
|
27
|
+
past_due: "past_due";
|
|
28
|
+
trialing: "trialing";
|
|
29
|
+
unpaid: "unpaid";
|
|
30
|
+
}>;
|
|
31
|
+
valor: z4.ZodNumber;
|
|
32
|
+
moeda: z4.ZodString;
|
|
33
|
+
plano_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
34
|
+
gateway_subscription_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
35
|
+
gateway_customer_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
36
|
+
price_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
37
|
+
stripe_latest_invoice_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
38
|
+
ativo: z4.ZodUnion<readonly [z4.ZodLiteral<1>, z4.ZodLiteral<0>]>;
|
|
39
|
+
}, z4.core.$strip>;
|
|
40
|
+
namespace Criar {
|
|
41
|
+
const route: "/api/assinatura";
|
|
42
|
+
const InputSchema: z4.ZodObject<{
|
|
43
|
+
data: z4.ZodObject<{
|
|
44
|
+
assinatura: z4.ZodObject<{
|
|
45
|
+
_id: z4.ZodUUID;
|
|
46
|
+
usuario_tipo: z4.ZodEnum<{
|
|
47
|
+
padrao: "padrao";
|
|
48
|
+
}>;
|
|
49
|
+
app: z4.ZodEnum<{
|
|
50
|
+
"service-usuario": "service-usuario";
|
|
51
|
+
"service-financeiro": "service-financeiro";
|
|
52
|
+
"service-pages-ai": "service-pages-ai";
|
|
53
|
+
}>;
|
|
54
|
+
plano_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
55
|
+
gateway_subscription_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
56
|
+
gateway_customer_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
57
|
+
valor: z4.ZodNumber;
|
|
58
|
+
periodo_inicio: z4.ZodNumber;
|
|
59
|
+
periodo_fim: z4.ZodNumber;
|
|
60
|
+
moeda: z4.ZodString;
|
|
61
|
+
price_id: z4.ZodNullable<z4.ZodOptional<z4.ZodString>>;
|
|
62
|
+
}, z4.core.$strip>;
|
|
63
|
+
}, z4.core.$strip>;
|
|
64
|
+
}, z4.core.$strip>;
|
|
65
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
66
|
+
type Output = {
|
|
67
|
+
data: {
|
|
68
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
72
|
+
}
|
|
73
|
+
namespace BuscarPeloFiltro {
|
|
74
|
+
const route: "/api/assinatura";
|
|
75
|
+
const InputSchema: z4.ZodObject<{
|
|
76
|
+
filtros: z4.ZodObject<{
|
|
77
|
+
assinatura: z4.ZodObject<{
|
|
78
|
+
pagina: z4.ZodNumber;
|
|
79
|
+
_id: z4.ZodNullable<z4.ZodOptional<z4.ZodString>>;
|
|
80
|
+
usuario_id: z4.ZodNullable<z4.ZodOptional<z4.ZodString>>;
|
|
81
|
+
status: z4.ZodNullable<z4.ZodOptional<z4.ZodEnum<{
|
|
82
|
+
canceled: "canceled";
|
|
83
|
+
incomplete: "incomplete";
|
|
84
|
+
paused: "paused";
|
|
85
|
+
active: "active";
|
|
86
|
+
incomplete_expired: "incomplete_expired";
|
|
87
|
+
past_due: "past_due";
|
|
88
|
+
trialing: "trialing";
|
|
89
|
+
unpaid: "unpaid";
|
|
90
|
+
}>>>;
|
|
91
|
+
}, z4.core.$strip>;
|
|
92
|
+
}, z4.core.$strip>;
|
|
93
|
+
}, z4.core.$strip>;
|
|
94
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
95
|
+
type Output = {
|
|
96
|
+
data: {
|
|
97
|
+
paginacao: {
|
|
98
|
+
total_itens: number;
|
|
99
|
+
total_paginas: number;
|
|
100
|
+
itens_por_pagina: number;
|
|
101
|
+
total_itens_pagina_atual: number;
|
|
102
|
+
};
|
|
103
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>[];
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
107
|
+
}
|
|
108
|
+
namespace BuscarPeloId {
|
|
109
|
+
const route: "/api/assinatura/:id";
|
|
110
|
+
const InputSchema: z4.ZodObject<{
|
|
111
|
+
data: z4.ZodObject<{
|
|
112
|
+
_id: z4.ZodString;
|
|
113
|
+
}, z4.core.$strip>;
|
|
114
|
+
}, z4.core.$strip>;
|
|
115
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
116
|
+
type Output = {
|
|
117
|
+
data: {
|
|
118
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
122
|
+
}
|
|
123
|
+
namespace AtualizarPeloId {
|
|
124
|
+
const route: "/api/assinatura/:id";
|
|
125
|
+
const InputSchema: z4.ZodObject<{
|
|
126
|
+
data: z4.ZodObject<{
|
|
127
|
+
assinatura: z4.ZodObject<{
|
|
128
|
+
_id: z4.ZodString;
|
|
129
|
+
plano_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
130
|
+
status: z4.ZodOptional<z4.ZodEnum<{
|
|
131
|
+
canceled: "canceled";
|
|
132
|
+
incomplete: "incomplete";
|
|
133
|
+
paused: "paused";
|
|
134
|
+
active: "active";
|
|
135
|
+
incomplete_expired: "incomplete_expired";
|
|
136
|
+
past_due: "past_due";
|
|
137
|
+
trialing: "trialing";
|
|
138
|
+
unpaid: "unpaid";
|
|
139
|
+
}>>;
|
|
140
|
+
valor: z4.ZodOptional<z4.ZodNumber>;
|
|
141
|
+
moeda: z4.ZodOptional<z4.ZodString>;
|
|
142
|
+
data_atualizacao: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
143
|
+
periodo_inicio: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
144
|
+
periodo_fim: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
145
|
+
price_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
146
|
+
gateway_subscription_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
147
|
+
gateway_customer_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
148
|
+
stripe_latest_invoice_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
149
|
+
ativo: z4.ZodOptional<z4.ZodUnion<readonly [z4.ZodLiteral<1>, z4.ZodLiteral<0>]>>;
|
|
150
|
+
}, z4.core.$strip>;
|
|
151
|
+
}, z4.core.$strip>;
|
|
152
|
+
}, z4.core.$strip>;
|
|
153
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
154
|
+
type Output = {
|
|
155
|
+
data: {
|
|
156
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
160
|
+
}
|
|
161
|
+
namespace DeletarPeloId {
|
|
162
|
+
const route: "/api/assinatura/:id";
|
|
163
|
+
const InputSchema: z4.ZodObject<{
|
|
164
|
+
data: z4.ZodObject<{
|
|
165
|
+
_id: z4.ZodString;
|
|
166
|
+
}, z4.core.$strip>;
|
|
167
|
+
}, z4.core.$strip>;
|
|
168
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
169
|
+
type Output = {
|
|
170
|
+
data: {
|
|
171
|
+
assinatura: {};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
175
|
+
}
|
|
176
|
+
namespace BuscarProdutoStripe {
|
|
177
|
+
const route: "/api/assinatura/produto";
|
|
178
|
+
type Output = {
|
|
179
|
+
data: {
|
|
180
|
+
produtos: Array<Stripe.Product & {
|
|
181
|
+
precos: Stripe.Price[];
|
|
182
|
+
}>;
|
|
183
|
+
plano_atual: Stripe.ApiList<Stripe.Subscription>;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
187
|
+
}
|
|
188
|
+
namespace CriarCheckoutSession {
|
|
189
|
+
const route: "/api/assinatura/checkout";
|
|
190
|
+
const InputSchema: z4.ZodObject<{
|
|
191
|
+
data: z4.ZodObject<{
|
|
192
|
+
checkout: z4.ZodObject<{
|
|
193
|
+
price_id: z4.ZodString;
|
|
194
|
+
}, z4.core.$strip>;
|
|
195
|
+
}, z4.core.$strip>;
|
|
196
|
+
}, z4.core.$strip>;
|
|
197
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
198
|
+
type Output = {
|
|
199
|
+
data: {
|
|
200
|
+
checkout: {
|
|
201
|
+
url: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
namespace Cancelar {
|
|
207
|
+
const route: "/api/assinatura";
|
|
208
|
+
const InputSchema: z4.ZodObject<{}, z4.core.$strip>;
|
|
209
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
210
|
+
type Output = {
|
|
211
|
+
data: {
|
|
212
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
216
|
+
}
|
|
217
|
+
namespace GerenciarAssinatura {
|
|
218
|
+
const route: "/api/assinatura/gerenciar";
|
|
219
|
+
const InputSchema: z4.ZodObject<{}, z4.core.$strip>;
|
|
220
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
221
|
+
type Output = {
|
|
222
|
+
data: {
|
|
223
|
+
assinatura: Stripe.Response<Stripe.BillingPortal.Session>;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
export default TypeControllerAssinatura;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { AxiosResponse } from "axios";
|
|
2
|
+
import z4 from "zod/v4";
|
|
3
|
+
import t from "../index";
|
|
4
|
+
declare namespace TypeControllerCliente {
|
|
5
|
+
const ClienteBaseSchema: z4.ZodObject<{
|
|
6
|
+
_id: z4.ZodString;
|
|
7
|
+
usuario_id: z4.ZodString;
|
|
8
|
+
client_stripe_id: z4.ZodString;
|
|
9
|
+
nome: z4.ZodString;
|
|
10
|
+
email: z4.ZodString;
|
|
11
|
+
data_criacao: z4.ZodNumber;
|
|
12
|
+
}, z4.core.$strip>;
|
|
13
|
+
type Cliente = z4.infer<typeof ClienteBaseSchema>;
|
|
14
|
+
namespace Criar {
|
|
15
|
+
const route: "/api/cliente";
|
|
16
|
+
const InputSchema: z4.ZodObject<{
|
|
17
|
+
data: z4.ZodObject<{
|
|
18
|
+
cliente: z4.ZodObject<{
|
|
19
|
+
usuario_id: z4.ZodString;
|
|
20
|
+
client_stripe_id: z4.ZodString;
|
|
21
|
+
nome: z4.ZodString;
|
|
22
|
+
email: z4.ZodEmail;
|
|
23
|
+
}, z4.core.$strip>;
|
|
24
|
+
}, z4.core.$strip>;
|
|
25
|
+
}, z4.core.$strip>;
|
|
26
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
27
|
+
type Output = {
|
|
28
|
+
data: {
|
|
29
|
+
cliente: Cliente;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
33
|
+
}
|
|
34
|
+
namespace BuscarPeloFiltro {
|
|
35
|
+
const route: "/api/cliente";
|
|
36
|
+
const InputSchema: z4.ZodObject<{
|
|
37
|
+
filtros: z4.ZodObject<{
|
|
38
|
+
cliente: z4.ZodObject<{
|
|
39
|
+
pagina: z4.ZodNumber;
|
|
40
|
+
_id: z4.ZodNullable<z4.ZodOptional<z4.ZodUUID>>;
|
|
41
|
+
usuario_id: z4.ZodNullable<z4.ZodOptional<z4.ZodUUID>>;
|
|
42
|
+
client_stripe_id: z4.ZodNullable<z4.ZodOptional<z4.ZodString>>;
|
|
43
|
+
email: z4.ZodNullable<z4.ZodOptional<z4.ZodString>>;
|
|
44
|
+
}, z4.core.$strip>;
|
|
45
|
+
}, z4.core.$strip>;
|
|
46
|
+
}, z4.core.$strip>;
|
|
47
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
48
|
+
type Output = {
|
|
49
|
+
data: {
|
|
50
|
+
paginacao: {
|
|
51
|
+
total_itens: number;
|
|
52
|
+
total_paginas: number;
|
|
53
|
+
itens_por_pagina: number;
|
|
54
|
+
total_itens_pagina_atual: number;
|
|
55
|
+
};
|
|
56
|
+
cliente: Cliente[];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
60
|
+
}
|
|
61
|
+
namespace BuscarPeloId {
|
|
62
|
+
const route: "/api/cliente/:id";
|
|
63
|
+
const InputSchema: z4.ZodObject<{
|
|
64
|
+
data: z4.ZodObject<{
|
|
65
|
+
usuario_id: z4.ZodString;
|
|
66
|
+
}, z4.core.$strip>;
|
|
67
|
+
}, z4.core.$strip>;
|
|
68
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
69
|
+
type Output = {
|
|
70
|
+
data: {
|
|
71
|
+
cliente: Cliente;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
75
|
+
}
|
|
76
|
+
namespace AtualizarPeloId {
|
|
77
|
+
const route: "/api/cliente/:id";
|
|
78
|
+
const InputSchema: z4.ZodObject<{
|
|
79
|
+
data: z4.ZodObject<{
|
|
80
|
+
cliente: z4.ZodObject<{
|
|
81
|
+
_id: z4.ZodString;
|
|
82
|
+
client_stripe_id: z4.ZodOptional<z4.ZodString>;
|
|
83
|
+
nome: z4.ZodOptional<z4.ZodString>;
|
|
84
|
+
email: z4.ZodOptional<z4.ZodString>;
|
|
85
|
+
}, z4.core.$strip>;
|
|
86
|
+
}, z4.core.$strip>;
|
|
87
|
+
}, z4.core.$strip>;
|
|
88
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
89
|
+
type Output = {
|
|
90
|
+
data: {
|
|
91
|
+
cliente: Cliente;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
95
|
+
}
|
|
96
|
+
namespace DeletarPeloId {
|
|
97
|
+
const route: "/api/cliente/:id";
|
|
98
|
+
const InputSchema: z4.ZodObject<{
|
|
99
|
+
data: z4.ZodObject<{
|
|
100
|
+
_id: z4.ZodString;
|
|
101
|
+
}, z4.core.$strip>;
|
|
102
|
+
}, z4.core.$strip>;
|
|
103
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
104
|
+
type Output = {
|
|
105
|
+
data: {
|
|
106
|
+
cliente: {};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export default TypeControllerCliente;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Context } from "hono";
|
|
2
|
+
import z4 from "zod/v4";
|
|
3
|
+
declare namespace TypeControllerResponse {
|
|
4
|
+
const BaseResponseSchema: z4.ZodObject<{
|
|
5
|
+
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
6
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">]>;
|
|
7
|
+
type: z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>;
|
|
8
|
+
message: z4.ZodString;
|
|
9
|
+
results: z4.ZodOptional<z4.ZodUnknown>;
|
|
10
|
+
error: z4.ZodOptional<z4.ZodUnknown>;
|
|
11
|
+
}, z4.core.$strip>;
|
|
12
|
+
type BaseResponse<T = unknown> = z4.infer<typeof BaseResponseSchema> & {
|
|
13
|
+
results?: T;
|
|
14
|
+
};
|
|
15
|
+
export namespace C {
|
|
16
|
+
export const InputSchema: z4.ZodObject<{
|
|
17
|
+
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
18
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">]>;
|
|
19
|
+
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
20
|
+
message: z4.ZodOptional<z4.ZodString>;
|
|
21
|
+
results: z4.ZodAny;
|
|
22
|
+
c: z4.ZodCustom<Context<any, any, {}>, Context<any, any, {}>>;
|
|
23
|
+
}, z4.core.$strip>;
|
|
24
|
+
export type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
25
|
+
results?: T;
|
|
26
|
+
};
|
|
27
|
+
export type Output<T = unknown> = BaseResponse<T>;
|
|
28
|
+
const FileResponseParamsSchema: z4.ZodObject<{
|
|
29
|
+
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
30
|
+
message: z4.ZodOptional<z4.ZodString>;
|
|
31
|
+
file_buffer: z4.ZodUnion<readonly [z4.ZodCustom<Blob, Blob>, z4.ZodCustom<ArrayBuffer, ArrayBuffer>, z4.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
32
|
+
content_type: z4.ZodString;
|
|
33
|
+
filename: z4.ZodOptional<z4.ZodString>;
|
|
34
|
+
c: z4.ZodOptional<z4.ZodCustom<Context<any, any, {}>, Context<any, any, {}>>>;
|
|
35
|
+
}, z4.core.$strip>;
|
|
36
|
+
export type FileResponseParams = z4.infer<typeof FileResponseParamsSchema>;
|
|
37
|
+
export {};
|
|
38
|
+
}
|
|
39
|
+
export namespace Error {
|
|
40
|
+
const InputSchema: z4.ZodObject<{
|
|
41
|
+
message: z4.ZodOptional<z4.ZodString>;
|
|
42
|
+
results: z4.ZodOptional<z4.ZodUnion<readonly [z4.ZodArray<z4.ZodUnknown>, z4.ZodUnknown]>>;
|
|
43
|
+
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
44
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">]>;
|
|
45
|
+
status: z4.ZodDefault<z4.ZodOptional<z4.ZodNumber>>;
|
|
46
|
+
}, z4.core.$strip>;
|
|
47
|
+
type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
48
|
+
results?: T;
|
|
49
|
+
};
|
|
50
|
+
type Output<T = unknown> = BaseResponse<T>;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
}
|
|
54
|
+
export default TypeControllerResponse;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Context as HonoContext } from "hono";
|
|
2
|
+
import type { D1Database } from "@cloudflare/workers-types";
|
|
3
|
+
import { TypesUsuario } from "biblioteca-service-usuario";
|
|
4
|
+
import TypeControllerAssinatura from "./controller/assinatura";
|
|
5
|
+
import TypeControllerCliente from "./controller/cliente";
|
|
6
|
+
import TypeResponse from "./geral/type_response";
|
|
7
|
+
declare namespace t {
|
|
8
|
+
namespace Controller {
|
|
9
|
+
export import Assinatura = TypeControllerAssinatura;
|
|
10
|
+
export import Cliente = TypeControllerCliente;
|
|
11
|
+
}
|
|
12
|
+
namespace Integrations {
|
|
13
|
+
}
|
|
14
|
+
namespace Geral {
|
|
15
|
+
export import Response = TypeResponse;
|
|
16
|
+
namespace FormularioZod {
|
|
17
|
+
interface Describe {
|
|
18
|
+
label?: string;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
type?: "text" | "password" | "number" | "select";
|
|
21
|
+
icon?: string;
|
|
22
|
+
searchable?: boolean;
|
|
23
|
+
helpText?: string;
|
|
24
|
+
options?: Array<{
|
|
25
|
+
label: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}>;
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
interface Env {
|
|
32
|
+
JSON_WEB_TOKEN_AUTH_USER: string;
|
|
33
|
+
STRIPE_SECRET_KEY: string;
|
|
34
|
+
PUBLIC_BASE_URL_BACKEND_FINANCEIRO: string;
|
|
35
|
+
PUBLIC_BASE_URL_FRTONEND_PRINCIPAL: string;
|
|
36
|
+
RESEND_API_KEY: string;
|
|
37
|
+
CORS_ORIGIN: string;
|
|
38
|
+
DB_SERVICE_FINANCEIRO: D1Database;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
interface Context extends HonoContext {
|
|
42
|
+
env: Geral.Env;
|
|
43
|
+
set(key: "usuario_auth", params: TypesUsuario.Controller.Usuario.Login.Output): TypesUsuario.Controller.Usuario.Login.Output;
|
|
44
|
+
get(key: "usuario_auth"): TypesUsuario.Controller.Usuario.UsuarioAuth;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export default t;
|