@neetru/sdk 2.3.6 → 3.0.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 +185 -0
- package/README.md +84 -22
- package/dist/auth.cjs +360 -140
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +1 -2
- package/dist/auth.d.ts +1 -2
- package/dist/auth.mjs +360 -140
- package/dist/auth.mjs.map +1 -1
- package/dist/catalog.cjs +21 -2
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +1 -2
- package/dist/catalog.d.ts +1 -2
- package/dist/catalog.mjs +21 -2
- package/dist/catalog.mjs.map +1 -1
- package/dist/checkout.cjs +21 -2
- package/dist/checkout.cjs.map +1 -1
- package/dist/checkout.d.cts +1 -2
- package/dist/checkout.d.ts +1 -2
- package/dist/checkout.mjs +21 -2
- package/dist/checkout.mjs.map +1 -1
- package/dist/db.cjs +28 -3
- package/dist/db.cjs.map +1 -1
- package/dist/db.d.cts +1 -2
- package/dist/db.d.ts +1 -2
- package/dist/db.mjs +28 -3
- package/dist/db.mjs.map +1 -1
- package/dist/entitlements.cjs +21 -2
- package/dist/entitlements.cjs.map +1 -1
- package/dist/entitlements.d.cts +1 -2
- package/dist/entitlements.d.ts +1 -2
- package/dist/entitlements.mjs +21 -2
- package/dist/entitlements.mjs.map +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +3 -1
- package/dist/errors.d.ts +3 -1
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +408 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -20
- package/dist/index.d.ts +31 -20
- package/dist/index.mjs +408 -146
- package/dist/index.mjs.map +1 -1
- package/dist/mocks.cjs +33 -33
- package/dist/mocks.cjs.map +1 -1
- package/dist/mocks.d.cts +23 -20
- package/dist/mocks.d.ts +23 -20
- package/dist/mocks.mjs +33 -33
- package/dist/mocks.mjs.map +1 -1
- package/dist/notifications.cjs +80 -14
- package/dist/notifications.cjs.map +1 -1
- package/dist/notifications.d.cts +1 -2
- package/dist/notifications.d.ts +1 -2
- package/dist/notifications.mjs +80 -14
- package/dist/notifications.mjs.map +1 -1
- package/dist/react.d.cts +1 -2
- package/dist/react.d.ts +1 -2
- package/dist/support.cjs +72 -12
- package/dist/support.cjs.map +1 -1
- package/dist/support.d.cts +1 -2
- package/dist/support.d.ts +1 -2
- package/dist/support.mjs +72 -12
- package/dist/support.mjs.map +1 -1
- package/dist/telemetry.cjs +23 -4
- package/dist/telemetry.cjs.map +1 -1
- package/dist/telemetry.d.cts +1 -2
- package/dist/telemetry.d.ts +1 -2
- package/dist/telemetry.mjs +23 -4
- package/dist/telemetry.mjs.map +1 -1
- package/dist/{types-CSC-RIdS.d.ts → types-DALIhcbq.d.ts} +130 -74
- package/dist/{types-sGGN1vkg.d.cts → types-Lfd3LiAF.d.cts} +130 -74
- package/dist/usage.cjs +57 -63
- package/dist/usage.cjs.map +1 -1
- package/dist/usage.d.cts +1 -2
- package/dist/usage.d.ts +1 -2
- package/dist/usage.mjs +57 -63
- package/dist/usage.mjs.map +1 -1
- package/dist/webhooks.cjs +110 -33
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.d.cts +1 -2
- package/dist/webhooks.d.ts +1 -2
- package/dist/webhooks.mjs +110 -33
- package/dist/webhooks.mjs.map +1 -1
- package/package.json +2 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { c as DbCollectionRef$1, S as SyncState, U as Unsubscribe, C as ConflictRecord, R as RealtimeTransport } from './collection-ref-DqAAhuhX.js';
|
|
2
|
-
import { DbQuery, DeltaFrame } from '@neetru/realtime-protocol';
|
|
3
2
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
4
3
|
import { NeetruError } from './errors.js';
|
|
5
4
|
|
|
@@ -104,6 +103,11 @@ interface ProductNotification {
|
|
|
104
103
|
dismissedAt?: string;
|
|
105
104
|
}
|
|
106
105
|
interface SendNotificationInput {
|
|
106
|
+
/**
|
|
107
|
+
* **3.0 (breaking):** productId é obrigatório (Core valida via Zod). Default
|
|
108
|
+
* resolve do `config.productId`; lança `validation_failed` se ausente.
|
|
109
|
+
*/
|
|
110
|
+
productId?: string;
|
|
107
111
|
userId: string;
|
|
108
112
|
kind: string;
|
|
109
113
|
title: string;
|
|
@@ -118,6 +122,11 @@ interface SendNotificationInput {
|
|
|
118
122
|
fingerprint?: string;
|
|
119
123
|
}
|
|
120
124
|
interface ListNotificationsOptions {
|
|
125
|
+
/**
|
|
126
|
+
* **3.0 (breaking):** productId é obrigatório no Core. Default resolve do
|
|
127
|
+
* `config.productId`.
|
|
128
|
+
*/
|
|
129
|
+
productId?: string;
|
|
121
130
|
/** Inclui notificações dismissed (default false). */
|
|
122
131
|
includeDismissed?: boolean;
|
|
123
132
|
/** Filtro por unread. */
|
|
@@ -125,17 +134,21 @@ interface ListNotificationsOptions {
|
|
|
125
134
|
/** Máx itens (default 50, máx 200). */
|
|
126
135
|
limit?: number;
|
|
127
136
|
}
|
|
137
|
+
/** 3.0: scope option pra markRead/dismiss (productId obrigatório no Core). */
|
|
138
|
+
interface NotificationScopeOptions {
|
|
139
|
+
productId?: string;
|
|
140
|
+
}
|
|
128
141
|
interface NotificationsNamespace {
|
|
129
142
|
/** Produto envia uma notificação pra um usuário do produto. */
|
|
130
143
|
send(input: SendNotificationInput): Promise<ProductNotification>;
|
|
131
144
|
/** Lista notificações de um usuário. */
|
|
132
145
|
list(userId: string, options?: ListNotificationsOptions): Promise<ProductNotification[]>;
|
|
133
146
|
/** Marca como lida. */
|
|
134
|
-
markRead(id: string): Promise<{
|
|
147
|
+
markRead(id: string, options?: NotificationScopeOptions): Promise<{
|
|
135
148
|
ok: true;
|
|
136
149
|
}>;
|
|
137
150
|
/** Descarta. */
|
|
138
|
-
dismiss(id: string): Promise<{
|
|
151
|
+
dismiss(id: string, options?: NotificationScopeOptions): Promise<{
|
|
139
152
|
ok: true;
|
|
140
153
|
}>;
|
|
141
154
|
}
|
|
@@ -145,10 +158,10 @@ declare class MockNotifications implements NotificationsNamespace {
|
|
|
145
158
|
private nextId;
|
|
146
159
|
send(input: SendNotificationInput): Promise<ProductNotification>;
|
|
147
160
|
list(userId: string, options?: ListNotificationsOptions): Promise<ProductNotification[]>;
|
|
148
|
-
markRead(id: string): Promise<{
|
|
161
|
+
markRead(id: string, _options?: NotificationScopeOptions): Promise<{
|
|
149
162
|
ok: true;
|
|
150
163
|
}>;
|
|
151
|
-
dismiss(id: string): Promise<{
|
|
164
|
+
dismiss(id: string, _options?: NotificationScopeOptions): Promise<{
|
|
152
165
|
ok: true;
|
|
153
166
|
}>;
|
|
154
167
|
}
|
|
@@ -169,6 +182,12 @@ interface WebhookEndpoint {
|
|
|
169
182
|
createdAt: string;
|
|
170
183
|
}
|
|
171
184
|
interface RegisterWebhookInput {
|
|
185
|
+
/**
|
|
186
|
+
* **3.0 (breaking):** `productId` é obrigatório no body. Se ausente,
|
|
187
|
+
* SDK tenta resolver do `config.productId` (default no `createNeetruClient`);
|
|
188
|
+
* lança `validation_failed` se ambos faltarem.
|
|
189
|
+
*/
|
|
190
|
+
productId?: string;
|
|
172
191
|
url: string;
|
|
173
192
|
events: WebhookEvent[];
|
|
174
193
|
/**
|
|
@@ -184,53 +203,67 @@ interface WebhookTestResult {
|
|
|
184
203
|
durationMs?: number;
|
|
185
204
|
error?: string;
|
|
186
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* 3.0: opções de scoping — todos os verbos exigem `productId` (default do
|
|
208
|
+
* `config.productId` se ausente).
|
|
209
|
+
*/
|
|
210
|
+
interface WebhookScopeOptions {
|
|
211
|
+
productId?: string;
|
|
212
|
+
}
|
|
187
213
|
interface WebhooksNamespace {
|
|
188
214
|
/** Registra um novo endpoint. */
|
|
189
215
|
register(input: RegisterWebhookInput): Promise<WebhookEndpoint>;
|
|
190
216
|
/** Lista endpoints registrados pelo produto. */
|
|
191
|
-
list(): Promise<WebhookEndpoint[]>;
|
|
217
|
+
list(options?: WebhookScopeOptions): Promise<WebhookEndpoint[]>;
|
|
192
218
|
/** Remove um endpoint. */
|
|
193
|
-
unregister(id: string): Promise<{
|
|
219
|
+
unregister(id: string, options?: WebhookScopeOptions): Promise<{
|
|
194
220
|
ok: true;
|
|
195
221
|
}>;
|
|
196
222
|
/** Dispara evento de teste pra validar conectividade. */
|
|
197
|
-
test(id: string): Promise<WebhookTestResult>;
|
|
223
|
+
test(id: string, options?: WebhookScopeOptions): Promise<WebhookTestResult>;
|
|
198
224
|
}
|
|
199
225
|
/**
|
|
200
226
|
* Verifica assinatura HMAC SHA-256 de payload de webhook recebido pelo
|
|
201
|
-
* produto consumer.
|
|
227
|
+
* produto consumer. **3.0**: Universal (browser/Node/Edge) via WebCrypto.subtle.
|
|
202
228
|
*
|
|
203
|
-
*
|
|
229
|
+
* Constant-time compare via byte-level XOR accumulator (não usa
|
|
230
|
+
* `timingSafeEqual` do Node porque WebCrypto não tem equivalente direto).
|
|
231
|
+
*
|
|
232
|
+
* @param payload Corpo cru da request (string ou Uint8Array). NÃO use o objeto
|
|
204
233
|
* parseado — JSON.stringify pode diferir do que foi assinado.
|
|
205
234
|
* @param signature Header `X-Neetru-Signature` recebido (formato `sha256=<hex>`).
|
|
206
235
|
* @param secret Secret registrado em `webhooks.register({ secret })`.
|
|
207
|
-
* @returns true se assinatura confere, false caso contrário.
|
|
236
|
+
* @returns Promise<boolean> — true se assinatura confere, false caso contrário.
|
|
208
237
|
*
|
|
209
238
|
* @example
|
|
210
239
|
* ```ts
|
|
211
|
-
* //
|
|
212
|
-
*
|
|
213
|
-
* const
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* }
|
|
217
|
-
* const event = JSON.parse(
|
|
240
|
+
* // Next.js Route Handler (Edge ou Node runtime — funciona em ambos)
|
|
241
|
+
* export async function POST(req: Request) {
|
|
242
|
+
* const raw = await req.text();
|
|
243
|
+
* const sig = req.headers.get('X-Neetru-Signature');
|
|
244
|
+
* const ok = await verifyWebhookSignature(raw, sig, process.env.NEETRU_WEBHOOK_SECRET!);
|
|
245
|
+
* if (!ok) return new Response('unauthorized', { status: 401 });
|
|
246
|
+
* const event = JSON.parse(raw);
|
|
218
247
|
* // ... handle event
|
|
219
|
-
*
|
|
220
|
-
* }
|
|
248
|
+
* return Response.json({ ok: true });
|
|
249
|
+
* }
|
|
221
250
|
* ```
|
|
251
|
+
*
|
|
252
|
+
* @throws NeetruError('runtime_unsupported') se runtime não expõe WebCrypto.
|
|
253
|
+
* Não retorna `false` silencioso — caller precisa distinguir "assinatura
|
|
254
|
+
* inválida" (return false) de "ambiente não suporta" (throw).
|
|
222
255
|
*/
|
|
223
|
-
declare function verifyWebhookSignature(payload: string | Uint8Array, signature: string | null | undefined, secret: string): boolean
|
|
256
|
+
declare function verifyWebhookSignature(payload: string | Uint8Array, signature: string | null | undefined, secret: string): Promise<boolean>;
|
|
224
257
|
declare function createWebhooksNamespace(config: ResolvedConfig): WebhooksNamespace;
|
|
225
258
|
declare class MockWebhooks implements WebhooksNamespace {
|
|
226
259
|
private endpoints;
|
|
227
260
|
private nextId;
|
|
228
261
|
register(input: RegisterWebhookInput): Promise<WebhookEndpoint>;
|
|
229
|
-
list(): Promise<WebhookEndpoint[]>;
|
|
230
|
-
unregister(id: string): Promise<{
|
|
262
|
+
list(_options?: WebhookScopeOptions): Promise<WebhookEndpoint[]>;
|
|
263
|
+
unregister(id: string, _options?: WebhookScopeOptions): Promise<{
|
|
231
264
|
ok: true;
|
|
232
265
|
}>;
|
|
233
|
-
test(id: string): Promise<WebhookTestResult>;
|
|
266
|
+
test(id: string, _options?: WebhookScopeOptions): Promise<WebhookTestResult>;
|
|
234
267
|
}
|
|
235
268
|
|
|
236
269
|
/**
|
|
@@ -290,29 +323,25 @@ declare class NeetruDbError extends NeetruError {
|
|
|
290
323
|
constructor(code: NeetruDbErrorCode, message: string, dbId?: string);
|
|
291
324
|
}
|
|
292
325
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
* - InboundFrame (alias de DeltaFrame)
|
|
313
|
-
* Os aliases preservam a API publica do cliente sem expor os nomes do gateway.
|
|
314
|
-
*/
|
|
315
|
-
|
|
326
|
+
declare const DELTA_OPS: readonly ["delta", "resync", "stale", "error", "pong", "drain"];
|
|
327
|
+
type DeltaOp = (typeof DELTA_OPS)[number];
|
|
328
|
+
interface DbQuery {
|
|
329
|
+
filter?: Record<string, unknown>;
|
|
330
|
+
limit?: number;
|
|
331
|
+
orderBy?: string;
|
|
332
|
+
orderDir?: 'asc' | 'desc';
|
|
333
|
+
}
|
|
334
|
+
interface DbChange {
|
|
335
|
+
type: string;
|
|
336
|
+
documentId: string;
|
|
337
|
+
data?: Record<string, unknown>;
|
|
338
|
+
}
|
|
339
|
+
interface DeltaFrame {
|
|
340
|
+
op: DeltaOp;
|
|
341
|
+
subscriptionId: string;
|
|
342
|
+
changes?: DbChange[];
|
|
343
|
+
reason?: string;
|
|
344
|
+
}
|
|
316
345
|
type InboundFrame = DeltaFrame;
|
|
317
346
|
type RealtimeQuery = DbQuery;
|
|
318
347
|
/**
|
|
@@ -560,7 +589,7 @@ interface SqlOptions {
|
|
|
560
589
|
* - Rotear frames inbound para o callback correto por `subscriptionId`.
|
|
561
590
|
* - Emitir mudanças de `ConnectionState` para observadores externos.
|
|
562
591
|
*
|
|
563
|
-
* Protocolo de frames (contrato
|
|
592
|
+
* Protocolo de frames (contrato inlined em `./types.ts` — MASTER-CRIT-038):
|
|
564
593
|
* ENVIA → `subscribe` | `unsubscribe` | `ping`
|
|
565
594
|
* RECEBE ← `delta` | `resync` | `stale` | `error` | `pong` | `drain`
|
|
566
595
|
*
|
|
@@ -1043,6 +1072,14 @@ interface NeetruClientConfig {
|
|
|
1043
1072
|
* Valores: `'rest'` | `'firestore'` | `'nosql-vm'`.
|
|
1044
1073
|
*/
|
|
1045
1074
|
db?: NeetruDbOptions;
|
|
1075
|
+
/**
|
|
1076
|
+
* 3.0 — hosts adicionais permitidos para `baseUrl`. Por default, SDK aceita
|
|
1077
|
+
* `*.neetru.com` HTTPS + localhost. Para apontar pra staging/proxy custom em
|
|
1078
|
+
* `https://meu-proxy.empresa.com`, adicione `['empresa.com']`.
|
|
1079
|
+
*
|
|
1080
|
+
* Bypass total: `NEETRU_ALLOW_INSECURE_BASEURL=1` no env.
|
|
1081
|
+
*/
|
|
1082
|
+
allowedHosts?: string[];
|
|
1046
1083
|
}
|
|
1047
1084
|
/**
|
|
1048
1085
|
* Status do produto no catálogo público.
|
|
@@ -1299,41 +1336,41 @@ interface VerifyTokenOptions {
|
|
|
1299
1336
|
*/
|
|
1300
1337
|
jwksCacheTtlMs?: number;
|
|
1301
1338
|
}
|
|
1339
|
+
/**
|
|
1340
|
+
* 3.0 BREAKING: `UsageEventInput` mantido só como tipo para tests/legacy
|
|
1341
|
+
* imports — não é mais retorno de método. `usage.track`/`usage.getQuota`
|
|
1342
|
+
* **REMOVIDOS** em 3.0. Use `usage.report(resource, qty, options)`.
|
|
1343
|
+
*/
|
|
1302
1344
|
interface UsageEventInput {
|
|
1303
|
-
/** Nome do evento, ex: `report_generated`, `api_call`. */
|
|
1304
1345
|
event: string;
|
|
1305
|
-
/** Atributos do evento. Valores primitivos serializáveis. */
|
|
1306
1346
|
properties?: Record<string, string | number | boolean | null>;
|
|
1307
|
-
/** Quantidade — default 1 (1 evento). Útil pra batch. */
|
|
1308
1347
|
quantity?: number;
|
|
1309
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* 3.0 BREAKING: `UsageQuota` mantido só para compat de imports. Não é mais
|
|
1351
|
+
* retorno de método ativo. `usage.report()` devolve `{value, limit, remaining}`
|
|
1352
|
+
* inline; `usage.check()` devolve detalhes do entitlement.
|
|
1353
|
+
*/
|
|
1310
1354
|
interface UsageQuota {
|
|
1311
1355
|
metric: string;
|
|
1312
|
-
/** Quantidade já consumida no período. */
|
|
1313
1356
|
used: number;
|
|
1314
|
-
/** Limite total. -1 = unlimited. */
|
|
1315
1357
|
limit: number;
|
|
1316
|
-
/** ISO timestamp do reset (próximo período). */
|
|
1317
1358
|
resetsAt?: string;
|
|
1318
|
-
/** Plano que define o limite. */
|
|
1319
1359
|
plan?: string;
|
|
1320
1360
|
}
|
|
1361
|
+
/**
|
|
1362
|
+
* 3.0 — superfície limpa: `report` (POST metered) + `check` (GET entitlement).
|
|
1363
|
+
*
|
|
1364
|
+
* Métodos removidos vs 2.x:
|
|
1365
|
+
* - `track(event, props)` — vaporware contra Core. Use `report()`.
|
|
1366
|
+
* - `getQuota(metric)` — endpoint nunca existiu. `report()` devolve quota.
|
|
1367
|
+
*/
|
|
1321
1368
|
interface UsageNamespace {
|
|
1322
|
-
/** Persiste um evento de uso. Mock em dev, POST `/sdk/v1/usage/record` em prod. */
|
|
1323
|
-
track(event: string, props?: UsageEventInput['properties']): Promise<{
|
|
1324
|
-
ok: true;
|
|
1325
|
-
}>;
|
|
1326
|
-
/** Lê quota atual de uma métrica. Mock em dev, GET `/sdk/v1/usage/quota` em prod. */
|
|
1327
|
-
getQuota(metric: string): Promise<UsageQuota>;
|
|
1328
1369
|
/**
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1370
|
+
* Reporta consumo metered. Incrementa `usage_counters` no Core atomicamente.
|
|
1371
|
+
* Idempotency-Key gerado por chamada (defesa anti-dup em retry transient).
|
|
1331
1372
|
*
|
|
1332
|
-
*
|
|
1333
|
-
* `usage_counters/{tenantId}_{productId}_{resource}_{yyyymm}` atomicamente.
|
|
1334
|
-
*
|
|
1335
|
-
* `productId`/`tenantId` são lidos do contexto resolvido do client se
|
|
1336
|
-
* ausentes nas options.
|
|
1373
|
+
* `productId`/`tenantId` lidos do contexto do client se ausentes nas options.
|
|
1337
1374
|
*/
|
|
1338
1375
|
report(resource: string, qty?: number, options?: {
|
|
1339
1376
|
productId?: string;
|
|
@@ -1347,8 +1384,9 @@ interface UsageNamespace {
|
|
|
1347
1384
|
status?: string;
|
|
1348
1385
|
}>;
|
|
1349
1386
|
/**
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1387
|
+
* Verifica entitlement de um resource/feature. GET cacheável (HTTP 60s).
|
|
1388
|
+
* Resposta inclui `allowed`, `reason`, `remaining`, `limit`, `planId`,
|
|
1389
|
+
* `planFeatures` e `behavior` ('readonly' quando limit_exceeded).
|
|
1352
1390
|
*/
|
|
1353
1391
|
check(resource: string, options?: {
|
|
1354
1392
|
productId?: string;
|
|
@@ -1360,6 +1398,7 @@ interface UsageNamespace {
|
|
|
1360
1398
|
limit?: number;
|
|
1361
1399
|
planId?: string | null;
|
|
1362
1400
|
planFeatures?: string[];
|
|
1401
|
+
behavior?: 'readonly' | null;
|
|
1363
1402
|
}>;
|
|
1364
1403
|
}
|
|
1365
1404
|
/**
|
|
@@ -1427,12 +1466,29 @@ interface CreateTicketInput {
|
|
|
1427
1466
|
message: string;
|
|
1428
1467
|
severity?: SupportSeverity;
|
|
1429
1468
|
productSlug?: string;
|
|
1469
|
+
/**
|
|
1470
|
+
* **L-05 fix (Opus review 2026-05-27):** metadata opcional (Core já aceita
|
|
1471
|
+
* via `metadata: z.record(...)` no Zod). Útil pra anexar contexto como
|
|
1472
|
+
* `{ orderId, userAgent, route, sessionId }` sem inflar subject/message.
|
|
1473
|
+
*
|
|
1474
|
+
* Chaves limitadas a 64 chars; valores primitive (string/number/boolean/null).
|
|
1475
|
+
*/
|
|
1476
|
+
metadata?: Record<string, string | number | boolean | null>;
|
|
1430
1477
|
}
|
|
1431
1478
|
interface SupportNamespace {
|
|
1432
|
-
/**
|
|
1479
|
+
/**
|
|
1480
|
+
* Cria um novo ticket. **3.0**: POST `/api/sdk/v1/support/tickets`
|
|
1481
|
+
* (canonical, requer `productId` no body — default `config.productId`).
|
|
1482
|
+
* Mock em dev.
|
|
1483
|
+
*/
|
|
1433
1484
|
createTicket(input: CreateTicketInput): Promise<SupportTicket>;
|
|
1434
|
-
/**
|
|
1435
|
-
|
|
1485
|
+
/**
|
|
1486
|
+
* Lista meus tickets abertos. **3.0**: GET `/api/sdk/v1/support/tickets?productId=...`
|
|
1487
|
+
* (canonical). `options.productSlug` override do `config.productId` default.
|
|
1488
|
+
*/
|
|
1489
|
+
listMyTickets(options?: {
|
|
1490
|
+
productSlug?: string;
|
|
1491
|
+
}): Promise<SupportTicket[]>;
|
|
1436
1492
|
}
|
|
1437
1493
|
/**
|
|
1438
1494
|
* Modo do SDK. `dev` ativa mocks automáticos (úteis pra testes e
|
|
@@ -1459,4 +1515,4 @@ interface CatalogListOptions {
|
|
|
1459
1515
|
includeDrafts?: boolean;
|
|
1460
1516
|
}
|
|
1461
1517
|
|
|
1462
|
-
export { type
|
|
1518
|
+
export { type UsageQuota as $, type AuthNamespace as A, type ProductNotification as B, type CatalogListOptions as C, DEFAULT_BASE_URL as D, type EntitlementCheck as E, type ProductNotificationSeverity as F, type ProductPlan as G, type ProductStatus as H, type ResolvedConfig as I, type SignInOptions as J, type SqlOptions as K, type ListNotificationsOptions as L, MockCheckout as M, type NeetruClient as N, type SupportNamespace as O, type Product as P, type SupportSeverity as Q, type RegisterWebhookInput as R, type SendNotificationInput as S, type SupportStatus as T, type SupportTicket as U, type TelemetryEventAck as V, type TelemetryEventInput as W, type TelemetryLogAck as X, type TelemetryLogInput as Y, type UsageEventInput as Z, type UsageNamespace as _, type AuthStateListener as a, type VerifyTokenOptions as a0, type WebhookEndpoint as a1, type WebhookEvent as a2, type WebhookScopeOptions as a3, type WebhookTestResult as a4, type WebhooksNamespace as a5, createCheckoutNamespace as a6, createNeetruDb as a7, createNotificationsNamespace as a8, createRestSyncTransport as a9, createWebhooksNamespace as aa, getWebSocketRealtimeClient as ab, verifyWebhookSignature as ac, type CatalogListResponse as b, type CheckoutIntentInfo as c, type CheckoutIntentStatus as d, type CheckoutNamespace as e, type CheckoutStartInput as f, type CheckoutStartResult as g, type CheckoutTenantType as h, type CreateTicketInput as i, type DbNamespace as j, type DbSqlLease as k, type DbWhereFilter as l, MockNotifications as m, MockWebhooks as n, type NeetruClientConfig as o, type NeetruDb as p, type NeetruDbEngine as q, NeetruDbError as r, type NeetruDbErrorCode as s, type NeetruDbOptions as t, type NeetruDbTransport as u, type NeetruEnv as v, type NeetruSqlClient as w, type NeetruUser as x, type NotificationScopeOptions as y, type NotificationsNamespace as z };
|