@terminal3/t3n-sdk 4.40.0 → 4.42.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/dist/index.d.ts CHANGED
@@ -2322,7 +2322,20 @@ interface ActivityReport {
2322
2322
  */
2323
2323
  next_seq: number | null;
2324
2324
  }
2325
- /** Params for one activity-report page. All optional; `{}` is valid. */
2325
+ /**
2326
+ * Params for one activity-report page. All optional; `{}` is valid.
2327
+ *
2328
+ * The row filters (`caller_type`, `outcome`, `did`, `contract`, `function`)
2329
+ * are AND-ed and applied node-side before the page is filled, so `limit` keeps
2330
+ * counting *matching* rows and the cursor keeps its meaning — page a filtered
2331
+ * report exactly as an unfiltered one, resending the same filters with every
2332
+ * `before_seq`. They narrow what comes back, not what the node scans, so short
2333
+ * and empty pages with a live `next_seq` are the normal case under a selective
2334
+ * filter.
2335
+ *
2336
+ * A field the node does not recognise is rejected (400) rather than ignored,
2337
+ * so a filter never silently widens a query back to the whole organisation.
2338
+ */
2326
2339
  interface GetActivityLogOptions {
2327
2340
  /** Window start, Unix ms, inclusive. Defaults to 0 (no lower bound). */
2328
2341
  from_ms?: number;
@@ -2341,6 +2354,31 @@ interface GetActivityLogOptions {
2341
2354
  * the node's own scan cap can trip first. See {@link ActivityReport.next_seq}.
2342
2355
  */
2343
2356
  limit?: number;
2357
+ /** Keep only calls made by an agent, or only those made by a human. */
2358
+ caller_type?: ActivityCallerType;
2359
+ /** Keep only calls that ended in this outcome. */
2360
+ outcome?: ActivityOutcome;
2361
+ /**
2362
+ * Keep only calls this DID took part in — as the {@link ActivityEntry.actor}
2363
+ * that ran them, or as the {@link ActivityEntry.on_behalf_of} owner they ran
2364
+ * for. Both sides match: "what did this agent do" and "what was done in my
2365
+ * name" are the same question from the two ends of one delegation.
2366
+ *
2367
+ * One whole `did:t3n:<40-hex>`. A partial DID is rejected rather than widened
2368
+ * into a prefix search, so a search box should send this only once it holds a
2369
+ * complete DID.
2370
+ */
2371
+ did?: string;
2372
+ /**
2373
+ * Keep only calls whose {@link ActivityEntry.contract} contains this
2374
+ * substring, compared case-insensitively. Must not be empty.
2375
+ */
2376
+ contract?: string;
2377
+ /**
2378
+ * Keep only calls whose {@link ActivityEntry.function} contains this
2379
+ * substring, compared case-insensitively. Must not be empty.
2380
+ */
2381
+ function?: string;
2344
2382
  }
2345
2383
 
2346
2384
  /**
@@ -2816,6 +2854,22 @@ declare class T3nClient {
2816
2854
  * cursor = page.next_seq ?? undefined;
2817
2855
  * } while (cursor !== undefined);
2818
2856
  * ```
2857
+ *
2858
+ * The optional row filters — `caller_type`, `outcome`, `did`, `contract`,
2859
+ * `function` — are AND-ed node-side and applied before the page is filled, so
2860
+ * they compose freely with each other and with the cursor. Resend the same
2861
+ * filters with every page; changing them mid-walk changes what the cursor
2862
+ * means. Because a filter narrows what comes back rather than what the node
2863
+ * scans, short and empty pages are the normal case — page until `next_seq` is
2864
+ * `null`.
2865
+ *
2866
+ * ```ts
2867
+ * // Everything one agent did, or had done in its name, that was refused.
2868
+ * const denied = await client.getActivityLog({
2869
+ * did: "did:t3n:8a2fbc8a2fbc8a2fbc8a2fbc8a2fbc8a2fbc8a2f",
2870
+ * outcome: "denied",
2871
+ * });
2872
+ * ```
2819
2873
  */
2820
2874
  getActivityLog(opts?: GetActivityLogOptions): Promise<ActivityReport>;
2821
2875
  /**