@neetru/sdk 3.3.0 → 3.4.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/CHANGELOG.md +25 -0
- package/dist/ai.d.cts +1 -1
- package/dist/ai.d.ts +1 -1
- package/dist/auth.cjs +179 -2
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.mjs +179 -2
- package/dist/auth.mjs.map +1 -1
- package/dist/catalog.d.cts +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +1 -1
- package/dist/db-react.d.cts +1 -1
- package/dist/db-react.d.ts +1 -1
- package/dist/db.cjs +17 -0
- package/dist/db.cjs.map +1 -1
- package/dist/db.d.cts +1 -1
- package/dist/db.d.ts +1 -1
- package/dist/db.mjs +17 -1
- package/dist/db.mjs.map +1 -1
- 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 +180 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +180 -3
- package/dist/index.mjs.map +1 -1
- package/dist/mocks.cjs +68 -1
- package/dist/mocks.cjs.map +1 -1
- package/dist/mocks.d.cts +17 -1
- package/dist/mocks.d.ts +17 -1
- package/dist/mocks.mjs +68 -1
- package/dist/mocks.mjs.map +1 -1
- package/dist/notifications.d.cts +1 -1
- package/dist/notifications.d.ts +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/support.cjs +98 -1
- package/dist/support.cjs.map +1 -1
- package/dist/support.d.cts +1 -1
- package/dist/support.d.ts +1 -1
- package/dist/support.mjs +98 -1
- package/dist/support.mjs.map +1 -1
- package/dist/telemetry.d.cts +1 -1
- package/dist/telemetry.d.ts +1 -1
- package/dist/{types-DQplLXIk.d.cts → types-BoFSCHF_.d.cts} +117 -2
- package/dist/{types-DslphKIM.d.ts → types-DdJyqBy-.d.ts} +117 -2
- package/dist/usage.d.cts +1 -1
- package/dist/usage.d.ts +1 -1
- package/dist/webhooks.d.cts +1 -1
- package/dist/webhooks.d.ts +1 -1
- package/package.json +1 -1
package/dist/catalog.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ag as ResolvedConfig, C as CatalogListOptions, n as CatalogListResponse, a8 as Product } from './types-
|
|
1
|
+
import { ag as ResolvedConfig, C as CatalogListOptions, n as CatalogListResponse, a8 as Product } from './types-BoFSCHF_.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
|
4
4
|
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ag as ResolvedConfig, C as CatalogListOptions, n as CatalogListResponse, a8 as Product } from './types-
|
|
1
|
+
import { ag as ResolvedConfig, C as CatalogListOptions, n as CatalogListResponse, a8 as Product } from './types-DdJyqBy-.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
|
4
4
|
|
package/dist/checkout.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { o as CheckoutAuthOpts, p as CheckoutIntentInfo, q as CheckoutIntentStatus, r as CheckoutNamespace, s as CheckoutStartInput, t as CheckoutStartResult, u as CheckoutTenantType, S as MockCheckout,
|
|
1
|
+
export { o as CheckoutAuthOpts, p as CheckoutIntentInfo, q as CheckoutIntentStatus, r as CheckoutNamespace, s as CheckoutStartInput, t as CheckoutStartResult, u as CheckoutTenantType, S as MockCheckout, aJ as createCheckoutNamespace } from './types-BoFSCHF_.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
package/dist/checkout.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { o as CheckoutAuthOpts, p as CheckoutIntentInfo, q as CheckoutIntentStatus, r as CheckoutNamespace, s as CheckoutStartInput, t as CheckoutStartResult, u as CheckoutTenantType, S as MockCheckout,
|
|
1
|
+
export { o as CheckoutAuthOpts, p as CheckoutIntentInfo, q as CheckoutIntentStatus, r as CheckoutNamespace, s as CheckoutStartInput, t as CheckoutStartResult, u as CheckoutTenantType, S as MockCheckout, aJ as createCheckoutNamespace } from './types-DdJyqBy-.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
package/dist/db-react.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ap as SyncState, au as Unsubscribe, F as DbDoc, W as NeetruClient, E as DbCollectionRef, K as DbQuery } from './types-
|
|
1
|
+
import { ap as SyncState, au as Unsubscribe, F as DbDoc, W as NeetruClient, E as DbCollectionRef, K as DbQuery } from './types-BoFSCHF_.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
|
4
4
|
|
package/dist/db-react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ap as SyncState, au as Unsubscribe, F as DbDoc, W as NeetruClient, E as DbCollectionRef, K as DbQuery } from './types-
|
|
1
|
+
import { ap as SyncState, au as Unsubscribe, F as DbDoc, W as NeetruClient, E as DbCollectionRef, K as DbQuery } from './types-DdJyqBy-.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
|
4
4
|
|
package/dist/db.cjs
CHANGED
|
@@ -4401,7 +4401,23 @@ function buildTicketProvider(config, opts) {
|
|
|
4401
4401
|
function getWebSocketRealtimeClient(gatewayUrl, ticketProvider, dbId, wsFactory) {
|
|
4402
4402
|
return new NeetruRealtimeClient({ gatewayUrl, ticketProvider, dbId, webSocketFactory: wsFactory });
|
|
4403
4403
|
}
|
|
4404
|
+
var _hasWarnedMissingDbId = false;
|
|
4405
|
+
function __resetDbIdWarningForTests() {
|
|
4406
|
+
_hasWarnedMissingDbId = false;
|
|
4407
|
+
}
|
|
4408
|
+
function warnMissingDbIdOnce(config, dbOpts) {
|
|
4409
|
+
if (_hasWarnedMissingDbId) return;
|
|
4410
|
+
if (dbOpts.dbId) return;
|
|
4411
|
+
if (config.env === "prod") return;
|
|
4412
|
+
if (typeof window === "undefined") return;
|
|
4413
|
+
if (typeof console === "undefined" || typeof console.warn !== "function") return;
|
|
4414
|
+
_hasWarnedMissingDbId = true;
|
|
4415
|
+
console.warn(
|
|
4416
|
+
"[neetru/sdk] client.db sem `dbId` expl\xEDcito: escritas client-side (add/set/update/remove/list) caem no datastore gen\xE9rico do Core, escopado por tenant/produto (header x-neetru-tenant) \u2014 `dbId` s\xF3 nomeia o cache offline LOCAL (IndexedDB), n\xE3o roteia nem escopa nada no servidor. Veja o JSDoc de NeetruDbOptions.dbId."
|
|
4417
|
+
);
|
|
4418
|
+
}
|
|
4404
4419
|
function createNeetruDb(config, dbOpts = {}) {
|
|
4420
|
+
warnMissingDbIdOnce(config, dbOpts);
|
|
4405
4421
|
let resolvedTransport;
|
|
4406
4422
|
if (dbOpts.transport !== void 0) {
|
|
4407
4423
|
resolvedTransport = dbOpts.transport;
|
|
@@ -4577,6 +4593,7 @@ function createLazyCollectionRef(name, getDocsPromise) {
|
|
|
4577
4593
|
}
|
|
4578
4594
|
|
|
4579
4595
|
exports.NEETRU_SENTINEL_KEY = NEETRU_SENTINEL_KEY;
|
|
4596
|
+
exports.__resetDbIdWarningForTests = __resetDbIdWarningForTests;
|
|
4580
4597
|
exports.createNeetruDb = createNeetruDb;
|
|
4581
4598
|
exports.createRestSyncTransport = createRestSyncTransport;
|
|
4582
4599
|
exports.getWebSocketRealtimeClient = getWebSocketRealtimeClient;
|