@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,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @license React
|
|
13
|
+
* react-jsx-runtime.production.js
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.544.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
declare const _sistema: {
|
|
2
|
+
empresa: {
|
|
3
|
+
nome: string;
|
|
4
|
+
email_suporte: string;
|
|
5
|
+
email_no_replay: string;
|
|
6
|
+
razaoSocial: string;
|
|
7
|
+
cnpj: string;
|
|
8
|
+
inscricaoEstadual: string;
|
|
9
|
+
inscricaoMunicipal: string;
|
|
10
|
+
endereco: {
|
|
11
|
+
logradouro: string;
|
|
12
|
+
numero: string;
|
|
13
|
+
complemento: string;
|
|
14
|
+
bairro: string;
|
|
15
|
+
cidade: string;
|
|
16
|
+
estado: string;
|
|
17
|
+
cep: string;
|
|
18
|
+
pais: string;
|
|
19
|
+
};
|
|
20
|
+
contato: {
|
|
21
|
+
telefone: string;
|
|
22
|
+
celular: string;
|
|
23
|
+
email: string;
|
|
24
|
+
site: string;
|
|
25
|
+
};
|
|
26
|
+
dadosBancarios: {
|
|
27
|
+
banco: string;
|
|
28
|
+
agencia: string;
|
|
29
|
+
conta: string;
|
|
30
|
+
tipoConta: string;
|
|
31
|
+
pix: string;
|
|
32
|
+
};
|
|
33
|
+
responsavel: {
|
|
34
|
+
nome: string;
|
|
35
|
+
cpf: string;
|
|
36
|
+
cargo: string;
|
|
37
|
+
email: string;
|
|
38
|
+
};
|
|
39
|
+
configuracoes: {
|
|
40
|
+
ativo: boolean;
|
|
41
|
+
dataFundacao: string;
|
|
42
|
+
regimeTributario: string;
|
|
43
|
+
ramoAtividade: string;
|
|
44
|
+
cnae: string;
|
|
45
|
+
porteEmpresa: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export default _sistema;
|
|
@@ -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,249 @@
|
|
|
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
|
+
usuario_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
|
+
assinatura: z4.ZodObject<{
|
|
113
|
+
usuario_id: z4.ZodUUID;
|
|
114
|
+
}, z4.core.$strip>;
|
|
115
|
+
}, z4.core.$strip>;
|
|
116
|
+
}, z4.core.$strip>;
|
|
117
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
118
|
+
type Output = {
|
|
119
|
+
data: {
|
|
120
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
124
|
+
}
|
|
125
|
+
namespace AtualizarPeloId {
|
|
126
|
+
const route: "/api/assinatura/:id";
|
|
127
|
+
const InputSchema: z4.ZodObject<{
|
|
128
|
+
data: z4.ZodObject<{
|
|
129
|
+
assinatura: z4.ZodObject<{
|
|
130
|
+
usuario_id: z4.ZodUUID;
|
|
131
|
+
plano_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
132
|
+
status: z4.ZodOptional<z4.ZodEnum<{
|
|
133
|
+
canceled: "canceled";
|
|
134
|
+
incomplete: "incomplete";
|
|
135
|
+
paused: "paused";
|
|
136
|
+
active: "active";
|
|
137
|
+
incomplete_expired: "incomplete_expired";
|
|
138
|
+
past_due: "past_due";
|
|
139
|
+
trialing: "trialing";
|
|
140
|
+
unpaid: "unpaid";
|
|
141
|
+
}>>;
|
|
142
|
+
valor: z4.ZodOptional<z4.ZodNumber>;
|
|
143
|
+
moeda: z4.ZodOptional<z4.ZodString>;
|
|
144
|
+
data_atualizacao: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
145
|
+
periodo_inicio: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
146
|
+
periodo_fim: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
147
|
+
price_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
148
|
+
gateway_subscription_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
149
|
+
gateway_customer_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
150
|
+
stripe_latest_invoice_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
151
|
+
ativo: z4.ZodOptional<z4.ZodUnion<readonly [z4.ZodLiteral<1>, z4.ZodLiteral<0>]>>;
|
|
152
|
+
}, z4.core.$strip>;
|
|
153
|
+
}, z4.core.$strip>;
|
|
154
|
+
}, z4.core.$strip>;
|
|
155
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
156
|
+
type Output = {
|
|
157
|
+
data: {
|
|
158
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
162
|
+
}
|
|
163
|
+
namespace DeletarPeloId {
|
|
164
|
+
const route: "/api/assinatura/:id";
|
|
165
|
+
const InputSchema: z4.ZodObject<{
|
|
166
|
+
data: z4.ZodObject<{
|
|
167
|
+
_id: z4.ZodString;
|
|
168
|
+
}, z4.core.$strip>;
|
|
169
|
+
}, z4.core.$strip>;
|
|
170
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
171
|
+
type Output = {
|
|
172
|
+
data: {
|
|
173
|
+
assinatura: {};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
177
|
+
}
|
|
178
|
+
namespace BuscarProdutoStripe {
|
|
179
|
+
const route: "/api/assinatura/produto";
|
|
180
|
+
type Output = {
|
|
181
|
+
data: {
|
|
182
|
+
produtos: Array<Stripe.Product & {
|
|
183
|
+
precos: Stripe.Price[];
|
|
184
|
+
}>;
|
|
185
|
+
plano_atual: t.Controller.Assinatura.BuscarPeloId.Output['data']['assinatura'];
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
189
|
+
}
|
|
190
|
+
namespace CriarCheckoutSession {
|
|
191
|
+
const route: "/api/assinatura/checkout";
|
|
192
|
+
const InputSchema: z4.ZodObject<{
|
|
193
|
+
data: z4.ZodObject<{
|
|
194
|
+
checkout: z4.ZodObject<{
|
|
195
|
+
price_id: z4.ZodString;
|
|
196
|
+
}, z4.core.$strip>;
|
|
197
|
+
}, z4.core.$strip>;
|
|
198
|
+
}, z4.core.$strip>;
|
|
199
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
200
|
+
type Output = {
|
|
201
|
+
data: {
|
|
202
|
+
checkout: {
|
|
203
|
+
url: string;
|
|
204
|
+
tipo_evento: 'subscription' | 'upgrade';
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
namespace Cancelar {
|
|
210
|
+
const route: "/api/assinatura";
|
|
211
|
+
const InputSchema: z4.ZodObject<{}, z4.core.$strip>;
|
|
212
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
213
|
+
type Output = {
|
|
214
|
+
data: {
|
|
215
|
+
assinatura: z4.infer<typeof AssinaturaBaseSchema>;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
219
|
+
}
|
|
220
|
+
namespace GerenciarAssinatura {
|
|
221
|
+
const route: "/api/assinatura/gerenciar";
|
|
222
|
+
const InputSchema: z4.ZodObject<{}, z4.core.$strip>;
|
|
223
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
224
|
+
type Output = {
|
|
225
|
+
data: {
|
|
226
|
+
assinatura: Stripe.Response<Stripe.BillingPortal.Session>;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
230
|
+
}
|
|
231
|
+
namespace UpgradeEDownGradeAssinatura {
|
|
232
|
+
const route: "/api/assinatura/upgrade_downgrade";
|
|
233
|
+
const InputSchema: z4.ZodObject<{
|
|
234
|
+
data: z4.ZodObject<{
|
|
235
|
+
assinatura: z4.ZodObject<{
|
|
236
|
+
novo_price_id: z4.ZodString;
|
|
237
|
+
}, z4.core.$strip>;
|
|
238
|
+
}, z4.core.$strip>;
|
|
239
|
+
}, z4.core.$strip>;
|
|
240
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
241
|
+
type Output = {
|
|
242
|
+
data: {
|
|
243
|
+
assinatura: {};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
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;
|