@navservice/assinatura 1.52.0 → 1.53.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/index.js CHANGED
@@ -18998,10 +18998,16 @@ var assinatura_TypeControllerAssinatura;
18998
18998
  const cliente = cliente_TypeControllerCliente;
18999
18999
  var cliente_TypeControllerCliente;
19000
19000
  (function(TypeControllerCreditos) {
19001
+ TypeControllerCreditos.TipoEnum = [
19002
+ "entrada",
19003
+ "saida",
19004
+ "bonus"
19005
+ ];
19001
19006
  TypeControllerCreditos.PontosBaseSchema = v4.object({
19002
19007
  _id: v4.string(),
19003
19008
  usuario_id: v4.string(),
19004
19009
  app: v4["enum"](es_types.Controller.Usuario.AppEnum),
19010
+ tipo: v4["enum"](TypeControllerCreditos.TipoEnum),
19005
19011
  quantidade: v4.number(),
19006
19012
  valor: v4.number(),
19007
19013
  data_criacao: v4.number(),
@@ -19017,6 +19023,17 @@ var cliente_TypeControllerCliente;
19017
19023
  })
19018
19024
  });
19019
19025
  })(TypeControllerCreditos.BuscarPeloUsuarioId || (TypeControllerCreditos.BuscarPeloUsuarioId = {}));
19026
+ (function(UsarCreditosDoUsuario) {
19027
+ UsarCreditosDoUsuario.route = "/api/creditos/usuario/usar";
19028
+ UsarCreditosDoUsuario.InputSchema = v4.object({
19029
+ data: v4.object({
19030
+ creditos: v4.object({
19031
+ usuario_id: v4.string(),
19032
+ quantidade: v4.number().int().positive()
19033
+ })
19034
+ })
19035
+ });
19036
+ })(TypeControllerCreditos.UsarCreditosDoUsuario || (TypeControllerCreditos.UsarCreditosDoUsuario = {}));
19020
19037
  (function(CriarCheckoutCreditos) {
19021
19038
  CriarCheckoutCreditos.route = "/api/creditos/checkout";
19022
19039
  CriarCheckoutCreditos.InputSchema = v4.object({
@@ -2,6 +2,7 @@ import { AxiosResponse } from "axios";
2
2
  import z4 from "zod/v4";
3
3
  import t from "../index";
4
4
  declare namespace TypeControllerCreditos {
5
+ const TipoEnum: readonly ["entrada", "saida", "bonus"];
5
6
  const PontosBaseSchema: z4.ZodObject<{
6
7
  _id: z4.ZodString;
7
8
  usuario_id: z4.ZodString;
@@ -11,6 +12,11 @@ declare namespace TypeControllerCreditos {
11
12
  "service-assinatura": "service-assinatura";
12
13
  "service-bucket": "service-bucket";
13
14
  }>;
15
+ tipo: z4.ZodEnum<{
16
+ entrada: "entrada";
17
+ saida: "saida";
18
+ bonus: "bonus";
19
+ }>;
14
20
  quantidade: z4.ZodNumber;
15
21
  valor: z4.ZodNumber;
16
22
  data_criacao: z4.ZodNumber;
@@ -27,6 +33,27 @@ declare namespace TypeControllerCreditos {
27
33
  }, z4.core.$strip>;
28
34
  }, z4.core.$strip>;
29
35
  type Input = z4.infer<typeof InputSchema>;
36
+ type Output = {
37
+ data: {
38
+ creditos: {
39
+ quantidade: number;
40
+ proporcao_credito_para_reais: 100;
41
+ };
42
+ };
43
+ };
44
+ type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
45
+ }
46
+ namespace UsarCreditosDoUsuario {
47
+ const route: "/api/creditos/usuario/usar";
48
+ const InputSchema: z4.ZodObject<{
49
+ data: z4.ZodObject<{
50
+ creditos: z4.ZodObject<{
51
+ usuario_id: z4.ZodString;
52
+ quantidade: z4.ZodNumber;
53
+ }, z4.core.$strip>;
54
+ }, z4.core.$strip>;
55
+ }, z4.core.$strip>;
56
+ type Input = z4.infer<typeof InputSchema>;
30
57
  type Output = {
31
58
  data: {
32
59
  creditos: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navservice/assinatura",
3
- "version": "1.52.0",
3
+ "version": "1.53.0",
4
4
  "description": "Service de autenticação de usuários unificado",
5
5
  "type": "module",
6
6
  "main": "./build/lib/index.js",