@neetru/sdk 3.8.1 → 3.9.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 +46 -0
- package/README.md +14 -1
- 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 +844 -803
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.mjs +841 -800
- package/dist/build-guard.cjs +186 -82
- package/dist/build-guard.d.cts +53 -1
- package/dist/build-guard.d.ts +53 -1
- package/dist/build-guard.mjs +175 -74
- 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 +62 -49
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +1 -1
- package/dist/checkout.mjs +62 -49
- package/dist/db-react.d.cts +1 -1
- package/dist/db-react.d.ts +1 -1
- package/dist/db.cjs +200 -187
- package/dist/db.d.cts +1 -1
- package/dist/db.d.ts +1 -1
- package/dist/db.mjs +193 -180
- 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 +880 -839
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +847 -806
- package/dist/mobile.cjs +328 -276
- package/dist/mobile.d.cts +12 -2
- package/dist/mobile.d.ts +12 -2
- package/dist/mobile.mjs +328 -276
- package/dist/mocks.cjs +5 -5
- package/dist/mocks.d.cts +2 -2
- package/dist/mocks.d.ts +2 -2
- package/dist/mocks.mjs +4 -4
- 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.cjs +119 -119
- package/dist/react.d.cts +8 -2
- package/dist/react.d.ts +8 -2
- package/dist/react.mjs +119 -119
- 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 +62 -49
- package/dist/telemetry.d.cts +1 -1
- package/dist/telemetry.d.ts +1 -1
- package/dist/telemetry.mjs +62 -49
- package/dist/{types-yv3EDKg2.d.cts → types-Bl_4HROd.d.cts} +62 -3
- package/dist/{types-BYPk_3HR.d.ts → types-Bqnsqvow.d.ts} +62 -3
- 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 +9 -1
package/dist/mocks.cjs
CHANGED
|
@@ -85,7 +85,7 @@ var x = Object.freeze({
|
|
|
85
85
|
return this._user || (this._user = { ...x }), this._notify(), this._user;
|
|
86
86
|
}
|
|
87
87
|
async signOut() {
|
|
88
|
-
this._user = null, this._notify();
|
|
88
|
+
return this._user = null, this._notify(), { localSessionCleared: true, remoteRevocation: "skipped" };
|
|
89
89
|
}
|
|
90
90
|
getUser() {
|
|
91
91
|
return this._user;
|
|
@@ -265,7 +265,7 @@ var x = Object.freeze({
|
|
|
265
265
|
__reset() {
|
|
266
266
|
this._reports = [], this._quotas.clear(), this._counters.clear();
|
|
267
267
|
}
|
|
268
|
-
},
|
|
268
|
+
}, D = class {
|
|
269
269
|
_tickets = [];
|
|
270
270
|
_ticketSeq = 0;
|
|
271
271
|
async createTicket(e) {
|
|
@@ -342,7 +342,7 @@ var x = Object.freeze({
|
|
|
342
342
|
__reset() {
|
|
343
343
|
this._tickets = [], this._ticketSeq = 0;
|
|
344
344
|
}
|
|
345
|
-
},
|
|
345
|
+
}, P = class {
|
|
346
346
|
_denied = /* @__PURE__ */ new Set();
|
|
347
347
|
async check(e, r) {
|
|
348
348
|
return !this._denied.has(`${e}:${r}`);
|
|
@@ -681,6 +681,6 @@ exports.DEV_FIXTURE_USER = x;
|
|
|
681
681
|
exports.MockAi = N;
|
|
682
682
|
exports.MockAuth = A;
|
|
683
683
|
exports.MockDb = C;
|
|
684
|
-
exports.MockEntitlements =
|
|
685
|
-
exports.MockSupport =
|
|
684
|
+
exports.MockEntitlements = P;
|
|
685
|
+
exports.MockSupport = D;
|
|
686
686
|
exports.MockUsage = T;
|
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,
|
|
1
|
+
import { a6 as NeetruUser, g as AiNamespace, b as AiChatOptions, c as AiChatResult, i as AiStreamHandle, l as AuthNamespace, al as SignInOptions, am as SignOutResult, m as AuthStateListener, af as RedirectCallbackResult, v as CompleteSignInResult, Z as NeetruDb, E as DbCollectionRef, a5 as NeetruSqlClient, at as SyncState, ay as Unsubscribe, w as ConflictRecord, P as EntitlementCheck, ao as SupportNamespace, y as CreateTicketInput, ar as SupportTicket, aA as UsageNamespace, aB as UsageQuota } from './types-Bl_4HROd.cjs';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.cjs';
|
|
4
4
|
|
|
@@ -56,7 +56,7 @@ declare class MockAuth implements AuthNamespace {
|
|
|
56
56
|
private _allowUnsignedDecode;
|
|
57
57
|
constructor(initialUser?: NeetruUser | null, options?: MockAuthOptions);
|
|
58
58
|
signIn(_options?: SignInOptions): Promise<NeetruUser>;
|
|
59
|
-
signOut(): Promise<
|
|
59
|
+
signOut(): Promise<SignOutResult>;
|
|
60
60
|
getUser(): NeetruUser | null;
|
|
61
61
|
onAuthStateChanged(listener: AuthStateListener): () => void;
|
|
62
62
|
/**
|
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,
|
|
1
|
+
import { a6 as NeetruUser, g as AiNamespace, b as AiChatOptions, c as AiChatResult, i as AiStreamHandle, l as AuthNamespace, al as SignInOptions, am as SignOutResult, m as AuthStateListener, af as RedirectCallbackResult, v as CompleteSignInResult, Z as NeetruDb, E as DbCollectionRef, a5 as NeetruSqlClient, at as SyncState, ay as Unsubscribe, w as ConflictRecord, P as EntitlementCheck, ao as SupportNamespace, y as CreateTicketInput, ar as SupportTicket, aA as UsageNamespace, aB as UsageQuota } from './types-Bqnsqvow.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|
|
4
4
|
|
|
@@ -56,7 +56,7 @@ declare class MockAuth implements AuthNamespace {
|
|
|
56
56
|
private _allowUnsignedDecode;
|
|
57
57
|
constructor(initialUser?: NeetruUser | null, options?: MockAuthOptions);
|
|
58
58
|
signIn(_options?: SignInOptions): Promise<NeetruUser>;
|
|
59
|
-
signOut(): Promise<
|
|
59
|
+
signOut(): Promise<SignOutResult>;
|
|
60
60
|
getUser(): NeetruUser | null;
|
|
61
61
|
onAuthStateChanged(listener: AuthStateListener): () => void;
|
|
62
62
|
/**
|
package/dist/mocks.mjs
CHANGED
|
@@ -83,7 +83,7 @@ var x = Object.freeze({
|
|
|
83
83
|
return this._user || (this._user = { ...x }), this._notify(), this._user;
|
|
84
84
|
}
|
|
85
85
|
async signOut() {
|
|
86
|
-
this._user = null, this._notify();
|
|
86
|
+
return this._user = null, this._notify(), { localSessionCleared: true, remoteRevocation: "skipped" };
|
|
87
87
|
}
|
|
88
88
|
getUser() {
|
|
89
89
|
return this._user;
|
|
@@ -263,7 +263,7 @@ var x = Object.freeze({
|
|
|
263
263
|
__reset() {
|
|
264
264
|
this._reports = [], this._quotas.clear(), this._counters.clear();
|
|
265
265
|
}
|
|
266
|
-
},
|
|
266
|
+
}, D = class {
|
|
267
267
|
_tickets = [];
|
|
268
268
|
_ticketSeq = 0;
|
|
269
269
|
async createTicket(e) {
|
|
@@ -340,7 +340,7 @@ var x = Object.freeze({
|
|
|
340
340
|
__reset() {
|
|
341
341
|
this._tickets = [], this._ticketSeq = 0;
|
|
342
342
|
}
|
|
343
|
-
},
|
|
343
|
+
}, P = class {
|
|
344
344
|
_denied = /* @__PURE__ */ new Set();
|
|
345
345
|
async check(e, r) {
|
|
346
346
|
return !this._denied.has(`${e}:${r}`);
|
|
@@ -675,4 +675,4 @@ var x = Object.freeze({
|
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
677
|
|
|
678
|
-
export { x as DEV_FIXTURE_USER, N as MockAi, A as MockAuth, C as MockDb,
|
|
678
|
+
export { x as DEV_FIXTURE_USER, N as MockAi, A as MockAuth, C as MockDb, P as MockEntitlements, D as MockSupport, T as MockUsage };
|
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,
|
|
1
|
+
export { S as ListNotificationsOptions, U as MockNotifications, a7 as NotificationScopeOptions, a8 as NotificationsNamespace, aa as ProductNotification, ab as ProductNotificationSeverity, aj as SendNotificationInput, aP as createNotificationsNamespace } from './types-Bl_4HROd.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,
|
|
1
|
+
export { S as ListNotificationsOptions, U as MockNotifications, a7 as NotificationScopeOptions, a8 as NotificationsNamespace, aa as ProductNotification, ab as ProductNotificationSeverity, aj as SendNotificationInput, aP as createNotificationsNamespace } from './types-Bqnsqvow.js';
|
|
2
2
|
import 'drizzle-orm/node-postgres';
|
|
3
3
|
import './errors.js';
|