@neetru/sdk 1.1.1 → 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 (95) hide show
  1. package/CHANGELOG.md +284 -214
  2. package/README.md +194 -218
  3. package/dist/auth.cjs +4181 -346
  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 +4181 -346
  8. package/dist/auth.mjs.map +1 -1
  9. package/dist/catalog.cjs +63 -24
  10. package/dist/catalog.cjs.map +1 -1
  11. package/dist/catalog.d.cts +6 -2
  12. package/dist/catalog.d.ts +6 -2
  13. package/dist/catalog.mjs +63 -24
  14. package/dist/catalog.mjs.map +1 -1
  15. package/dist/checkout.cjs +60 -18
  16. package/dist/checkout.cjs.map +1 -1
  17. package/dist/checkout.d.cts +5 -1
  18. package/dist/checkout.d.ts +5 -1
  19. package/dist/checkout.mjs +60 -18
  20. package/dist/checkout.mjs.map +1 -1
  21. package/dist/collection-ref-BBvTTXoG.d.cts +423 -0
  22. package/dist/collection-ref-BBvTTXoG.d.ts +423 -0
  23. package/dist/db-react.cjs +136 -0
  24. package/dist/db-react.cjs.map +1 -0
  25. package/dist/db-react.d.cts +99 -0
  26. package/dist/db-react.d.ts +99 -0
  27. package/dist/db-react.mjs +112 -0
  28. package/dist/db-react.mjs.map +1 -0
  29. package/dist/db.cjs +3652 -143
  30. package/dist/db.cjs.map +1 -1
  31. package/dist/db.d.cts +5 -8
  32. package/dist/db.d.ts +5 -8
  33. package/dist/db.mjs +3649 -143
  34. package/dist/db.mjs.map +1 -1
  35. package/dist/entitlements.cjs +101 -24
  36. package/dist/entitlements.cjs.map +1 -1
  37. package/dist/entitlements.d.cts +15 -5
  38. package/dist/entitlements.d.ts +15 -5
  39. package/dist/entitlements.mjs +101 -24
  40. package/dist/entitlements.mjs.map +1 -1
  41. package/dist/errors.cjs.map +1 -1
  42. package/dist/errors.mjs.map +1 -1
  43. package/dist/index.cjs +4341 -282
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts +13 -6
  46. package/dist/index.d.ts +13 -6
  47. package/dist/index.mjs +4243 -189
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/mocks.cjs +186 -9
  50. package/dist/mocks.cjs.map +1 -1
  51. package/dist/mocks.d.cts +21 -6
  52. package/dist/mocks.d.ts +21 -6
  53. package/dist/mocks.mjs +186 -9
  54. package/dist/mocks.mjs.map +1 -1
  55. package/dist/notifications.cjs +296 -0
  56. package/dist/notifications.cjs.map +1 -0
  57. package/dist/notifications.d.cts +5 -0
  58. package/dist/notifications.d.ts +5 -0
  59. package/dist/notifications.mjs +293 -0
  60. package/dist/notifications.mjs.map +1 -0
  61. package/dist/react.cjs +7 -3
  62. package/dist/react.cjs.map +1 -1
  63. package/dist/react.d.cts +5 -1
  64. package/dist/react.d.ts +5 -1
  65. package/dist/react.mjs +7 -3
  66. package/dist/react.mjs.map +1 -1
  67. package/dist/support.cjs +60 -18
  68. package/dist/support.cjs.map +1 -1
  69. package/dist/support.d.cts +5 -1
  70. package/dist/support.d.ts +5 -1
  71. package/dist/support.mjs +60 -18
  72. package/dist/support.mjs.map +1 -1
  73. package/dist/telemetry.cjs +130 -19
  74. package/dist/telemetry.cjs.map +1 -1
  75. package/dist/telemetry.d.cts +21 -1
  76. package/dist/telemetry.d.ts +21 -1
  77. package/dist/telemetry.mjs +130 -19
  78. package/dist/telemetry.mjs.map +1 -1
  79. package/dist/types-B1jylbMC.d.ts +1364 -0
  80. package/dist/types-Kmt4y1FQ.d.cts +1364 -0
  81. package/dist/usage.cjs +60 -18
  82. package/dist/usage.cjs.map +1 -1
  83. package/dist/usage.d.cts +5 -1
  84. package/dist/usage.d.ts +5 -1
  85. package/dist/usage.mjs +60 -18
  86. package/dist/usage.mjs.map +1 -1
  87. package/dist/webhooks.cjs +316 -0
  88. package/dist/webhooks.cjs.map +1 -0
  89. package/dist/webhooks.d.cts +5 -0
  90. package/dist/webhooks.d.ts +5 -0
  91. package/dist/webhooks.mjs +312 -0
  92. package/dist/webhooks.mjs.map +1 -0
  93. package/package.json +133 -101
  94. package/dist/types-BA53dd8S.d.cts +0 -490
  95. package/dist/types-BA53dd8S.d.ts +0 -490
package/dist/index.d.cts CHANGED
@@ -1,21 +1,28 @@
1
- import { N as NeetruClientConfig, a as NeetruClient } from './types-BA53dd8S.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, M as MockCheckout, o as NeetruEnv, p as NeetruUser, P as Product, q as ProductPlan, r as ProductStatus, R as ResolvedConfig, S as SignInOptions, s as SupportNamespace, t as SupportSeverity, u as SupportStatus, v as SupportTicket, T as TelemetryEventAck, w as TelemetryEventInput, U as UsageEventInput, x as UsageNamespace, y as UsageQuota, z as createCheckoutNamespace } from './types-BA53dd8S.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.1.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-BA53dd8S.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, M as MockCheckout, o as NeetruEnv, p as NeetruUser, P as Product, q as ProductPlan, r as ProductStatus, R as ResolvedConfig, S as SignInOptions, s as SupportNamespace, t as SupportSeverity, u as SupportStatus, v as SupportTicket, T as TelemetryEventAck, w as TelemetryEventInput, U as UsageEventInput, x as UsageNamespace, y as UsageQuota, z as createCheckoutNamespace } from './types-BA53dd8S.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.1.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;