@lessly/sdk-app 75.0.0 → 76.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.
@@ -71146,7 +71146,13 @@ export type BrainClickupSpacesListOutput = {
71146
71146
  export interface BrainCognitionDigestInput {
71147
71147
  }
71148
71148
  export interface BrainCognitionDigestOutput {
71149
+ /**
71150
+ * Id of the queued run. The completion event carries the same `run_id`, which is how a waiting step ties the event back to this call; brain_cognition_status reports the same run.
71151
+ */
71149
71152
  run_id: string;
71153
+ /**
71154
+ * Always true — the run was queued. The call fails outright rather than reporting a false here.
71155
+ */
71150
71156
  accepted: true;
71151
71157
  }
71152
71158
  export interface BrainCognitionStatusInput {
@@ -71179,7 +71185,13 @@ export interface BrainCognitionStatusOutput {
71179
71185
  export interface BrainCognitionSweepInput {
71180
71186
  }
71181
71187
  export interface BrainCognitionSweepOutput {
71188
+ /**
71189
+ * Id of the queued run. The completion event carries the same `run_id`, which is how a waiting step ties the event back to this call; brain_cognition_status reports the same run.
71190
+ */
71182
71191
  run_id: string;
71192
+ /**
71193
+ * Always true — the run was queued. The call fails outright rather than reporting a false here.
71194
+ */
71183
71195
  accepted: true;
71184
71196
  }
71185
71197
  export interface BrainConnectorBranchesListInput {
@@ -71209,6 +71221,9 @@ export type BrainConnectorReposListOutput = {
71209
71221
  defaultBranch: string;
71210
71222
  }[];
71211
71223
  export interface BrainDaemonBatchStatusInput {
71224
+ /**
71225
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
71226
+ */
71212
71227
  id: string;
71213
71228
  }
71214
71229
  export interface BrainDaemonBatchStatusOutput {
@@ -71292,6 +71307,9 @@ export interface BrainDaemonCreateOutput {
71292
71307
  unmeasuredCount: number;
71293
71308
  }
71294
71309
  export interface BrainDaemonGetInput {
71310
+ /**
71311
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
71312
+ */
71295
71313
  id: string;
71296
71314
  }
71297
71315
  export interface BrainDaemonGetOutput {
@@ -71315,52 +71333,154 @@ export interface BrainDaemonGetOutput {
71315
71333
  unmeasuredCount: number;
71316
71334
  }
71317
71335
  export interface BrainDaemonReingestInput {
71336
+ /**
71337
+ * Id of the ingestion daemon that owns these documents, as returned by brain_daemons_list
71338
+ */
71318
71339
  id: string;
71319
71340
  /**
71341
+ * Source paths to re-ingest, exactly as the daemon recorded them (a repo path such as docs/spec.md, a Drive file id, a ClickUp item id). 1-100 per call.
71342
+ *
71320
71343
  * @minItems 1
71321
71344
  * @maxItems 100
71322
71345
  */
71323
71346
  paths: [string, ...(string)[]];
71324
71347
  }
71325
71348
  export interface BrainDaemonReingestOutput {
71349
+ /**
71350
+ * The run started to pick the cleared paths up — brain/daemon.run-completed for this id is what finishes the step. Null when no run was started (see triggered/triggerError).
71351
+ */
71352
+ runId: (string | null);
71353
+ /**
71354
+ * Paths whose ingest state was cleared, so the next run will read them again from scratch
71355
+ */
71326
71356
  cleared: string[];
71357
+ /**
71358
+ * Paths this daemon has no ingest record for — usually a typo, or a document it never ingested
71359
+ */
71327
71360
  notFound: string[];
71361
+ /**
71362
+ * True when a run was started to pick the cleared paths up; false when the daemon is paused, a run is already in flight, or nothing was eligible
71363
+ */
71328
71364
  triggered: boolean;
71365
+ /**
71366
+ * Why no run was started; absent when one was
71367
+ */
71329
71368
  triggerError?: string;
71369
+ /**
71370
+ * Paths left alone because they are in an unfinished batch; re-ask once that run has finished
71371
+ */
71330
71372
  skippedPending: string[];
71331
71373
  }
71332
71374
  export interface BrainDaemonRemoveInput {
71375
+ /**
71376
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
71377
+ */
71333
71378
  id: string;
71334
71379
  }
71335
71380
  export interface BrainDaemonRemoveOutput {
71336
71381
  ok: true;
71337
71382
  }
71338
71383
  export interface BrainDaemonRunInput {
71384
+ /**
71385
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
71386
+ */
71339
71387
  id: string;
71340
71388
  }
71341
71389
  export interface BrainDaemonRunOutput {
71390
+ /**
71391
+ * True once the run has finished, whether it succeeded or failed
71392
+ */
71342
71393
  done: boolean;
71394
+ /**
71395
+ * Id of the run being reported; null when this daemon has never run
71396
+ */
71343
71397
  runId: (string | null);
71398
+ /**
71399
+ * Where the run stands: 'queued' waiting to start, 'running' in progress, 'done' finished, 'failed' gave up, 'none' this daemon has never run
71400
+ */
71344
71401
  status: ("queued" | "running" | "done" | "failed" | "none");
71402
+ /**
71403
+ * Per-source progress as the connector reported it; the shape differs by connector type and is meant for display, not for binding a step to
71404
+ */
71345
71405
  sources: unknown[];
71406
+ /**
71407
+ * Document counts for the run; null when nothing has been counted yet
71408
+ */
71346
71409
  progress: ({
71347
- counts: BrainDaemonRunOutputCounts;
71410
+ /**
71411
+ * Totals for the whole run
71412
+ */
71413
+ counts: {
71414
+ /**
71415
+ * Documents that failed after retries — transient failures, worth re-running
71416
+ */
71417
+ error: number;
71418
+ /**
71419
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
71420
+ */
71421
+ denied: number;
71422
+ /**
71423
+ * Of those, how many were downloaded
71424
+ */
71425
+ fetched: number;
71426
+ /**
71427
+ * Of those, how many became memories
71428
+ */
71429
+ ingested: number;
71430
+ /**
71431
+ * Documents the run found at the source
71432
+ */
71433
+ discovered: number;
71434
+ /**
71435
+ * Documents skipped because their content had not changed since the last run
71436
+ */
71437
+ skippedUnchanged: number;
71438
+ };
71439
+ /**
71440
+ * The same totals split by source category; the keys are the connector's own (github: markdown/issues/pulls, clickup: tasks/comments/docs/chat, gdrive: files)
71441
+ */
71348
71442
  byCategory: {
71349
- [k: string]: BrainDaemonRunOutputCounts;
71443
+ [k: string]: {
71444
+ /**
71445
+ * Documents that failed after retries — transient failures, worth re-running
71446
+ */
71447
+ error: number;
71448
+ /**
71449
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
71450
+ */
71451
+ denied: number;
71452
+ /**
71453
+ * Of those, how many were downloaded
71454
+ */
71455
+ fetched: number;
71456
+ /**
71457
+ * Of those, how many became memories
71458
+ */
71459
+ ingested: number;
71460
+ /**
71461
+ * Documents the run found at the source
71462
+ */
71463
+ discovered: number;
71464
+ /**
71465
+ * Documents skipped because their content had not changed since the last run
71466
+ */
71467
+ skippedUnchanged: number;
71468
+ };
71350
71469
  };
71351
71470
  } | null);
71471
+ /**
71472
+ * Which lane the run went to: 'realtime' finishes in minutes, 'batch' queues the work with the model provider and can take hours
71473
+ */
71352
71474
  routedTo: ("realtime" | "batch");
71475
+ /**
71476
+ * True when this call actually started a run; false when one was already in flight and nothing new was started
71477
+ */
71353
71478
  triggered: boolean;
71479
+ /**
71480
+ * Why the run could not be started; absent when it was started
71481
+ */
71354
71482
  triggerError?: string;
71355
71483
  }
71356
- export interface BrainDaemonRunOutputCounts {
71357
- error: number;
71358
- denied: number;
71359
- fetched: number;
71360
- ingested: number;
71361
- discovered: number;
71362
- skippedUnchanged: number;
71363
- }
71364
71484
  export interface BrainDaemonRunItemsInput {
71365
71485
  limit?: number;
71366
71486
  runId: string;
@@ -71378,64 +71498,208 @@ export interface BrainDaemonRunItemsOutput {
71378
71498
  }[];
71379
71499
  runId: string;
71380
71500
  counts: {
71501
+ /**
71502
+ * Documents that failed after retries — transient failures, worth re-running
71503
+ */
71381
71504
  error: number;
71505
+ /**
71506
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
71507
+ */
71382
71508
  denied: number;
71509
+ /**
71510
+ * Of those, how many were downloaded
71511
+ */
71383
71512
  fetched: number;
71513
+ /**
71514
+ * Of those, how many became memories
71515
+ */
71384
71516
  ingested: number;
71517
+ /**
71518
+ * Documents the run found at the source
71519
+ */
71385
71520
  discovered: number;
71521
+ /**
71522
+ * Documents skipped because their content had not changed since the last run
71523
+ */
71386
71524
  skippedUnchanged: number;
71387
71525
  };
71388
71526
  nextCursor: (string | null);
71389
71527
  }
71390
71528
  export interface BrainDaemonRunsInput {
71529
+ /**
71530
+ * Id of the ingestion daemon whose run history to read, as returned by brain_daemons_list
71531
+ */
71391
71532
  id: string;
71533
+ /**
71534
+ * How many of the most recent runs to return (default 20, max 100)
71535
+ */
71392
71536
  limit?: number;
71393
71537
  }
71394
71538
  export interface BrainDaemonRunsOutput {
71539
+ /**
71540
+ * The most recent runs, newest first
71541
+ */
71395
71542
  runs: {
71543
+ /**
71544
+ * How the run was carried out: 'realtime' inline, 'batch' through the model provider's batch queue, 'reclaimed' a stalled run closed out by the janitor
71545
+ */
71396
71546
  lane: ("realtime" | "batch" | "reclaimed");
71547
+ /**
71548
+ * Id of this run
71549
+ */
71397
71550
  runId: string;
71551
+ /**
71552
+ * Document counts for this run
71553
+ */
71398
71554
  counts: {
71555
+ /**
71556
+ * Documents that failed after retries — transient failures, worth re-running
71557
+ */
71399
71558
  error: number;
71559
+ /**
71560
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
71561
+ */
71400
71562
  denied: number;
71563
+ /**
71564
+ * Of those, how many were downloaded
71565
+ */
71401
71566
  fetched: number;
71567
+ /**
71568
+ * Of those, how many became memories
71569
+ */
71402
71570
  ingested: number;
71571
+ /**
71572
+ * Documents the run found at the source
71573
+ */
71403
71574
  discovered: number;
71575
+ /**
71576
+ * Documents skipped because their content had not changed since the last run
71577
+ */
71404
71578
  skippedUnchanged: number;
71405
71579
  };
71580
+ /**
71581
+ * Where the run ended up — 'queued', 'running', 'done' or 'failed'
71582
+ */
71406
71583
  status: string;
71584
+ /**
71585
+ * How a batch run finished, in the batch pipeline's own words (e.g. finalized, timeout, crash); null for a realtime run
71586
+ */
71407
71587
  outcome: (string | null);
71588
+ /**
71589
+ * When the run started, ISO 8601 timestamp
71590
+ */
71408
71591
  startedAt: string;
71592
+ /**
71593
+ * Documents that failed after retries during this run
71594
+ */
71409
71595
  errorCount: number;
71596
+ /**
71597
+ * When the run finished, ISO 8601 timestamp; null while it is still going
71598
+ */
71410
71599
  finishedAt: (string | null);
71600
+ /**
71601
+ * Documents the source permanently refused during this run
71602
+ */
71411
71603
  deniedCount: number;
71604
+ /**
71605
+ * Documents stored as raw text because the extraction step failed — NULL MEANS NOT MEASURED, never "clean": only realtime runs measure this, so every batch and reclaimed run reports null
71606
+ */
71412
71607
  degradedCount: (number | null);
71413
71608
  }[];
71609
+ /**
71610
+ * Id of the daemon these runs belong to
71611
+ */
71414
71612
  daemonId: string;
71415
71613
  }
71416
71614
  export interface BrainDaemonStatusInput {
71615
+ /**
71616
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
71617
+ */
71417
71618
  id: string;
71418
71619
  }
71419
71620
  export interface BrainDaemonStatusOutput {
71621
+ /**
71622
+ * True once the run has finished, whether it succeeded or failed
71623
+ */
71420
71624
  done: boolean;
71625
+ /**
71626
+ * Id of the run being reported; null when this daemon has never run
71627
+ */
71421
71628
  runId: (string | null);
71629
+ /**
71630
+ * Where the run stands: 'queued' waiting to start, 'running' in progress, 'done' finished, 'failed' gave up, 'none' this daemon has never run
71631
+ */
71422
71632
  status: ("queued" | "running" | "done" | "failed" | "none");
71633
+ /**
71634
+ * Per-source progress as the connector reported it; the shape differs by connector type and is meant for display, not for binding a step to
71635
+ */
71423
71636
  sources: unknown[];
71637
+ /**
71638
+ * Document counts for the run; null when nothing has been counted yet
71639
+ */
71424
71640
  progress: ({
71425
- counts: BrainDaemonStatusOutputCounts;
71641
+ /**
71642
+ * Totals for the whole run
71643
+ */
71644
+ counts: {
71645
+ /**
71646
+ * Documents that failed after retries — transient failures, worth re-running
71647
+ */
71648
+ error: number;
71649
+ /**
71650
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
71651
+ */
71652
+ denied: number;
71653
+ /**
71654
+ * Of those, how many were downloaded
71655
+ */
71656
+ fetched: number;
71657
+ /**
71658
+ * Of those, how many became memories
71659
+ */
71660
+ ingested: number;
71661
+ /**
71662
+ * Documents the run found at the source
71663
+ */
71664
+ discovered: number;
71665
+ /**
71666
+ * Documents skipped because their content had not changed since the last run
71667
+ */
71668
+ skippedUnchanged: number;
71669
+ };
71670
+ /**
71671
+ * The same totals split by source category; the keys are the connector's own (github: markdown/issues/pulls, clickup: tasks/comments/docs/chat, gdrive: files)
71672
+ */
71426
71673
  byCategory: {
71427
- [k: string]: BrainDaemonStatusOutputCounts;
71674
+ [k: string]: {
71675
+ /**
71676
+ * Documents that failed after retries — transient failures, worth re-running
71677
+ */
71678
+ error: number;
71679
+ /**
71680
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
71681
+ */
71682
+ denied: number;
71683
+ /**
71684
+ * Of those, how many were downloaded
71685
+ */
71686
+ fetched: number;
71687
+ /**
71688
+ * Of those, how many became memories
71689
+ */
71690
+ ingested: number;
71691
+ /**
71692
+ * Documents the run found at the source
71693
+ */
71694
+ discovered: number;
71695
+ /**
71696
+ * Documents skipped because their content had not changed since the last run
71697
+ */
71698
+ skippedUnchanged: number;
71699
+ };
71428
71700
  };
71429
71701
  } | null);
71430
71702
  }
71431
- export interface BrainDaemonStatusOutputCounts {
71432
- error: number;
71433
- denied: number;
71434
- fetched: number;
71435
- ingested: number;
71436
- discovered: number;
71437
- skippedUnchanged: number;
71438
- }
71439
71703
  export interface BrainDaemonUpdateInput {
71440
71704
  id: string;
71441
71705
  name?: (string | null);
@@ -71521,46 +71785,121 @@ export interface BrainKnowledgeEntityMemoriesInput {
71521
71785
  entity_ref: string;
71522
71786
  }
71523
71787
  export interface BrainKnowledgeEntityMemoriesOutput {
71788
+ /**
71789
+ * How many memories back this entity in total, across all pages
71790
+ */
71524
71791
  total: number;
71792
+ /**
71793
+ * The entity the memories belong to; null when `entity_ref` matched nothing
71794
+ */
71525
71795
  entity: ({
71796
+ /**
71797
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
71798
+ */
71526
71799
  score?: number;
71800
+ /**
71801
+ * Other names the same entity appears under in the ingested text
71802
+ */
71527
71803
  aliases: string[];
71804
+ /**
71805
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
71806
+ */
71528
71807
  entity_id: string;
71808
+ /**
71809
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
71810
+ */
71529
71811
  description: (string | null);
71812
+ /**
71813
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
71814
+ */
71530
71815
  entity_type: string;
71816
+ /**
71817
+ * The name to show a person — usually the spelling the source text used
71818
+ */
71531
71819
  display_name: string;
71820
+ /**
71821
+ * The one name this entity is stored under; use it when matching entities against each other
71822
+ */
71532
71823
  canonical_name: string;
71824
+ /**
71825
+ * How many memories mention this entity — a rough measure of how well attested it is
71826
+ */
71533
71827
  evidence_count: number;
71534
71828
  } | null);
71829
+ /**
71830
+ * One page of the memories this entity was drawn from — the same shape brain_memory_list returns
71831
+ */
71535
71832
  memories: {
71536
71833
  /**
71537
71834
  * Consumer-facing label derived from the layer; 'unknown' for an unrecognised layer
71538
71835
  */
71539
71836
  kind: ("schema" | "intention" | "identity" | "basic" | "fact" | "summary" | "knowledge" | "raw" | "unknown");
71837
+ /**
71838
+ * Engine tags on this memory; empty when it carries none
71839
+ */
71540
71840
  tags: string[];
71541
71841
  /**
71542
71842
  * Engine memory layer (l0_basic_info…l7_intention)
71543
71843
  */
71544
71844
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw");
71845
+ /**
71846
+ * Free-form metadata, verbatim as the writer passed brain_memory_add's `metadata`; keys are the caller's
71847
+ */
71545
71848
  custom: {
71546
71849
  [k: string]: unknown;
71547
71850
  };
71851
+ /**
71852
+ * Engine lifecycle status of the row — 'active' for a memory in use; superseded rows are not listed
71853
+ */
71548
71854
  status: string;
71855
+ /**
71856
+ * The memory text itself
71857
+ */
71549
71858
  content: string;
71859
+ /**
71860
+ * Engine user namespace the memory was written under
71861
+ */
71550
71862
  user_id: string;
71863
+ /**
71864
+ * Engine agent namespace the memory was written under — the shared pool for a 'shared' write, the caller's own for a private one
71865
+ */
71551
71866
  agent_id: string;
71867
+ /**
71868
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
71869
+ */
71552
71870
  memory_at: (number | null);
71871
+ /**
71872
+ * Engine id of this memory; pass it to brain_memory_get, _update or _delete
71873
+ */
71553
71874
  memory_id: string;
71875
+ /**
71876
+ * The engine's own inference about this memory, or null when it recorded none
71877
+ */
71554
71878
  speculate: (string | null);
71879
+ /**
71880
+ * Engine session the memory was written in; empty when the writer opened none
71881
+ */
71555
71882
  session_id: string;
71883
+ /**
71884
+ * When this memory row was written, epoch milliseconds
71885
+ */
71556
71886
  gmt_created: number;
71557
71887
  /**
71558
71888
  * Source authority (highest→lowest): policy > official > team > informal
71559
71889
  */
71560
71890
  source_authority: ("policy" | "official" | "team" | "informal");
71891
+ /**
71892
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
71893
+ */
71561
71894
  source_raw_memory_id: (string | null);
71562
71895
  }[];
71896
+ /**
71897
+ * How long the engine took to answer, milliseconds
71898
+ */
71563
71899
  elapsed_ms: number;
71900
+ /**
71901
+ * Engine request id for this call — quote it when reporting a problem
71902
+ */
71564
71903
  request_id: string;
71565
71904
  }
71566
71905
  export interface BrainKnowledgeGraphInput {
@@ -71574,29 +71913,92 @@ export interface BrainKnowledgeGraphInput {
71574
71913
  scope?: ("shared" | "private" | "both");
71575
71914
  }
71576
71915
  export interface BrainKnowledgeGraphOutput {
71916
+ /**
71917
+ * The typed relations between those entities
71918
+ */
71577
71919
  edges: {
71920
+ /**
71921
+ * Why the engine drew this edge, in its own words; null when it recorded none
71922
+ */
71578
71923
  reason: (string | null);
71924
+ /**
71925
+ * Id of the node the edge points FROM (a `nodes[].id`)
71926
+ */
71579
71927
  source: string;
71928
+ /**
71929
+ * Id of the node the edge points TO (a `nodes[].id`)
71930
+ */
71580
71931
  target: string;
71932
+ /**
71933
+ * True when the relation reads the same in both directions
71934
+ */
71581
71935
  symmetric: boolean;
71936
+ /**
71937
+ * Ontology type of the relation, e.g. depends_on, competes_with, owns
71938
+ */
71582
71939
  relation_type: string;
71583
71940
  }[];
71941
+ /**
71942
+ * The entities in the exported graph
71943
+ */
71584
71944
  nodes: {
71945
+ /**
71946
+ * Id of this entity; the `source` and `target` of an edge refer to it
71947
+ */
71585
71948
  id: string;
71949
+ /**
71950
+ * How many edges touch this node — the hub concepts are the ones kept when the export is truncated
71951
+ */
71586
71952
  degree: number;
71953
+ /**
71954
+ * Other names the same entity appears under in the ingested text
71955
+ */
71587
71956
  aliases: string[];
71957
+ /**
71958
+ * What the entity is, as the engine summarised it; null when it has not written one
71959
+ */
71588
71960
  description: (string | null);
71961
+ /**
71962
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
71963
+ */
71589
71964
  entity_type: string;
71965
+ /**
71966
+ * The name to show a person
71967
+ */
71590
71968
  display_name: string;
71969
+ /**
71970
+ * The one name this entity is stored under
71971
+ */
71591
71972
  canonical_name: string;
71973
+ /**
71974
+ * How many memories mention this entity
71975
+ */
71592
71976
  evidence_count: number;
71593
71977
  }[];
71978
+ /**
71979
+ * Sizes of what was actually returned
71980
+ */
71594
71981
  totals: {
71982
+ /**
71983
+ * Edges returned in this export
71984
+ */
71595
71985
  edgeCount: number;
71986
+ /**
71987
+ * Nodes returned in this export
71988
+ */
71596
71989
  nodeCount: number;
71597
71990
  };
71991
+ /**
71992
+ * True when `limit` cut the export short — the highest-degree nodes were kept, so what you get is the hubs
71993
+ */
71598
71994
  truncated: boolean;
71995
+ /**
71996
+ * How long the engine took to answer, milliseconds
71997
+ */
71599
71998
  elapsed_ms: number;
71999
+ /**
72000
+ * Engine request id for this call — quote it when reporting a problem
72001
+ */
71600
72002
  request_id: string;
71601
72003
  }
71602
72004
  export interface BrainKnowledgeNeighborhoodInput {
@@ -71626,38 +72028,128 @@ export interface BrainKnowledgeNeighborhoodInput {
71626
72028
  relation_type?: string;
71627
72029
  }
71628
72030
  export interface BrainKnowledgeNeighborhoodOutput {
72031
+ /**
72032
+ * The entity that was expanded around; null when `entity_ref` matched nothing
72033
+ */
71629
72034
  root: ({
72035
+ /**
72036
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
72037
+ */
71630
72038
  score?: number;
72039
+ /**
72040
+ * Other names the same entity appears under in the ingested text
72041
+ */
71631
72042
  aliases: string[];
72043
+ /**
72044
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
72045
+ */
71632
72046
  entity_id: string;
72047
+ /**
72048
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
72049
+ */
71633
72050
  description: (string | null);
72051
+ /**
72052
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
72053
+ */
71634
72054
  entity_type: string;
72055
+ /**
72056
+ * The name to show a person — usually the spelling the source text used
72057
+ */
71635
72058
  display_name: string;
72059
+ /**
72060
+ * The one name this entity is stored under; use it when matching entities against each other
72061
+ */
71636
72062
  canonical_name: string;
72063
+ /**
72064
+ * How many memories mention this entity — a rough measure of how well attested it is
72065
+ */
71637
72066
  evidence_count: number;
71638
72067
  } | null);
72068
+ /**
72069
+ * The neighbours reached within `depth` hops of the root, the root excluded
72070
+ */
71639
72071
  entities: {
72072
+ /**
72073
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
72074
+ */
71640
72075
  score?: number;
72076
+ /**
72077
+ * Other names the same entity appears under in the ingested text
72078
+ */
71641
72079
  aliases: string[];
72080
+ /**
72081
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
72082
+ */
71642
72083
  entity_id: string;
72084
+ /**
72085
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
72086
+ */
71643
72087
  description: (string | null);
72088
+ /**
72089
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
72090
+ */
71644
72091
  entity_type: string;
72092
+ /**
72093
+ * The name to show a person — usually the spelling the source text used
72094
+ */
71645
72095
  display_name: string;
72096
+ /**
72097
+ * The one name this entity is stored under; use it when matching entities against each other
72098
+ */
71646
72099
  canonical_name: string;
72100
+ /**
72101
+ * How many memories mention this entity — a rough measure of how well attested it is
72102
+ */
71647
72103
  evidence_count: number;
71648
72104
  }[];
72105
+ /**
72106
+ * The relations that connect the root and the neighbours above
72107
+ */
71649
72108
  relations: {
72109
+ /**
72110
+ * Why the engine drew this relation, in its own words; null when it recorded none
72111
+ */
71650
72112
  reason: (string | null);
72113
+ /**
72114
+ * Id of the entity the relation points FROM
72115
+ */
71651
72116
  source_id: string;
72117
+ /**
72118
+ * True when the relation reads the same in both directions, so source and target are interchangeable
72119
+ */
71652
72120
  symmetric: boolean;
72121
+ /**
72122
+ * Id of the entity the relation points TO
72123
+ */
71653
72124
  target_id: string;
72125
+ /**
72126
+ * Ontology type of the relation, e.g. depends_on, competes_with, owns
72127
+ */
71654
72128
  relation_type: string;
72129
+ /**
72130
+ * Name to show for the source entity
72131
+ */
71655
72132
  source_display_name: string;
72133
+ /**
72134
+ * Name to show for the target entity
72135
+ */
71656
72136
  target_display_name: string;
72137
+ /**
72138
+ * Stored name of the source entity
72139
+ */
71657
72140
  source_canonical_name: string;
72141
+ /**
72142
+ * Stored name of the target entity
72143
+ */
71658
72144
  target_canonical_name: string;
71659
72145
  }[];
72146
+ /**
72147
+ * How long the engine took to answer, milliseconds
72148
+ */
71660
72149
  elapsed_ms: number;
72150
+ /**
72151
+ * Engine request id for this call — quote it when reporting a problem
72152
+ */
71661
72153
  request_id: string;
71662
72154
  }
71663
72155
  export interface BrainKnowledgeRelationsInput {
@@ -71683,18 +72175,54 @@ export interface BrainKnowledgeRelationsInput {
71683
72175
  target_entity?: string;
71684
72176
  }
71685
72177
  export interface BrainKnowledgeRelationsOutput {
72178
+ /**
72179
+ * The relations matching the filters
72180
+ */
71686
72181
  relations: {
72182
+ /**
72183
+ * Why the engine drew this relation, in its own words; null when it recorded none
72184
+ */
71687
72185
  reason: (string | null);
72186
+ /**
72187
+ * Id of the entity the relation points FROM
72188
+ */
71688
72189
  source_id: string;
72190
+ /**
72191
+ * True when the relation reads the same in both directions, so source and target are interchangeable
72192
+ */
71689
72193
  symmetric: boolean;
72194
+ /**
72195
+ * Id of the entity the relation points TO
72196
+ */
71690
72197
  target_id: string;
72198
+ /**
72199
+ * Ontology type of the relation, e.g. depends_on, competes_with, owns
72200
+ */
71691
72201
  relation_type: string;
72202
+ /**
72203
+ * Name to show for the source entity
72204
+ */
71692
72205
  source_display_name: string;
72206
+ /**
72207
+ * Name to show for the target entity
72208
+ */
71693
72209
  target_display_name: string;
72210
+ /**
72211
+ * Stored name of the source entity
72212
+ */
71694
72213
  source_canonical_name: string;
72214
+ /**
72215
+ * Stored name of the target entity
72216
+ */
71695
72217
  target_canonical_name: string;
71696
72218
  }[];
72219
+ /**
72220
+ * How long the engine took to answer, milliseconds
72221
+ */
71697
72222
  elapsed_ms: number;
72223
+ /**
72224
+ * Engine request id for this call — quote it when reporting a problem
72225
+ */
71698
72226
  request_id: string;
71699
72227
  }
71700
72228
  export interface BrainKnowledgeSearchInput {
@@ -71720,18 +72248,54 @@ export interface BrainKnowledgeSearchInput {
71720
72248
  entity_type?: string;
71721
72249
  }
71722
72250
  export interface BrainKnowledgeSearchOutput {
72251
+ /**
72252
+ * How many entities match in total, across all pages — not the length of this page
72253
+ */
71723
72254
  total: number;
72255
+ /**
72256
+ * Matching entities, best match first
72257
+ */
71724
72258
  entities: {
72259
+ /**
72260
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
72261
+ */
71725
72262
  score?: number;
72263
+ /**
72264
+ * Other names the same entity appears under in the ingested text
72265
+ */
71726
72266
  aliases: string[];
72267
+ /**
72268
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
72269
+ */
71727
72270
  entity_id: string;
72271
+ /**
72272
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
72273
+ */
71728
72274
  description: (string | null);
72275
+ /**
72276
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
72277
+ */
71729
72278
  entity_type: string;
72279
+ /**
72280
+ * The name to show a person — usually the spelling the source text used
72281
+ */
71730
72282
  display_name: string;
72283
+ /**
72284
+ * The one name this entity is stored under; use it when matching entities against each other
72285
+ */
71731
72286
  canonical_name: string;
72287
+ /**
72288
+ * How many memories mention this entity — a rough measure of how well attested it is
72289
+ */
71732
72290
  evidence_count: number;
71733
72291
  }[];
72292
+ /**
72293
+ * How long the engine took to answer, milliseconds
72294
+ */
71734
72295
  elapsed_ms: number;
72296
+ /**
72297
+ * Engine request id for this call — quote it when reporting a problem
72298
+ */
71735
72299
  request_id: string;
71736
72300
  }
71737
72301
  export interface BrainMemoryAddInput {
@@ -71755,8 +72319,17 @@ export interface BrainMemoryAddInput {
71755
72319
  source_authority?: ("policy" | "official" | "team" | "informal");
71756
72320
  }
71757
72321
  export interface BrainMemoryAddOutput {
72322
+ /**
72323
+ * True when the memory was stored
72324
+ */
71758
72325
  success: boolean;
72326
+ /**
72327
+ * Engine id of the memory just stored; keep it to read, replace or delete the memory later
72328
+ */
71759
72329
  memory_id: string;
72330
+ /**
72331
+ * Engine request id for this call — quote it when reporting a problem
72332
+ */
71760
72333
  request_id: string;
71761
72334
  }
71762
72335
  export interface BrainMemoryDeleteInput {
@@ -71766,8 +72339,17 @@ export interface BrainMemoryDeleteInput {
71766
72339
  memory_id: string;
71767
72340
  }
71768
72341
  export interface BrainMemoryDeleteOutput {
72342
+ /**
72343
+ * Always true — the call fails outright rather than reporting a false here
72344
+ */
71769
72345
  success: true;
72346
+ /**
72347
+ * Engine request id for this call — quote it when reporting a problem
72348
+ */
71770
72349
  request_id: string;
72350
+ /**
72351
+ * How many memory rows the engine removed for this id; 0 when it was already gone
72352
+ */
71771
72353
  deleted_count: number;
71772
72354
  }
71773
72355
  export interface BrainMemoryGetInput {
@@ -71777,72 +72359,177 @@ export interface BrainMemoryGetInput {
71777
72359
  memory_id: string;
71778
72360
  }
71779
72361
  export interface BrainMemoryGetOutput {
72362
+ /**
72363
+ * Engine tags on this memory; empty when it carries none
72364
+ */
71780
72365
  tags: string[];
71781
72366
  /**
71782
72367
  * Engine memory layer (l0_basic_info…l7_intention)
71783
72368
  */
71784
72369
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw");
72370
+ /**
72371
+ * Free-form metadata, verbatim as the writer passed brain_memory_add's `metadata`; keys are the caller's
72372
+ */
71785
72373
  custom: {
71786
72374
  [k: string]: unknown;
71787
72375
  };
72376
+ /**
72377
+ * Which store answered the read — 'vdb' the vector store, 'graph' the memory graph. Diagnostic; the content is the same either way.
72378
+ */
71788
72379
  source: ("vdb" | "graph");
72380
+ /**
72381
+ * Engine lifecycle status of the row — 'active' for a memory in use
72382
+ */
71789
72383
  status: string;
72384
+ /**
72385
+ * The memory text itself
72386
+ */
71790
72387
  content: string;
72388
+ /**
72389
+ * Engine user namespace the memory was written under
72390
+ */
71791
72391
  user_id: string;
72392
+ /**
72393
+ * Engine agent namespace the memory was written under
72394
+ */
71792
72395
  agent_id: string;
72396
+ /**
72397
+ * True when this is the current version of the memory; false when a newer one has replaced it
72398
+ */
71793
72399
  is_latest: boolean;
72400
+ /**
72401
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
72402
+ */
71794
72403
  memory_at: (number | null);
72404
+ /**
72405
+ * Engine id of this memory — the id that was asked for
72406
+ */
71795
72407
  memory_id: string;
72408
+ /**
72409
+ * The engine's own inference about this memory, or null when it recorded none
72410
+ */
71796
72411
  speculate: (string | null);
72412
+ /**
72413
+ * The engine's confidence in this memory, 0..1
72414
+ */
71797
72415
  confidence: number;
72416
+ /**
72417
+ * How long the engine took to answer, milliseconds
72418
+ */
71798
72419
  elapsed_ms: number;
72420
+ /**
72421
+ * Engine request id for this call — quote it when reporting a problem
72422
+ */
71799
72423
  request_id: string;
72424
+ /**
72425
+ * Ids of the memories this one replaced; null when it replaced none
72426
+ */
71800
72427
  supersedes: (string[] | null);
72428
+ /**
72429
+ * When this memory row was written, epoch milliseconds
72430
+ */
71801
72431
  gmt_created: number;
72432
+ /**
72433
+ * Ids of the memories that replaced this one; null while it is still current
72434
+ */
71802
72435
  superseded_by: (string[] | null);
71803
72436
  /**
71804
72437
  * Source authority (highest→lowest): policy > official > team > informal
71805
72438
  */
71806
72439
  source_authority: ("policy" | "official" | "team" | "informal");
72440
+ /**
72441
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
72442
+ */
71807
72443
  source_raw_memory_id: (string | null);
71808
72444
  }
71809
72445
  export interface BrainMemoryListInput {
72446
+ /**
72447
+ * How many memories to return, max 1000. Omit to use the engine's own page size.
72448
+ */
71810
72449
  limit?: number;
72450
+ /**
72451
+ * Sort by write time: 'desc' newest first, 'asc' oldest first. Omit to take the engine's own order.
72452
+ */
71811
72453
  order?: ("asc" | "desc");
71812
72454
  /**
71813
72455
  * Read scope; 'both' (default) unions shared + your private
71814
72456
  */
71815
72457
  scope?: ("shared" | "private" | "both");
72458
+ /**
72459
+ * How many memories to skip before this page — offset 100 with limit 100 is the second page. Omit to start at the beginning.
72460
+ */
71816
72461
  offset?: number;
71817
72462
  }
71818
72463
  export interface BrainMemoryListOutput {
72464
+ /**
72465
+ * How many memories match in total, across all pages — not the length of this page
72466
+ */
71819
72467
  total: number;
72468
+ /**
72469
+ * One page of memories, newest first unless `order` said otherwise
72470
+ */
71820
72471
  memories: {
71821
72472
  /**
71822
72473
  * Consumer-facing label derived from the layer; 'unknown' for an unrecognised layer
71823
72474
  */
71824
72475
  kind: ("schema" | "intention" | "identity" | "basic" | "fact" | "summary" | "knowledge" | "raw" | "unknown");
72476
+ /**
72477
+ * Engine tags on this memory; empty when it carries none
72478
+ */
71825
72479
  tags: string[];
71826
72480
  /**
71827
72481
  * Engine memory layer (l0_basic_info…l7_intention)
71828
72482
  */
71829
72483
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw");
72484
+ /**
72485
+ * Free-form metadata, verbatim as the writer passed brain_memory_add's `metadata`; keys are the caller's
72486
+ */
71830
72487
  custom: {
71831
72488
  [k: string]: unknown;
71832
72489
  };
72490
+ /**
72491
+ * Engine lifecycle status of the row — 'active' for a memory in use; superseded rows are not listed
72492
+ */
71833
72493
  status: string;
72494
+ /**
72495
+ * The memory text itself
72496
+ */
71834
72497
  content: string;
72498
+ /**
72499
+ * Engine user namespace the memory was written under
72500
+ */
71835
72501
  user_id: string;
72502
+ /**
72503
+ * Engine agent namespace the memory was written under — the shared pool for a 'shared' write, the caller's own for a private one
72504
+ */
71836
72505
  agent_id: string;
72506
+ /**
72507
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
72508
+ */
71837
72509
  memory_at: (number | null);
72510
+ /**
72511
+ * Engine id of this memory; pass it to brain_memory_get, _update or _delete
72512
+ */
71838
72513
  memory_id: string;
72514
+ /**
72515
+ * The engine's own inference about this memory, or null when it recorded none
72516
+ */
71839
72517
  speculate: (string | null);
72518
+ /**
72519
+ * Engine session the memory was written in; empty when the writer opened none
72520
+ */
71840
72521
  session_id: string;
72522
+ /**
72523
+ * When this memory row was written, epoch milliseconds
72524
+ */
71841
72525
  gmt_created: number;
71842
72526
  /**
71843
72527
  * Source authority (highest→lowest): policy > official > team > informal
71844
72528
  */
71845
72529
  source_authority: ("policy" | "official" | "team" | "informal");
72530
+ /**
72531
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
72532
+ */
71846
72533
  source_raw_memory_id: (string | null);
71847
72534
  }[];
71848
72535
  }
@@ -71861,8 +72548,17 @@ export interface BrainMemorySearchInput {
71861
72548
  scope?: ("shared" | "private" | "both");
71862
72549
  }
71863
72550
  export interface BrainMemorySearchOutput {
72551
+ /**
72552
+ * Ordinary hits: the facts, summaries and raw notes that match the query
72553
+ */
71864
72554
  normal: BrainMemorySearchOutputItems[];
72555
+ /**
72556
+ * Hits describing WHO the subject is — stable identity and preference memories (l0/l4). Usually the ones worth carrying into a prompt.
72557
+ */
71865
72558
  profile: BrainMemorySearchOutputItems[];
72559
+ /**
72560
+ * Hits the engine offers unprompted — intentions and open threads (l7) it judged relevant to the query rather than matched to it
72561
+ */
71866
72562
  proactive: BrainMemorySearchOutputItems[];
71867
72563
  }
71868
72564
  export interface BrainMemorySearchOutputItems {
@@ -71870,23 +72566,53 @@ export interface BrainMemorySearchOutputItems {
71870
72566
  * Consumer-facing label derived from the layer; 'unknown' for an unrecognised layer
71871
72567
  */
71872
72568
  kind: ("schema" | "intention" | "identity" | "basic" | "fact" | "summary" | "knowledge" | "raw" | "unknown");
72569
+ /**
72570
+ * Engine tags on this memory; empty when it carries none
72571
+ */
71873
72572
  tags: string[];
71874
72573
  /**
71875
72574
  * Engine memory layer (l0_basic_info…l7_intention)
71876
72575
  */
71877
72576
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw");
72577
+ /**
72578
+ * How closely this hit matches the query — higher is closer. An engine-internal scale, not a percentage; compare hits against each other, never against a fixed threshold.
72579
+ */
71878
72580
  score: number;
72581
+ /**
72582
+ * The memory text itself
72583
+ */
71879
72584
  content: string;
72585
+ /**
72586
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
72587
+ */
71880
72588
  memory_at: (number | null);
72589
+ /**
72590
+ * Engine id of this memory; pass it to brain_memory_get, _update or _delete
72591
+ */
71881
72592
  memory_id: string;
72593
+ /**
72594
+ * The engine's own inference about this memory, or null when it recorded none
72595
+ */
71882
72596
  speculate: (string | null);
72597
+ /**
72598
+ * When this memory row was written, epoch milliseconds
72599
+ */
71883
72600
  gmt_created: number;
72601
+ /**
72602
+ * Name of the l6_schema type this memory instantiates; absent on every other layer
72603
+ */
71884
72604
  schema_type?: string;
72605
+ /**
72606
+ * Ids of the earlier memories this one grew out of, oldest first; absent when it has no history
72607
+ */
71885
72608
  evolution_chain?: string[];
71886
72609
  /**
71887
72610
  * Source authority (highest→lowest): policy > official > team > informal
71888
72611
  */
71889
72612
  source_authority: ("policy" | "official" | "team" | "informal");
72613
+ /**
72614
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
72615
+ */
71890
72616
  source_raw_memory_id: (string | null);
71891
72617
  }
71892
72618
  export interface BrainMemoryStatsInput {
@@ -71896,19 +72622,52 @@ export interface BrainMemoryStatsInput {
71896
72622
  scope?: ("shared" | "private" | "both");
71897
72623
  }
71898
72624
  export interface BrainMemoryStatsOutput {
72625
+ /**
72626
+ * Size of the engine's memory graph
72627
+ */
71899
72628
  graph: {
72629
+ /**
72630
+ * Edges between those nodes
72631
+ */
71900
72632
  edgeCount: number;
72633
+ /**
72634
+ * Nodes in the memory graph
72635
+ */
71901
72636
  nodeCount: number;
71902
72637
  };
72638
+ /**
72639
+ * Memory counts for the requested scope
72640
+ */
71903
72641
  memories: {
72642
+ /**
72643
+ * How many memories the scope holds in total
72644
+ */
71904
72645
  total: number;
72646
+ /**
72647
+ * Counts for the three derived layers the engine reports; the other layers are not broken out
72648
+ */
71905
72649
  byLayer: {
72650
+ /**
72651
+ * Count of l2_fact memories — extracted facts
72652
+ */
71906
72653
  l2: number;
72654
+ /**
72655
+ * Count of l3_summary memories — summaries over facts
72656
+ */
71907
72657
  l3: number;
72658
+ /**
72659
+ * Count of l4_identity memories — who the subject is
72660
+ */
71908
72661
  l4: number;
71909
72662
  };
71910
72663
  };
72664
+ /**
72665
+ * Size of the product knowledge graph
72666
+ */
71911
72667
  knowledge: {
72668
+ /**
72669
+ * Entities in the product knowledge graph (see brain_knowledge_search)
72670
+ */
71912
72671
  entityCount: number;
71913
72672
  };
71914
72673
  }
@@ -71923,8 +72682,17 @@ export interface BrainMemoryUpdateInput {
71923
72682
  memory_id: string;
71924
72683
  }
71925
72684
  export interface BrainMemoryUpdateOutput {
72685
+ /**
72686
+ * Always true — the call fails outright rather than reporting a false here
72687
+ */
71926
72688
  success: true;
72689
+ /**
72690
+ * Engine id of the memory that was replaced
72691
+ */
71927
72692
  memory_id: string;
72693
+ /**
72694
+ * Engine request id for this call — quote it when reporting a problem
72695
+ */
71928
72696
  request_id: string;
71929
72697
  }
71930
72698
  export interface BrainProductSharedMemoryResetInput {
@@ -71973,6 +72741,9 @@ export interface BrainUsageReportInput {
71973
72741
  days?: number;
71974
72742
  }
71975
72743
  export interface BrainUsageReportOutput {
72744
+ /**
72745
+ * A standing warning, in words, that product.rows and platform.meters have different subjects and need not match
72746
+ */
71976
72747
  note: string;
71977
72748
  /**
71978
72749
  * Brain's own ledger, for THIS product only
@@ -71990,6 +72761,9 @@ export interface BrainUsageReportOutput {
71990
72761
  * Inclusive UTC start of the window, YYYY-MM-DD
71991
72762
  */
71992
72763
  from: string;
72764
+ /**
72765
+ * One row per UTC day and meter dimension — the grain to join against a billing export
72766
+ */
71993
72767
  rows: {
71994
72768
  /**
71995
72769
  * 'sync' | 'batch'; '' when the push carried none
@@ -72028,27 +72802,72 @@ export interface BrainUsageReportOutput {
72028
72802
  * The rows rolled up per meter across the whole window
72029
72803
  */
72030
72804
  totals: {
72805
+ /**
72806
+ * Manifest meter slug, e.g. llm-tokens
72807
+ */
72031
72808
  meter: string;
72809
+ /**
72810
+ * How many metered calls landed in the window
72811
+ */
72032
72812
  events: number;
72813
+ /**
72814
+ * Tokens metered for this meter across the whole window
72815
+ */
72033
72816
  tokens: number;
72817
+ /**
72818
+ * Of those calls, how many billing did not accept — a non-zero here means our ledger and the invoice will differ
72819
+ */
72034
72820
  delivery_failed: number;
72035
72821
  }[];
72822
+ /**
72823
+ * The product this ledger belongs to — the one the call was made for
72824
+ */
72036
72825
  product_id: string;
72037
72826
  };
72038
72827
  /**
72039
72828
  * The platform billing aggregate for the whole ORG; null if it could not be read
72040
72829
  */
72041
72830
  platform: ({
72831
+ /**
72832
+ * The billing plan in force for that organisation
72833
+ */
72042
72834
  plan: string;
72835
+ /**
72836
+ * Always 'org' — a reminder that these numbers are the whole organisation's, not this product's
72837
+ */
72043
72838
  scope: "org";
72839
+ /**
72840
+ * Per-meter allowance and month-to-date usage as billing reports it
72841
+ */
72044
72842
  meters: {
72843
+ /**
72844
+ * What the numbers below are counted in, e.g. tokens
72845
+ */
72045
72846
  unit?: string;
72847
+ /**
72848
+ * How much of it has been used MONTH TO DATE, for the whole org — not for the window asked for here
72849
+ */
72046
72850
  used?: number;
72851
+ /**
72852
+ * The plan's allowance for this meter; null or absent when there is no cap
72853
+ */
72047
72854
  limit?: (number | null);
72855
+ /**
72856
+ * Allowance left; null or absent when the meter is uncapped
72857
+ */
72048
72858
  remaining?: (number | null);
72859
+ /**
72860
+ * True when this meter has no cap at all
72861
+ */
72049
72862
  unlimited?: boolean;
72863
+ /**
72864
+ * Platform meter slug, e.g. llm-tokens
72865
+ */
72050
72866
  meter_slug: string;
72051
72867
  }[];
72868
+ /**
72869
+ * The organisation the billing aggregate was read for
72870
+ */
72052
72871
  org_id: string;
72053
72872
  } | null);
72054
72873
  /**
@@ -116863,25 +117682,106 @@ export interface UsersApikeysCreateInput {
116863
117682
  type: ("server" | "publishable");
116864
117683
  }
116865
117684
  export interface UsersApikeysCreateOutput {
117685
+ /**
117686
+ * Id of the key. Pass it to users_apikeys_revoke.
117687
+ */
116866
117688
  id: string;
117689
+ /**
117690
+ * The full secret key, shown ONCE. Store it now — it is never returned again, and a lost key is replaced by minting a new one.
117691
+ */
116867
117692
  key: string;
117693
+ /**
117694
+ * The label a human gave this key — which backend or environment holds it.
117695
+ */
116868
117696
  name: string;
117697
+ /**
117698
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
117699
+ */
116869
117700
  type: ("server" | "publishable");
117701
+ /**
117702
+ * The full value of a publishable key, which is not a secret. Null for a server key — that value exists in exactly one response, ever.
117703
+ */
116870
117704
  value: (string | null);
117705
+ /**
117706
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
117707
+ */
116871
117708
  prefix: string;
117709
+ /**
117710
+ * When the key was issued (ISO 8601).
117711
+ */
116872
117712
  createdAt: string;
117713
+ /**
117714
+ * When the key was revoked (ISO 8601). Null while it still works.
117715
+ */
117716
+ revokedAt: (string | null);
117717
+ }
117718
+ export interface UsersApikeysGetInput {
117719
+ /**
117720
+ * Id of the key to read — the `id` from users_apikeys_list.
117721
+ */
117722
+ id: string;
117723
+ }
117724
+ export interface UsersApikeysGetOutput {
117725
+ /**
117726
+ * Id of the key. Pass it to users_apikeys_revoke.
117727
+ */
117728
+ id: string;
117729
+ /**
117730
+ * The label a human gave this key — which backend or environment holds it.
117731
+ */
117732
+ name: string;
117733
+ /**
117734
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
117735
+ */
117736
+ type: ("server" | "publishable");
117737
+ /**
117738
+ * The full value of a publishable key, which is not a secret. Null for a server key — that value exists in exactly one response, ever.
117739
+ */
117740
+ value: (string | null);
117741
+ /**
117742
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
117743
+ */
117744
+ prefix: string;
117745
+ /**
117746
+ * When the key was issued (ISO 8601).
117747
+ */
117748
+ createdAt: string;
117749
+ /**
117750
+ * When the key was revoked (ISO 8601). Null while it still works.
117751
+ */
116873
117752
  revokedAt: (string | null);
116874
117753
  }
116875
117754
  export interface UsersApikeysListInput {
116876
117755
  }
116877
117756
  export interface UsersApikeysListOutput {
116878
117757
  keys: {
117758
+ /**
117759
+ * Id of the key. Pass it to users_apikeys_revoke.
117760
+ */
116879
117761
  id: string;
117762
+ /**
117763
+ * The label a human gave this key — which backend or environment holds it.
117764
+ */
116880
117765
  name: string;
117766
+ /**
117767
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
117768
+ */
116881
117769
  type: ("server" | "publishable");
117770
+ /**
117771
+ * The full value of a publishable key, which is not a secret. Null for a server key — that value exists in exactly one response, ever.
117772
+ */
116882
117773
  value: (string | null);
117774
+ /**
117775
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
117776
+ */
116883
117777
  prefix: string;
117778
+ /**
117779
+ * When the key was issued (ISO 8601).
117780
+ */
116884
117781
  createdAt: string;
117782
+ /**
117783
+ * When the key was revoked (ISO 8601). Null while it still works.
117784
+ */
116885
117785
  revokedAt: (string | null);
116886
117786
  }[];
116887
117787
  }
@@ -116892,7 +117792,13 @@ export interface UsersApikeysRevokeInput {
116892
117792
  id: string;
116893
117793
  }
116894
117794
  export interface UsersApikeysRevokeOutput {
117795
+ /**
117796
+ * Id of the key that was revoked.
117797
+ */
116895
117798
  id: string;
117799
+ /**
117800
+ * Always true — revocation is immediate and final.
117801
+ */
116896
117802
  revoked: true;
116897
117803
  }
116898
117804
  export interface UsersAuditListInput {
@@ -116926,21 +117832,60 @@ export interface UsersAuditListInput {
116926
117832
  targetType?: string;
116927
117833
  }
116928
117834
  export interface UsersAuditListOutput {
117835
+ /**
117836
+ * The page of audit events, newest first.
117837
+ */
116929
117838
  events: {
117839
+ /**
117840
+ * Id of this audit row.
117841
+ */
116930
117842
  id: string;
117843
+ /**
117844
+ * IP the action came from. Null when it was not an HTTP action.
117845
+ */
116931
117846
  ip: (string | null);
117847
+ /**
117848
+ * What happened, as a dotted name — `user.created`, `passkey.deleted`, `email_change.override_applied`.
117849
+ */
116932
117850
  action: string;
117851
+ /**
117852
+ * Id of the actor. Null for a system action.
117853
+ */
116933
117854
  actorId: (string | null);
117855
+ /**
117856
+ * Action-specific detail — the reason text, counts, whatever the action recorded.
117857
+ */
116934
117858
  metadata: {
116935
117859
  [k: string]: unknown;
116936
117860
  };
117861
+ /**
117862
+ * Id of the row the action was about. Null when there was none.
117863
+ */
116937
117864
  targetId: (string | null);
117865
+ /**
117866
+ * Who acted: `operator` (a human or agent on the management plane), `end_user`, or `system`.
117867
+ */
116938
117868
  actorType: ("operator" | "system" | "end_user");
117869
+ /**
117870
+ * When the action happened (ISO 8601).
117871
+ */
116939
117872
  createdAt: string;
117873
+ /**
117874
+ * Product the audited action happened in.
117875
+ */
116940
117876
  productId: string;
117877
+ /**
117878
+ * User agent the action came from. Null when none was sent.
117879
+ */
116941
117880
  userAgent: (string | null);
117881
+ /**
117882
+ * What kind of row the action was about — `user` or `product`. Null when it was about nothing in particular.
117883
+ */
116942
117884
  targetType: (string | null);
116943
117885
  }[];
117886
+ /**
117887
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
117888
+ */
116944
117889
  nextCursor: (string | null);
116945
117890
  }
116946
117891
  export interface UsersConfigGetInput {
@@ -117916,12 +118861,33 @@ export interface UsersFactorsListInput {
117916
118861
  userId: string;
117917
118862
  }
117918
118863
  export interface UsersFactorsListOutput {
118864
+ /**
118865
+ * Every second factor this user has — types and status only, never material.
118866
+ */
117919
118867
  factors: {
118868
+ /**
118869
+ * Kind of second factor: `totp` or `backup_codes`. No key material is ever returned.
118870
+ */
117920
118871
  type: ("totp" | "backup_codes" | "webauthn");
118872
+ /**
118873
+ * Whether this factor is enrolled and usable, or still pending verification.
118874
+ */
117921
118875
  status: ("unverified" | "verified");
118876
+ /**
118877
+ * When the factor was enrolled (ISO 8601).
118878
+ */
117922
118879
  createdAt: string;
118880
+ /**
118881
+ * `backup_codes` only: how many of the batch are still unspent. Null for any other factor type.
118882
+ */
117923
118883
  remaining: (number | null);
118884
+ /**
118885
+ * When the factor was last used to sign in (ISO 8601). Null if it never was.
118886
+ */
117924
118887
  lastUsedAt: (string | null);
118888
+ /**
118889
+ * When the user first proved the factor works (ISO 8601). Null while it is unverified.
118890
+ */
117925
118891
  verifiedAt: (string | null);
117926
118892
  }[];
117927
118893
  }
@@ -117936,7 +118902,13 @@ export interface UsersFactorsResetInput {
117936
118902
  userId: string;
117937
118903
  }
117938
118904
  export interface UsersFactorsResetOutput {
118905
+ /**
118906
+ * Id of the scheduled reset. The same value arrives on `users/mfa.reset-settled`, which is what finishes this step.
118907
+ */
117939
118908
  requestId: string;
118909
+ /**
118910
+ * When the removal happens, if nobody aborts it first (ISO 8601). The delay is this product's, not a fixed one.
118911
+ */
117940
118912
  scheduledFor: string;
117941
118913
  }
117942
118914
  export interface UsersKeysListInput {
@@ -118217,6 +119189,50 @@ export interface UsersOpsSloGetOutput {
118217
119189
  signInFailureBaseline: (number | null);
118218
119190
  };
118219
119191
  }
119192
+ export interface UsersPasskeysGetInput {
119193
+ /**
119194
+ * The end user the credential belongs to.
119195
+ */
119196
+ userId: string;
119197
+ /**
119198
+ * Which credential to read — the `id` from `users_passkeys_list`.
119199
+ */
119200
+ passkeyId: string;
119201
+ }
119202
+ export interface UsersPasskeysGetOutput {
119203
+ /**
119204
+ * Id of the credential. Pass it to users_passkeys_revoke.
119205
+ */
119206
+ id: string;
119207
+ /**
119208
+ * The name the user gave this credential, so a person can tell their devices apart. Null when they never named it.
119209
+ */
119210
+ name: (string | null);
119211
+ /**
119212
+ * The authenticator MODEL’s identifier, which says what kind of device this is, never which one. Null when the authenticator withheld it.
119213
+ */
119214
+ aaguid: (string | null);
119215
+ /**
119216
+ * True when the platform syncs this credential, so it survives losing the device. False means it lives on that device alone.
119217
+ */
119218
+ backedUp: boolean;
119219
+ /**
119220
+ * When the credential was registered (ISO 8601).
119221
+ */
119222
+ createdAt: string;
119223
+ /**
119224
+ * The authenticator’s own counter as of the last assertion. 0 when the authenticator does not count.
119225
+ */
119226
+ signCount: number;
119227
+ /**
119228
+ * When it last signed in (ISO 8601). Null when it never has.
119229
+ */
119230
+ lastUsedAt: (string | null);
119231
+ /**
119232
+ * How this authenticator can be reached. Empty when the browser reported nothing — the vocabulary is the platform’s and grows, so it is not an enum.
119233
+ */
119234
+ transports: string[];
119235
+ }
118220
119236
  export interface UsersPasskeysListInput {
118221
119237
  /**
118222
119238
  * The end user whose passkeys to list.
@@ -118224,14 +119240,41 @@ export interface UsersPasskeysListInput {
118224
119240
  userId: string;
118225
119241
  }
118226
119242
  export interface UsersPasskeysListOutput {
119243
+ /**
119244
+ * The credentials this user has registered, newest first. Empty when they have none.
119245
+ */
118227
119246
  passkeys: {
119247
+ /**
119248
+ * Id of the credential. Pass it to users_passkeys_revoke.
119249
+ */
118228
119250
  id: string;
119251
+ /**
119252
+ * The name the user gave this credential, so a person can tell their devices apart. Null when they never named it.
119253
+ */
118229
119254
  name: (string | null);
119255
+ /**
119256
+ * The authenticator MODEL’s identifier, which says what kind of device this is, never which one. Null when the authenticator withheld it.
119257
+ */
118230
119258
  aaguid: (string | null);
119259
+ /**
119260
+ * True when the platform syncs this credential, so it survives losing the device. False means it lives on that device alone.
119261
+ */
118231
119262
  backedUp: boolean;
119263
+ /**
119264
+ * When the credential was registered (ISO 8601).
119265
+ */
118232
119266
  createdAt: string;
119267
+ /**
119268
+ * The authenticator’s own counter as of the last assertion. 0 when the authenticator does not count.
119269
+ */
118233
119270
  signCount: number;
119271
+ /**
119272
+ * When it last signed in (ISO 8601). Null when it never has.
119273
+ */
118234
119274
  lastUsedAt: (string | null);
119275
+ /**
119276
+ * How this authenticator can be reached. Empty when the browser reported nothing — the vocabulary is the platform’s and grows, so it is not an enum.
119277
+ */
118235
119278
  transports: string[];
118236
119279
  }[];
118237
119280
  }
@@ -118254,9 +119297,18 @@ export interface UsersPasskeysRevokeOutput {
118254
119297
  * Present when the revoke was refused — today, only because it was the last way in.
118255
119298
  */
118256
119299
  error: ({
119300
+ /**
119301
+ * Why it was refused. Today only `passkey_last_way_in`.
119302
+ */
118257
119303
  code: string;
119304
+ /**
119305
+ * The refusal in a sentence, safe to show a human.
119306
+ */
118258
119307
  message: string;
118259
119308
  } | null);
119309
+ /**
119310
+ * `deleted` when the credential is gone, `failed` when the revoke was refused.
119311
+ */
118260
119312
  status: ("deleted" | "failed");
118261
119313
  }
118262
119314
  export interface UsersSessionsGetInput {
@@ -118266,7 +119318,13 @@ export interface UsersSessionsGetInput {
118266
119318
  sessionId: string;
118267
119319
  }
118268
119320
  export interface UsersSessionsGetOutput {
119321
+ /**
119322
+ * Id of this session. Pass it to users_sessions_revoke.
119323
+ */
118269
119324
  id: string;
119325
+ /**
119326
+ * IP the session was opened from. Null when it was not recorded.
119327
+ */
118270
119328
  ip: (string | null);
118271
119329
  /**
118272
119330
  * `aal2` only if a verified second factor completed.
@@ -118276,18 +119334,45 @@ export interface UsersSessionsGetOutput {
118276
119334
  * The factors this session was established with.
118277
119335
  */
118278
119336
  amr: string[];
119337
+ /**
119338
+ * Whether the session is still usable, expired, or revoked.
119339
+ */
118279
119340
  status: ("active" | "revoked");
119341
+ /**
119342
+ * The end user this session belongs to.
119343
+ */
118280
119344
  userId: string;
119345
+ /**
119346
+ * When the session was opened (ISO 8601).
119347
+ */
118281
119348
  createdAt: string;
119349
+ /**
119350
+ * When the current token stops working unless refreshed (ISO 8601).
119351
+ */
118282
119352
  expiresAt: string;
119353
+ /**
119354
+ * When the session was revoked (ISO 8601). Null while it is live.
119355
+ */
118283
119356
  revokedAt: (string | null);
119357
+ /**
119358
+ * User agent the session was opened from. Null when none was sent.
119359
+ */
118284
119360
  userAgent: (string | null);
119361
+ /**
119362
+ * Why the session ended, when it was revoked — e.g. `signout`, `ban`, `mfa_reset`. Null while it is live. The vocabulary is additive, so it is not an enum.
119363
+ */
118285
119364
  revokedReason: (string | null);
118286
119365
  /**
118287
119366
  * The operator behind an impersonated session, or null for an ordinary one.
118288
119367
  */
118289
119368
  impersonatedBy: (string | null);
119369
+ /**
119370
+ * When the session last refreshed its tokens (ISO 8601). Null if it never has.
119371
+ */
118290
119372
  lastRefreshedAt: (string | null);
119373
+ /**
119374
+ * When the session ends no matter how often it refreshes (ISO 8601).
119375
+ */
118291
119376
  absoluteExpiresAt: string;
118292
119377
  }
118293
119378
  export interface UsersSessionsImpersonateInput {
@@ -118323,16 +119408,49 @@ export interface UsersSessionsListInput {
118323
119408
  userId: string;
118324
119409
  }
118325
119410
  export interface UsersSessionsListOutput {
119411
+ /**
119412
+ * The sessions matching the filter, newest first.
119413
+ */
118326
119414
  sessions: {
119415
+ /**
119416
+ * Id of this session. Pass it to users_sessions_revoke.
119417
+ */
118327
119418
  id: string;
119419
+ /**
119420
+ * IP the session was opened from. Null when it was not recorded.
119421
+ */
118328
119422
  ip: (string | null);
119423
+ /**
119424
+ * Whether the session is still usable, expired, or revoked.
119425
+ */
118329
119426
  status: ("active" | "revoked");
119427
+ /**
119428
+ * The end user this session belongs to.
119429
+ */
118330
119430
  userId: string;
119431
+ /**
119432
+ * When the session was opened (ISO 8601).
119433
+ */
118331
119434
  createdAt: string;
119435
+ /**
119436
+ * When the current token stops working unless refreshed (ISO 8601).
119437
+ */
118332
119438
  expiresAt: string;
119439
+ /**
119440
+ * When the session was revoked (ISO 8601). Null while it is live.
119441
+ */
118333
119442
  revokedAt: (string | null);
119443
+ /**
119444
+ * User agent the session was opened from. Null when none was sent.
119445
+ */
118334
119446
  userAgent: (string | null);
119447
+ /**
119448
+ * When the session last refreshed its tokens (ISO 8601). Null if it never has.
119449
+ */
118335
119450
  lastRefreshedAt: (string | null);
119451
+ /**
119452
+ * When the session ends no matter how often it refreshes (ISO 8601).
119453
+ */
118336
119454
  absoluteExpiresAt: string;
118337
119455
  }[];
118338
119456
  }
@@ -118347,6 +119465,9 @@ export interface UsersSessionsRevokeInput {
118347
119465
  sessionId?: string;
118348
119466
  }
118349
119467
  export interface UsersSessionsRevokeOutput {
119468
+ /**
119469
+ * How many sessions were revoked. Zero when there was nothing live to revoke.
119470
+ */
118350
119471
  revoked: number;
118351
119472
  }
118352
119473
  export interface UsersStatsGetInput {
@@ -118469,37 +119590,126 @@ export interface UsersUsersBanInput {
118469
119590
  userId: string;
118470
119591
  }
118471
119592
  export interface UsersUsersBanOutput {
119593
+ /**
119594
+ * Id of this end user. Pass it to any users_users_* tool.
119595
+ */
118472
119596
  id: string;
119597
+ /**
119598
+ * The user's display name. Null when nobody set one.
119599
+ */
118473
119600
  name: (string | null);
119601
+ /**
119602
+ * When the user was banned (ISO 8601). Null while they are not banned.
119603
+ */
118474
119604
  bannedAt: (string | null);
119605
+ /**
119606
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
119607
+ */
118475
119608
  erasedAt: (string | null);
119609
+ /**
119610
+ * URL of the user's avatar. Null when there is none.
119611
+ */
118476
119612
  imageUrl: (string | null);
119613
+ /**
119614
+ * Whether this is a test fixture — excluded from metering and from the default listing.
119615
+ */
118477
119616
  testUser: boolean;
119617
+ /**
119618
+ * When the user was created (ISO 8601).
119619
+ */
118478
119620
  createdAt: string;
119621
+ /**
119622
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
119623
+ */
118479
119624
  deletedAt: (string | null);
119625
+ /**
119626
+ * Product this user belongs to. Never an input — it comes from the calling identity.
119627
+ */
118480
119628
  productId: string;
119629
+ /**
119630
+ * When the user was last changed (ISO 8601).
119631
+ */
118481
119632
  updatedAt: string;
119633
+ /**
119634
+ * Whether this user is still on the waitlist and cannot sign in yet.
119635
+ */
118482
119636
  waitlisted: boolean;
119637
+ /**
119638
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
119639
+ */
118483
119640
  identifiers: {
119641
+ /**
119642
+ * Id of this identifier row.
119643
+ */
118484
119644
  id: string;
119645
+ /**
119646
+ * What kind of identifier this is. Today always `email`.
119647
+ */
118485
119648
  type: "email";
119649
+ /**
119650
+ * The address as the user typed it, for display.
119651
+ */
118486
119652
  value: string;
119653
+ /**
119654
+ * Whether this is the identifier the user signs in with and is contacted at.
119655
+ */
118487
119656
  isPrimary: boolean;
119657
+ /**
119658
+ * When this address was verified (ISO 8601). Null while it never was.
119659
+ */
118488
119660
  verifiedAt: (string | null);
119661
+ /**
119662
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
119663
+ */
118489
119664
  valueCanonical: string;
119665
+ /**
119666
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
119667
+ */
118490
119668
  verificationStatus: ("unverified" | "verified" | "expired");
118491
119669
  }[];
119670
+ /**
119671
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
119672
+ */
118492
119673
  lockedUntil: (string | null);
119674
+ /**
119675
+ * When the user last signed in (ISO 8601). Null if they never have.
119676
+ */
118493
119677
  lastSignInAt: (string | null);
119678
+ /**
119679
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
119680
+ */
119681
+ primaryEmail: (string | null);
119682
+ /**
119683
+ * Whether the user must set a new password at their next sign-in.
119684
+ */
118494
119685
  requiresReset: boolean;
118495
- publicMetadata: UsersUsersBanOutputPublicMetadata;
118496
- unsafeMetadata: UsersUsersBanOutputPublicMetadata;
118497
- privateMetadata: UsersUsersBanOutputPublicMetadata;
119686
+ /**
119687
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
119688
+ */
119689
+ publicMetadata: {
119690
+ [k: string]: unknown;
119691
+ };
119692
+ /**
119693
+ * Metadata the end user may write themselves. Treat it as untrusted.
119694
+ */
119695
+ unsafeMetadata: {
119696
+ [k: string]: unknown;
119697
+ };
119698
+ /**
119699
+ * Metadata for the management plane only. Never reaches the end user or a token.
119700
+ */
119701
+ privateMetadata: {
119702
+ [k: string]: unknown;
119703
+ };
119704
+ /**
119705
+ * Id of the primary identifier row. Null when there is no primary identifier.
119706
+ */
119707
+ primaryIdentifierId: (string | null);
119708
+ /**
119709
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
119710
+ */
118498
119711
  emailChangeLockedUntil: (string | null);
118499
119712
  }
118500
- export interface UsersUsersBanOutputPublicMetadata {
118501
- [k: string]: unknown;
118502
- }
118503
119713
  export interface UsersUsersCreateInput {
118504
119714
  /**
118505
119715
  * The user's display name.
@@ -118603,37 +119813,126 @@ export interface UsersUsersCreateInputPublicMetadata1 {
118603
119813
  [k: string]: unknown;
118604
119814
  }
118605
119815
  export interface UsersUsersCreateOutput {
119816
+ /**
119817
+ * Id of this end user. Pass it to any users_users_* tool.
119818
+ */
118606
119819
  id: string;
119820
+ /**
119821
+ * The user's display name. Null when nobody set one.
119822
+ */
118607
119823
  name: (string | null);
119824
+ /**
119825
+ * When the user was banned (ISO 8601). Null while they are not banned.
119826
+ */
118608
119827
  bannedAt: (string | null);
119828
+ /**
119829
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
119830
+ */
118609
119831
  erasedAt: (string | null);
119832
+ /**
119833
+ * URL of the user's avatar. Null when there is none.
119834
+ */
118610
119835
  imageUrl: (string | null);
119836
+ /**
119837
+ * Whether this is a test fixture — excluded from metering and from the default listing.
119838
+ */
118611
119839
  testUser: boolean;
119840
+ /**
119841
+ * When the user was created (ISO 8601).
119842
+ */
118612
119843
  createdAt: string;
119844
+ /**
119845
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
119846
+ */
118613
119847
  deletedAt: (string | null);
119848
+ /**
119849
+ * Product this user belongs to. Never an input — it comes from the calling identity.
119850
+ */
118614
119851
  productId: string;
119852
+ /**
119853
+ * When the user was last changed (ISO 8601).
119854
+ */
118615
119855
  updatedAt: string;
119856
+ /**
119857
+ * Whether this user is still on the waitlist and cannot sign in yet.
119858
+ */
118616
119859
  waitlisted: boolean;
119860
+ /**
119861
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
119862
+ */
118617
119863
  identifiers: {
119864
+ /**
119865
+ * Id of this identifier row.
119866
+ */
118618
119867
  id: string;
119868
+ /**
119869
+ * What kind of identifier this is. Today always `email`.
119870
+ */
118619
119871
  type: "email";
119872
+ /**
119873
+ * The address as the user typed it, for display.
119874
+ */
118620
119875
  value: string;
119876
+ /**
119877
+ * Whether this is the identifier the user signs in with and is contacted at.
119878
+ */
118621
119879
  isPrimary: boolean;
119880
+ /**
119881
+ * When this address was verified (ISO 8601). Null while it never was.
119882
+ */
118622
119883
  verifiedAt: (string | null);
119884
+ /**
119885
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
119886
+ */
118623
119887
  valueCanonical: string;
119888
+ /**
119889
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
119890
+ */
118624
119891
  verificationStatus: ("unverified" | "verified" | "expired");
118625
119892
  }[];
119893
+ /**
119894
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
119895
+ */
118626
119896
  lockedUntil: (string | null);
119897
+ /**
119898
+ * When the user last signed in (ISO 8601). Null if they never have.
119899
+ */
118627
119900
  lastSignInAt: (string | null);
119901
+ /**
119902
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
119903
+ */
119904
+ primaryEmail: (string | null);
119905
+ /**
119906
+ * Whether the user must set a new password at their next sign-in.
119907
+ */
118628
119908
  requiresReset: boolean;
118629
- publicMetadata: UsersUsersCreateOutputPublicMetadata;
118630
- unsafeMetadata: UsersUsersCreateOutputPublicMetadata;
118631
- privateMetadata: UsersUsersCreateOutputPublicMetadata;
119909
+ /**
119910
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
119911
+ */
119912
+ publicMetadata: {
119913
+ [k: string]: unknown;
119914
+ };
119915
+ /**
119916
+ * Metadata the end user may write themselves. Treat it as untrusted.
119917
+ */
119918
+ unsafeMetadata: {
119919
+ [k: string]: unknown;
119920
+ };
119921
+ /**
119922
+ * Metadata for the management plane only. Never reaches the end user or a token.
119923
+ */
119924
+ privateMetadata: {
119925
+ [k: string]: unknown;
119926
+ };
119927
+ /**
119928
+ * Id of the primary identifier row. Null when there is no primary identifier.
119929
+ */
119930
+ primaryIdentifierId: (string | null);
119931
+ /**
119932
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
119933
+ */
118632
119934
  emailChangeLockedUntil: (string | null);
118633
119935
  }
118634
- export interface UsersUsersCreateOutputPublicMetadata {
118635
- [k: string]: unknown;
118636
- }
118637
119936
  export interface UsersUsersDeleteInput {
118638
119937
  /**
118639
119938
  * The opaque user id returned by users_users_create or _list.
@@ -118641,37 +119940,126 @@ export interface UsersUsersDeleteInput {
118641
119940
  userId: string;
118642
119941
  }
118643
119942
  export interface UsersUsersDeleteOutput {
119943
+ /**
119944
+ * Id of this end user. Pass it to any users_users_* tool.
119945
+ */
118644
119946
  id: string;
119947
+ /**
119948
+ * The user's display name. Null when nobody set one.
119949
+ */
118645
119950
  name: (string | null);
119951
+ /**
119952
+ * When the user was banned (ISO 8601). Null while they are not banned.
119953
+ */
118646
119954
  bannedAt: (string | null);
119955
+ /**
119956
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
119957
+ */
118647
119958
  erasedAt: (string | null);
119959
+ /**
119960
+ * URL of the user's avatar. Null when there is none.
119961
+ */
118648
119962
  imageUrl: (string | null);
119963
+ /**
119964
+ * Whether this is a test fixture — excluded from metering and from the default listing.
119965
+ */
118649
119966
  testUser: boolean;
119967
+ /**
119968
+ * When the user was created (ISO 8601).
119969
+ */
118650
119970
  createdAt: string;
119971
+ /**
119972
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
119973
+ */
118651
119974
  deletedAt: (string | null);
119975
+ /**
119976
+ * Product this user belongs to. Never an input — it comes from the calling identity.
119977
+ */
118652
119978
  productId: string;
119979
+ /**
119980
+ * When the user was last changed (ISO 8601).
119981
+ */
118653
119982
  updatedAt: string;
119983
+ /**
119984
+ * Whether this user is still on the waitlist and cannot sign in yet.
119985
+ */
118654
119986
  waitlisted: boolean;
119987
+ /**
119988
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
119989
+ */
118655
119990
  identifiers: {
119991
+ /**
119992
+ * Id of this identifier row.
119993
+ */
118656
119994
  id: string;
119995
+ /**
119996
+ * What kind of identifier this is. Today always `email`.
119997
+ */
118657
119998
  type: "email";
119999
+ /**
120000
+ * The address as the user typed it, for display.
120001
+ */
118658
120002
  value: string;
120003
+ /**
120004
+ * Whether this is the identifier the user signs in with and is contacted at.
120005
+ */
118659
120006
  isPrimary: boolean;
120007
+ /**
120008
+ * When this address was verified (ISO 8601). Null while it never was.
120009
+ */
118660
120010
  verifiedAt: (string | null);
120011
+ /**
120012
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
120013
+ */
118661
120014
  valueCanonical: string;
120015
+ /**
120016
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
120017
+ */
118662
120018
  verificationStatus: ("unverified" | "verified" | "expired");
118663
120019
  }[];
120020
+ /**
120021
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
120022
+ */
118664
120023
  lockedUntil: (string | null);
120024
+ /**
120025
+ * When the user last signed in (ISO 8601). Null if they never have.
120026
+ */
118665
120027
  lastSignInAt: (string | null);
120028
+ /**
120029
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
120030
+ */
120031
+ primaryEmail: (string | null);
120032
+ /**
120033
+ * Whether the user must set a new password at their next sign-in.
120034
+ */
118666
120035
  requiresReset: boolean;
118667
- publicMetadata: UsersUsersDeleteOutputPublicMetadata;
118668
- unsafeMetadata: UsersUsersDeleteOutputPublicMetadata;
118669
- privateMetadata: UsersUsersDeleteOutputPublicMetadata;
120036
+ /**
120037
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
120038
+ */
120039
+ publicMetadata: {
120040
+ [k: string]: unknown;
120041
+ };
120042
+ /**
120043
+ * Metadata the end user may write themselves. Treat it as untrusted.
120044
+ */
120045
+ unsafeMetadata: {
120046
+ [k: string]: unknown;
120047
+ };
120048
+ /**
120049
+ * Metadata for the management plane only. Never reaches the end user or a token.
120050
+ */
120051
+ privateMetadata: {
120052
+ [k: string]: unknown;
120053
+ };
120054
+ /**
120055
+ * Id of the primary identifier row. Null when there is no primary identifier.
120056
+ */
120057
+ primaryIdentifierId: (string | null);
120058
+ /**
120059
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
120060
+ */
118670
120061
  emailChangeLockedUntil: (string | null);
118671
120062
  }
118672
- export interface UsersUsersDeleteOutputPublicMetadata {
118673
- [k: string]: unknown;
118674
- }
118675
120063
  export interface UsersUsersExportInput {
118676
120064
  /**
118677
120065
  * Rows per page, 1-500. Default 100.
@@ -118697,40 +120085,129 @@ export interface UsersUsersExportInput {
118697
120085
  export interface UsersUsersExportOutput {
118698
120086
  count: number;
118699
120087
  users: {
120088
+ /**
120089
+ * Id of this end user. Pass it to any users_users_* tool.
120090
+ */
118700
120091
  id: string;
120092
+ /**
120093
+ * The user's display name. Null when nobody set one.
120094
+ */
118701
120095
  name: (string | null);
120096
+ /**
120097
+ * When the user was banned (ISO 8601). Null while they are not banned.
120098
+ */
118702
120099
  bannedAt: (string | null);
120100
+ /**
120101
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
120102
+ */
118703
120103
  erasedAt: (string | null);
120104
+ /**
120105
+ * URL of the user's avatar. Null when there is none.
120106
+ */
118704
120107
  imageUrl: (string | null);
120108
+ /**
120109
+ * Whether this is a test fixture — excluded from metering and from the default listing.
120110
+ */
118705
120111
  testUser: boolean;
120112
+ /**
120113
+ * When the user was created (ISO 8601).
120114
+ */
118706
120115
  createdAt: string;
120116
+ /**
120117
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
120118
+ */
118707
120119
  deletedAt: (string | null);
120120
+ /**
120121
+ * Product this user belongs to. Never an input — it comes from the calling identity.
120122
+ */
118708
120123
  productId: string;
120124
+ /**
120125
+ * When the user was last changed (ISO 8601).
120126
+ */
118709
120127
  updatedAt: string;
120128
+ /**
120129
+ * Whether this user is still on the waitlist and cannot sign in yet.
120130
+ */
118710
120131
  waitlisted: boolean;
120132
+ /**
120133
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
120134
+ */
118711
120135
  identifiers: {
120136
+ /**
120137
+ * Id of this identifier row.
120138
+ */
118712
120139
  id: string;
120140
+ /**
120141
+ * What kind of identifier this is. Today always `email`.
120142
+ */
118713
120143
  type: "email";
120144
+ /**
120145
+ * The address as the user typed it, for display.
120146
+ */
118714
120147
  value: string;
120148
+ /**
120149
+ * Whether this is the identifier the user signs in with and is contacted at.
120150
+ */
118715
120151
  isPrimary: boolean;
120152
+ /**
120153
+ * When this address was verified (ISO 8601). Null while it never was.
120154
+ */
118716
120155
  verifiedAt: (string | null);
120156
+ /**
120157
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
120158
+ */
118717
120159
  valueCanonical: string;
120160
+ /**
120161
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
120162
+ */
118718
120163
  verificationStatus: ("unverified" | "verified" | "expired");
118719
120164
  }[];
120165
+ /**
120166
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
120167
+ */
118720
120168
  lockedUntil: (string | null);
120169
+ /**
120170
+ * When the user last signed in (ISO 8601). Null if they never have.
120171
+ */
118721
120172
  lastSignInAt: (string | null);
120173
+ /**
120174
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
120175
+ */
120176
+ primaryEmail: (string | null);
120177
+ /**
120178
+ * Whether the user must set a new password at their next sign-in.
120179
+ */
118722
120180
  requiresReset: boolean;
118723
- publicMetadata: UsersUsersExportOutputPublicMetadata;
118724
- unsafeMetadata: UsersUsersExportOutputPublicMetadata;
118725
- privateMetadata: UsersUsersExportOutputPublicMetadata;
120181
+ /**
120182
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
120183
+ */
120184
+ publicMetadata: {
120185
+ [k: string]: unknown;
120186
+ };
120187
+ /**
120188
+ * Metadata the end user may write themselves. Treat it as untrusted.
120189
+ */
120190
+ unsafeMetadata: {
120191
+ [k: string]: unknown;
120192
+ };
120193
+ /**
120194
+ * Metadata for the management plane only. Never reaches the end user or a token.
120195
+ */
120196
+ privateMetadata: {
120197
+ [k: string]: unknown;
120198
+ };
120199
+ /**
120200
+ * Id of the primary identifier row. Null when there is no primary identifier.
120201
+ */
120202
+ primaryIdentifierId: (string | null);
120203
+ /**
120204
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
120205
+ */
118726
120206
  emailChangeLockedUntil: (string | null);
118727
120207
  }[];
118728
120208
  exportedAt: string;
118729
120209
  nextCursor: (string | null);
118730
120210
  }
118731
- export interface UsersUsersExportOutputPublicMetadata {
118732
- [k: string]: unknown;
118733
- }
118734
120211
  export interface UsersUsersGetInput {
118735
120212
  /**
118736
120213
  * The opaque user id returned by users_users_create or _list.
@@ -118738,37 +120215,126 @@ export interface UsersUsersGetInput {
118738
120215
  userId: string;
118739
120216
  }
118740
120217
  export interface UsersUsersGetOutput {
120218
+ /**
120219
+ * Id of this end user. Pass it to any users_users_* tool.
120220
+ */
118741
120221
  id: string;
120222
+ /**
120223
+ * The user's display name. Null when nobody set one.
120224
+ */
118742
120225
  name: (string | null);
120226
+ /**
120227
+ * When the user was banned (ISO 8601). Null while they are not banned.
120228
+ */
118743
120229
  bannedAt: (string | null);
120230
+ /**
120231
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
120232
+ */
118744
120233
  erasedAt: (string | null);
120234
+ /**
120235
+ * URL of the user's avatar. Null when there is none.
120236
+ */
118745
120237
  imageUrl: (string | null);
120238
+ /**
120239
+ * Whether this is a test fixture — excluded from metering and from the default listing.
120240
+ */
118746
120241
  testUser: boolean;
120242
+ /**
120243
+ * When the user was created (ISO 8601).
120244
+ */
118747
120245
  createdAt: string;
120246
+ /**
120247
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
120248
+ */
118748
120249
  deletedAt: (string | null);
120250
+ /**
120251
+ * Product this user belongs to. Never an input — it comes from the calling identity.
120252
+ */
118749
120253
  productId: string;
120254
+ /**
120255
+ * When the user was last changed (ISO 8601).
120256
+ */
118750
120257
  updatedAt: string;
120258
+ /**
120259
+ * Whether this user is still on the waitlist and cannot sign in yet.
120260
+ */
118751
120261
  waitlisted: boolean;
120262
+ /**
120263
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
120264
+ */
118752
120265
  identifiers: {
120266
+ /**
120267
+ * Id of this identifier row.
120268
+ */
118753
120269
  id: string;
120270
+ /**
120271
+ * What kind of identifier this is. Today always `email`.
120272
+ */
118754
120273
  type: "email";
120274
+ /**
120275
+ * The address as the user typed it, for display.
120276
+ */
118755
120277
  value: string;
120278
+ /**
120279
+ * Whether this is the identifier the user signs in with and is contacted at.
120280
+ */
118756
120281
  isPrimary: boolean;
120282
+ /**
120283
+ * When this address was verified (ISO 8601). Null while it never was.
120284
+ */
118757
120285
  verifiedAt: (string | null);
120286
+ /**
120287
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
120288
+ */
118758
120289
  valueCanonical: string;
120290
+ /**
120291
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
120292
+ */
118759
120293
  verificationStatus: ("unverified" | "verified" | "expired");
118760
120294
  }[];
120295
+ /**
120296
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
120297
+ */
118761
120298
  lockedUntil: (string | null);
120299
+ /**
120300
+ * When the user last signed in (ISO 8601). Null if they never have.
120301
+ */
118762
120302
  lastSignInAt: (string | null);
120303
+ /**
120304
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
120305
+ */
120306
+ primaryEmail: (string | null);
120307
+ /**
120308
+ * Whether the user must set a new password at their next sign-in.
120309
+ */
118763
120310
  requiresReset: boolean;
118764
- publicMetadata: UsersUsersGetOutputPublicMetadata;
118765
- unsafeMetadata: UsersUsersGetOutputPublicMetadata;
118766
- privateMetadata: UsersUsersGetOutputPublicMetadata;
120311
+ /**
120312
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
120313
+ */
120314
+ publicMetadata: {
120315
+ [k: string]: unknown;
120316
+ };
120317
+ /**
120318
+ * Metadata the end user may write themselves. Treat it as untrusted.
120319
+ */
120320
+ unsafeMetadata: {
120321
+ [k: string]: unknown;
120322
+ };
120323
+ /**
120324
+ * Metadata for the management plane only. Never reaches the end user or a token.
120325
+ */
120326
+ privateMetadata: {
120327
+ [k: string]: unknown;
120328
+ };
120329
+ /**
120330
+ * Id of the primary identifier row. Null when there is no primary identifier.
120331
+ */
120332
+ primaryIdentifierId: (string | null);
120333
+ /**
120334
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
120335
+ */
118767
120336
  emailChangeLockedUntil: (string | null);
118768
120337
  }
118769
- export interface UsersUsersGetOutputPublicMetadata {
118770
- [k: string]: unknown;
118771
- }
118772
120338
  export interface UsersUsersImportInput {
118773
120339
  /**
118774
120340
  * The users to import, at most 500 per call — batch client-side beyond that. Each row: identifiers (email), optional profile, optional password HASH, optional flags.
@@ -118779,15 +120345,42 @@ export interface UsersUsersImportInput {
118779
120345
  users: [unknown, ...(unknown)[]];
118780
120346
  }
118781
120347
  export interface UsersUsersImportOutput {
120348
+ /**
120349
+ * How many rows could not be imported at all.
120350
+ */
118782
120351
  failed: number;
120352
+ /**
120353
+ * How many users were created.
120354
+ */
118783
120355
  created: number;
120356
+ /**
120357
+ * One row per submitted row, in the order you sent them.
120358
+ */
118784
120359
  results: {
120360
+ /**
120361
+ * Zero-based index of the row in the `users` array you sent.
120362
+ */
118785
120363
  row: number;
120364
+ /**
120365
+ * Why it was skipped, or what went wrong. Null for a created row.
120366
+ */
118786
120367
  reason: (string | null);
120368
+ /**
120369
+ * What happened to this row.
120370
+ */
118787
120371
  status: ("created" | "skipped" | "failed");
120372
+ /**
120373
+ * The created user's id. Null for skipped and failed rows.
120374
+ */
118788
120375
  userId: (string | null);
118789
120376
  }[];
120377
+ /**
120378
+ * How many rows were passed over — an address already in the directory, typically.
120379
+ */
118790
120380
  skipped: number;
120381
+ /**
120382
+ * How many rows you submitted.
120383
+ */
118791
120384
  requested: number;
118792
120385
  }
118793
120386
  export interface UsersUsersInviteInput {
@@ -118813,9 +120406,21 @@ export interface UsersUsersInviteInput {
118813
120406
  };
118814
120407
  }
118815
120408
  export interface UsersUsersInviteOutput {
120409
+ /**
120410
+ * False when the re-invite cooldown or the mail toolkit refused the send. The invite is still live.
120411
+ */
118816
120412
  mailed: boolean;
120413
+ /**
120414
+ * The invited user, created immediately and listed straight away — they simply cannot sign in until they accept.
120415
+ */
118817
120416
  userId: string;
120417
+ /**
120418
+ * False when this address had already been invited; the same user is returned.
120419
+ */
118818
120420
  created: boolean;
120421
+ /**
120422
+ * When the invite link stops working (ISO 8601).
120423
+ */
118819
120424
  expiresAt: string;
118820
120425
  }
118821
120426
  export interface UsersUsersListInput {
@@ -118849,40 +120454,135 @@ export interface UsersUsersListInput {
118849
120454
  includeWaitlisted?: boolean;
118850
120455
  }
118851
120456
  export interface UsersUsersListOutput {
120457
+ /**
120458
+ * The page of users, newest first.
120459
+ */
118852
120460
  users: {
120461
+ /**
120462
+ * Id of this end user. Pass it to any users_users_* tool.
120463
+ */
118853
120464
  id: string;
120465
+ /**
120466
+ * The user's display name. Null when nobody set one.
120467
+ */
118854
120468
  name: (string | null);
120469
+ /**
120470
+ * When the user was banned (ISO 8601). Null while they are not banned.
120471
+ */
118855
120472
  bannedAt: (string | null);
120473
+ /**
120474
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
120475
+ */
118856
120476
  erasedAt: (string | null);
120477
+ /**
120478
+ * URL of the user's avatar. Null when there is none.
120479
+ */
118857
120480
  imageUrl: (string | null);
120481
+ /**
120482
+ * Whether this is a test fixture — excluded from metering and from the default listing.
120483
+ */
118858
120484
  testUser: boolean;
120485
+ /**
120486
+ * When the user was created (ISO 8601).
120487
+ */
118859
120488
  createdAt: string;
120489
+ /**
120490
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
120491
+ */
118860
120492
  deletedAt: (string | null);
120493
+ /**
120494
+ * Product this user belongs to. Never an input — it comes from the calling identity.
120495
+ */
118861
120496
  productId: string;
120497
+ /**
120498
+ * When the user was last changed (ISO 8601).
120499
+ */
118862
120500
  updatedAt: string;
120501
+ /**
120502
+ * Whether this user is still on the waitlist and cannot sign in yet.
120503
+ */
118863
120504
  waitlisted: boolean;
120505
+ /**
120506
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
120507
+ */
118864
120508
  identifiers: {
120509
+ /**
120510
+ * Id of this identifier row.
120511
+ */
118865
120512
  id: string;
120513
+ /**
120514
+ * What kind of identifier this is. Today always `email`.
120515
+ */
118866
120516
  type: "email";
120517
+ /**
120518
+ * The address as the user typed it, for display.
120519
+ */
118867
120520
  value: string;
120521
+ /**
120522
+ * Whether this is the identifier the user signs in with and is contacted at.
120523
+ */
118868
120524
  isPrimary: boolean;
120525
+ /**
120526
+ * When this address was verified (ISO 8601). Null while it never was.
120527
+ */
118869
120528
  verifiedAt: (string | null);
120529
+ /**
120530
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
120531
+ */
118870
120532
  valueCanonical: string;
120533
+ /**
120534
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
120535
+ */
118871
120536
  verificationStatus: ("unverified" | "verified" | "expired");
118872
120537
  }[];
120538
+ /**
120539
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
120540
+ */
118873
120541
  lockedUntil: (string | null);
120542
+ /**
120543
+ * When the user last signed in (ISO 8601). Null if they never have.
120544
+ */
118874
120545
  lastSignInAt: (string | null);
120546
+ /**
120547
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
120548
+ */
120549
+ primaryEmail: (string | null);
120550
+ /**
120551
+ * Whether the user must set a new password at their next sign-in.
120552
+ */
118875
120553
  requiresReset: boolean;
118876
- publicMetadata: UsersUsersListOutputPublicMetadata;
118877
- unsafeMetadata: UsersUsersListOutputPublicMetadata;
118878
- privateMetadata: UsersUsersListOutputPublicMetadata;
120554
+ /**
120555
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
120556
+ */
120557
+ publicMetadata: {
120558
+ [k: string]: unknown;
120559
+ };
120560
+ /**
120561
+ * Metadata the end user may write themselves. Treat it as untrusted.
120562
+ */
120563
+ unsafeMetadata: {
120564
+ [k: string]: unknown;
120565
+ };
120566
+ /**
120567
+ * Metadata for the management plane only. Never reaches the end user or a token.
120568
+ */
120569
+ privateMetadata: {
120570
+ [k: string]: unknown;
120571
+ };
120572
+ /**
120573
+ * Id of the primary identifier row. Null when there is no primary identifier.
120574
+ */
120575
+ primaryIdentifierId: (string | null);
120576
+ /**
120577
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
120578
+ */
118879
120579
  emailChangeLockedUntil: (string | null);
118880
120580
  }[];
120581
+ /**
120582
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
120583
+ */
118881
120584
  nextCursor: (string | null);
118882
120585
  }
118883
- export interface UsersUsersListOutputPublicMetadata {
118884
- [k: string]: unknown;
118885
- }
118886
120586
  export interface UsersUsersSetPrimaryIdentifierInput {
118887
120587
  /**
118888
120588
  * The address to make primary. Must not already belong, verified, to another user of this product.
@@ -118898,7 +120598,13 @@ export interface UsersUsersSetPrimaryIdentifierInput {
118898
120598
  userId: string;
118899
120599
  }
118900
120600
  export interface UsersUsersSetPrimaryIdentifierOutput {
120601
+ /**
120602
+ * Id of the scheduled change. It appears in the audit rows and in the abort link mailed to the old address.
120603
+ */
118901
120604
  requestId: string;
120605
+ /**
120606
+ * When the swap becomes applicable, if nobody aborts it first (ISO 8601). The delay is this product's `emailChange.overrideDelayHours`, 72 by default.
120607
+ */
118902
120608
  scheduledFor: string;
118903
120609
  }
118904
120610
  export interface UsersUsersUnbanInput {
@@ -118908,37 +120614,126 @@ export interface UsersUsersUnbanInput {
118908
120614
  userId: string;
118909
120615
  }
118910
120616
  export interface UsersUsersUnbanOutput {
120617
+ /**
120618
+ * Id of this end user. Pass it to any users_users_* tool.
120619
+ */
118911
120620
  id: string;
120621
+ /**
120622
+ * The user's display name. Null when nobody set one.
120623
+ */
118912
120624
  name: (string | null);
120625
+ /**
120626
+ * When the user was banned (ISO 8601). Null while they are not banned.
120627
+ */
118913
120628
  bannedAt: (string | null);
120629
+ /**
120630
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
120631
+ */
118914
120632
  erasedAt: (string | null);
120633
+ /**
120634
+ * URL of the user's avatar. Null when there is none.
120635
+ */
118915
120636
  imageUrl: (string | null);
120637
+ /**
120638
+ * Whether this is a test fixture — excluded from metering and from the default listing.
120639
+ */
118916
120640
  testUser: boolean;
120641
+ /**
120642
+ * When the user was created (ISO 8601).
120643
+ */
118917
120644
  createdAt: string;
120645
+ /**
120646
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
120647
+ */
118918
120648
  deletedAt: (string | null);
120649
+ /**
120650
+ * Product this user belongs to. Never an input — it comes from the calling identity.
120651
+ */
118919
120652
  productId: string;
120653
+ /**
120654
+ * When the user was last changed (ISO 8601).
120655
+ */
118920
120656
  updatedAt: string;
120657
+ /**
120658
+ * Whether this user is still on the waitlist and cannot sign in yet.
120659
+ */
118921
120660
  waitlisted: boolean;
120661
+ /**
120662
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
120663
+ */
118922
120664
  identifiers: {
120665
+ /**
120666
+ * Id of this identifier row.
120667
+ */
118923
120668
  id: string;
120669
+ /**
120670
+ * What kind of identifier this is. Today always `email`.
120671
+ */
118924
120672
  type: "email";
120673
+ /**
120674
+ * The address as the user typed it, for display.
120675
+ */
118925
120676
  value: string;
120677
+ /**
120678
+ * Whether this is the identifier the user signs in with and is contacted at.
120679
+ */
118926
120680
  isPrimary: boolean;
120681
+ /**
120682
+ * When this address was verified (ISO 8601). Null while it never was.
120683
+ */
118927
120684
  verifiedAt: (string | null);
120685
+ /**
120686
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
120687
+ */
118928
120688
  valueCanonical: string;
120689
+ /**
120690
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
120691
+ */
118929
120692
  verificationStatus: ("unverified" | "verified" | "expired");
118930
120693
  }[];
120694
+ /**
120695
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
120696
+ */
118931
120697
  lockedUntil: (string | null);
120698
+ /**
120699
+ * When the user last signed in (ISO 8601). Null if they never have.
120700
+ */
118932
120701
  lastSignInAt: (string | null);
120702
+ /**
120703
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
120704
+ */
120705
+ primaryEmail: (string | null);
120706
+ /**
120707
+ * Whether the user must set a new password at their next sign-in.
120708
+ */
118933
120709
  requiresReset: boolean;
118934
- publicMetadata: UsersUsersUnbanOutputPublicMetadata;
118935
- unsafeMetadata: UsersUsersUnbanOutputPublicMetadata;
118936
- privateMetadata: UsersUsersUnbanOutputPublicMetadata;
120710
+ /**
120711
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
120712
+ */
120713
+ publicMetadata: {
120714
+ [k: string]: unknown;
120715
+ };
120716
+ /**
120717
+ * Metadata the end user may write themselves. Treat it as untrusted.
120718
+ */
120719
+ unsafeMetadata: {
120720
+ [k: string]: unknown;
120721
+ };
120722
+ /**
120723
+ * Metadata for the management plane only. Never reaches the end user or a token.
120724
+ */
120725
+ privateMetadata: {
120726
+ [k: string]: unknown;
120727
+ };
120728
+ /**
120729
+ * Id of the primary identifier row. Null when there is no primary identifier.
120730
+ */
120731
+ primaryIdentifierId: (string | null);
120732
+ /**
120733
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
120734
+ */
118937
120735
  emailChangeLockedUntil: (string | null);
118938
120736
  }
118939
- export interface UsersUsersUnbanOutputPublicMetadata {
118940
- [k: string]: unknown;
118941
- }
118942
120737
  export interface UsersUsersUpdateInput {
118943
120738
  /**
118944
120739
  * The user's display name. Pass null to clear.
@@ -118986,37 +120781,126 @@ export interface UsersUsersUpdateInputPublicMetadata1 {
118986
120781
  [k: string]: unknown;
118987
120782
  }
118988
120783
  export interface UsersUsersUpdateOutput {
120784
+ /**
120785
+ * Id of this end user. Pass it to any users_users_* tool.
120786
+ */
118989
120787
  id: string;
120788
+ /**
120789
+ * The user's display name. Null when nobody set one.
120790
+ */
118990
120791
  name: (string | null);
120792
+ /**
120793
+ * When the user was banned (ISO 8601). Null while they are not banned.
120794
+ */
118991
120795
  bannedAt: (string | null);
120796
+ /**
120797
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
120798
+ */
118992
120799
  erasedAt: (string | null);
120800
+ /**
120801
+ * URL of the user's avatar. Null when there is none.
120802
+ */
118993
120803
  imageUrl: (string | null);
120804
+ /**
120805
+ * Whether this is a test fixture — excluded from metering and from the default listing.
120806
+ */
118994
120807
  testUser: boolean;
120808
+ /**
120809
+ * When the user was created (ISO 8601).
120810
+ */
118995
120811
  createdAt: string;
120812
+ /**
120813
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
120814
+ */
118996
120815
  deletedAt: (string | null);
120816
+ /**
120817
+ * Product this user belongs to. Never an input — it comes from the calling identity.
120818
+ */
118997
120819
  productId: string;
120820
+ /**
120821
+ * When the user was last changed (ISO 8601).
120822
+ */
118998
120823
  updatedAt: string;
120824
+ /**
120825
+ * Whether this user is still on the waitlist and cannot sign in yet.
120826
+ */
118999
120827
  waitlisted: boolean;
120828
+ /**
120829
+ * Every identifier of this user, the primary one flagged. To bind the primary address itself, use `primaryEmail` — `identifiers.0` means "the first", not "the primary".
120830
+ */
119000
120831
  identifiers: {
120832
+ /**
120833
+ * Id of this identifier row.
120834
+ */
119001
120835
  id: string;
120836
+ /**
120837
+ * What kind of identifier this is. Today always `email`.
120838
+ */
119002
120839
  type: "email";
120840
+ /**
120841
+ * The address as the user typed it, for display.
120842
+ */
119003
120843
  value: string;
120844
+ /**
120845
+ * Whether this is the identifier the user signs in with and is contacted at.
120846
+ */
119004
120847
  isPrimary: boolean;
120848
+ /**
120849
+ * When this address was verified (ISO 8601). Null while it never was.
120850
+ */
119005
120851
  verifiedAt: (string | null);
120852
+ /**
120853
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
120854
+ */
119006
120855
  valueCanonical: string;
120856
+ /**
120857
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
120858
+ */
119007
120859
  verificationStatus: ("unverified" | "verified" | "expired");
119008
120860
  }[];
120861
+ /**
120862
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
120863
+ */
119009
120864
  lockedUntil: (string | null);
120865
+ /**
120866
+ * When the user last signed in (ISO 8601). Null if they never have.
120867
+ */
119010
120868
  lastSignInAt: (string | null);
120869
+ /**
120870
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
120871
+ */
120872
+ primaryEmail: (string | null);
120873
+ /**
120874
+ * Whether the user must set a new password at their next sign-in.
120875
+ */
119011
120876
  requiresReset: boolean;
119012
- publicMetadata: UsersUsersUpdateOutputPublicMetadata;
119013
- unsafeMetadata: UsersUsersUpdateOutputPublicMetadata;
119014
- privateMetadata: UsersUsersUpdateOutputPublicMetadata;
120877
+ /**
120878
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
120879
+ */
120880
+ publicMetadata: {
120881
+ [k: string]: unknown;
120882
+ };
120883
+ /**
120884
+ * Metadata the end user may write themselves. Treat it as untrusted.
120885
+ */
120886
+ unsafeMetadata: {
120887
+ [k: string]: unknown;
120888
+ };
120889
+ /**
120890
+ * Metadata for the management plane only. Never reaches the end user or a token.
120891
+ */
120892
+ privateMetadata: {
120893
+ [k: string]: unknown;
120894
+ };
120895
+ /**
120896
+ * Id of the primary identifier row. Null when there is no primary identifier.
120897
+ */
120898
+ primaryIdentifierId: (string | null);
120899
+ /**
120900
+ * Until this instant the user may not start another email change, because somebody reverted one (ISO 8601). Null for a user who never reverted one.
120901
+ */
119015
120902
  emailChangeLockedUntil: (string | null);
119016
120903
  }
119017
- export interface UsersUsersUpdateOutputPublicMetadata {
119018
- [k: string]: unknown;
119019
- }
119020
120904
  export interface UsersWaitlistFunnelInput {
119021
120905
  }
119022
120906
  export interface UsersWaitlistFunnelOutput {
@@ -119027,6 +120911,62 @@ export interface UsersWaitlistFunnelOutput {
119027
120911
  registered: number;
119028
120912
  unconfirmed: number;
119029
120913
  }
120914
+ export interface UsersWaitlistGetInput {
120915
+ /**
120916
+ * The waitlisted user to read — the `userId` from `users_waitlist_list`.
120917
+ */
120918
+ userId: string;
120919
+ }
120920
+ export interface UsersWaitlistGetOutput {
120921
+ /**
120922
+ * Where in the funnel this entry is: `pending`, `invited`, `registered` or `withdrawn`.
120923
+ */
120924
+ status: ("pending" | "invited" | "registered" | "withdrawn");
120925
+ /**
120926
+ * The waitlisted user. Every users_users_* tool takes this id.
120927
+ */
120928
+ userId: string;
120929
+ /**
120930
+ * When the entry joined the waitlist (ISO 8601).
120931
+ */
120932
+ createdAt: string;
120933
+ /**
120934
+ * When the invite was sent (ISO 8601). Null while the entry is pending.
120935
+ */
120936
+ invitedAt: (string | null);
120937
+ /**
120938
+ * The email address that signed up.
120939
+ */
120940
+ identifier: string;
120941
+ /**
120942
+ * Where the signup came from — the campaign, referrer and landing page recorded at the time.
120943
+ */
120944
+ attribution: {
120945
+ [k: string]: unknown;
120946
+ };
120947
+ /**
120948
+ * When the address confirmed a double opt-in (ISO 8601). Null when it never did.
120949
+ */
120950
+ confirmedAt: (string | null);
120951
+ /**
120952
+ * When the address asked to be taken off the list (ISO 8601). Null when it did not.
120953
+ */
120954
+ withdrawnAt: (string | null);
120955
+ /**
120956
+ * What was recorded to show this address consented: when, from where, and under which wording.
120957
+ */
120958
+ consentProof: {
120959
+ [k: string]: unknown;
120960
+ };
120961
+ /**
120962
+ * When the invitee finished signing up (ISO 8601). Null until they do.
120963
+ */
120964
+ registeredAt: (string | null);
120965
+ /**
120966
+ * Id of the live invite token. Null while the entry has not been invited.
120967
+ */
120968
+ inviteTokenId: (string | null);
120969
+ }
119030
120970
  export interface UsersWaitlistImportInput {
119031
120971
  /**
119032
120972
  * The legacy signups to import, at most 500 per call — batch client-side beyond that.
@@ -119194,15 +121134,42 @@ export interface UsersWaitlistImportInput {
119194
121134
  ];
119195
121135
  }
119196
121136
  export interface UsersWaitlistImportOutput {
121137
+ /**
121138
+ * How many could not be imported at all.
121139
+ */
119197
121140
  failed: number;
121141
+ /**
121142
+ * One row per submitted row, in the order you sent them.
121143
+ */
119198
121144
  results: {
121145
+ /**
121146
+ * Zero-based index of the row in the array you sent.
121147
+ */
119199
121148
  row: number;
121149
+ /**
121150
+ * Why it was skipped, or what went wrong. Null for an imported row.
121151
+ */
119200
121152
  reason: (string | null);
121153
+ /**
121154
+ * What happened to this row.
121155
+ */
119201
121156
  status: ("imported" | "skipped" | "failed");
121157
+ /**
121158
+ * The waitlisted user this row created. Null for skipped and failed rows.
121159
+ */
119202
121160
  userId: (string | null);
119203
121161
  }[];
121162
+ /**
121163
+ * How many were already on the list or otherwise passed over.
121164
+ */
119204
121165
  skipped: number;
121166
+ /**
121167
+ * How many became waitlist entries.
121168
+ */
119205
121169
  imported: number;
121170
+ /**
121171
+ * How many rows you submitted.
121172
+ */
119206
121173
  requested: number;
119207
121174
  }
119208
121175
  export interface UsersWaitlistInviteInput {
@@ -119215,12 +121182,30 @@ export interface UsersWaitlistInviteInput {
119215
121182
  userIds: [string, ...(string)[]];
119216
121183
  }
119217
121184
  export interface UsersWaitlistInviteOutput {
121185
+ /**
121186
+ * How many of the requested users were invited.
121187
+ */
119218
121188
  invited: number;
121189
+ /**
121190
+ * One row per user you asked for, in the order you sent them.
121191
+ */
119219
121192
  results: {
121193
+ /**
121194
+ * Why this user was skipped. Null for an invited row.
121195
+ */
119220
121196
  reason: (("suppressed" | "not_found" | "already_registered") | null);
121197
+ /**
121198
+ * Whether this user was invited or passed over.
121199
+ */
119221
121200
  status: ("invited" | "skipped");
121201
+ /**
121202
+ * The user this row is about.
121203
+ */
119222
121204
  userId: string;
119223
121205
  }[];
121206
+ /**
121207
+ * How many were passed over — see each row's `reason`.
121208
+ */
119224
121209
  skipped: number;
119225
121210
  }
119226
121211
  export interface UsersWaitlistListInput {
@@ -119242,23 +121227,62 @@ export interface UsersWaitlistListInput {
119242
121227
  confirmed?: boolean;
119243
121228
  }
119244
121229
  export interface UsersWaitlistListOutput {
121230
+ /**
121231
+ * The page of waitlist entries, newest first.
121232
+ */
119245
121233
  entries: {
121234
+ /**
121235
+ * Where in the funnel this entry is: `pending`, `invited`, `registered` or `withdrawn`.
121236
+ */
119246
121237
  status: ("pending" | "invited" | "registered" | "withdrawn");
121238
+ /**
121239
+ * The waitlisted user. Every users_users_* tool takes this id.
121240
+ */
119247
121241
  userId: string;
121242
+ /**
121243
+ * When the entry joined the waitlist (ISO 8601).
121244
+ */
119248
121245
  createdAt: string;
121246
+ /**
121247
+ * When the invite was sent (ISO 8601). Null while the entry is pending.
121248
+ */
119249
121249
  invitedAt: (string | null);
121250
+ /**
121251
+ * The email address that signed up.
121252
+ */
119250
121253
  identifier: string;
121254
+ /**
121255
+ * Where the signup came from — the campaign, referrer and landing page recorded at the time.
121256
+ */
119251
121257
  attribution: {
119252
121258
  [k: string]: unknown;
119253
121259
  };
121260
+ /**
121261
+ * When the address confirmed a double opt-in (ISO 8601). Null when it never did.
121262
+ */
119254
121263
  confirmedAt: (string | null);
121264
+ /**
121265
+ * When the address asked to be taken off the list (ISO 8601). Null when it did not.
121266
+ */
119255
121267
  withdrawnAt: (string | null);
121268
+ /**
121269
+ * What was recorded to show this address consented: when, from where, and under which wording.
121270
+ */
119256
121271
  consentProof: {
119257
121272
  [k: string]: unknown;
119258
121273
  };
121274
+ /**
121275
+ * When the invitee finished signing up (ISO 8601). Null until they do.
121276
+ */
119259
121277
  registeredAt: (string | null);
121278
+ /**
121279
+ * Id of the live invite token. Null while the entry has not been invited.
121280
+ */
119260
121281
  inviteTokenId: (string | null);
119261
121282
  }[];
121283
+ /**
121284
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
121285
+ */
119262
121286
  nextCursor: (string | null);
119263
121287
  }
119264
121288
  export interface UsersWebhooksCreateInput {