@navservice/assinatura 1.33.0 → 1.36.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 +2 -2
- package/build/es/index.js +51 -47
- package/build/es/shared/types/controller/assinatura.d.ts +2 -0
- package/build/es/shared/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/build/lib/backend/schema/schema_assinatura.d.ts +0 -324
- package/build/lib/biblioteca/src/componentes/checkout/ButtonGerarUrl.d.ts +0 -7
- package/build/lib/biblioteca/src/componentes/checkout/CheckoutAssinaturaStripe.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/checkout/Stype.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +0 -5
- package/build/lib/biblioteca/src/componentes/geral/TopTabs/index.d.ts +0 -10
- package/build/lib/biblioteca/src/config_env/index.d.ts +0 -9
- package/build/lib/biblioteca/src/contexto/contexto_assinatura.d.ts +0 -31
- package/build/lib/biblioteca/src/index.d.ts +0 -2
- package/build/lib/biblioteca/src/utils/_api.d.ts +0 -41
- package/build/lib/biblioteca/src/utils/_data.d.ts +0 -11
- package/build/lib/biblioteca/src/utils/_form.d.ts +0 -11
- package/build/lib/biblioteca/src/utils/_geral.d.ts +0 -9
- package/build/lib/biblioteca/src/utils/_hooks.d.ts +0 -5
- package/build/lib/biblioteca/src/utils/_local_storage.d.ts +0 -8
- package/build/lib/biblioteca/src/utils/_session_storage.d.ts +0 -14
- package/build/lib/biblioteca/src/utils/_update_context.d.ts +0 -21
- package/build/lib/biblioteca/src/utils/utils.d.ts +0 -108
- package/build/lib/index.js +0 -461
- package/build/lib/shared/configuracoes/_sistema.d.ts +0 -49
- package/build/lib/shared/configuracoes/_theme.d.ts +0 -91
- package/build/lib/shared/configuracoes/index.d.ts +0 -142
- package/build/lib/shared/types/controller/assinatura.d.ts +0 -229
- package/build/lib/shared/types/controller/cliente.d.ts +0 -112
- package/build/lib/shared/types/geral/type_response.d.ts +0 -54
- package/build/lib/shared/types/index.d.ts +0 -47
|
@@ -66,14 +66,14 @@ export declare const schema_assinatura: import("drizzle-orm/sqlite-core").SQLite
|
|
|
66
66
|
tableName: "assinatura";
|
|
67
67
|
dataType: "string";
|
|
68
68
|
columnType: "SQLiteText";
|
|
69
|
-
data: "service-usuario" | "service-financeiro" | "service-pages-ai";
|
|
69
|
+
data: "service-usuario" | "service-financeiro" | "service-pages-ai" | "service-assinatura";
|
|
70
70
|
driverParam: string;
|
|
71
71
|
notNull: true;
|
|
72
72
|
hasDefault: false;
|
|
73
73
|
isPrimaryKey: false;
|
|
74
74
|
isAutoincrement: false;
|
|
75
75
|
hasRuntimeDefault: false;
|
|
76
|
-
enumValues: ["service-usuario", "service-financeiro", "service-pages-ai"];
|
|
76
|
+
enumValues: ["service-usuario", "service-financeiro", "service-pages-ai", "service-assinatura"];
|
|
77
77
|
baseColumn: never;
|
|
78
78
|
identity: undefined;
|
|
79
79
|
generated: undefined;
|
package/build/es/index.js
CHANGED
|
@@ -16242,8 +16242,8 @@ var _type_response_TypeControllerResponse;
|
|
|
16242
16242
|
})(t.Geral || (t.Geral = {}));
|
|
16243
16243
|
})(types_t || (types_t = {}));
|
|
16244
16244
|
var types_t;
|
|
16245
|
-
const _session_storage = class {
|
|
16246
|
-
|
|
16245
|
+
const _session_storage = new class {
|
|
16246
|
+
adicionar_item_session_storage({ chave, novoItem }) {
|
|
16247
16247
|
try {
|
|
16248
16248
|
const valorAtual = window.sessionStorage.getItem(chave);
|
|
16249
16249
|
const listaAtual = valorAtual ? JSON.parse(valorAtual) : [];
|
|
@@ -16256,14 +16256,14 @@ const _session_storage = class {
|
|
|
16256
16256
|
console.error(error);
|
|
16257
16257
|
}
|
|
16258
16258
|
}
|
|
16259
|
-
|
|
16259
|
+
set_session_storage_sem_incremento({ chave, novoItem }) {
|
|
16260
16260
|
try {
|
|
16261
16261
|
window.sessionStorage.setItem(chave, JSON.stringify(novoItem));
|
|
16262
16262
|
} catch (error) {
|
|
16263
16263
|
console.error(error);
|
|
16264
16264
|
}
|
|
16265
16265
|
}
|
|
16266
|
-
|
|
16266
|
+
get_item_session_storage(chave) {
|
|
16267
16267
|
try {
|
|
16268
16268
|
if ("undefined" != typeof window) {
|
|
16269
16269
|
const valorAtual = window.sessionStorage.getItem(chave);
|
|
@@ -16274,13 +16274,17 @@ const _session_storage = class {
|
|
|
16274
16274
|
console.error(error);
|
|
16275
16275
|
}
|
|
16276
16276
|
}
|
|
16277
|
-
|
|
16277
|
+
remover_item_session_storage(chave) {
|
|
16278
16278
|
try {
|
|
16279
16279
|
window.sessionStorage.removeItem(chave);
|
|
16280
16280
|
} catch (error) {
|
|
16281
16281
|
console.error(error);
|
|
16282
16282
|
}
|
|
16283
16283
|
}
|
|
16284
|
+
get usuario_auth() {
|
|
16285
|
+
const get_auth_user = this.get_item_session_storage("auth_user");
|
|
16286
|
+
return get_auth_user;
|
|
16287
|
+
}
|
|
16284
16288
|
};
|
|
16285
16289
|
const utils_session_storage = _session_storage;
|
|
16286
16290
|
const _api_api = class _api {
|
|
@@ -16366,8 +16370,8 @@ const _api_api = class _api {
|
|
|
16366
16370
|
}
|
|
16367
16371
|
};
|
|
16368
16372
|
const utils_api = _api_api;
|
|
16369
|
-
const _data = class {
|
|
16370
|
-
|
|
16373
|
+
const _data = new class {
|
|
16374
|
+
YYYY_MM_DD_00_00_00(newData) {
|
|
16371
16375
|
let dataAtual = new Date();
|
|
16372
16376
|
if (newData) dataAtual = new Date(newData);
|
|
16373
16377
|
const options = {
|
|
@@ -16382,7 +16386,7 @@ const _data = class {
|
|
|
16382
16386
|
const [dia, mes, ano] = data.split("/");
|
|
16383
16387
|
return `${ano}-${mes}-${dia} ${hora}`;
|
|
16384
16388
|
}
|
|
16385
|
-
|
|
16389
|
+
DD_MM_YYYY_00_00_00(newData) {
|
|
16386
16390
|
let dataAtual = new Date();
|
|
16387
16391
|
if (newData) dataAtual = new Date(newData);
|
|
16388
16392
|
const options = {
|
|
@@ -16394,7 +16398,7 @@ const _data = class {
|
|
|
16394
16398
|
};
|
|
16395
16399
|
return dataAtual.toLocaleString("pt-BR", options);
|
|
16396
16400
|
}
|
|
16397
|
-
|
|
16401
|
+
DD_MM_YYYY_00_00(newData) {
|
|
16398
16402
|
let dataAtual = new Date();
|
|
16399
16403
|
if (newData) dataAtual = new Date(newData);
|
|
16400
16404
|
const options = {
|
|
@@ -16407,7 +16411,7 @@ const _data = class {
|
|
|
16407
16411
|
const dataFormatada = dataAtual.toLocaleString("pt-BR", options).replace(",", "");
|
|
16408
16412
|
return dataFormatada;
|
|
16409
16413
|
}
|
|
16410
|
-
|
|
16414
|
+
DD_MM_YYYY(newData) {
|
|
16411
16415
|
let dataAtual = new Date();
|
|
16412
16416
|
if (newData) dataAtual = new Date(newData);
|
|
16413
16417
|
const options = {
|
|
@@ -16419,7 +16423,7 @@ const _data = class {
|
|
|
16419
16423
|
};
|
|
16420
16424
|
return dataAtual.toLocaleString("pt-BR", options);
|
|
16421
16425
|
}
|
|
16422
|
-
|
|
16426
|
+
YYYY_MM_DD(newData) {
|
|
16423
16427
|
let dataAtual = new Date();
|
|
16424
16428
|
if (newData) dataAtual = new Date(newData);
|
|
16425
16429
|
const options = {
|
|
@@ -16434,21 +16438,21 @@ const _data = class {
|
|
|
16434
16438
|
const [dia, mes, ano] = data.split("/");
|
|
16435
16439
|
return `${ano}-${mes}-${dia}`;
|
|
16436
16440
|
}
|
|
16437
|
-
|
|
16441
|
+
DIFERENCA_SEGUNDOS(data) {
|
|
16438
16442
|
var dataInicial = new Date(data);
|
|
16439
16443
|
var dataAtual = new Date();
|
|
16440
16444
|
var diferenca = Number(dataAtual) - Number(dataInicial);
|
|
16441
16445
|
var diferencaEmSegundos = Math.floor(diferenca / 1000);
|
|
16442
16446
|
return diferencaEmSegundos;
|
|
16443
16447
|
}
|
|
16444
|
-
|
|
16448
|
+
DIFERENCA_DIAS(data) {
|
|
16445
16449
|
var dataInicial = new Date(data);
|
|
16446
16450
|
var dataAtual = new Date();
|
|
16447
16451
|
var diferenca = dataAtual.getTime() - dataInicial.getTime();
|
|
16448
16452
|
var diferencaEmDias = Math.floor(diferenca / 86400000);
|
|
16449
16453
|
return diferencaEmDias;
|
|
16450
16454
|
}
|
|
16451
|
-
|
|
16455
|
+
SET_SECONDS_TO_DD_MM_YYYY_HH_MM(timestamp) {
|
|
16452
16456
|
const segundos = Number(timestamp);
|
|
16453
16457
|
if (!Number.isFinite(segundos)) return "-";
|
|
16454
16458
|
const data = new Date(1000 * segundos);
|
|
@@ -16465,7 +16469,7 @@ const _data = class {
|
|
|
16465
16469
|
};
|
|
16466
16470
|
const utils_data = _data;
|
|
16467
16471
|
class _form {
|
|
16468
|
-
|
|
16472
|
+
regex_cpf_cnpj(value) {
|
|
16469
16473
|
let tempValue = value.replace(/\D/g, "");
|
|
16470
16474
|
if (tempValue.length > 14) tempValue = tempValue.slice(0, 14);
|
|
16471
16475
|
tempValue = tempValue.length <= 11 ? tempValue.replace(/^(\d{0,3})(\d{0,3})(\d{0,3})(\d{0,2})$/, (match, p1, p2, p3, p4)=>{
|
|
@@ -16484,7 +16488,7 @@ class _form {
|
|
|
16484
16488
|
});
|
|
16485
16489
|
return tempValue;
|
|
16486
16490
|
}
|
|
16487
|
-
|
|
16491
|
+
formatar_cpf(value) {
|
|
16488
16492
|
const cpf = value.replace(/\D/g, "");
|
|
16489
16493
|
if (cpf.length > 11) return cpf.slice(0, 11);
|
|
16490
16494
|
return cpf.replace(/^(\d{0,3})(\d{0,3})(\d{0,3})(\d{0,2})$/, (match, p1, p2, p3, p4)=>{
|
|
@@ -16495,7 +16499,7 @@ class _form {
|
|
|
16495
16499
|
return result;
|
|
16496
16500
|
});
|
|
16497
16501
|
}
|
|
16498
|
-
|
|
16502
|
+
formatar_cnpj(value) {
|
|
16499
16503
|
const cnpj = value.replace(/\D/g, "");
|
|
16500
16504
|
if (cnpj.length > 14) return cnpj.slice(0, 14);
|
|
16501
16505
|
return cnpj.replace(/^(\d{0,2})(\d{0,3})(\d{0,3})(\d{0,4})(\d{0,2})$/, (match, p1, p2, p3, p4, p5)=>{
|
|
@@ -16507,7 +16511,7 @@ class _form {
|
|
|
16507
16511
|
return result;
|
|
16508
16512
|
});
|
|
16509
16513
|
}
|
|
16510
|
-
|
|
16514
|
+
formatar_cep(value) {
|
|
16511
16515
|
const cep = value.replace(/\D/g, "");
|
|
16512
16516
|
if (cep.length > 8) return cep.slice(0, 8);
|
|
16513
16517
|
return cep.replace(/^(\d{0,5})(\d{0,3})$/, (match, p1, p2)=>{
|
|
@@ -16515,7 +16519,7 @@ class _form {
|
|
|
16515
16519
|
return p1;
|
|
16516
16520
|
});
|
|
16517
16521
|
}
|
|
16518
|
-
|
|
16522
|
+
formatar_telefone_fixo(value) {
|
|
16519
16523
|
const telefone = value.replace(/\D/g, "");
|
|
16520
16524
|
if (telefone.length > 10) return telefone.slice(0, 10);
|
|
16521
16525
|
return telefone.replace(/^(\d{0,2})(\d{0,4})(\d{0,4})$/, (match, p1, p2, p3)=>{
|
|
@@ -16526,7 +16530,7 @@ class _form {
|
|
|
16526
16530
|
return result;
|
|
16527
16531
|
});
|
|
16528
16532
|
}
|
|
16529
|
-
|
|
16533
|
+
formatar_celular(value) {
|
|
16530
16534
|
const celular = value.replace(/\D/g, "");
|
|
16531
16535
|
if (celular.length > 11) return celular.slice(0, 11);
|
|
16532
16536
|
return celular.replace(/^(\d{0,2})(\d{0,5})(\d{0,4})$/, (match, p1, p2, p3)=>{
|
|
@@ -16537,7 +16541,7 @@ class _form {
|
|
|
16537
16541
|
return result;
|
|
16538
16542
|
});
|
|
16539
16543
|
}
|
|
16540
|
-
|
|
16544
|
+
formatar_nome(name) {
|
|
16541
16545
|
const lowercaseWords = [
|
|
16542
16546
|
"de",
|
|
16543
16547
|
"da",
|
|
@@ -16556,7 +16560,7 @@ class _form {
|
|
|
16556
16560
|
});
|
|
16557
16561
|
return formattedWords.join(" ");
|
|
16558
16562
|
}
|
|
16559
|
-
|
|
16563
|
+
formatar_reais_br(value) {
|
|
16560
16564
|
let num = value.replace(/\D/g, "");
|
|
16561
16565
|
return new Intl.NumberFormat("pt-BR", {
|
|
16562
16566
|
style: "currency",
|
|
@@ -16565,9 +16569,9 @@ class _form {
|
|
|
16565
16569
|
}).format(Number(num) / 100);
|
|
16566
16570
|
}
|
|
16567
16571
|
}
|
|
16568
|
-
const utils_form = _form;
|
|
16569
|
-
const geral = class {
|
|
16570
|
-
|
|
16572
|
+
const utils_form = new _form;
|
|
16573
|
+
const geral = new class {
|
|
16574
|
+
slice_file_name(filename, maxLength = 30) {
|
|
16571
16575
|
if (!filename || "string" != typeof filename) return "";
|
|
16572
16576
|
const lastDotIndex = filename.lastIndexOf(".");
|
|
16573
16577
|
if (-1 === lastDotIndex) return filename.length > maxLength ? filename.substring(0, maxLength - 3) + "..." : filename;
|
|
@@ -16578,12 +16582,12 @@ const geral = class {
|
|
|
16578
16582
|
if (availableLength <= 0) return name.substring(0, 1) + "..." + extension;
|
|
16579
16583
|
return name.substring(0, availableLength) + "..." + extension;
|
|
16580
16584
|
}
|
|
16581
|
-
|
|
16585
|
+
extrair_id(array_enviado) {
|
|
16582
16586
|
const ids = [];
|
|
16583
16587
|
for(let i = 0; i < array_enviado.length; i++)if (array_enviado[i]?._id) ids.push(array_enviado[i]._id);
|
|
16584
16588
|
return ids;
|
|
16585
16589
|
}
|
|
16586
|
-
|
|
16590
|
+
gerar_id = (length = 32)=>{
|
|
16587
16591
|
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
16588
16592
|
const timestamp = Date.now().toString(16) + performance.now().toString(16).replace(".", "");
|
|
16589
16593
|
let result = timestamp;
|
|
@@ -16597,8 +16601,8 @@ const geral = class {
|
|
|
16597
16601
|
};
|
|
16598
16602
|
};
|
|
16599
16603
|
const _geral = geral;
|
|
16600
|
-
const _local_storage = class {
|
|
16601
|
-
|
|
16604
|
+
const _local_storage = new class {
|
|
16605
|
+
adicionar_item_local_storage(chave, novoItem) {
|
|
16602
16606
|
try {
|
|
16603
16607
|
const valorAtual = window.localStorage.getItem(chave);
|
|
16604
16608
|
const listaAtual = valorAtual ? JSON.parse(valorAtual) : [];
|
|
@@ -16611,14 +16615,14 @@ const _local_storage = class {
|
|
|
16611
16615
|
console.log(error);
|
|
16612
16616
|
}
|
|
16613
16617
|
}
|
|
16614
|
-
|
|
16618
|
+
set_local_storage_sem_incremento(chave, novoItem) {
|
|
16615
16619
|
try {
|
|
16616
16620
|
window.localStorage.setItem(chave, JSON.stringify(novoItem));
|
|
16617
16621
|
} catch (error) {
|
|
16618
16622
|
console.log(error);
|
|
16619
16623
|
}
|
|
16620
16624
|
}
|
|
16621
|
-
|
|
16625
|
+
get_item_local_storage(chave) {
|
|
16622
16626
|
try {
|
|
16623
16627
|
if ("undefined" != typeof window) {
|
|
16624
16628
|
const valorAtual = window.localStorage.getItem(chave);
|
|
@@ -16629,7 +16633,7 @@ const _local_storage = class {
|
|
|
16629
16633
|
console.log(error);
|
|
16630
16634
|
}
|
|
16631
16635
|
}
|
|
16632
|
-
|
|
16636
|
+
remover_item_local_storage(chave) {
|
|
16633
16637
|
try {
|
|
16634
16638
|
window.localStorage.removeItem(chave);
|
|
16635
16639
|
} catch (error) {
|
|
@@ -16638,8 +16642,8 @@ const _local_storage = class {
|
|
|
16638
16642
|
}
|
|
16639
16643
|
};
|
|
16640
16644
|
const utils_local_storage = _local_storage;
|
|
16641
|
-
const _update_context = class {
|
|
16642
|
-
|
|
16645
|
+
const _update_context = new class {
|
|
16646
|
+
set_new_item_end = ({ oldArray = [], newItem = [], key = "_id" })=>{
|
|
16643
16647
|
try {
|
|
16644
16648
|
const hasValidIds = Array.isArray(newItem) ? newItem.every((item)=>item?.[key]) : newItem?.[key];
|
|
16645
16649
|
const newItemArray = hasValidIds ? Array.isArray(newItem) ? newItem : [
|
|
@@ -16668,7 +16672,7 @@ const _update_context = class {
|
|
|
16668
16672
|
return oldArray;
|
|
16669
16673
|
}
|
|
16670
16674
|
};
|
|
16671
|
-
|
|
16675
|
+
update_array_itens = ({ oldArray = [], newItem = [], key = "_id" })=>{
|
|
16672
16676
|
try {
|
|
16673
16677
|
const hasValidIds = Array.isArray(newItem) ? newItem.every((item)=>item?.[key]) : newItem?.[key];
|
|
16674
16678
|
const newItemArray = hasValidIds ? Array.isArray(newItem) ? newItem : [
|
|
@@ -16697,7 +16701,7 @@ const _update_context = class {
|
|
|
16697
16701
|
return oldArray;
|
|
16698
16702
|
}
|
|
16699
16703
|
};
|
|
16700
|
-
|
|
16704
|
+
remove_array_items = ({ oldArray = [], itemsToRemove = [], key = "_id" })=>{
|
|
16701
16705
|
try {
|
|
16702
16706
|
if (!Array.isArray(oldArray) || 0 === oldArray.length) return oldArray;
|
|
16703
16707
|
if (!itemsToRemove) return oldArray;
|
|
@@ -16713,7 +16717,7 @@ const _update_context = class {
|
|
|
16713
16717
|
return oldArray;
|
|
16714
16718
|
}
|
|
16715
16719
|
};
|
|
16716
|
-
|
|
16720
|
+
compare_arrays({ arrayAntigo, arrayNovo }) {
|
|
16717
16721
|
const idsAntigos = new Set(arrayAntigo.map((item)=>item._id));
|
|
16718
16722
|
const idsNovos = new Set(arrayNovo.map((item)=>item._id));
|
|
16719
16723
|
const itensMantidos = arrayAntigo.filter((item)=>idsNovos.has(item._id));
|
|
@@ -16797,14 +16801,14 @@ class _hooks {
|
|
|
16797
16801
|
}
|
|
16798
16802
|
const utils_hooks = new _hooks;
|
|
16799
16803
|
const _environment = class {
|
|
16800
|
-
|
|
16804
|
+
set(key, props) {
|
|
16801
16805
|
window.sessionStorage.setItem(key, props);
|
|
16802
16806
|
}
|
|
16803
|
-
|
|
16807
|
+
get(key) {
|
|
16804
16808
|
return window.sessionStorage.getItem(key);
|
|
16805
16809
|
}
|
|
16806
16810
|
};
|
|
16807
|
-
const utils_environment = _environment;
|
|
16811
|
+
const utils_environment = new _environment;
|
|
16808
16812
|
const es_utils = {
|
|
16809
16813
|
api: utils_api,
|
|
16810
16814
|
data: utils_data,
|
|
@@ -19323,7 +19327,7 @@ class contexto_assinatura {
|
|
|
19323
19327
|
s.loading = true;
|
|
19324
19328
|
});
|
|
19325
19329
|
const response = await src_utils.api.servidor_pricipal.post({
|
|
19326
|
-
baseURLKey: "
|
|
19330
|
+
baseURLKey: "PUBLIC_BASE_URL_BACKEND_ASSINATURA",
|
|
19327
19331
|
url: shared_types.Controller.Assinatura.Criar.route,
|
|
19328
19332
|
data: props
|
|
19329
19333
|
});
|
|
@@ -19345,7 +19349,7 @@ class contexto_assinatura {
|
|
|
19345
19349
|
});
|
|
19346
19350
|
const url = shared_types.Controller.Assinatura.BuscarPeloId.route.replace(":id", props.data.assinatura.usuario_id);
|
|
19347
19351
|
const response = await src_utils.api.servidor_pricipal.get({
|
|
19348
|
-
baseURLKey: "
|
|
19352
|
+
baseURLKey: "PUBLIC_BASE_URL_BACKEND_ASSINATURA",
|
|
19349
19353
|
url: url
|
|
19350
19354
|
});
|
|
19351
19355
|
const data = response?.data?.results ?? null;
|
|
@@ -19365,7 +19369,7 @@ class contexto_assinatura {
|
|
|
19365
19369
|
s.loading = true;
|
|
19366
19370
|
});
|
|
19367
19371
|
const response = await src_utils.api.servidor_pricipal.get({
|
|
19368
|
-
baseURLKey: "
|
|
19372
|
+
baseURLKey: "PUBLIC_BASE_URL_BACKEND_ASSINATURA",
|
|
19369
19373
|
url: shared_types.Controller.Assinatura.BuscarPeloFiltro.route,
|
|
19370
19374
|
params: props.filtros.assinatura
|
|
19371
19375
|
});
|
|
@@ -19388,7 +19392,7 @@ class contexto_assinatura {
|
|
|
19388
19392
|
});
|
|
19389
19393
|
const url = shared_types.Controller.Assinatura.AtualizarPeloId.route.replace(":id", props.data.assinatura.usuario_id);
|
|
19390
19394
|
const response = await src_utils.api.servidor_pricipal.patch({
|
|
19391
|
-
baseURLKey: "
|
|
19395
|
+
baseURLKey: "PUBLIC_BASE_URL_BACKEND_ASSINATURA",
|
|
19392
19396
|
url,
|
|
19393
19397
|
data: props
|
|
19394
19398
|
});
|
|
@@ -19410,7 +19414,7 @@ class contexto_assinatura {
|
|
|
19410
19414
|
});
|
|
19411
19415
|
const url = shared_types.Controller.Assinatura.DeletarPeloId.route.replace(":id", props.data._id);
|
|
19412
19416
|
const response = await src_utils.api.servidor_pricipal["delete"]({
|
|
19413
|
-
baseURLKey: "
|
|
19417
|
+
baseURLKey: "PUBLIC_BASE_URL_BACKEND_ASSINATURA",
|
|
19414
19418
|
url: url
|
|
19415
19419
|
});
|
|
19416
19420
|
return response?.data?.results ?? null;
|
|
@@ -19426,7 +19430,7 @@ class contexto_assinatura {
|
|
|
19426
19430
|
false == s.loading && (s.loading = true);
|
|
19427
19431
|
});
|
|
19428
19432
|
const response = await src_utils.api.servidor_pricipal.get({
|
|
19429
|
-
baseURLKey: "
|
|
19433
|
+
baseURLKey: "PUBLIC_BASE_URL_BACKEND_ASSINATURA",
|
|
19430
19434
|
url: shared_types.Controller.Assinatura.BuscarProdutoStripe.route
|
|
19431
19435
|
});
|
|
19432
19436
|
const data = response?.data?.results?.data;
|
|
@@ -19464,7 +19468,7 @@ class contexto_assinatura {
|
|
|
19464
19468
|
s.loading = true;
|
|
19465
19469
|
});
|
|
19466
19470
|
const response = await src_utils.api.servidor_pricipal.post({
|
|
19467
|
-
baseURLKey: "
|
|
19471
|
+
baseURLKey: "PUBLIC_BASE_URL_BACKEND_ASSINATURA",
|
|
19468
19472
|
url: shared_types.Controller.Assinatura.CriarCheckoutSession.route,
|
|
19469
19473
|
data: props
|
|
19470
19474
|
});
|
|
@@ -13,6 +13,7 @@ declare namespace TypeControllerAssinatura {
|
|
|
13
13
|
"service-usuario": "service-usuario";
|
|
14
14
|
"service-financeiro": "service-financeiro";
|
|
15
15
|
"service-pages-ai": "service-pages-ai";
|
|
16
|
+
"service-assinatura": "service-assinatura";
|
|
16
17
|
}>;
|
|
17
18
|
data_criacao: z4.ZodNumber;
|
|
18
19
|
data_atualizacao: z4.ZodOptional<z4.ZodNullable<z4.ZodNumber>>;
|
|
@@ -50,6 +51,7 @@ declare namespace TypeControllerAssinatura {
|
|
|
50
51
|
"service-usuario": "service-usuario";
|
|
51
52
|
"service-financeiro": "service-financeiro";
|
|
52
53
|
"service-pages-ai": "service-pages-ai";
|
|
54
|
+
"service-assinatura": "service-assinatura";
|
|
53
55
|
}>;
|
|
54
56
|
plano_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
55
57
|
gateway_subscription_id: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
@@ -15,11 +15,11 @@ declare namespace t {
|
|
|
15
15
|
export import Response = TypeResponse;
|
|
16
16
|
interface Env {
|
|
17
17
|
JSON_WEB_TOKEN_AUTH_USER?: string;
|
|
18
|
-
|
|
18
|
+
STRIPE_PRICES_ID_SERVICE_ASSINATURA?: string;
|
|
19
19
|
STRIPE_PRICES_ID_SERVICE_USUARIO?: string;
|
|
20
20
|
STRIPE_PRICES_ID_SERVICE_PAGES_AI?: string;
|
|
21
21
|
STRIPE_SECRET_KEY?: string;
|
|
22
|
-
|
|
22
|
+
PUBLIC_BASE_URL_BACKEND_ASSINATURA?: string;
|
|
23
23
|
PUBLIC_BASE_URL_FRTONEND_PRINCIPAL?: string;
|
|
24
24
|
RESEND_API_KEY?: string;
|
|
25
25
|
CORS_ORIGIN?: string;
|