@neetru/sdk 1.2.0 → 2.1.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +284 -244
  2. package/README.md +194 -194
  3. package/dist/auth.cjs +3740 -345
  4. package/dist/auth.cjs.map +1 -1
  5. package/dist/auth.d.cts +5 -1
  6. package/dist/auth.d.ts +5 -1
  7. package/dist/auth.mjs +3740 -345
  8. package/dist/auth.mjs.map +1 -1
  9. package/dist/catalog.cjs.map +1 -1
  10. package/dist/catalog.d.cts +5 -1
  11. package/dist/catalog.d.ts +5 -1
  12. package/dist/catalog.mjs.map +1 -1
  13. package/dist/checkout.cjs.map +1 -1
  14. package/dist/checkout.d.cts +5 -1
  15. package/dist/checkout.d.ts +5 -1
  16. package/dist/checkout.mjs.map +1 -1
  17. package/dist/collection-ref-BBvTTXoG.d.cts +423 -0
  18. package/dist/collection-ref-BBvTTXoG.d.ts +423 -0
  19. package/dist/db-react.cjs +136 -0
  20. package/dist/db-react.cjs.map +1 -0
  21. package/dist/db-react.d.cts +99 -0
  22. package/dist/db-react.d.ts +99 -0
  23. package/dist/db-react.mjs +112 -0
  24. package/dist/db-react.mjs.map +1 -0
  25. package/dist/db.cjs +3599 -131
  26. package/dist/db.cjs.map +1 -1
  27. package/dist/db.d.cts +5 -8
  28. package/dist/db.d.ts +5 -8
  29. package/dist/db.mjs +3596 -131
  30. package/dist/db.mjs.map +1 -1
  31. package/dist/entitlements.cjs.map +1 -1
  32. package/dist/entitlements.d.cts +5 -1
  33. package/dist/entitlements.d.ts +5 -1
  34. package/dist/entitlements.mjs.map +1 -1
  35. package/dist/errors.cjs.map +1 -1
  36. package/dist/errors.mjs.map +1 -1
  37. package/dist/index.cjs +3957 -342
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +13 -6
  40. package/dist/index.d.ts +13 -6
  41. package/dist/index.mjs +3877 -263
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/mocks.cjs +183 -7
  44. package/dist/mocks.cjs.map +1 -1
  45. package/dist/mocks.d.cts +18 -5
  46. package/dist/mocks.d.ts +18 -5
  47. package/dist/mocks.mjs +183 -7
  48. package/dist/mocks.mjs.map +1 -1
  49. package/dist/notifications.cjs.map +1 -1
  50. package/dist/notifications.d.cts +5 -1
  51. package/dist/notifications.d.ts +5 -1
  52. package/dist/notifications.mjs.map +1 -1
  53. package/dist/react.cjs.map +1 -1
  54. package/dist/react.d.cts +5 -1
  55. package/dist/react.d.ts +5 -1
  56. package/dist/react.mjs.map +1 -1
  57. package/dist/support.cjs.map +1 -1
  58. package/dist/support.d.cts +5 -1
  59. package/dist/support.d.ts +5 -1
  60. package/dist/support.mjs.map +1 -1
  61. package/dist/telemetry.cjs.map +1 -1
  62. package/dist/telemetry.d.cts +5 -1
  63. package/dist/telemetry.d.ts +5 -1
  64. package/dist/telemetry.mjs.map +1 -1
  65. package/dist/types-B1jylbMC.d.ts +1364 -0
  66. package/dist/types-Kmt4y1FQ.d.cts +1364 -0
  67. package/dist/usage.cjs.map +1 -1
  68. package/dist/usage.d.cts +5 -1
  69. package/dist/usage.d.ts +5 -1
  70. package/dist/usage.mjs.map +1 -1
  71. package/dist/webhooks.cjs.map +1 -1
  72. package/dist/webhooks.d.cts +5 -1
  73. package/dist/webhooks.d.ts +5 -1
  74. package/dist/webhooks.mjs.map +1 -1
  75. package/package.json +133 -111
  76. package/dist/types-CQAfwqUS.d.cts +0 -654
  77. package/dist/types-CQAfwqUS.d.ts +0 -654
package/dist/index.d.cts CHANGED
@@ -1,21 +1,28 @@
1
- import { N as NeetruClientConfig, a as NeetruClient } from './types-CQAfwqUS.cjs';
2
- export { A as AuthNamespace, b as AuthStateListener, C as CatalogListOptions, c as CatalogListResponse, d as CheckoutIntentInfo, e as CheckoutIntentStatus, f as CheckoutNamespace, g as CheckoutStartInput, h as CheckoutStartResult, i as CheckoutTenantType, j as CreateTicketInput, D as DEFAULT_BASE_URL, k as DbCollectionRef, l as DbListOptions, m as DbNamespace, n as DbWhereFilter, E as EntitlementCheck, L as ListNotificationsOptions, M as MockCheckout, o as MockNotifications, p as MockWebhooks, q as NeetruEnv, r as NeetruUser, s as NotificationsNamespace, P as Product, t as ProductNotification, u as ProductNotificationSeverity, v as ProductPlan, w as ProductStatus, R as RegisterWebhookInput, x as ResolvedConfig, S as SendNotificationInput, y as SignInOptions, z as SupportNamespace, B as SupportSeverity, F as SupportStatus, G as SupportTicket, T as TelemetryEventAck, H as TelemetryEventInput, U as UsageEventInput, I as UsageNamespace, J as UsageQuota, W as WebhookEndpoint, K as WebhookEvent, O as WebhookTestResult, Q as WebhooksNamespace, V as createCheckoutNamespace, X as createNotificationsNamespace, Y as createWebhooksNamespace } from './types-CQAfwqUS.cjs';
1
+ import { o as NeetruClientConfig, N as NeetruClient } from './types-Kmt4y1FQ.cjs';
2
+ export { A as AuthNamespace, a as AuthStateListener, C as CatalogListOptions, b as CatalogListResponse, c as CheckoutIntentInfo, d as CheckoutIntentStatus, e as CheckoutNamespace, f as CheckoutStartInput, g as CheckoutStartResult, h as CheckoutTenantType, i as CreateTicketInput, D as DEFAULT_BASE_URL, j as DbNamespace, k as DbSqlLease, l as DbWhereFilter, E as EntitlementCheck, L as ListNotificationsOptions, M as MockCheckout, m as MockNotifications, n as MockWebhooks, p as NeetruDb, q as NeetruDbEngine, r as NeetruDbError, s as NeetruDbErrorCode, t as NeetruDbOptions, u as NeetruEnv, v as NeetruSqlClient, w as NeetruUser, x as NotificationsNamespace, P as Product, y as ProductNotification, z as ProductNotificationSeverity, B as ProductPlan, F as ProductStatus, R as RegisterWebhookInput, G as ResolvedConfig, S as SendNotificationInput, H as SignInOptions, J as SupportNamespace, K as SupportSeverity, O as SupportStatus, Q as SupportTicket, T as TelemetryEventAck, U as TelemetryEventInput, X as UsageEventInput, Y as UsageNamespace, Z as UsageQuota, _ as WebhookEndpoint, $ as WebhookEvent, a0 as WebhookTestResult, a1 as WebhooksNamespace, a2 as createCheckoutNamespace, a3 as createNeetruDb, a4 as createNotificationsNamespace, a6 as createWebhooksNamespace } from './types-Kmt4y1FQ.cjs';
3
3
  export { createNeetruClient } from './auth.cjs';
4
4
  export { NeetruError, NeetruErrorCode } from './errors.cjs';
5
+ export { D as DbBatchOp, b as DbChangeType, c as DbCollectionRef, d as DbDoc, e as DbDocRef, f as DbGetResult, g as DbListResult, h as DbQuery } from './collection-ref-BBvTTXoG.cjs';
5
6
  export { DEV_FIXTURE_USER, MockAuth, MockDb, MockEntitlements, MockSupport, MockUsage } from './mocks.cjs';
7
+ import '@neetru/realtime-protocol';
8
+ import 'drizzle-orm/node-postgres';
6
9
 
7
10
  /** Versão do SDK — exportada explicitamente pra detecção em runtime. */
8
- declare const VERSION: "1.2.0";
11
+ declare const VERSION: "2.0.0";
9
12
 
10
13
  /**
11
- * @deprecated Use `createNeetruClient` em vez de `initNeetru`. Mantido por
12
- * compat com v0.0.1; **será removido em v2.0.0**.
14
+ * @deprecated REMOVIDO em v2.0.0. Use `createNeetruClient`.
15
+ *
16
+ * Este stub mantém compatibilidade com código que ainda importa `initNeetru`
17
+ * mas lança erro em runtime para forçar a migração.
18
+ *
19
+ * **Migração:** substitua `initNeetru(config)` por `createNeetruClient(config)`.
13
20
  */
14
21
  declare function initNeetru(config: NeetruClientConfig & {
15
22
  apiUrl?: string;
16
23
  }): NeetruClient;
17
24
  /**
18
- * @deprecated Use `NeetruClientConfig`. Será removido em v2.0.0.
25
+ * @deprecated REMOVIDO em v2.0.0. Use `NeetruClientConfig`.
19
26
  */
20
27
  type NeetruConfig = NeetruClientConfig & {
21
28
  apiUrl?: string;
package/dist/index.d.ts CHANGED
@@ -1,21 +1,28 @@
1
- import { N as NeetruClientConfig, a as NeetruClient } from './types-CQAfwqUS.js';
2
- export { A as AuthNamespace, b as AuthStateListener, C as CatalogListOptions, c as CatalogListResponse, d as CheckoutIntentInfo, e as CheckoutIntentStatus, f as CheckoutNamespace, g as CheckoutStartInput, h as CheckoutStartResult, i as CheckoutTenantType, j as CreateTicketInput, D as DEFAULT_BASE_URL, k as DbCollectionRef, l as DbListOptions, m as DbNamespace, n as DbWhereFilter, E as EntitlementCheck, L as ListNotificationsOptions, M as MockCheckout, o as MockNotifications, p as MockWebhooks, q as NeetruEnv, r as NeetruUser, s as NotificationsNamespace, P as Product, t as ProductNotification, u as ProductNotificationSeverity, v as ProductPlan, w as ProductStatus, R as RegisterWebhookInput, x as ResolvedConfig, S as SendNotificationInput, y as SignInOptions, z as SupportNamespace, B as SupportSeverity, F as SupportStatus, G as SupportTicket, T as TelemetryEventAck, H as TelemetryEventInput, U as UsageEventInput, I as UsageNamespace, J as UsageQuota, W as WebhookEndpoint, K as WebhookEvent, O as WebhookTestResult, Q as WebhooksNamespace, V as createCheckoutNamespace, X as createNotificationsNamespace, Y as createWebhooksNamespace } from './types-CQAfwqUS.js';
1
+ import { o as NeetruClientConfig, N as NeetruClient } from './types-B1jylbMC.js';
2
+ export { A as AuthNamespace, a as AuthStateListener, C as CatalogListOptions, b as CatalogListResponse, c as CheckoutIntentInfo, d as CheckoutIntentStatus, e as CheckoutNamespace, f as CheckoutStartInput, g as CheckoutStartResult, h as CheckoutTenantType, i as CreateTicketInput, D as DEFAULT_BASE_URL, j as DbNamespace, k as DbSqlLease, l as DbWhereFilter, E as EntitlementCheck, L as ListNotificationsOptions, M as MockCheckout, m as MockNotifications, n as MockWebhooks, p as NeetruDb, q as NeetruDbEngine, r as NeetruDbError, s as NeetruDbErrorCode, t as NeetruDbOptions, u as NeetruEnv, v as NeetruSqlClient, w as NeetruUser, x as NotificationsNamespace, P as Product, y as ProductNotification, z as ProductNotificationSeverity, B as ProductPlan, F as ProductStatus, R as RegisterWebhookInput, G as ResolvedConfig, S as SendNotificationInput, H as SignInOptions, J as SupportNamespace, K as SupportSeverity, O as SupportStatus, Q as SupportTicket, T as TelemetryEventAck, U as TelemetryEventInput, X as UsageEventInput, Y as UsageNamespace, Z as UsageQuota, _ as WebhookEndpoint, $ as WebhookEvent, a0 as WebhookTestResult, a1 as WebhooksNamespace, a2 as createCheckoutNamespace, a3 as createNeetruDb, a4 as createNotificationsNamespace, a6 as createWebhooksNamespace } from './types-B1jylbMC.js';
3
3
  export { createNeetruClient } from './auth.js';
4
4
  export { NeetruError, NeetruErrorCode } from './errors.js';
5
+ export { D as DbBatchOp, b as DbChangeType, c as DbCollectionRef, d as DbDoc, e as DbDocRef, f as DbGetResult, g as DbListResult, h as DbQuery } from './collection-ref-BBvTTXoG.js';
5
6
  export { DEV_FIXTURE_USER, MockAuth, MockDb, MockEntitlements, MockSupport, MockUsage } from './mocks.js';
7
+ import '@neetru/realtime-protocol';
8
+ import 'drizzle-orm/node-postgres';
6
9
 
7
10
  /** Versão do SDK — exportada explicitamente pra detecção em runtime. */
8
- declare const VERSION: "1.2.0";
11
+ declare const VERSION: "2.0.0";
9
12
 
10
13
  /**
11
- * @deprecated Use `createNeetruClient` em vez de `initNeetru`. Mantido por
12
- * compat com v0.0.1; **será removido em v2.0.0**.
14
+ * @deprecated REMOVIDO em v2.0.0. Use `createNeetruClient`.
15
+ *
16
+ * Este stub mantém compatibilidade com código que ainda importa `initNeetru`
17
+ * mas lança erro em runtime para forçar a migração.
18
+ *
19
+ * **Migração:** substitua `initNeetru(config)` por `createNeetruClient(config)`.
13
20
  */
14
21
  declare function initNeetru(config: NeetruClientConfig & {
15
22
  apiUrl?: string;
16
23
  }): NeetruClient;
17
24
  /**
18
- * @deprecated Use `NeetruClientConfig`. Será removido em v2.0.0.
25
+ * @deprecated REMOVIDO em v2.0.0. Use `NeetruClientConfig`.
19
26
  */
20
27
  type NeetruConfig = NeetruClientConfig & {
21
28
  apiUrl?: string;