@navservice/assinatura 1.56.0 → 1.57.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.
|
@@ -321,9 +321,14 @@ export declare const schema_assinatura: import("drizzle-orm/sqlite-core").SQLite
|
|
|
321
321
|
};
|
|
322
322
|
dialect: "sqlite";
|
|
323
323
|
}>;
|
|
324
|
-
export type
|
|
325
|
-
export type
|
|
326
|
-
export type
|
|
324
|
+
export type Base = InferSelectModel<typeof schema_assinatura>;
|
|
325
|
+
export type Criar = InferInsertModel<typeof schema_assinatura>;
|
|
326
|
+
export type BuscarPeloFiltro = Pick<InferSelectModel<typeof schema_assinatura>, "usuario_id"> & Partial<Pick<InferSelectModel<typeof schema_assinatura>, "_id" | "status">> & {
|
|
327
|
+
pagina: number;
|
|
328
|
+
};
|
|
329
|
+
export type AtualizarPeloId = Pick<InferSelectModel<typeof schema_assinatura>, "usuario_id"> & Partial<Pick<InferSelectModel<typeof schema_assinatura>, "plano_name" | "plano_id" | "price_id" | "status" | "stripe_latest_invoice_id" | "gateway_subscription_id" | "gateway_customer_id" | "valor" | "moeda" | "periodo_inicio" | "periodo_fim" | "ativo" | "data_atualizacao">>;
|
|
330
|
+
export type BuscarPeloId = {
|
|
327
331
|
app: TypesCore.Controller.Usuario.TokenPayload["app"];
|
|
328
332
|
usuario_id: string;
|
|
329
333
|
};
|
|
334
|
+
export type DeletarPeloId = Pick<InferSelectModel<typeof schema_assinatura>, "_id">;
|
package/build/es/index.js
CHANGED
|
@@ -15968,7 +15968,9 @@ var _usuario_TypeControllerUsuario;
|
|
|
15968
15968
|
v4.literal("SUCCESS_FILE"),
|
|
15969
15969
|
v4.literal("DATABASE_ERROR"),
|
|
15970
15970
|
v4.literal("BUSINESS_RULE_VIOLATION"),
|
|
15971
|
-
v4.literal("PLAN_FORBIDDEN")
|
|
15971
|
+
v4.literal("PLAN_FORBIDDEN"),
|
|
15972
|
+
v4.literal("INTEGRATION_ERROR"),
|
|
15973
|
+
v4.literal("TOKEN_AUTH_USER")
|
|
15972
15974
|
]);
|
|
15973
15975
|
v4.object({
|
|
15974
15976
|
status: StatusSchema,
|
|
@@ -15990,6 +15992,7 @@ var _usuario_TypeControllerUsuario;
|
|
|
15990
15992
|
v4.object({
|
|
15991
15993
|
status: StatusSchema,
|
|
15992
15994
|
message: v4.string().optional(),
|
|
15995
|
+
fn: v4.string(),
|
|
15993
15996
|
file_buffer: v4.union([
|
|
15994
15997
|
v4["instanceof"](Blob),
|
|
15995
15998
|
v4["instanceof"](ArrayBuffer),
|
|
@@ -18829,18 +18832,18 @@ sqliteTable('assinatura', {
|
|
|
18829
18832
|
usuario_id: v4.string(),
|
|
18830
18833
|
app: AppEnumZod,
|
|
18831
18834
|
data_criacao: v4.number(),
|
|
18832
|
-
data_atualizacao: v4.number().nullable()
|
|
18833
|
-
periodo_inicio: v4.number().nullable()
|
|
18834
|
-
periodo_fim: v4.number().nullable()
|
|
18835
|
+
data_atualizacao: v4.number().nullable(),
|
|
18836
|
+
periodo_inicio: v4.number().nullable(),
|
|
18837
|
+
periodo_fim: v4.number().nullable(),
|
|
18835
18838
|
status: AssinaturaStatusZod,
|
|
18836
18839
|
valor: v4.number(),
|
|
18837
18840
|
moeda: v4.string(),
|
|
18838
|
-
plano_id: v4.string().nullable()
|
|
18841
|
+
plano_id: v4.string().nullable(),
|
|
18839
18842
|
plano_name: PlanNameEnum,
|
|
18840
|
-
gateway_subscription_id: v4.string().nullable()
|
|
18841
|
-
gateway_customer_id: v4.string().nullable()
|
|
18842
|
-
price_id: v4.string().nullable()
|
|
18843
|
-
stripe_latest_invoice_id: v4.string().nullable()
|
|
18843
|
+
gateway_subscription_id: v4.string().nullable(),
|
|
18844
|
+
gateway_customer_id: v4.string().nullable(),
|
|
18845
|
+
price_id: v4.string().nullable(),
|
|
18846
|
+
stripe_latest_invoice_id: v4.string().nullable(),
|
|
18844
18847
|
ativo: v4.union([
|
|
18845
18848
|
v4.literal(1),
|
|
18846
18849
|
v4.literal(0)
|
|
@@ -18908,7 +18911,7 @@ sqliteTable('assinatura', {
|
|
|
18908
18911
|
assinatura: v4.object({
|
|
18909
18912
|
usuario_id: v4.uuidv4(),
|
|
18910
18913
|
plano_id: v4.string().nullable().optional(),
|
|
18911
|
-
plano_name: PlanNameEnum.
|
|
18914
|
+
plano_name: PlanNameEnum.optional(),
|
|
18912
18915
|
status: AssinaturaStatusZod.optional(),
|
|
18913
18916
|
valor: v4.number().optional(),
|
|
18914
18917
|
moeda: v4.string().optional(),
|
|
@@ -16,9 +16,9 @@ declare namespace TypeControllerAssinatura {
|
|
|
16
16
|
"service-oraculo": "service-oraculo";
|
|
17
17
|
}>;
|
|
18
18
|
data_criacao: z4.ZodNumber;
|
|
19
|
-
data_atualizacao: z4.
|
|
20
|
-
periodo_inicio: z4.
|
|
21
|
-
periodo_fim: z4.
|
|
19
|
+
data_atualizacao: z4.ZodNullable<z4.ZodNumber>;
|
|
20
|
+
periodo_inicio: z4.ZodNullable<z4.ZodNumber>;
|
|
21
|
+
periodo_fim: z4.ZodNullable<z4.ZodNumber>;
|
|
22
22
|
status: z4.ZodEnum<{
|
|
23
23
|
canceled: "canceled";
|
|
24
24
|
incomplete: "incomplete";
|
|
@@ -31,17 +31,17 @@ declare namespace TypeControllerAssinatura {
|
|
|
31
31
|
}>;
|
|
32
32
|
valor: z4.ZodNumber;
|
|
33
33
|
moeda: z4.ZodString;
|
|
34
|
-
plano_id: z4.
|
|
34
|
+
plano_id: z4.ZodNullable<z4.ZodString>;
|
|
35
35
|
plano_name: z4.ZodEnum<{
|
|
36
36
|
FREE: "FREE";
|
|
37
37
|
ESSENTIAL: "ESSENTIAL";
|
|
38
38
|
BUSINESS: "BUSINESS";
|
|
39
39
|
ENTERPRISE: "ENTERPRISE";
|
|
40
40
|
}>;
|
|
41
|
-
gateway_subscription_id: z4.
|
|
42
|
-
gateway_customer_id: z4.
|
|
43
|
-
price_id: z4.
|
|
44
|
-
stripe_latest_invoice_id: z4.
|
|
41
|
+
gateway_subscription_id: z4.ZodNullable<z4.ZodString>;
|
|
42
|
+
gateway_customer_id: z4.ZodNullable<z4.ZodString>;
|
|
43
|
+
price_id: z4.ZodNullable<z4.ZodString>;
|
|
44
|
+
stripe_latest_invoice_id: z4.ZodNullable<z4.ZodString>;
|
|
45
45
|
ativo: z4.ZodUnion<readonly [z4.ZodLiteral<1>, z4.ZodLiteral<0>]>;
|
|
46
46
|
}, z4.core.$strip>;
|
|
47
47
|
type AssinaturaBase = z4.infer<typeof AssinaturaBaseSchema>;
|
|
@@ -174,12 +174,12 @@ declare namespace TypeControllerAssinatura {
|
|
|
174
174
|
assinatura: z4.ZodObject<{
|
|
175
175
|
usuario_id: z4.ZodUUID;
|
|
176
176
|
plano_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
177
|
-
plano_name: z4.ZodOptional<z4.
|
|
177
|
+
plano_name: z4.ZodOptional<z4.ZodEnum<{
|
|
178
178
|
FREE: "FREE";
|
|
179
179
|
ESSENTIAL: "ESSENTIAL";
|
|
180
180
|
BUSINESS: "BUSINESS";
|
|
181
181
|
ENTERPRISE: "ENTERPRISE";
|
|
182
|
-
}
|
|
182
|
+
}>>;
|
|
183
183
|
status: z4.ZodOptional<z4.ZodEnum<{
|
|
184
184
|
canceled: "canceled";
|
|
185
185
|
incomplete: "incomplete";
|