@neetru/sdk 3.8.0 → 3.8.1
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/CHANGELOG.md +20 -0
- package/dist/ai.cjs +1 -1
- package/dist/ai.d.cts +1 -1
- package/dist/ai.d.ts +1 -1
- package/dist/ai.mjs +1 -1
- package/dist/auth.cjs +708 -688
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.mjs +705 -685
- package/dist/catalog.cjs +1 -1
- package/dist/catalog.d.cts +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.mjs +1 -1
- package/dist/checkout.cjs +1 -1
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +1 -1
- package/dist/checkout.mjs +1 -1
- package/dist/db-react.d.cts +1 -1
- package/dist/db-react.d.ts +1 -1
- package/dist/db.cjs +242 -222
- package/dist/db.d.cts +1 -1
- package/dist/db.d.ts +1 -1
- package/dist/db.mjs +263 -243
- package/dist/entitlements.d.cts +1 -1
- package/dist/entitlements.d.ts +1 -1
- package/dist/firestore-compat.d.cts +1 -1
- package/dist/firestore-compat.d.ts +1 -1
- package/dist/index.cjs +730 -710
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +874 -854
- package/dist/mobile.d.cts +1 -1
- package/dist/mobile.d.ts +1 -1
- package/dist/mocks.d.cts +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/notifications.cjs +1 -1
- package/dist/notifications.d.cts +1 -1
- package/dist/notifications.d.ts +1 -1
- package/dist/notifications.mjs +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/support.cjs +1 -1
- package/dist/support.d.cts +1 -1
- package/dist/support.d.ts +1 -1
- package/dist/support.mjs +1 -1
- package/dist/telemetry.cjs +1 -1
- package/dist/telemetry.d.cts +1 -1
- package/dist/telemetry.d.ts +1 -1
- package/dist/telemetry.mjs +1 -1
- package/dist/{types-bVztFQTI.d.ts → types-BYPk_3HR.d.ts} +56 -16
- package/dist/{types-D-9bjlM0.d.cts → types-yv3EDKg2.d.cts} +56 -16
- package/dist/usage.cjs +1 -1
- package/dist/usage.d.cts +1 -1
- package/dist/usage.d.ts +1 -1
- package/dist/usage.mjs +1 -1
- package/dist/webhooks.cjs +1 -1
- package/dist/webhooks.d.cts +1 -1
- package/dist/webhooks.d.ts +1 -1
- package/dist/webhooks.mjs +1 -1
- package/package.json +1 -1
package/dist/mobile.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as NeetruClientConfig, v as CompleteSignInResult, a6 as NeetruUser, m as AuthStateListener } from './types-
|
|
1
|
+
import { Y as NeetruClientConfig, v as CompleteSignInResult, a6 as NeetruUser, m as AuthStateListener } from './types-yv3EDKg2.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
|
4
4
|
|
package/dist/mobile.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as NeetruClientConfig, v as CompleteSignInResult, a6 as NeetruUser, m as AuthStateListener } from './types-
|
|
1
|
+
import { Y as NeetruClientConfig, v as CompleteSignInResult, a6 as NeetruUser, m as AuthStateListener } from './types-BYPk_3HR.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
|
4
4
|
|
package/dist/mocks.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as NeetruUser, g as AiNamespace, b as AiChatOptions, c as AiChatResult, i as AiStreamHandle, l as AuthNamespace, ak as SignInOptions, m as AuthStateListener, af as RedirectCallbackResult, v as CompleteSignInResult, Z as NeetruDb, E as DbCollectionRef, a5 as NeetruSqlClient, ar as SyncState, aw as Unsubscribe, w as ConflictRecord, P as EntitlementCheck, am as SupportNamespace, y as CreateTicketInput, ap as SupportTicket, ay as UsageNamespace, az as UsageQuota } from './types-
|
|
1
|
+
import { a6 as NeetruUser, g as AiNamespace, b as AiChatOptions, c as AiChatResult, i as AiStreamHandle, l as AuthNamespace, ak as SignInOptions, m as AuthStateListener, af as RedirectCallbackResult, v as CompleteSignInResult, Z as NeetruDb, E as DbCollectionRef, a5 as NeetruSqlClient, ar as SyncState, aw as Unsubscribe, w as ConflictRecord, P as EntitlementCheck, am as SupportNamespace, y as CreateTicketInput, ap as SupportTicket, ay as UsageNamespace, az as UsageQuota } from './types-yv3EDKg2.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
|
4
4
|
|
package/dist/mocks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as NeetruUser, g as AiNamespace, b as AiChatOptions, c as AiChatResult, i as AiStreamHandle, l as AuthNamespace, ak as SignInOptions, m as AuthStateListener, af as RedirectCallbackResult, v as CompleteSignInResult, Z as NeetruDb, E as DbCollectionRef, a5 as NeetruSqlClient, ar as SyncState, aw as Unsubscribe, w as ConflictRecord, P as EntitlementCheck, am as SupportNamespace, y as CreateTicketInput, ap as SupportTicket, ay as UsageNamespace, az as UsageQuota } from './types-
|
|
1
|
+
import { a6 as NeetruUser, g as AiNamespace, b as AiChatOptions, c as AiChatResult, i as AiStreamHandle, l as AuthNamespace, ak as SignInOptions, m as AuthStateListener, af as RedirectCallbackResult, v as CompleteSignInResult, Z as NeetruDb, E as DbCollectionRef, a5 as NeetruSqlClient, ar as SyncState, aw as Unsubscribe, w as ConflictRecord, P as EntitlementCheck, am as SupportNamespace, y as CreateTicketInput, ap as SupportTicket, ay as UsageNamespace, az as UsageQuota } from './types-BYPk_3HR.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
|
4
4
|
|
package/dist/notifications.cjs
CHANGED
package/dist/notifications.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { S as ListNotificationsOptions, U as MockNotifications, a7 as NotificationScopeOptions, a8 as NotificationsNamespace, aa as ProductNotification, ab as ProductNotificationSeverity, ai as SendNotificationInput, aN as createNotificationsNamespace } from './types-
|
|
1
|
+
export { S as ListNotificationsOptions, U as MockNotifications, a7 as NotificationScopeOptions, a8 as NotificationsNamespace, aa as ProductNotification, ab as ProductNotificationSeverity, ai as SendNotificationInput, aN as createNotificationsNamespace } from './types-yv3EDKg2.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
package/dist/notifications.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { S as ListNotificationsOptions, U as MockNotifications, a7 as NotificationScopeOptions, a8 as NotificationsNamespace, aa as ProductNotification, ab as ProductNotificationSeverity, ai as SendNotificationInput, aN as createNotificationsNamespace } from './types-
|
|
1
|
+
export { S as ListNotificationsOptions, U as MockNotifications, a7 as NotificationScopeOptions, a8 as NotificationsNamespace, aa as ProductNotification, ab as ProductNotificationSeverity, ai as SendNotificationInput, aN as createNotificationsNamespace } from './types-BYPk_3HR.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
package/dist/notifications.mjs
CHANGED
package/dist/react.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { X as NeetruClient, t as CheckoutStartResult, l as AuthNamespace, a6 as NeetruUser } from './types-
|
|
2
|
+
import { X as NeetruClient, t as CheckoutStartResult, l as AuthNamespace, a6 as NeetruUser } from './types-yv3EDKg2.cjs';
|
|
3
3
|
import { CollectionReference, Query, DocumentReference } from './firestore-compat.cjs';
|
|
4
4
|
import 'drizzle-orm/node-postgres';
|
|
5
5
|
import './errors.cjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { X as NeetruClient, t as CheckoutStartResult, l as AuthNamespace, a6 as NeetruUser } from './types-
|
|
2
|
+
import { X as NeetruClient, t as CheckoutStartResult, l as AuthNamespace, a6 as NeetruUser } from './types-BYPk_3HR.js';
|
|
3
3
|
import { CollectionReference, Query, DocumentReference } from './firestore-compat.js';
|
|
4
4
|
import 'drizzle-orm/node-postgres';
|
|
5
5
|
import './errors.js';
|
package/dist/support.cjs
CHANGED
package/dist/support.d.cts
CHANGED
package/dist/support.d.ts
CHANGED
package/dist/support.mjs
CHANGED
package/dist/telemetry.cjs
CHANGED
package/dist/telemetry.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ah as ResolvedConfig, at as TelemetryEventInput, as as TelemetryEventAck, av as TelemetryLogInput, au as TelemetryLogAck } from './types-
|
|
1
|
+
import { ah as ResolvedConfig, at as TelemetryEventInput, as as TelemetryEventAck, av as TelemetryLogInput, au as TelemetryLogAck } from './types-yv3EDKg2.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
|
4
4
|
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ah as ResolvedConfig, at as TelemetryEventInput, as as TelemetryEventAck, av as TelemetryLogInput, au as TelemetryLogAck } from './types-
|
|
1
|
+
import { ah as ResolvedConfig, at as TelemetryEventInput, as as TelemetryEventAck, av as TelemetryLogInput, au as TelemetryLogAck } from './types-BYPk_3HR.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
|
4
4
|
|
package/dist/telemetry.mjs
CHANGED
|
@@ -1412,9 +1412,42 @@ interface RealtimeClientOptions {
|
|
|
1412
1412
|
* Alinhado com `DbSqlLease` do Core (`src/lib/db/lease/types.ts`).
|
|
1413
1413
|
*
|
|
1414
1414
|
* - `port` sempre 5433 — o lease aponta pro PgBouncer, nunca à porta crua.
|
|
1415
|
-
* - `credentialVersion` —
|
|
1416
|
-
* o pool ao detectar versão diferente.
|
|
1415
|
+
* - `credentialVersion` — hoje é um placeholder fixo do Core (ver o campo).
|
|
1417
1416
|
* - `expiresAt` — ISO string; o SDK renova aos ~80% do TTL (12 min em TTL=15 min).
|
|
1417
|
+
*
|
|
1418
|
+
* ── TLS / mTLS (estado real) ───────────────────────────────────────────────
|
|
1419
|
+
*
|
|
1420
|
+
* **O mTLS de cliente ESTÁ ativo.** O Core emite os três materiais em TODO
|
|
1421
|
+
* lease SQL (emissão e renovação — `buildLease`, ramo `sql`, em
|
|
1422
|
+
* `src/lib/db/lease/issuer-core.ts` do Core):
|
|
1423
|
+
* - `sslca` — a CA interna do Core (secret `coredb_ca_cert`). A MESMA CA
|
|
1424
|
+
* assina o cert do servidor PgBouncer (365 dias) e os certs de cliente.
|
|
1425
|
+
* - `clientCert` — X.509 de cliente emitido por lease: CN = `leaseId`, EKU
|
|
1426
|
+
* `clientAuth`, validade = TTL do lease (15 min).
|
|
1427
|
+
* - `clientKey` — chave EC P-256 efêmera, nova a cada emissão/renovação.
|
|
1428
|
+
* Não há flag que desligue isso: sem a CA no Secret Manager a emissão FALHA
|
|
1429
|
+
* (HTTP 500), em vez de devolver esses campos `null`.
|
|
1430
|
+
*
|
|
1431
|
+
* O SDK usa os três ao abrir o `pg.Pool` (`createPgPool` e o `createPool` de
|
|
1432
|
+
* `createSqlClientFromConfig`): com `sslca` presente, `ssl = { ca: sslca,
|
|
1433
|
+
* cert: clientCert, key: clientKey, rejectUnauthorized: true }` — verifica o
|
|
1434
|
+
* servidor (CA + hostname) E apresenta o cert de cliente.
|
|
1435
|
+
*
|
|
1436
|
+
* Do lado da VM, o PgBouncer roda com `client_tls_sslmode = verify-full` e
|
|
1437
|
+
* `client_tls_ca_file` = CA do Core (agente, `src/handlers/db-pgbouncer.ts`):
|
|
1438
|
+
* EXIGE cert de cliente válido. E `auth_type = scram-sha-256` — a conexão
|
|
1439
|
+
* precisa do cert E da senha do lease (o CN não é comparado ao usuário).
|
|
1440
|
+
*
|
|
1441
|
+
* Consequências práticas:
|
|
1442
|
+
* - o cert de cliente expira junto com o lease (~15 min). Pool que não troca
|
|
1443
|
+
* de lease passa a levar `certificate expired` (alerta TLS 45 enviado pelo
|
|
1444
|
+
* PgBouncer) — é o que a renovação proativa (`lease.ts`) e o re-lease
|
|
1445
|
+
* reativo (`resilient-pool.ts`) curam;
|
|
1446
|
+
* - se o install da VM não obteve a CA/assinatura, o Core configura o
|
|
1447
|
+
* PgBouncer SEM TLS (fail-open, com aviso no log). Como o SDK sempre liga
|
|
1448
|
+
* TLS quando o lease traz `sslca`, a conexão falha com "The server does
|
|
1449
|
+
* not support SSL connections" — o conserto é reconfigurar o PgBouncer com
|
|
1450
|
+
* TLS, não desligar TLS no SDK.
|
|
1418
1451
|
*/
|
|
1419
1452
|
interface DbSqlLease {
|
|
1420
1453
|
leaseId: string;
|
|
@@ -1425,31 +1458,38 @@ interface DbSqlLease {
|
|
|
1425
1458
|
/** Plaintext — trafega só sobre HTTPS, NUNCA logado/persistido. */
|
|
1426
1459
|
password: string;
|
|
1427
1460
|
/**
|
|
1428
|
-
* CA do
|
|
1429
|
-
*
|
|
1430
|
-
* (`rejectUnauthorized: true`).
|
|
1461
|
+
* CA interna do Core (PEM) — a mesma que assina o cert do servidor PgBouncer
|
|
1462
|
+
* e o `clientCert`. O pool valida o servidor contra ela
|
|
1463
|
+
* (`rejectUnauthorized: true`). O Core sempre manda em lease SQL; `null` só
|
|
1464
|
+
* se o campo vier ausente, e aí o SDK conecta SEM TLS (`ssl: false`), mesmo
|
|
1465
|
+
* que `clientCert` exista.
|
|
1431
1466
|
*/
|
|
1432
1467
|
sslca: string | null;
|
|
1433
1468
|
/**
|
|
1434
|
-
* Certificado de **cliente** para mTLS
|
|
1435
|
-
*
|
|
1436
|
-
*
|
|
1437
|
-
*
|
|
1438
|
-
*
|
|
1469
|
+
* Certificado X.509 de **cliente** (PEM) para mTLS, emitido por lease
|
|
1470
|
+
* (CN = `leaseId`, EKU `clientAuth`, expira com o lease — 15 min). O SDK o
|
|
1471
|
+
* apresenta ao PgBouncer em `ssl.cert`; o PgBouncer o exige
|
|
1472
|
+
* (`client_tls_sslmode = verify-full`). O Core sempre manda em lease SQL —
|
|
1473
|
+
* o `| null` é só tolerância a resposta sem o campo (o pool fica com TLS
|
|
1474
|
+
* só de servidor).
|
|
1439
1475
|
*/
|
|
1440
1476
|
clientCert: string | null;
|
|
1441
1477
|
/**
|
|
1442
|
-
* Chave privada de **cliente**
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1478
|
+
* Chave privada de **cliente** (PEM, EC P-256 efêmera, nova a cada
|
|
1479
|
+
* emissão/renovação) — par de `clientCert`, vai em `ssl.key`. Trafega só
|
|
1480
|
+
* sobre HTTPS, NUNCA logada/persistida. Mesma regra de `null` do
|
|
1481
|
+
* `clientCert`.
|
|
1445
1482
|
*/
|
|
1446
1483
|
clientKey: string | null;
|
|
1447
1484
|
/**
|
|
1448
|
-
* Versão da credencial
|
|
1449
|
-
*
|
|
1485
|
+
* Versão da credencial. HOJE o Core manda sempre o placeholder `1` (TODO de
|
|
1486
|
+
* versionamento no `issuer-core.ts` do Core), então ela NÃO sinaliza
|
|
1487
|
+
* rotação. A troca de pool numa rotação é disparada pela mudança de
|
|
1488
|
+
* `password` (ou de qualquer campo de conexão) — ver `hasConnectionChanged`
|
|
1489
|
+
* em `lease.ts`.
|
|
1450
1490
|
*/
|
|
1451
1491
|
credentialVersion: number;
|
|
1452
|
-
/** Expiração ISO — SDK renova ~
|
|
1492
|
+
/** Expiração ISO — o SDK renova aos ~80% do TTL (~3 min antes, em 15 min). */
|
|
1453
1493
|
expiresAt: string;
|
|
1454
1494
|
}
|
|
1455
1495
|
/**
|
|
@@ -1412,9 +1412,42 @@ interface RealtimeClientOptions {
|
|
|
1412
1412
|
* Alinhado com `DbSqlLease` do Core (`src/lib/db/lease/types.ts`).
|
|
1413
1413
|
*
|
|
1414
1414
|
* - `port` sempre 5433 — o lease aponta pro PgBouncer, nunca à porta crua.
|
|
1415
|
-
* - `credentialVersion` —
|
|
1416
|
-
* o pool ao detectar versão diferente.
|
|
1415
|
+
* - `credentialVersion` — hoje é um placeholder fixo do Core (ver o campo).
|
|
1417
1416
|
* - `expiresAt` — ISO string; o SDK renova aos ~80% do TTL (12 min em TTL=15 min).
|
|
1417
|
+
*
|
|
1418
|
+
* ── TLS / mTLS (estado real) ───────────────────────────────────────────────
|
|
1419
|
+
*
|
|
1420
|
+
* **O mTLS de cliente ESTÁ ativo.** O Core emite os três materiais em TODO
|
|
1421
|
+
* lease SQL (emissão e renovação — `buildLease`, ramo `sql`, em
|
|
1422
|
+
* `src/lib/db/lease/issuer-core.ts` do Core):
|
|
1423
|
+
* - `sslca` — a CA interna do Core (secret `coredb_ca_cert`). A MESMA CA
|
|
1424
|
+
* assina o cert do servidor PgBouncer (365 dias) e os certs de cliente.
|
|
1425
|
+
* - `clientCert` — X.509 de cliente emitido por lease: CN = `leaseId`, EKU
|
|
1426
|
+
* `clientAuth`, validade = TTL do lease (15 min).
|
|
1427
|
+
* - `clientKey` — chave EC P-256 efêmera, nova a cada emissão/renovação.
|
|
1428
|
+
* Não há flag que desligue isso: sem a CA no Secret Manager a emissão FALHA
|
|
1429
|
+
* (HTTP 500), em vez de devolver esses campos `null`.
|
|
1430
|
+
*
|
|
1431
|
+
* O SDK usa os três ao abrir o `pg.Pool` (`createPgPool` e o `createPool` de
|
|
1432
|
+
* `createSqlClientFromConfig`): com `sslca` presente, `ssl = { ca: sslca,
|
|
1433
|
+
* cert: clientCert, key: clientKey, rejectUnauthorized: true }` — verifica o
|
|
1434
|
+
* servidor (CA + hostname) E apresenta o cert de cliente.
|
|
1435
|
+
*
|
|
1436
|
+
* Do lado da VM, o PgBouncer roda com `client_tls_sslmode = verify-full` e
|
|
1437
|
+
* `client_tls_ca_file` = CA do Core (agente, `src/handlers/db-pgbouncer.ts`):
|
|
1438
|
+
* EXIGE cert de cliente válido. E `auth_type = scram-sha-256` — a conexão
|
|
1439
|
+
* precisa do cert E da senha do lease (o CN não é comparado ao usuário).
|
|
1440
|
+
*
|
|
1441
|
+
* Consequências práticas:
|
|
1442
|
+
* - o cert de cliente expira junto com o lease (~15 min). Pool que não troca
|
|
1443
|
+
* de lease passa a levar `certificate expired` (alerta TLS 45 enviado pelo
|
|
1444
|
+
* PgBouncer) — é o que a renovação proativa (`lease.ts`) e o re-lease
|
|
1445
|
+
* reativo (`resilient-pool.ts`) curam;
|
|
1446
|
+
* - se o install da VM não obteve a CA/assinatura, o Core configura o
|
|
1447
|
+
* PgBouncer SEM TLS (fail-open, com aviso no log). Como o SDK sempre liga
|
|
1448
|
+
* TLS quando o lease traz `sslca`, a conexão falha com "The server does
|
|
1449
|
+
* not support SSL connections" — o conserto é reconfigurar o PgBouncer com
|
|
1450
|
+
* TLS, não desligar TLS no SDK.
|
|
1418
1451
|
*/
|
|
1419
1452
|
interface DbSqlLease {
|
|
1420
1453
|
leaseId: string;
|
|
@@ -1425,31 +1458,38 @@ interface DbSqlLease {
|
|
|
1425
1458
|
/** Plaintext — trafega só sobre HTTPS, NUNCA logado/persistido. */
|
|
1426
1459
|
password: string;
|
|
1427
1460
|
/**
|
|
1428
|
-
* CA do
|
|
1429
|
-
*
|
|
1430
|
-
* (`rejectUnauthorized: true`).
|
|
1461
|
+
* CA interna do Core (PEM) — a mesma que assina o cert do servidor PgBouncer
|
|
1462
|
+
* e o `clientCert`. O pool valida o servidor contra ela
|
|
1463
|
+
* (`rejectUnauthorized: true`). O Core sempre manda em lease SQL; `null` só
|
|
1464
|
+
* se o campo vier ausente, e aí o SDK conecta SEM TLS (`ssl: false`), mesmo
|
|
1465
|
+
* que `clientCert` exista.
|
|
1431
1466
|
*/
|
|
1432
1467
|
sslca: string | null;
|
|
1433
1468
|
/**
|
|
1434
|
-
* Certificado de **cliente** para mTLS
|
|
1435
|
-
*
|
|
1436
|
-
*
|
|
1437
|
-
*
|
|
1438
|
-
*
|
|
1469
|
+
* Certificado X.509 de **cliente** (PEM) para mTLS, emitido por lease
|
|
1470
|
+
* (CN = `leaseId`, EKU `clientAuth`, expira com o lease — 15 min). O SDK o
|
|
1471
|
+
* apresenta ao PgBouncer em `ssl.cert`; o PgBouncer o exige
|
|
1472
|
+
* (`client_tls_sslmode = verify-full`). O Core sempre manda em lease SQL —
|
|
1473
|
+
* o `| null` é só tolerância a resposta sem o campo (o pool fica com TLS
|
|
1474
|
+
* só de servidor).
|
|
1439
1475
|
*/
|
|
1440
1476
|
clientCert: string | null;
|
|
1441
1477
|
/**
|
|
1442
|
-
* Chave privada de **cliente**
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1478
|
+
* Chave privada de **cliente** (PEM, EC P-256 efêmera, nova a cada
|
|
1479
|
+
* emissão/renovação) — par de `clientCert`, vai em `ssl.key`. Trafega só
|
|
1480
|
+
* sobre HTTPS, NUNCA logada/persistida. Mesma regra de `null` do
|
|
1481
|
+
* `clientCert`.
|
|
1445
1482
|
*/
|
|
1446
1483
|
clientKey: string | null;
|
|
1447
1484
|
/**
|
|
1448
|
-
* Versão da credencial
|
|
1449
|
-
*
|
|
1485
|
+
* Versão da credencial. HOJE o Core manda sempre o placeholder `1` (TODO de
|
|
1486
|
+
* versionamento no `issuer-core.ts` do Core), então ela NÃO sinaliza
|
|
1487
|
+
* rotação. A troca de pool numa rotação é disparada pela mudança de
|
|
1488
|
+
* `password` (ou de qualquer campo de conexão) — ver `hasConnectionChanged`
|
|
1489
|
+
* em `lease.ts`.
|
|
1450
1490
|
*/
|
|
1451
1491
|
credentialVersion: number;
|
|
1452
|
-
/** Expiração ISO — SDK renova ~
|
|
1492
|
+
/** Expiração ISO — o SDK renova aos ~80% do TTL (~3 min antes, em 15 min). */
|
|
1453
1493
|
expiresAt: string;
|
|
1454
1494
|
}
|
|
1455
1495
|
/**
|
package/dist/usage.cjs
CHANGED
package/dist/usage.d.cts
CHANGED
package/dist/usage.d.ts
CHANGED
package/dist/usage.mjs
CHANGED
package/dist/webhooks.cjs
CHANGED
package/dist/webhooks.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { V as MockWebhooks, ag as RegisterWebhookInput, aB as VerifyWebhookRequestOptions, aC as VerifyWebhookRequestResult, aD as WebhookEndpoint, aE as WebhookEvent, aF as WebhookScopeOptions, aG as WebhookTestResult, aH as WebhooksNamespace, aP as createWebhooksNamespace, aW as verifyWebhookRequest, aX as verifyWebhookSignature } from './types-
|
|
1
|
+
export { V as MockWebhooks, ag as RegisterWebhookInput, aB as VerifyWebhookRequestOptions, aC as VerifyWebhookRequestResult, aD as WebhookEndpoint, aE as WebhookEvent, aF as WebhookScopeOptions, aG as WebhookTestResult, aH as WebhooksNamespace, aP as createWebhooksNamespace, aW as verifyWebhookRequest, aX as verifyWebhookSignature } from './types-yv3EDKg2.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
package/dist/webhooks.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { V as MockWebhooks, ag as RegisterWebhookInput, aB as VerifyWebhookRequestOptions, aC as VerifyWebhookRequestResult, aD as WebhookEndpoint, aE as WebhookEvent, aF as WebhookScopeOptions, aG as WebhookTestResult, aH as WebhooksNamespace, aP as createWebhooksNamespace, aW as verifyWebhookRequest, aX as verifyWebhookSignature } from './types-
|
|
1
|
+
export { V as MockWebhooks, ag as RegisterWebhookInput, aB as VerifyWebhookRequestOptions, aC as VerifyWebhookRequestResult, aD as WebhookEndpoint, aE as WebhookEvent, aF as WebhookScopeOptions, aG as WebhookTestResult, aH as WebhooksNamespace, aP as createWebhooksNamespace, aW as verifyWebhookRequest, aX as verifyWebhookSignature } from './types-BYPk_3HR.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
package/dist/webhooks.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neetru/sdk",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "Neetru SDK 3.0 — biblioteca runtime universal (browser/Node/Edge) para consumir o ecossistema Neetru. Paths canonical /api/sdk/v1/*, productId obrigatório, Idempotency-Key em mutations, WebCrypto signatures, baseUrl allowlist fail-closed.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|