@navservice/assinatura 1.55.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.
|
@@ -48,14 +48,14 @@ export declare const schema_assinatura: import("drizzle-orm/sqlite-core").SQLite
|
|
|
48
48
|
tableName: "assinatura";
|
|
49
49
|
dataType: "string";
|
|
50
50
|
columnType: "SQLiteText";
|
|
51
|
-
data: "service-usuario" | "service-pages" | "service-assinatura" | "service-bucket";
|
|
51
|
+
data: "service-usuario" | "service-pages" | "service-assinatura" | "service-bucket" | "service-galio" | "service-oraculo";
|
|
52
52
|
driverParam: string;
|
|
53
53
|
notNull: true;
|
|
54
54
|
hasDefault: false;
|
|
55
55
|
isPrimaryKey: false;
|
|
56
56
|
isAutoincrement: false;
|
|
57
57
|
hasRuntimeDefault: false;
|
|
58
|
-
enumValues: ["service-usuario", "service-pages", "service-assinatura", "service-bucket"];
|
|
58
|
+
enumValues: ["service-usuario", "service-pages", "service-assinatura", "service-bucket", "service-galio", "service-oraculo"];
|
|
59
59
|
baseColumn: never;
|
|
60
60
|
identity: undefined;
|
|
61
61
|
generated: undefined;
|
|
@@ -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
|
@@ -15889,7 +15889,9 @@ const lib_axios = axios;
|
|
|
15889
15889
|
"service-usuario",
|
|
15890
15890
|
"service-pages",
|
|
15891
15891
|
"service-assinatura",
|
|
15892
|
-
"service-bucket"
|
|
15892
|
+
"service-bucket",
|
|
15893
|
+
"service-galio",
|
|
15894
|
+
"service-oraculo"
|
|
15893
15895
|
];
|
|
15894
15896
|
TypeControllerUsuario.AssinaturaStatusEnum = [
|
|
15895
15897
|
"active",
|
|
@@ -15914,6 +15916,12 @@ const lib_axios = axios;
|
|
|
15914
15916
|
"service-pages": [
|
|
15915
15917
|
"padrao"
|
|
15916
15918
|
],
|
|
15919
|
+
"service-galio": [
|
|
15920
|
+
"padrao"
|
|
15921
|
+
],
|
|
15922
|
+
"service-oraculo": [
|
|
15923
|
+
"padrao"
|
|
15924
|
+
],
|
|
15917
15925
|
"service-bucket": [
|
|
15918
15926
|
"padrao"
|
|
15919
15927
|
]
|
|
@@ -15958,7 +15966,11 @@ var _usuario_TypeControllerUsuario;
|
|
|
15958
15966
|
v4.literal("INVALID_TOKEN"),
|
|
15959
15967
|
v4.literal("NOT_FOUND"),
|
|
15960
15968
|
v4.literal("SUCCESS_FILE"),
|
|
15961
|
-
v4.literal("DATABASE_ERROR")
|
|
15969
|
+
v4.literal("DATABASE_ERROR"),
|
|
15970
|
+
v4.literal("BUSINESS_RULE_VIOLATION"),
|
|
15971
|
+
v4.literal("PLAN_FORBIDDEN"),
|
|
15972
|
+
v4.literal("INTEGRATION_ERROR"),
|
|
15973
|
+
v4.literal("TOKEN_AUTH_USER")
|
|
15962
15974
|
]);
|
|
15963
15975
|
v4.object({
|
|
15964
15976
|
status: StatusSchema,
|
|
@@ -15980,6 +15992,7 @@ var _usuario_TypeControllerUsuario;
|
|
|
15980
15992
|
v4.object({
|
|
15981
15993
|
status: StatusSchema,
|
|
15982
15994
|
message: v4.string().optional(),
|
|
15995
|
+
fn: v4.string(),
|
|
15983
15996
|
file_buffer: v4.union([
|
|
15984
15997
|
v4["instanceof"](Blob),
|
|
15985
15998
|
v4["instanceof"](ArrayBuffer),
|
|
@@ -16571,6 +16584,39 @@ class _hooks {
|
|
|
16571
16584
|
localStorage.setItem("theme", "light");
|
|
16572
16585
|
}
|
|
16573
16586
|
}
|
|
16587
|
+
use_set_show_component() {
|
|
16588
|
+
function aplicarVisibilidadeElemento(el) {
|
|
16589
|
+
const valor = el.getAttribute("set-show-component");
|
|
16590
|
+
if ("ocultar" === valor) el.style.display = "none";
|
|
16591
|
+
else if ("exibir" === valor) el.style.display = "";
|
|
16592
|
+
}
|
|
16593
|
+
function aplicarVisibilidade(node = document) {
|
|
16594
|
+
const elementos = node.querySelectorAll("[set-show-component]");
|
|
16595
|
+
elementos.forEach(aplicarVisibilidadeElemento);
|
|
16596
|
+
}
|
|
16597
|
+
document.addEventListener("DOMContentLoaded", ()=>{
|
|
16598
|
+
aplicarVisibilidade();
|
|
16599
|
+
const observer = new MutationObserver((mutations)=>{
|
|
16600
|
+
mutations.forEach((mutation)=>{
|
|
16601
|
+
mutation.addedNodes.forEach((node)=>{
|
|
16602
|
+
if (node instanceof HTMLElement) {
|
|
16603
|
+
if (node.hasAttribute("set-show-component")) aplicarVisibilidadeElemento(node);
|
|
16604
|
+
aplicarVisibilidade(node);
|
|
16605
|
+
}
|
|
16606
|
+
});
|
|
16607
|
+
if ("attributes" === mutation.type && mutation.target instanceof HTMLElement && "set-show-component" === mutation.attributeName) aplicarVisibilidadeElemento(mutation.target);
|
|
16608
|
+
});
|
|
16609
|
+
});
|
|
16610
|
+
observer.observe(document.body, {
|
|
16611
|
+
childList: true,
|
|
16612
|
+
subtree: true,
|
|
16613
|
+
attributes: true,
|
|
16614
|
+
attributeFilter: [
|
|
16615
|
+
"set-show-component"
|
|
16616
|
+
]
|
|
16617
|
+
});
|
|
16618
|
+
});
|
|
16619
|
+
}
|
|
16574
16620
|
}
|
|
16575
16621
|
const utils_hooks = new _hooks;
|
|
16576
16622
|
const _environment = class {
|
|
@@ -18786,18 +18832,18 @@ sqliteTable('assinatura', {
|
|
|
18786
18832
|
usuario_id: v4.string(),
|
|
18787
18833
|
app: AppEnumZod,
|
|
18788
18834
|
data_criacao: v4.number(),
|
|
18789
|
-
data_atualizacao: v4.number().nullable()
|
|
18790
|
-
periodo_inicio: v4.number().nullable()
|
|
18791
|
-
periodo_fim: v4.number().nullable()
|
|
18835
|
+
data_atualizacao: v4.number().nullable(),
|
|
18836
|
+
periodo_inicio: v4.number().nullable(),
|
|
18837
|
+
periodo_fim: v4.number().nullable(),
|
|
18792
18838
|
status: AssinaturaStatusZod,
|
|
18793
18839
|
valor: v4.number(),
|
|
18794
18840
|
moeda: v4.string(),
|
|
18795
|
-
plano_id: v4.string().nullable()
|
|
18841
|
+
plano_id: v4.string().nullable(),
|
|
18796
18842
|
plano_name: PlanNameEnum,
|
|
18797
|
-
gateway_subscription_id: v4.string().nullable()
|
|
18798
|
-
gateway_customer_id: v4.string().nullable()
|
|
18799
|
-
price_id: v4.string().nullable()
|
|
18800
|
-
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(),
|
|
18801
18847
|
ativo: v4.union([
|
|
18802
18848
|
v4.literal(1),
|
|
18803
18849
|
v4.literal(0)
|
|
@@ -18865,7 +18911,7 @@ sqliteTable('assinatura', {
|
|
|
18865
18911
|
assinatura: v4.object({
|
|
18866
18912
|
usuario_id: v4.uuidv4(),
|
|
18867
18913
|
plano_id: v4.string().nullable().optional(),
|
|
18868
|
-
plano_name: PlanNameEnum.
|
|
18914
|
+
plano_name: PlanNameEnum.optional(),
|
|
18869
18915
|
status: AssinaturaStatusZod.optional(),
|
|
18870
18916
|
valor: v4.number().optional(),
|
|
18871
18917
|
moeda: v4.string().optional(),
|
|
@@ -12,11 +12,13 @@ declare namespace TypeControllerAssinatura {
|
|
|
12
12
|
"service-pages": "service-pages";
|
|
13
13
|
"service-assinatura": "service-assinatura";
|
|
14
14
|
"service-bucket": "service-bucket";
|
|
15
|
+
"service-galio": "service-galio";
|
|
16
|
+
"service-oraculo": "service-oraculo";
|
|
15
17
|
}>;
|
|
16
18
|
data_criacao: z4.ZodNumber;
|
|
17
|
-
data_atualizacao: z4.
|
|
18
|
-
periodo_inicio: z4.
|
|
19
|
-
periodo_fim: z4.
|
|
19
|
+
data_atualizacao: z4.ZodNullable<z4.ZodNumber>;
|
|
20
|
+
periodo_inicio: z4.ZodNullable<z4.ZodNumber>;
|
|
21
|
+
periodo_fim: z4.ZodNullable<z4.ZodNumber>;
|
|
20
22
|
status: z4.ZodEnum<{
|
|
21
23
|
canceled: "canceled";
|
|
22
24
|
incomplete: "incomplete";
|
|
@@ -29,17 +31,17 @@ declare namespace TypeControllerAssinatura {
|
|
|
29
31
|
}>;
|
|
30
32
|
valor: z4.ZodNumber;
|
|
31
33
|
moeda: z4.ZodString;
|
|
32
|
-
plano_id: z4.
|
|
34
|
+
plano_id: z4.ZodNullable<z4.ZodString>;
|
|
33
35
|
plano_name: z4.ZodEnum<{
|
|
34
36
|
FREE: "FREE";
|
|
35
37
|
ESSENTIAL: "ESSENTIAL";
|
|
36
38
|
BUSINESS: "BUSINESS";
|
|
37
39
|
ENTERPRISE: "ENTERPRISE";
|
|
38
40
|
}>;
|
|
39
|
-
gateway_subscription_id: z4.
|
|
40
|
-
gateway_customer_id: z4.
|
|
41
|
-
price_id: z4.
|
|
42
|
-
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>;
|
|
43
45
|
ativo: z4.ZodUnion<readonly [z4.ZodLiteral<1>, z4.ZodLiteral<0>]>;
|
|
44
46
|
}, z4.core.$strip>;
|
|
45
47
|
type AssinaturaBase = z4.infer<typeof AssinaturaBaseSchema>;
|
|
@@ -57,6 +59,8 @@ declare namespace TypeControllerAssinatura {
|
|
|
57
59
|
"service-pages": "service-pages";
|
|
58
60
|
"service-assinatura": "service-assinatura";
|
|
59
61
|
"service-bucket": "service-bucket";
|
|
62
|
+
"service-galio": "service-galio";
|
|
63
|
+
"service-oraculo": "service-oraculo";
|
|
60
64
|
}>;
|
|
61
65
|
plano_name: z4.ZodEnum<{
|
|
62
66
|
FREE: "FREE";
|
|
@@ -146,6 +150,8 @@ declare namespace TypeControllerAssinatura {
|
|
|
146
150
|
"service-pages": "service-pages";
|
|
147
151
|
"service-assinatura": "service-assinatura";
|
|
148
152
|
"service-bucket": "service-bucket";
|
|
153
|
+
"service-galio": "service-galio";
|
|
154
|
+
"service-oraculo": "service-oraculo";
|
|
149
155
|
}>;
|
|
150
156
|
}, z4.core.$strip>;
|
|
151
157
|
}, z4.core.$strip>;
|
|
@@ -168,12 +174,12 @@ declare namespace TypeControllerAssinatura {
|
|
|
168
174
|
assinatura: z4.ZodObject<{
|
|
169
175
|
usuario_id: z4.ZodUUID;
|
|
170
176
|
plano_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
171
|
-
plano_name: z4.ZodOptional<z4.
|
|
177
|
+
plano_name: z4.ZodOptional<z4.ZodEnum<{
|
|
172
178
|
FREE: "FREE";
|
|
173
179
|
ESSENTIAL: "ESSENTIAL";
|
|
174
180
|
BUSINESS: "BUSINESS";
|
|
175
181
|
ENTERPRISE: "ENTERPRISE";
|
|
176
|
-
}
|
|
182
|
+
}>>;
|
|
177
183
|
status: z4.ZodOptional<z4.ZodEnum<{
|
|
178
184
|
canceled: "canceled";
|
|
179
185
|
incomplete: "incomplete";
|
|
@@ -11,6 +11,8 @@ declare namespace TypeControllerCreditos {
|
|
|
11
11
|
"service-pages": "service-pages";
|
|
12
12
|
"service-assinatura": "service-assinatura";
|
|
13
13
|
"service-bucket": "service-bucket";
|
|
14
|
+
"service-galio": "service-galio";
|
|
15
|
+
"service-oraculo": "service-oraculo";
|
|
14
16
|
}>;
|
|
15
17
|
tipo: z4.ZodEnum<{
|
|
16
18
|
entrada: "entrada";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navservice/assinatura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"description": "Service de autenticação de usuários unificado",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/lib/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build": "rslib build"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@navservice/usuario": "^1.
|
|
23
|
+
"@navservice/usuario": "^1.53.0",
|
|
24
24
|
"react": "^19.0.0",
|
|
25
25
|
"react-dom": "^19.0.0",
|
|
26
26
|
"react-router-dom": "^7.0.0"
|